pugs.blogs.com | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | <stevan> Moose... it's the new Camel ":P | .pmc == PPI source filters!
Set by Alias_ on 16 March 2006.
TimToady Actually, it's just Weird Al... 00:10
00:27 Khisanth joined
cognominal @a = < a b >; @b = << foo@a >>; # what do I get here? is this equivalent to: @b = < fooa foob > ? 00:29
?eval @a = < a b >; @b = << foo@a >>; 00:30
evalbot_10184 Error: Undeclared variable: "@a"
cognominal ?eval my @a = < a b >; my @b = << foo@a >>; 00:31
evalbot_10184 ["foo\@a",]
particle_ :)
cognominal ?eval my $a = 'a'; my @b = << foo$a >>;
evalbot_10184 ["fooa",]
00:35 OutThere joined, OutThere is now known as SubStack
TimToady ?eval my @a = < a b >; my @b = << foo@a[] >>; 00:40
evalbot_10184 ["fooa", "b"]
TimToady that looks about right to me.
cognominal so that's a simple string interpolation 00:41
TimToady no implicit hyperops there...
cognominal :)
particle_ will perl6 users want and expect -0.0, or can 0.0 be the sole floating point zero value? 00:42
TimToady looks like a hardware dependency to me... 00:43
what does IEEE say?
particle_ well, IEEE754 specifies both
TimToady AND or OR?
particle_ AND, iirc 00:44
i expect parrot will differ from 754 a bit, as does java
TimToady One should attempt convergence where performance is not terribly impacted... 00:45
particle_ for example, user selectable rounding modes when converting from float to int
TimToady user-selectable in which scope? 00:46
such a thing should generally be lexically scoped in Perl 6 if possible.
particle_ good question. i'll have to look closely at the spec
TimToady "magical rounding at a distance..." :/ 00:47
particle_ rounding modes include up, down, or towards zero
TimToady and a bazillion other options...
particle_ well, the ieee rounding modes
right now, parrot numbers are stringified in a hardware-specific manner 00:50
that's a problem.
we need to decide on what the representations are 00:51
and if, how & where we're diverging from ieee
-0.0 being the only real number i'm opposed to 00:52
however, it's used in a limited capacity, for instance meteorologists round small negative temperatures to -0.0
TimToady Is that how IEEE distinguishes negative underflow from positive? 00:53
particle_ it's a side-effect of the representation, that the value happens to exist
since there's a signbit
if perl doesn't care, then i'll bother somebody whose language does care :) 00:55
01:06 justatheory joined
svnbot6 r10206 | audreyt++ | * Makefile.PL: Support for arbitrary GHC probed from outside PATH in building third-party dependencies. 01:24
szbalint morning? :) 01:26
TimToady audreyt: I think t/builtins/lists/empty_list_in_map.t is failing because { () } looks like a 0-ary closure to the map rather than 1-ary. Changing to -> $_ { () } makes it work. 01:27
well, all, but the { undef } one...
decommuting & 01:32
01:35 rawr joined 01:37 rawr is now known as SubStack
FurnaceBoy <particle_>i expect parrot will differ from 754 a bit, as does java 01:37
that's an understatement :-) www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf (Kahan) How Java's Floating-Point Hurts Everyone Everywhere
more IEEE754 links @ www.sonic.net/~jddarcy/Borneo/ 01:38
particle_ thx 01:45
01:56 jserv-- joined 01:57 mako132_ joined
FurnaceBoy yw 02:05
02:09 kanru joined 02:11 reZo joined 02:31 schneiker joined 02:37 schneiker left, schneiker joined
FurnaceBoy ola schneiker 02:38
any response?
02:40 EdLin joined
schneiker FurnaceBoy: Greetings. Didn't see anything yet. 02:41
William Kahan is pretty amazing--brilliant pit bull. I met him at IEEE754 meetings. 02:46
(I was one of people representing Nat. Semi's at the time.)
02:48 EdLin left 02:58 aufrank joined 03:00 weinig is now known as weinig|sleep
lisppaste3 aufrank pasted "build error on osx 10.3.9 with ghc 6.4.1" at paste.lisp.org/display/19602 03:02
aufrank it builds fine once I do the ranlib on both of the haskell libraries 03:05
FurnaceBoy yeah, I spent some time on his site a while back. most impressive.
schneiker s/Nat. Semi's/Natl. Semi./ 03:08
FurnaceBoy: Just discovered email reply from earlier perl.org inquiry.
(The perl.* groups are gated via a mail2news gateway from the perl.org
mailing lists. They're carried by many, but not all, USENET news
servers, including google groups. They are carried by my DSL
provider, AT&T.)
My news server doesn't carry perl.perl6.*, which is why G.Group
restriction was a suprise to me.
obra schneiker: you're really talking about a perl6-something mailinglist 03:12
perl.org admins have your request in hand.
the last time we talked about it, there was a little bit of a concern that a "perl6 newbies" list was premature. 03:13
schneiker obra: Didn't realize inquiry was a request, so that's good news. 03:20
What level newbies? Folks interested in p5 to p6 or total perl newbies?
Any especially noteworthy concens?
03:22 kanru joined, FurnaceBoy_ joined
obra *laugh* 03:23
it certainly got escalated to a request ;)
So, I guess the basic concern was that "total newbies" might get suckered into diving into p6 before it was really ready 03:24
But I think more input is useful.
schneiker Maybe: 03:28
perl.perl6.pre-alpha.general?
perl.perl6.early-proto.general?
(or .misc)
lisppaste3 aufrank pasted "make install error on osx 10.3.9 with ghc 6.4.1" at paste.lisp.org/display/19603 03:29
aufrank the install still seems to run fine, despite the error above 03:30
obra schneiker: it might be worth reusing an existing list 03:42
03:45 fglock joined 03:49 drbean_ joined
schneiker obra, Good idea. Specific suggestions? 03:51
"perl.perl6.meta" seems closest approximation to a *6.general or *6.misc.
That would be fine with me.
I'm looking at list on (www.nntp.perl.org/group/).
03:51 Quell joined
obra looking 03:52
basically, do the audrey thing and just start taking over something existing
. o O {www.nntp.perl.org/group/perl.perl6....uage.flow} 03:53
meta is good
schneiker OK. What does it take to get into Google Groups (like other 4 perl.perl6.* groups)? 03:57
svnbot6 r10207 | Darren_Duncan++ | ext/Locale-KeyedText/ : added export_as_hash() methods to KeyedText.pm ; changed module version to 1.73.0 from 1.72.2, corres to p5v CPAN release
obra I bet "start to post to it" 04:07
schneiker OK, will try. (But I didn't see any GG archives for other *perl6* groups besides current 4.) 04:10
obra robrt works for perl6 now.
er
for google
I bet we can get it fixed fast once we're using it 04:11
schneiker OK, thanks.
04:23 cognominal joined
svnbot6 r10208 | audreyt++ | * unTODO now-passing pairs.t tests 04:27
r10209 | audreyt++ | * unTODO: Hash attributes no longer crahes the parser
04:31 cognominal joined 04:32 kanru joined 04:39 cognominal joined 04:48 qu1j0t3 joined, Ymmv joined 04:49 cognominal joined 04:53 cognominal joined
aufrank audreyt: ping? 04:58
?eval for 1..3 -> $x { say $x } 04:59
evalbot_10184 OUTPUT[1 2 3 ] undef
aufrank ?eval my $x = 'a'; $x ~~ / a b c /; 05:02
evalbot_10184 *** Cannot parse PGE: a b c *** Error: Cannot find the parrot executable in PATH Match.new( ok => bool::false, from => 0, to => 0, str => "", sub_pos => (), sub_named => {} )
aufrank ?eval my $x = 'a'; $x ~~ m/ a b c /; 05:03
evalbot_10184 *** Cannot parse PGE: a b c *** Error: Cannot find the parrot executable in PATH Match.new( ok => bool::false, from => 0, to => 0, str => "", sub_pos => (), sub_named => {} )
05:27 Quell joined 05:33 fglock left 05:52 aufrank joined
aufrank ?eval %hash<foo> = 1; %hash<food> = 1; %hash<foosball> = 1; $x = 'fo'; $x ~~ / %hash /; 06:04
evalbot_10184 Error: Undeclared variable: "%hash"
aufrank ?eval my %hash = { 'foo' => 1, 'food' => 1, 'foosball' => 1 }; my $x = 'fo'; $x ~~ / %hash /; 06:05
evalbot_10184 *** Cannot parse PGE: %hash *** Error: Cannot find the parrot executable in PATH Match.new( ok => bool::false, from => 0, to => 0, str => "", sub_pos => (), sub_named => {} ) 06:06
06:13 FurnaceBoy joined 06:25 kanru joined 06:31 drrho joined
gaal one of the js backends seems to've broke: 06:41
lib6/Prelude/JS/Operators.pm
gives an error at the end of 'make' 06:42
06:43 trampel joined
svnbot6 r10210 | audreyt++ | * Block-comma-list fix for PIL2JS reported by gaal++ 06:46
06:47 KingDiamond joined 06:55 iblechbot joined 07:07 H5N1 left
schneiker obra: Did 2 posts to perl.perl6.meta, but nothing came back yet. 07:09
Did 2 posts with 2 different newsreaders to nntp.perl.org.
Sent email to Ask BjĆørn Hansen (shown as nntp site owner) about it.
(line 2) s/Did 2/Did above 2/ 07:13
&
07:14 schneiker left 07:31 ghenry joined 07:41 kanru joined 08:04 marmic joined 08:08 f0rth joined 08:28 chris2 joined 08:47 vytautas joined 08:48 Odin-LAP joined 08:55 pdcawley joined
xinming audreyt: ping 08:58
08:58 nnunley joined 09:03 nnunley joined 09:27 xinming joined 09:46 penk joined 10:54 iblechbot joined 10:56 NEURAL_PHANTOM joined
NEURAL_PHANTOM hello any one on 10:56
xinming hi 10:57
NEURAL_PHANTOM hello 10:58
i need some help
think mind if i pm
xinming hmm, if it is perl 6 or pugs related question... just ask 10:59
azuroth help with what?
NEURAL_PHANTOM dmake
and setting it up on a xp box
xinming can't be helpful... xinming hides... 11:00
azuroth what's going wrong?
NEURAL_PHANTOM well i get an error when i try the dmake test command
this is the error "Error code 1, while making 'perlglob.o'" 11:01
'gcc' is not recognized as an internal or external command, 11:03
operable program or batch file.
11:03 TimToady joined
NEURAL_PHANTOM I have minGW with all updates 11:03
not sure what to do
azuroth hmm, ok. is gcc in the path?
NEURAL_PHANTOM CChmome path 11:04
?
azuroth hmm, I couldn't say 11:05
NEURAL_PHANTOM mind if i pm
azuroth if you just run 'gcc' from the term, does it work?
sure
is "nyet problimski" real russian? 11:10
mtve nope
azuroth damn. but it sounds so cool
11:13 elmex joined 11:14 kanru joined
NEURAL_PHANTOM azuroth 11:24
azuroth yo
you didn't pm me?
NEURAL_PHANTOM i found where the gcc.exe is stored and when i go to that dir and execuite it, it runs 11:25
says i cant need to reg
azuroth oh ok, cool
to register..?
NEURAL_PHANTOM my nick
azuroth oh
right
NEURAL_PHANTOM one sec and ill reg
azuroth well, if you need to be in gcc's dir to execute it, so would nmake. so you'll have to add that directory to the path 11:26
so it can be run from anywhere
maybe you should just join #nmake_np, so we don't flood the channel with this crap 11:27
NEURAL_PHANTOM ok in chan 11:29
azuroth ?eval my $x = 5; my $x; say $x; 11:46
evalbot_10184 OUTPUT[ ] bool::true
azuroth ?eval my $x = 5; my $x = 5; say $x;
evalbot_10184 OUTPUT[5 ] bool::true 11:47
azuroth hm, I have a feeling that's wrong?
'if you declare a lexical twice in the same scope, it is the same lexical' ... oh, I guess that doesn't mean anything about my's initialisation behaviour
?eval my $x = 5; my $r = \$x; my $x = 2; say $x; say $$r; 11:48
evalbot_10184 OUTPUT[2 5 ] bool::true
azuroth if I wasn't spineless, I would probably commit a test
broquaint notes Data::Bind's similarities to Params::Named ... 11:51
11:52 wilx`` joined
azuroth ?eval my ($a, $b, $c) >>=<< 5; say $b; 11:55
evalbot_10184 Error: unexpected ">" expecting comment, trait, "=", ".=", ":=", "::=", ";" or end of input
azuroth :-( 11:56
avar ?eval my ($a, $b, $c); ($a, $b, $c) Ā»= 5; say $b; 11:57
evalbot_10184 Error: unexpected "\\" expecting comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
avar ?eval my ($a, $b, $c); ($a, $b, $c) Ā»=Ā« 5; say $b;
azuroth isn't it hyper on both sides?
evalbot_10184 Error: unexpected "\\" expecting comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
azuroth ?eval my ($a, $b); ($a, $b) >>=<< 5; say $b; 11:58
evalbot_10184 Error: unexpected ">" expecting comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
azuroth ?eval my @a; @a >>=<< 5; say @a;
11:58 FurnaceBoy joined
evalbot_10184 Error: unexpected ">" expecting comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input 11:58
azuroth ?eval my @a; @a = @a >>+<< 5; say @a; 11:59
evalbot_10184 OUTPUT[ ] bool::true
azuroth hm, ok then..
?eval my @a; @a =<< 5; say @a;
evalbot_10184 Error: unexpected end of input expecting block, "\\", "$/", "$!", ">>" or "<<"
avar ?eval my @a; @a = @a >>+<< 5; say @a[0]; 12:00
evalbot_10184 OUTPUT[ ] bool::true
azuroth ?eval my @a = (1,2,3); @a = @a >>+<< 5; say @a;
evalbot_10184 OUTPUT[678 ] bool::true
12:02 jsiracusa joined
azuroth ?eval while my $x = 1 { last } $x # should there be a semicolon there, or is this voodoo? 12:04
evalbot_10184 Error: No such method in class Any: "&my"
azuroth ?eval while my $x = 1 { last }; $x # should there be a semicolon there, or is this voodoo?
evalbot_10184 Error: No such method in class Any: "&my"
azuroth ?eval my ($a, $b, $c) = 5; say $a; say $b; 12:05
evalbot_10184 OUTPUT[5 ] bool::true
12:15 wilx`` is now known as wilx 12:16 kane_ joined
audreyt azuroth: that is voodoo -- $x = 1 {last} shouldn't even parse 12:22
(sorry for the absence; $job went a bit crazy today (and likely tomorrow)) 12:24
...and the part of "port GHC to AIX 4.3" is certainly among the craziest
azuroth ahh, ok 12:27
should there be an equals hyperop, or ? is any 'op' able to be hyper'ed? 12:29
audreyt any "op" theoretically allows hyper'ing 12:31
12:31 kolibrie joined
azuroth ah ok, cool 12:31
?eval { my $x = 5; my $r = \$x; my $x = 2; say $x; say $$r; } # I have a feeling this should print 2 and 2, but I could be interpreting the synopses wrong.. 12:33
evalbot_10184 OUTPUT[2 5 ] bool::true
audreyt no, your interp is totally correct 12:34
double-my in pugs currently is not noop
that is certainly a bug.
write a test?
12:34 iblechbot joined
azuroth sure will - in t/builtins/my.t? 12:34
audreyt sure
azuroth I was unsure whether the second my should say, 'zero' it to undef though. I guess not, though. 12:38
12:38 lichtkind joined
audreyt no, it should be noop. 12:38
svnbot6 r10211 | azuroth++ | added test for two 'my' decls in same scope 12:42
azuroth what's the justification behind double-mys anyway, do you know? 12:43
lichtkind sorry where are the synopses ? svn.openfoundry.org/pugs/docs/Perl6/
azuroth dev.perl.org/perl6/doc/synopsis.html these ones are pod2htmlified daily, I think 12:44
lichtkind i mean in svn i found some quirks
azuroth oh, sorry 12:45
lichtkind and wanted look if its already fized
audreyt svn.perl.org/perl6/doc/trunk/design/syn
lichtkind in s6 the pipe operator has written ==> ans <==
thanks 12:46
audreyt what's wrong with <== and ==>?
lichtkind so far i read s03 they are spelled ===> 12:47
Gothmog_ azuroth: I think you made a typo... don't you mean $f = 5 instead of $a = 5?
xinming rinary ? : becomes ?? !!. It is a syntax error to use an operator in the middle that binds looser in precedence, such as =
any example?
trinary*
azuroth argh!
lichtkind audreyt or you can use both? 12:48
audreyt er no, ===> is not an operator
fixed. 12:49
12:49 stennie joined
audreyt lichtkind: I've fixed S03; where it reads ===> it should just be "#" 12:50
svnbot6 r10212 | azuroth++ | typo in last commit; Gothmog++
lichtkind audreyt ok thanks
audreyt thank _you_ :) 12:51
azuroth hmm, sorry if this is a stupid question, but why do zip and each use semicolons instead of commas to separate args? 12:52
audreyt because
zip(1,2,3;4,5,6)
azuroth ahh 12:53
audreyt it's like
zip <== 1,2,3 <== 4,5,6
two pipe batches
azuroth would zip's signature be an is parsed, or is possible to use semicolons always? 12:54
12:55 KingDiamond joined
audreyt it is always possible. 12:55
see S06, Multidimensional argument 12:56
azuroth ahh, cool 12:57
13:04 fglock joined
azuroth off to bed, good night all! 13:08
svnbot6 r10213 | fglock++ | docs/notes - added more details to generator/lazy array
fglock re SoC: how about implementing lazy array in parrot? 13:09
13:10 weinig|sleep joined
audreyt fglock: that'd be nice 13:11
parrot doesn't yet have general-purpose generators
nor "Range"
I wonder if there is a good C library somewhere that we can just link with, though. 13:12
fglock audreyt: will look 13:13
13:19 Qiang joined 13:24 cdpruden joined
audreyt zzz & 13:27
fglock audreyt: www.sgi.com/tech/stl/char_producer.html 13:29
13:29 Limbic_Region joined
aufrank good morning! 13:33
have to go to work, biab &
wolverian fglock, hm, ropes seem interesting. thanks 13:34
13:38 Ymmv joined
fglock wolverian: I'm checking if there are reusable libraries for lazy arrays - or if it makes sense to write one 13:40
13:51 jserv-- joined 13:52 macroron__ joined
clkao mi/win 24 13:52
13:57 pdcawley joined 13:58 vel joined 14:03 dvorak joined, kanru joined 14:05 justatheory joined 14:07 particle_ joined 14:11 aufrank joined
aufrank can someone explain the difference between m{ foo (bar) baz } and m{ foo <(bar)> baz } to me? 14:12
14:13 flounder99 joined
flounder99 what is reverse suposed to do to a hash in p6? 14:16
?eval my %h=(1,2,3,4);%h=reverse %h;%h{1}.say; 14:17
fglock aufrank: the first match stringifies to "foobarbaz", the second stringifies to "bar"
evalbot_10184 OUTPUT[2 ] bool::true
flounder99 ?eval my %h=(1,2,3,4);%h=zip %h.values,%h.keys;%h{2}.say; 14:18
evalbot_10184 OUTPUT[1 ] bool::true
aufrank and $/[0] is 'bar' in both cases?
fglock aufrank: I think so
aufrank ?eval my $x = 'bar'; my $y = $x ~~ / foo (bar) baz /; say $x; say $y; $say $/[0]; 14:19
evalbot_10184 Error: unexpected "$" expecting comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
flounder99 I couldn't find anything in the synopses about reverse on a hash
aufrank flounder99: I don't know the answer to this one 14:20
?eval my $x = 'bar'; my $y = $x ~~ / foo <(bar)> baz /; say $x; say $y; $say $/[0];
evalbot_10184 Error: unexpected "$" expecting comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
particle_ flounder99: what would you expect reverse to do?
aufrank fglock: did I mess something up in those? 14:21
fglock aufrank: but maybe not - S05 states: "other captures (named or numbered) are unaffected"
aufrank is reading S05 now :) 14:22
fglock ?eval my $x = 'bar'; my $y = $x ~~ / foo (bar) baz /; say $x; say $y; say $/[0];
evalbot_10184 *** Cannot parse PGE: foo (bar) baz *** Error: Cannot find the parrot executable in PATH OUTPUT[bar ] bool::true 14:23
fglock aufrank: s/$say/say/
aufrank heh
funny
flounder99 swap the keys and values like in p5. Actually I think P5 flattens it into a list and reverses the list which has the effect of reversing the keys and values. Except of course duped values. 14:24
where the last key based on the hash algorithm wins
particle_ well, now a hash is a set of pairs 14:25
if you want to get p5 semantics, i think you'll have to reverse the pairs
flounder99 %h = zip %h.values, %h.keys 14:26
particle_ i don't know syntax well enough, but something like %hash.each.reverse might work
flounder99 %h.kv.reverse seems to work 14:28
particle_ good news :)
flounder99 ?eval my %h=(,1,2,3,4);%h=%h.kv.reverse;%h.say; 14:29
evalbot_10184 Error: unexpected "," expecting comment, expression or ")" 14:30
flounder99 ?eval my %h=(1,2,3,4);%h=%h.kv.reverse;%h.say;
evalbot_10184 OUTPUT[2143 ] bool::true
flounder99 oops, fat finger
particle_ that deserves to be an example in a synopsis, if it's not already. 14:31
flounder99 I didn't see it -- but I don't have them memorized. 14:33
14:33 orafu joined
aufrank there's no kv.reverse in the syns 14:34
flounder99 I think TimToady should rule if the current pugs implementation is right or if it should act like P5. 14:36
particle_ reversing a hash is a common p5 op, it warrants an example. dunno if it belongs in the synopses
flounder99 I do it now and then in P5 14:37
aufrank ?eval my $x = 'b'; my $y = $x ~~ / (a) <( b )> c /; say $x; say $y; say $/[0]; say $/[1];
evalbot_10184 *** Cannot parse PGE: (a) <( b )> c *** Error: Cannot find the parrot executable in PATH OUTPUT[b ] bool::true
flounder99 ?eval my %h=(1,2,3,2);%h=%h.kv.reverse;%h.say; 14:39
evalbot_10184 OUTPUT[21 ] bool::true
fglock ?eval my %h=(1,2,3,2);%h=%h.kv.reverse; 14:40
evalbot_10184 {("2" => "1"),}
flounder99 I get the same in P5 14:42
I see reversing an array of pairs doe not reverse the pairs themselves 14:49
?eval my @a=(1=>2,3=>4);@a.reverse.say
evalbot_10184 OUTPUT[3412 ] bool::true
flounder99 It reverses the order of the pairs in the array not the elements of the pairs 14:50
I have to think of => as something other than a left stringifying comma 14:51
?eval my @a=("1",2,"3",4);@a.reverse.say 14:54
evalbot_10184 OUTPUT[4321 ] bool::true
flounder99 Toto, I don't think we're in Perl5 land anymore 14:56
15:02 avarab joined 15:04 vel joined 15:09 Arathorn joined 15:17 vel joined
wolverian ?eval my %h = (a => 1, b => 2); %h.reverse 15:21
evalbot_10184 "2\tb 1\ta"
wolverian ?eval my %h = (a => 1, b => 2); %h.kv 15:22
evalbot_10184 ("a", 1, "b", 2)
wolverian ?eval my %h = (a => 1, b => 2); %h.kv.reverse
evalbot_10184 "2 b 1 a"
wolverian ?eval my %h = (1,2,3,4)
evalbot_10184 {("1" => 2), ("3" => 4)}
wolverian hm. okay.
?eval my %h = (a => 1, b => 2); my @h = %h.kv.reverse; @h 15:23
evalbot_10184 [2, "b", 1, "a"]
wolverian ?eval my %h = (a => 1, b => 2); my @h = %h.kv.reverse; %h = @h; %h
evalbot_10184 {("1" => "a"), ("2" => "b")}
xinming ?eval my %h = (a => 1, b => 2); my @h = %h.pair.reverse; @h
evalbot_10184 [("b" => 2), ("a" => 1)]
xinming I think You should use pair... :-)
hmm, work...
wolverian I think people were wondering whether perl6 still has the perl5-esque reverse(%hash) 15:24
xinming feels sorry if he interrupted your conversation...
wolverian and I'm wondering where the tabs come from
oh well. prettyprinter, I guess.
xinming wolverian: @h defaults to seperate every elems using space, And I think, for hash, It use table to indent key-value pair.... 15:25
wolverian yeah.
xinming I mean in scalar context...
aufrank wolverian: why don't you need any quotes in %h = ( a => 1, b => 2 ) ?
wolverian aufrank, => still autoquotes its LHS 15:26
(like in perl5)
aufrank gotcha
thx
15:28 kanru joined
avarab %h = (eval => 1, eval, 2); 15:30
xinming ?eval my @a = 1..1000; [*] @a; 15:31
:-P
evalbot_10184 4023872600770937735437024339230039857193748642107146325437999104299385123986290205920442084869694048004799886101971960586316668729948085589013238296699445909974245040870737599188236277271887325197795059509952761208749754624970436014182780946464962910563938874378864873371191810458257836478499770124766328898359557354325131853239584630755574091142624174743493475534286465766116677973966688202912073791438537195882498081268678383745597317461360853795345
flounder99 ?eval my(@a,%h);@a=%h=(1,2,3,4);@a.say;@a=%h;@a.say; 15:32
evalbot_10184 OUTPUT[1234 1234 ] bool::true
flounder99 it seems @a=%h=... does not "pairify" @a but @a=%h; does 15:33
@a=%h=... seems to do %h=...;@a=...; 15:40
I would think it should do %h=...;@a=%h; 15:41
Gothmog_ It doesn't in Perl 5, either. 15:49
lichtkind works the for loop as topicalizer as a given?
Gothmog_ flounder99: Think of =()=, eg... 15:50
flounder99 perl5 doen't have Pairs
thats what I'm thinking of
15:51 Ymmv joined, ruz joined
Gothmog_ I think the question is more general about chained assignment operators. 15:51
flounder99 ?eval my(@a,%h);@a=%h=(1,2,3,4);say +@a;@a=%h;say +@a 15:52
evalbot_10184 OUTPUT[4 2 ] bool::true
wolverian lichtkind, yes 15:53
?eval for 1..4 { say when 3 }
evalbot_10184 Error: No such method in class Int: "&when"
svnbot6 r10214 | lwall++ | commification of sort and reduce
wolverian ?eval for 1..4 { when 3 { say } }
Gothmog_ flounder99: I see your point. I thought of
evalbot_10184 OUTPUT[ ] undef
Gothmog_ perl -le '$_="foo bar baz"; $a =()= m/ba./g; print $a'
2
wolverian evalbot_10184, sigh!
15:54 ruz joined
flounder99 @a=%h=(1,2,3,4) @a has 4 elements @a=%h @a has 2 elements 15:54
lichtkind wolverian cool so we have also a for when
wolverian i like this idea
wolverian lichtkind, 'when' is just 'if $_ ~~ ...'
except it also breaks out of the surrounding block
lichtkind wolverian i thought there is no except in perl6 15:55
wolverian lichtkind, hm?
lichtkind wolverian i also thought because for can set more topics there are in $^a ..etc
wolverian I don't know how 'when' works with those. read the appropriate synopsis. :)
flounder99 Gothmog_: =()= is what I was thinking of 15:56
lichtkind wolverian thanks all i wanted know if the first parameter of for goes in $_ 15:57
Gothmog_ *nods*
Perhaps you should ask @Larry, if there's nothing about it in the synopses... 15:58
flounder99 audreyt fixes things I point out before I can think of another example 16:00
FurnaceBoy hehe
Faster than a speeding packet 16:01
Gothmog_ But you can't speak of fixing until it's clear you found a bug. :-) 16:02
flounder99 Yep, yesterday I asked "is this right" and in less than a minute audrey answered "No" and committed a fix 16:03
I wasn't even sure it was wrong 16:04
16:07 coumbes joined 16:16 mago_ joined 16:25 hexmode joined 16:33 nnunley_ joined 16:36 vel joined 16:38 eric256 joined 16:39 weinig|sleep is now known as weinig|away
wolverian uh.. 16:50
"He [Damian] was a bit taken aback, and said they weren't planning on changing that feature. I read recently that they've decided to change it after all; you'll have to set some godawful global variable, possibly dollar-unicode-chinese-horse-symbol, to turn on auto-list flattening" www.cabochon.com/~stevey/blog-rants...-perl.html
I'm pretty sure perl6 still has list flattening... 16:52
eric256 just read it somewhere... @list[*] i think. ... 16:53
eric256 probably missed the point, goes to read irc logs
wolverian ?eval my @foo = ("a".."c"); (1, 2, @foo) 16:54
evalbot_10184 (1, 2, ["a", "b", "c"])
wolverian oh. that doesn't flatten?
avarab ew
eric256 ?eval my @foo = ("a".."c"); (1, 2, @foo[*])
avarab foo = ("a".."c"); (1, 2, *@foo)
evalbot_10184 Error: unexpected "]" expecting term
avarab eval? my @foo = ("a".."c"); (1, 2, *@foo)
eric256 ?eval my @foo = ("a".."c"); (1, 2, *@foo) 16:55
avarab ?eval my @foo = ("a".."c"); (1, 2, *@foo)
evalbot_10184 (1, 2, "a", "b", "c")
16:55 Blicero joined
eric256 i wasn't too far off 16:55
since they don't auto-flatten it means you can pass them to subs and stuff. it realy is nice actualy. ;()
wolverian does autoflattening ever happen anymore?
?eval (1, 2, ("a".."c")) 16:56
evalbot_10184 (1, 2, "a", "b", "c")
wolverian List still autoflattens.
Array doesn't.
eric256 counts the hours till he can go to radio shack and buy the parts needed to make a homemade custom shutter trigger for his DSLR ;) 16:57
avarab ?eval my @a = ("a" .. "c"); sub subbie (@a is Array, $b is Int) { [ \@a, $b ] }; subbie(@a, 5) 16:58
evalbot_10184 [["a", "b", "c"], 5]
wolverian anyway, I don't think pugs has Captures yet 16:59
they might change the semantics somewhat
avarab so it doesn't just automatically convert it to subbie(\@a, 5) as it would do if the whole thing worked on some evil Perl 5 prototypes level?
I.e. subbie (\@@) { ...
eric256 avarab no 17:02
we get real function prototypes ;) i beleive thats part of why arrays don't auto flatten.
?eval my @a = ("a" .. "c"); sub subbie (@a is Array, $b is Int) { [ @a, $b ] }; subbie(@a, 5)
evalbot_10184 ["a", "b", "c", 5]
wolverian ?eval ((1,2,3),)
evalbot_10184 (1, 2, 3) 17:03
wolverian hm.
eric256 koay thats kinda odd isn't it? i guess the return is still flattened?
?eval my @a = ("a" .. "c"); sub subbie (@a is Array, $b is Int) { ( @a, $b ) }; subbie(@a, 5)
evalbot_10184 (["a", "b", "c"], \5)
wolverian ?eval [(1,2,3),4]
evalbot_10184 [1, 2, 3, 4]
eric256 arg beat me to it. so its the [ ] that is flattening the array. 17:04
PerlJam um ... if you mean [[1,2,3],4], why not say that?
17:04 trampel left
wolverian I'm trying to find out what flattens now and what doesn't. and what exactly "list context" even is nowadays. 17:05
eric256 not thinking about it from that angle is why. just trying to see where it flattens and where it doesn't
PerlJam Well, I'm not sure that "flattening" even applies here. What makes you think that [(1,2,3),4] has "substructure"?
eric256 ?eval ((1,2,3),4) 17:06
evalbot_10184 (1, 2, 3, 4)
PerlJam if you say my $a = (1,2),(3,4); # how many things are in $a?
wolverian nothing, really. I'm just unclear on the rules.
since they're not written explicitly in the AES, I think.
PerlJam wolverian: that's okay, I'm not clear on them either ;-) 17:07
wolverian :)
eric256 ?eval my @a = (1,2,3); (@a,5,6);
evalbot_10184 ([1, 2, 3], 5, 6)
eric256 thats what got us confused on the falttening
wolverian in other words, I want "context" well defined
eric256 ?eval ( (1,2,3),5,6);
evalbot_10184 (1, 2, 3, 5, 6)
eric256 so what is happening there? why aren't those two the same? 17:08
audreyt those two should be the same. what you are seeing is yet-another-pugs-bug :) 17:09
eric256 which is the problem with learning perl6 by example ;) 17:10
wolverian audreyt, do you have a formal definition of context?
eric256 i was looking at t/builtins/arrays and t/builtins/lists but i don't see any files that this would seem to fit in
maybe something like t/builtins/lists/sanity.t ? 17:11
audreyt pugs> my @a = (1,2,3); (@a,5,6);
(1, 2, 3, 5, 6)
I wonder where does evalbot get the idea.
PerlJam audreyt: um ... is that what's supposed to happen?
audreyt wolverian: well, a formal definition for "flattening" 17:12
PerlJam: I think so; write (@a[], 5, 6) if you want no-flattening, I think
wolverian audreyt, is it in AES?
PerlJam audreyt: I think that's exactly backwards (of course, I could be wrong) 17:13
audreyt: I'd expect (@a,5,6) to be a list of 3 elements.
eric256 how do you get pugs to print its version i thought *$PUGS_VERSION but thats not it.
audreyt eric256: $?PUGS_VERSION
eric256 PerlJam a minute ago you where arguing that ((1,2,3),4) should be four elements.../me is confused 17:14
?eval $?PUGS_VERSION
evalbot_10184 \"Perl6 User\'s Golfing System, version 6.2.11, February 1, 2006 (r10178)"
audreyt PerlJam: a list in parenthesis always flattens the expressions between commas
TimToady in list contecxt
PerlJam eric256: I wasn't arguing, I was inquiring why you guys thought so. :)
TimToady you can't tell what the context is there yet. 17:15
audreyt TimToady: even in scalar context... my $x = (@a, 5, 6); still flattens @a, no?
at least S02 line 1815 seems to say that
wolverian what I'm wondering is, is context just a reformulation of return type mmd or does it encompass other things?
TimToady yes, I mean the context applied to the first arg.
avarab ?eval $+LC_ALL
TimToady foo(@a,5,6) may take @a as scalar.
evalbot_10184 Error: Undeclared variable: "$+LC_ALL"
wolverian (or s/reformulation/application/)
audreyt but that is not in a paren-list; it's not infix:<,> 17:16
it's in a capture, and is subject to capture rules
TimToady certainly, if you supply more context, it's more meaningful.
eric256 eval bot seems to be several revisions behind
audreyt (which indeed just remember @a)
PerlJam TimToady: so ... (@a,@b) = (@b,@a) is as in perl5 or not? Do I need to use := there ? 17:17
TimToady the original example had (@a,5,6) as the last statement in block, and it's not clear what the context of that is.
audreyt but even if it's assigned to a scalar, that still flattens @a, and puts a List into that scalar, no? 17:18
TimToady but yes, it's not a Caputre.
audreyt it can only be a Capture when you say
return(@a, 5, 6)
instead of
(@a, 5, 6);
eric256 's head starts spinning 17:19
audreyt the first can respond to binding; the latter always is just a List, which may or may not get flattened into the caller side's other lists
TimToady that seems a bit odd.
most folks would rather think of return as the same as what happens at the end of the block, with an extra goto. 17:20
17:20 weinig|away is now known as weinig
audreyt alternately, we can pretend there is always an implicit \() around the last statement. 17:20
(S06: Advanced subroutine features, The C<return> function)
17:21 nnunley joined
audreyt or rather, an implicit return() 17:21
(which amongs to the same thing, except for exception)
TimToady I think that'd make more sense to most people.
eric256 so in capture context the @a retains its ...err identity....but in any other context it flattens?
audreyt (that is, the implicit-return form does not trigger UNDO)
TimToady capture just implies that any flattening is lazily done later.
when you know the actual context. 17:22
audreyt sub f { :x<1>, :y<2> }; # potentially two named-return-subject-to-binding
sub f { (:x<1>, :y<2>) }; # always just a List of two pairs
that's what implicit-return would suggest to me
(which kinda makes sense)
eric256 ahhh okay. that kinda makes sense. that way you can store stuff in a captuer to pass to other subroutines and match their signature.
flounder99 ?eval my %h=(1,2,3,4);my @a=%h; say +@a; 17:23
evalbot_10184 OUTPUT[2 ] bool::true
eric256 ?eval my %h=(1,2,3,4);my @a=%h; say @a.perl; 17:24
evalbot_10184 OUTPUT[[("1" => 2), ("3" => 4)] ] bool::true
flounder99 2 pairs
eric256 needs to start grokiing pairs and now captures. ;)
audreyt will help if I implement them this weekend :) 17:25
wolverian TimToady, is there a definition of context in the AES or somewhere else? 17:26
theorbtwo The context that can be defined is not the true context.
TimToady sure, probably mutually contradictory. :)
but hey, I'm a good marketeer... :) 17:27
PerlJam wolverian: I like this one: context n 1: discourse that surrounds a language unit and helps to determine its interpretation
:-)
wolverian heh. :)
so it's not actually an element of the language formalism, just a name on something else?
flounder99 This also goes back to my earlier question about reversing a hash 17:28
?eval my %h=(1,2,3,4);%h.reverse.perl.say; 17:29
evalbot_10184 OUTPUT["4\t3 2\t1" ] bool::true
eric256 ?eval reverse ( 1=>2,3=>4);
evalbot_10184 "4\t3 2\t1"
eric256 that seems right...whats the problem?
PerlJam I'm still kind of hung up on (@a,5,6) though. I hesitate to say this, but in absense of context, that looks like a list of 3 things. I think it also, makes sense that people should have to ask for flattening explicitly. But what I've just seen here leads me to believe that asking can be explicit but quite subtle.
s/also,/also/ 17:30
flounder99 ?eval my %h=(1,2,3,4);%h=%h.reverse;%h.say;
evalbot_10184 OUTPUT[1234 ] bool::true
eric256 ?eval my %h=(1,2,3,4);%h=%h.reverse;%h.perl; 17:31
evalbot_10184 "\{(\"1\" => 2), (\"3\" => 4)}"
wolverian ?eval my %h = (1,2,3,4); %h.reverse
PerlJam flounder99: that just looks like a bug to me :)
evalbot_10184 "4\t3 2\t1"
flounder99 ?eval my %h=(1,2,3,4);%h=%h.kv.reverse;%h.say;
evalbot_10184 OUTPUT[2143 ] bool::true
audreyt TimToady: @x[f()] = @y[g()]; # f() is in scalar context, g() is in list context, correct?
(but @y[g()] is in scalar context.) 17:32
PerlJam audreyt: how do you figure? Why is f() in scalar context?
Apparently I'm going to have to re-read the AES soon.
audreyt PerlJam: S03: 17:33
Perl 6 does not attempt to intuit whether an lvalue slice is meant to be one element or several, so you must use parens in that case
but S02: subscripts are always evaluated in list context (when used as rvalue)
TimToady yes, I think that's the current interpretation
audreyt ok. I'll commit a couple lines of clarification to S02 17:34
as this lhs-vs-rhs is quite subtle :)
TimToady hmm, well, sometimes "subtle" means "wrong"... 17:35
PerlJam subtle == evil IMHO (for the most part)
17:35 schneiker joined
audreyt @x[f()] = g(); # scalar context for f() and g() 17:36
@x[f()] = @y[g()]; # scalar context for f(), list context for g()
@x[f()] = @y[+g()]; # scalar context for f() and g()
(@x[f()]) = g(); # list context for f() and g()
(@x[f()]) = @y[g()]; # list context for f() and g()
(@x[f()]) = @y[+g()]; # list context for f(), scalar context for g()
# current interpretation
TimToady looks right
audreyt k, committing
wolverian: I think list-context is now always statically a "flatten" node on AST 17:37
wolverian: ...and that's it. the Signature may apply more flattening, but that's part of Signature-binding definition 17:38
wolverian audreyt, can that be reduced to return type mmd? (I'm kind of stuck to that notion for some reason)
audreyt yes it can, but it requires finesse
wolverian finesse from the design or implementation? 17:39
audreyt see docs/notes/context_coercion.pod
TimToady I'm still not sure return should Capture by default.
wolverian thanks! audreyt++
audreyt wolverian: np, but I think using type inferrence for that is a bit overgeneralizing things
in any case it's going to be special-cased before 6.2831 here, I think
TimToady: "named returns" too sick? :) 17:40
TimToady foo(1,2,bar()) should allow bar to return a list that flattens, or we've basically destroyed list returns.
PerlJam Is there an operator actually called "list"?
i.e. list EXPR puts EXPR in list context
wolverian audreyt, mm. as long as it doesn't change semantics it seems, uh, less arbitrary to do it with type inference.
TimToady I wouldn't want to force people to have to say foo(1,2,*bar()) all the time.
audreyt TimToady: but bar() in that position does flatten
even if it's a Capture; the difference is whether nameds become pairs 17:41
or become further nameds to foo
TimToady but it can't flatten eagerly
foo(bar()) needs to know what foo expects as the first argument 17:42
audreyt sub bar { (3,4,5) }
can sure flatten eagerly
the problem case is
sub bar { 3,4,5 }
I think.
(substitute "3" above to three())
(or @three)
that's the same as 17:43
wolverian (btw, is --> now written outside the argument list?)
audreyt sub bar { return( (3,4,5) )}
sub bar { return( 3,4,5 )}
TimToady assuming return is a function
audreyt wolverian: --> occurs only in signature lists
or a macro-parsed-as-function, yes. 17:44
wolverian what's a signature list? that is, 'sub foo (--> bar)' or 'sub foo () --> bar'?
audreyt the first one
TimToady well, my brain isn't working well enough to think this through yet this morning.
so let me stew about it a while. 17:45
audreyt I tried arguing for the latter one in tokyo but TimToady thinks I need to rewire my brain, so I did :)
TimToady: k. I'll hold off the S06 patch then
+If the function ends with an expression without an explicit C<return>,
+that expression is also taken to be a C<Capture>:
+
+ sub f { :x<1> } # possibly named-argument binding
+ sub f { (:x<1>) } # always just one positional Pair object
+
wolverian ah, ok. context_coercion.pod still uses the () --> style 17:46
audreyt yeah. feel free to fix :)
wolverian mmhm
flounder99 Should a hash flattten to a list of pairs or should it flatten to a list? 17:48
TimToady list of pairs 17:49
flounder99 ?eval my %h=(1,2,3,4);my @a=%h; say +@a;@a.perl;
evalbot_10184 OUTPUT[2 ] "[(\"1\" => 2), (\"3\" => 4)]"
flounder99 that's what it does
TimToady to get the P5 behavior you use .kv
flounder99 so reverse(%h) is now %h.kv.reverse 17:50
schneiker obra: Some good perl.perl6.meta news....
Got reply back from Ask Bjprn Hansen (nntp.perl.org) about why posts didn't appear:
> What is status of perl.perl6.meta? ....
It was closed a few years ago.
However, after sending him requested info/link on discussion, my new posts later showed up
in newsreader (but not in www.nntp.perl.org/group/perl.perl6.meta archives).
Will start work on preliminary FAQ to post on it this weekend.
Suggestions (especially links and content pointers) welcome,
preferably posted to perl.perl6.meta, but I routinely skim #perl6 logs too.
flounder99 %h.reverse just moves around the pairs not reversing the elements of the pairs, right? 17:51
That is what pugs does now 17:52
schneiker Back to $work&
17:52 schneiker left
wolverian audreyt, does pugs currently implement context_coersion.pod? (with an 's') 17:52
TimToady It's kind of silly to ask a hash to reverse its value. 17:53
arguably %h.=reverse might mean something
particle_ yep, not silly in p5, but it is in p6
TimToady need to commute to work.
particle_ %h.kv.reverse makes sense
TimToady back in 15min or so... & 17:54
particle_ not many can beat that commute 17:55
PerlJam no commute is the best commute
particle_ that's my commute
bed -> desk
PerlJam Though, I guess it's good to know that TimToady is commutative. He's probably also associative and distributive too :) 17:56
17:56 Aankhen`` joined
particle_ well, then he's not exponential 17:56
17:57 Alb joined
PerlJam but he is non-linear 17:57
flounder99 if not chaotic
17:58 pdcawley joined
particle_ he is non perfect 17:58
s/non/not/
audreyt wolverian: no, pugs currently does not implement any static typing at all
wolverian hrm, I forgot --verbatim again 17:59
audreyt wolverian: it does limiated runtime inference on lvalue, but it's been ruled as unneccessary now so I'll pull it out soon
svnbot6 r10215 | wolverian++ | fix 'sub foo () --> bar' to 'sub foo ( --> bar)'
wolverian yay, svnbot fixed it
audreyt, right. oh well, it's all a bit too deep for me. basically I just want the more typeful approach to be used, whichever that is.. 18:00
(because "it works for haskell". :)
audreyt runtime typecasing is awfully hard for haskell, y'know? :)
typecase in general is possible with GADTs 18:01
but that's all closed-world; perl6-style open-world MMD based on runtime subtyping
wolverian can context be deduced at compile time? 18:02
audreyt is quite unnatural for haskell - you end up comparing TypeRep or something
the flatten-vs-nonflatten, sure
I think it's strictly static
wolverian but some aspects of context can be dynamic?
audreyt but I don't think the constraints can be statically inferred
wolverian right
audreyt see "Hybrid Typechecking" 18:03
linked from my journal
wolverian thanks
audreyt np :)
wolverian so, next question
why do we need context? :)
audreyt because implicit concatenation is fun?
(assuming you as asking about flattening) 18:04
(not general return-type-mmd)
wolverian the list-vs-single thing is the visible aspect, yeah
audreyt implicit concat is perlish :)
wolverian so the only reason we have context is implicit flattening?
audreyt I think so.
wolverian mmkay, thanks.
audreyt other parts (constraints, return type mmd etc) can be straightforwardly modeled 18:05
in the usual type systems
flounder99 ?eval my(@a,%h);@a=%h=(1,2,3,4);@a.say;@a=%h;@a.say;
evalbot_10184 OUTPUT[1234 1234 ] bool::true
flounder99 is chained = different context?
audreyt but implicit concat makes perl perl... without it maybe we should call this language Ruby2 or something
flounder99: no. it's a bug 18:06
write a test :)
TimToady degone 18:14
18:15 Alb left
wolverian audreyt, okay. it's just that context seems like an awful lot of complexity just for flattening. flattening _is_ very perlish, though. 18:17
Arathorn audreyt: thanks again for random judy handholding over the weekend - got it all working nicely after the realisation of the macros silent &-ing. still to investigate using judy1 for iterating over judyhs's, though 18:22
svnbot6 r10216 | flounder99++ | Added Name to AUTHORS
audreyt Arathorn: k :)
flounder99 hey! it worked! 18:23
audreyt "it works! if you see this, your pugs committership has been set up properly." 18:24
webmind anyone here going to the perl workshop ? 18:39
Juerd I am! 18:41
Do you mean Dutch Perl Workshop? :)
webmind yes
Juerd Or just any?
webmind the Dutch Perl Workshop in 2006, this month
Juerd 2006-05-17
webmind that one yes
Juerd Well, I am :)
webmind good
who else? 18:42
Juerd You are?
webmind indeed
18:45 Arathorn is now known as Aragone 18:47 neoesque joined 19:00 hexmode joined
Limbic_Region spent almost the entire day reading every single one of luqui's blog entries 19:09
kolibrie Limbic_Region: do you feel enlightened? 19:13
Limbic_Region kolibrie - I took away a lot of great links 19:14
Limbic_Region decided to take a day off from thinking about programming and just read what someone else was thinking
19:18 sahadev joined
Limbic_Region who runs planetsix.perl-foundation.org/ btw? It is b0rk (pulling in very old entries as if they were posted today) 19:21
szbalint which is luqui's blog, Limbic_Region, If I may ask?
particle_ use.perl.org/~luqui/journal
szbalint ty 19:22
Limbic_Region no 19:23
luqui.org 19:24
the use.perl journal is specific to p6 design and meeting minutes
and hasn't been updated in some months
sorry - was reading the Catalyst upheaval announcement 19:25
obra Limbic_Region: planet just does that sometimes 19:27
it's a planet/use.perl issue
19:29 elmex joined
Limbic_Region oh - not seen it before and I check twice a day on workdays and at least once a weekend 19:29
lichtkind reverse is an array method? 19:30
Limbic_Region ?eval my @foo = 1..5; my @bar = @foo.reverse; say ~@bar; 19:31
evalbot_10184 OUTPUT[5 4 3 2 1 ] bool::true
szbalint thanks L~R :)
Limbic_Region ?eval my @foo = (1..5).reverse; say ~@foo;
evalbot_10184 OUTPUT[5 4 3 2 1 ] bool::true
Limbic_Region lichtkind - I would say that if something can be treated as a list then .reverse is a method that can be applied to it 19:32
no problem szbalint
?eval my @inf = 1...;
evalbot_10184 pugs: out of memory (requested 1048576 bytes) 19:33
lichtkind Limbic_Region can or specced sorry but i have be serious about this
Limbic_Region hmmm - so that's still bork or is that correct behavior?
lichtkind - not hard to check the synopses
lichtkind - for instance, search for .reverse in S02 19:34
dev.perl.org/perl6/doc/design/syn/S02.html 19:35
lichtkind Liimbic_Region done that (otherwise i wouldnt ask) all i got is reverse 1..2 oh i checked only s3
because its a kind of operator
thanks 19:36
Limbic_Region I would have thought that it would have been in S09 too but apparently not
PerlJam I sure hope perl6 doesn't suffer the same documentation problems that other OO languages do. 19:37
19:38 eric256 left
Limbic_Region PerlJam - haven't read a lot of TFMs on other OO languages but 19:38
I would want a summarized list of all methods that certain objects/data types can take in a single place 19:39
and then I can dig further if need be in S29 or where ever the method itself would be further defined
PerlJam Most other OO languages tend to force you to hunt out more information about the thing you're interested in before you can find out what you need to know (in my experience anyway). It's better (IMHO) that if you know you need info on something called "reverse" that the docs help you find out what you need to know 19:41
19:41 bryan| joined, bryan| left
PerlJam that sure doesn't look as sensical as I want it to be :) 19:42
lichtkind why in s29 they see fifference in array and list? its array vs lazy list?
sorry difference 19:43
Limbic_Region lichtkind - look at the last update to S29
lichtkind in mailinglist?
svnbot6 r10217 | flounder99++ | /t/assign.t - added chained equals @=%=list; $=%=list; and (@a,@b)=(@b,@a) tests
Limbic_Region no - www.rodadams.net/Perl/S29.html
last updated over a year ago
lichtkind dear chained equals?? iv got to lot to learn 19:49
19:51 larsen_ joined
Limbic_Region well - that's chained equals with context specified I think 19:51
19:52 coumbes joined 19:56 weinig is now known as weinig|away
lichtkind nevertheless to high for me now currently i try to grok all the subroutine stuff 19:57
?eval :2(3) 19:58
evalbot_10184 3
flounder99 ?eval my(@a,%h);@a=%h=(1,2,3,4);@a.say;@a=%h;@a.say; 19:59
evalbot_10184 OUTPUT[1234 1234 ] bool::true
19:59 larsen__ joined
flounder99 ?eval my(@a,%h);@a=%h=(1,2,3,4);@a.perl.say;@a=%h;@a.perl.say; 20:00
evalbot_10184 OUTPUT[[1, 2, 3, 4] [("1" => 2), ("3" => 4)] ] bool::true
lichtkind ?eval :2(101)
evalbot_10184 5
flounder99 thats what I mean by chained equals. The bug is @a=%h=... is not the same as %h=...;@a=%h; 20:01
it should be 20:02
PerlJam flounder99: Though currently it's a great way to turn a list into a list of pairs :) 20:04
Limbic_Region PerlJam - wouldn't .kv do that too 20:05
and zip :by
hrm - not sure about zip on a single list
*shrug*
PerlJam Limbic_Region: @L2 = map { $^a => $^b } @L1; 20:06
flounder99 @a=%h and @a will be a list of pairs. @a=%h.kv is a flattend list, according to TimToady, at least today ;) 20:07
PerlJam though I guess my map needs a comma these days
@L2 = map { $^a => $^b }, @L1; or perhaps @L2 = L1 :map { $^a => $^b }; 20:08
er, s/L1/@L1/
Limbic_Region so as always, TIMTOWTDI
20:09 larsen joined
flounder99 What confused me is that %h = reverse %h; no longer swaps keys and values like in perl5 20:10
PerlJam @L2 = zip(@L1[0..*:by(2)],@L1[1..*:by(2)]);
Limbic_Region flounder99 - that confuses me still - why not? 20:11
because it is list context on both sides 20:12
so you get a list of pairs in reverse order?
PerlJam Limbic_Region: because the pairs don't flatten
right
(though that makes no sense as hashes are unordered anyway)
Limbic_Region so is there a * (splat) operator to force the flattening?
flounder99 that show I understand it 20:13
.kv seems to flatten it
Limbic_Region ok so %h = %h.kv.reverse;
PerlJam or even %h.=kv.reverse (I think) 20:14
flounder99 ?eval my %h=(1,2,3,4);%h=%h.reverse;%h.perl.say;%h=%h.kv.reverse;%h.perl.say;
evalbot_10184 OUTPUT[{("1" => 2), ("3" => 4)} {("2" => "1"), ("4" => "3")} ] bool::true
flounder99 ?eval my %h=(1,2,3,4);my @a=*%h;@a.perl; 20:16
evalbot_10184 "[(\"1\" => 2), (\"3\" => 4)]"
flounder99 apparently splat doesn't flatten a hash, at least not now
I don't think .= is implemented yet 20:20
lichtkind 5.as("%b") is konverting to binary but how to convert to the base of 3? 20:23
TimToady the most recent version of S29 is pugs/docs/Perl6/Spec/Functions.pod 20:43
lichtkind shit , perl6 is awfull lot of of syntax (sorry but i was temporary frustratet after making some index of all operators and after over 40 items and hairy wikisyntax no end in sight) 20:54
is there currentl< a alphabetical table of all operators? 20:56
PerlJam loves the svk error messages: Oh no, no more exceptions! 20:58
TimToady there are no alphabetical lists of anything.
lichtkind so the good news is i have the alphabetical list :) 21:01
still in progress but fairly anhanced
clkao PerlJam: bah, that's svn::mirror :/ 21:04
PerlJam clkao: well, now when I try to update my pugs, I get this: Can't locate Regexp/Shellish.pm in @INC 21:05
21:05 FurnaceBoy_ joined
clkao hmm do you have it? 21:07
PerlJam clkao: apparently I do not. However, unless yum removed it, I don't understand why I never saw this before. 21:08
21:11 p5evalbot joined 21:43 weinig|away joined 21:45 aufrank joined 21:49 weinig|away_ joined 21:50 SamB joined 21:51 larsen_ joined 21:53 coumbes_ joined 21:55 coumbes_ is now known as coumbes 21:58 weinig|away_ is now known as weinig 22:00 fglock left 22:03 larsen_ is now known as larsen 22:10 larsen_ joined 22:13 ghenry joined 22:21 r0nny joined
r0nny hi 22:21
22:23 larsen joined
TimToady nm 22:23
22:26 jsiracusa joined 22:28 Ymmv joined 22:31 larsen__ joined, ryan` joined, ryan` left 22:34 |mjk| joined 22:38 ruoso joined
ruoso back after workers holiday 22:39
arcady workers? holiday? 22:42
(never mind that the whole thing started in the US... they still don't know anything about it here) 22:43
22:48 Khisanth joined 22:49 larsen_ joined 23:00 mako132_ joined 23:04 neoesque joined 23:18 Limbic_Region joined 23:25 SamB joined 23:47 Ymmv joined
meppl gute nacht 23:51