Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-11-28

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:00 pugs_svn r18946 | dlo++ | [kp6] the lightbulb effect
00:03 Caelum joined #perl6
00:05 theorb joined #perl6
00:13 Limbic_Region joined #perl6
00:15 ofer joined #perl6
00:23 Alias__ joined #perl6
00:27 Casan joined #perl6
00:39 zakame_ joined #perl6
00:51 Alias_ joined #perl6
00:52 kst joined #perl6
01:21 funktio joined #perl6
01:29 ispy_ joined #perl6
02:02 agentzh joined #perl6
02:12 Torment joined #perl6
02:12 thoughtp1lice joined #perl6
02:19 kanru joined #perl6
03:36 BinGOs_ joined #perl6
04:11 zakame joined #perl6
04:28 jjore-m joined #perl6
04:28 zakame_ joined #perl6
04:42 justatheory joined #perl6
05:14 jjore-m joined #perl6
05:24 ggoebel joined #perl6
05:32 penk joined #perl6
05:34 cnhackTNT joined #perl6
05:38 ggoebel joined #perl6
05:41 REPLeffect joined #perl6
05:48 cnhackTNT joined #perl6
05:50 masak joined #perl6
05:52 cnhackTNT joined #perl6
05:57 kanru joined #perl6
05:59 ggoebel joined #perl6
06:20 Alias_ joined #perl6
06:41 devogon joined #perl6
06:43 Alias__ joined #perl6
06:51 zakame_ joined #perl6
06:55 moritz_ t/todo/39-junction.t passes here
07:18 dlocaus moritz_: yes, it passes, but  I don't think that's how fglock wanted it done
07:19 jisom joined #perl6
07:38 penk left #perl6
07:58 iblechbot joined #perl6
08:07 penk joined #perl6
08:12 dlocaus left #perl6
08:17 _meppl joined #perl6
08:20 franck___ joined #perl6
08:30 Aankhen`` joined #perl6
08:43 luqui joined #perl6
08:44 devogon joined #perl6
08:44 rgs joined #perl6
08:44 franck___ joined #perl6
08:44 meppl joined #perl6
08:44 penk joined #perl6
08:44 zakame_ joined #perl6
08:44 kanru joined #perl6
08:44 cnhackTNT joined #perl6
08:44 masak joined #perl6
08:44 BinGOS joined #perl6
08:44 agentzh joined #perl6
08:44 funktio joined #perl6
08:44 kst joined #perl6
08:44 ofer joined #perl6
08:44 rafl joined #perl6
08:44 [particle] joined #perl6
08:44 xinming joined #perl6
08:44 lumi joined #perl6
08:44 jjore-w joined #perl6
08:44 drupek12 joined #perl6
08:44 IllvilJa joined #perl6
08:44 alc joined #perl6
08:44 tokuhir__ joined #perl6
08:44 Patterner joined #perl6
08:44 stevan_ joined #perl6
08:44 c9s joined #perl6
08:44 thepler joined #perl6
08:44 araujo joined #perl6
08:44 mj41 joined #perl6
08:44 cognominal_ joined #perl6
08:44 zamolxes joined #perl6
08:44 qmole joined #perl6
08:44 Southen joined #perl6
08:44 baest joined #perl6
08:44 ingy joined #perl6
08:44 pugs_svn joined #perl6
08:44 lisppaste3 joined #perl6
08:44 jrockway joined #perl6
08:44 SubStack joined #perl6
08:44 GeJ joined #perl6
08:44 nipotan joined #perl6
08:44 TreyHarris joined #perl6
08:44 shachaf joined #perl6
08:44 arguile joined #perl6
08:44 stef_ joined #perl6
08:44 zostay joined #perl6
08:44 buu joined #perl6
08:44 PerlJam joined #perl6
08:44 wolverian joined #perl6
08:44 Juerd joined #perl6
08:44 jiing joined #perl6
08:44 Maddingue joined #perl6
08:44 TimToady joined #perl6
08:44 jql joined #perl6
08:44 exp_evalbot joined #perl6
08:44 ajs joined #perl6
08:44 sunnavy joined #perl6
08:44 idiotmax joined #perl6
08:44 yahooooo joined #perl6
08:44 diotalevi joined #perl6
08:44 tewk joined #perl6
08:44 shmem joined #perl6
08:44 QtPlatypus joined #perl6
08:44 lidden joined #perl6
08:44 cls_bsd joined #perl6
08:44 Kattana joined #perl6
08:44 melissa joined #perl6
08:44 SamB joined #perl6
08:44 kcwu joined #perl6
08:44 f0rth joined #perl6
08:44 ting_ joined #perl6
08:44 ruoso joined #perl6
08:44 yves joined #perl6
08:44 Yappo__ joined #perl6
08:44 Daveman joined #perl6
08:44 Helios- joined #perl6
08:44 wilx joined #perl6
08:44 Khisanth joined #perl6
08:44 drbean joined #perl6
08:44 pjcj joined #perl6
08:44 ilogger2 joined #perl6
08:44 AzureBOT_ joined #perl6
08:44 perlbot joined #perl6
08:44 BlueT_Malaysia joined #perl6
08:44 buubot joined #perl6
08:44 integral joined #perl6
08:44 hcchien joined #perl6
08:44 felipe joined #perl6
08:44 Eidolos joined #perl6
08:44 spinclad joined #perl6
08:44 Teratogen joined #perl6
08:44 dalek joined #perl6
08:44 bbkr_ joined #perl6
08:44 cookys joined #perl6
08:44 sri__ joined #perl6
08:44 obra joined #perl6
08:44 Gothmog_ joined #perl6
08:44 gugod joined #perl6
08:44 pravus joined #perl6
08:44 takanori_ joined #perl6
08:44 rhr joined #perl6
08:44 Grrrr joined #perl6
08:44 dvorak joined #perl6
08:44 kolibrie joined #perl6
08:44 Tene joined #perl6
08:44 broquaint joined #perl6
08:44 szbalint_ joined #perl6
08:44 nnunley_ joined #perl6
08:44 mtve joined #perl6
08:44 pasteling joined #perl6
08:47 needhelp joined #perl6
08:47 devogon_ joined #perl6
08:47 lambdabot Title: 3D White
08:48 broquain1 joined #perl6
08:48 needhelp left #perl6
08:48 nnunley joined #perl6
08:48 szbalint joined #perl6
08:51 ft joined #perl6
08:56 zakame_ joined #perl6
09:32 drrho joined #perl6
09:35 moritz_ I hate spammers... especially if they know they are spamming
09:42 masak moritz_: is there any way to keep them out?
09:53 cognominal_ joined #perl6
09:53 moritz_ masak: not really. I delete the links from the logs, but that's all
09:54 moritz_ the alternatives are too unfriendly, like making the channel invite-only
09:56 masak true
10:05 cathyal joined #perl6
10:23 drbean joined #perl6
10:28 drbean joined #perl6
10:33 fglock joined #perl6
10:39 andara joined #perl6
11:02 penk joined #perl6
11:15 ebassi joined #perl6
11:27 mj41 joined #perl6
11:42 lichtkind joined #perl6
12:08 mtve joined #perl6
12:10 hareldvd joined #perl6
12:31 Gekz joined #perl6
12:48 awwaiid joined #perl6
12:55 cognominal_ joined #perl6
12:59 [particle1 joined #perl6
12:59 Notrix joined #perl6
13:00 gongyiliao joined #perl6
13:16 yahooooo joined #perl6
13:25 funktio joined #perl6
13:28 faxathisia joined #perl6
13:38 iblechbot joined #perl6
13:43 kanru joined #perl6
14:15 pugs_svn r18947 | fglock++ | [kp6] implemented list interpolation in parameter-list
14:15 wolverian nice!
14:16 devogon joined #perl6
14:17 moritz_ kp6: sub foo($a, $b) { say "$b | $a" }; my @a = (2, 3); foo(@a);
14:17 exp_evalbot r18946: OUTPUT[ | 2 3␤]
14:19 moritz_ tinita: defaultinstallation oder so, http://freigeist.org/battie/
14:19 lambdabot Title: my c00l website - content
14:19 moritz_ sorry, wrong channel
14:19 moritz_ kp6: sub foo($a, $b) { say "$b | $a" }; my @a = (2, 3); foo(@a);
14:19 exp_evalbot r18947: OUTPUT[3 | 2␤]
14:19 moritz_ YaY, fglock++
14:20 fglock it's not ready yet :P
14:21 moritz_ but the simple example worked
14:30 pugs_svn r18948 | moritz++ | [kp6] simple test for list interpolation into parameter lists
14:32 pbuetow joined #perl6
14:37 fglock pugs: my $x := (2,(4,5)); say $x.perl
14:37 exp_evalbot OUTPUT[\2␤]
14:37 fglock pugs: my $x = (2,(4,5)); say $x.perl
14:37 exp_evalbot OUTPUT[[2, 4, 5]␤]
14:37 fglock what's the difference?
14:38 pmurias joined #perl6
14:38 moritz_ uhm
14:39 moritz_ dunno, really
14:39 pmurias S06:888
14:40 pmurias moritz_: you added a test for wrong behaviour
14:40 moritz_ pmurias: yes, I just noticed
14:41 pugs_svn r18949 | moritz++ | [kp6] corrected previous test
14:41 moritz_ pmurias++
14:41 theorbtwo joined #perl6
14:42 pmurias ;)
14:42 penk joined #perl6
14:44 moritz_ now we need eval() to test the wrong behaviour
14:49 pmurias moritz_: isn't it a runtime error?
14:49 pmurias i would guess we need CATCH
14:50 moritz_ pmurias: I don't think so, because it can be checked at compile time
14:51 pmurias only in this specific case
14:52 moritz_ why?
14:52 pmurias "&foo := bar()" would make it a runtime error
14:52 pbuetow joined #perl6
14:52 moritz_ right
14:53 moritz_ but it's the "normal" case
14:55 moritz_ I think a runtime error is a good start, but I'd prefer static checking at compile time wherever possible
14:55 pmurias who wouldn't ;)
14:55 moritz_ matlab programmers, sadly
14:56 pmurias never met any, or wrote any matlab
14:59 moritz_ lucky man ;)
15:00 fglock which spec defines the behaviour of @a vs $a ?
15:01 moritz_ fglock: in which context?
15:05 fglock moritz_: I'm worried with my $x := (2,(4,5));
15:07 moritz_ TimToady: ping
15:12 pmurias S02: 1153
15:14 pmurias moritz_: what is the matlab's users rationale for wanting the errors at runtime?
15:14 fglock pmurias: thanks
15:14 moritz_ pmurias: habit, I guess
15:15 fglock but I didn't find my answer yet
15:15 moritz_ pmurias: I always hated it
15:17 pmurias fglock: "C<$x> may be bound to any object..."
15:19 fglock pmurias: why does my $x := 2 creates a Capture?
15:20 fglock assuming pugs is correct
15:21 fglock pugs: my $x = 2; say $x.perl
15:21 exp_evalbot OUTPUT[\2␤]
15:21 fglock it may even be a .perl bug
15:22 moritz_ fglock: most .perl expressions generate a capture in pugs
15:22 pmurias it's something like :($x) := \(2)
15:22 pmurias $x shouldn't be a capture
15:22 Lorn joined #perl6
15:23 moritz_ pugs: say \2 ~~ Capture
15:23 exp_evalbot OUTPUT[␤]
15:28 fglock pugs: my $x := (3,4,5); say $x.perl  # why doesn't $x bind to the list?
15:28 exp_evalbot OUTPUT[\3␤]
15:30 moritz_ I think it propagates scalar context to the RHS
15:30 fglock the reason kp6 gets confused is because i am confused :P
15:31 moritz_ I'd expect it to "upgrade" the list to an array ref instead
15:31 AzureBOT joined #perl6
15:31 moritz_ pugs: my $x = (2, 3, 4); say $x;
15:31 exp_evalbot OUTPUT[2 3 4␤]
15:31 moritz_ just like assignment does
15:32 moritz_ could it be that lists only degenerate to .elems in numerical context, and in other scalar context it's changed to a capture?
15:33 pmurias moritz_: i think bind is supposed to be unmagical
15:33 pmurias pugs: 2.perl
15:33 exp_evalbot OUTPUT["2"␤]
15:33 pmurias pugs: say 2.perl
15:33 exp_evalbot OUTPUT[2␤]
15:33 fglock hmm - i think the explanation is:
15:33 pmurias pugs: my $x := 2;say $x.perl
15:34 exp_evalbot OUTPUT[\2␤]
15:34 fglock bind is compiled as: ($x) := (1,2,3)
15:37 pmurias pugs: my ($x) := (9,10,11);say $x.perl
15:37 exp_evalbot OUTPUT[\9␤]
15:37 pmurias fglock: i agree
15:37 fglock but why is assignment different?
15:38 AzureBOT_ joined #perl6
15:38 pmurias pugs: my ($x) = (9,10,11);say $x.perl
15:38 exp_evalbot OUTPUT[\9␤]
15:38 pmurias pugs: my ($x) = (9,10,11);$x++;say $x;
15:38 exp_evalbot OUTPUT[10␤]
15:38 pmurias pugs: my ($x) := (9,10,11);$x++;say $x;
15:38 exp_evalbot OUTPUT[*** Can't modify constant item: VInt 9␤    at /tmp/JVCUj783sW line 1, column 22-26␤]
15:39 fglock pugs: my $x := (3,4,5); say $x.perl;  # not an implicit ($x) ?
15:39 exp_evalbot OUTPUT[\3␤]
15:39 fglock pugs: my $x = (3,4,5); say $x.perl;  # not an implicit ($x) ?
15:39 exp_evalbot OUTPUT[[3, 4, 5]␤]
15:39 amnesiac joined #perl6
15:39 fglock i mean, the second one
15:40 AzureBOT_ left #perl6
15:40 fglock why is assignment different from binding
15:42 pmurias fglock: don't know (you could look at STD, it might be a syntax issue)
15:43 fglock i've got the spec now - i just don't know why :)
15:48 pmurias $x := (3,4,5) is a special case of :($x) := \(3,4,5)
15:49 fglock in this case, isn't it a runtime error that not all parameters get bind?
15:50 pmurias it could be
15:51 fglock pugs:  my $x; :($x) := \(3,4,5); say $x
15:51 exp_evalbot OUTPUT[*** Cannot bind this as lhs: Val (VV :($x))␤    at /tmp/eHa7lVDwQO line 1, column 8-25␤]
15:51 fglock ?
15:53 moritz_ kp6: say "test"
15:53 exp_evalbot r18949: OUTPUT[test␤]
15:53 Tene kp6: say "moritz_"
15:53 exp_evalbot r18949: OUTPUT[moritz_␤]
15:53 moritz_ my irssi or screen just mixed a "core dumped" line into this window
15:53 moritz_ so I thought mybe evalbot died
15:54 Tene Ahh.
15:54 moritz_ it was a leftover from #p5p, though
15:58 pmurias pugs:  my $x; :($x) := (3,4,5); say $x
15:59 exp_evalbot OUTPUT[*** Cannot bind this as lhs: Val (VV :($x))␤    at /tmp/gHHxojs7Tv line 1, column 8-24␤]
15:59 TimToady kp6: sub foo($a, $b) { say "$b | $a" }; my @a = (2, 3); foo(@a);
15:59 exp_evalbot r18949: OUTPUT[3 | 2␤]
15:59 TimToady that is incorrect
15:59 pmurias the test is fixed
15:59 TimToady it should attempt to bind @a to $a, and fail when there's nothing left to bind to $b
15:59 moritz_ ... but not the implementation
15:59 TimToady *nod*
16:00 moritz_ pugs: my $x := <a b>; say $x.perl
16:00 exp_evalbot OUTPUT[\"a"␤]
16:00 moritz_ pugs: my $x := (7,8); say $x.perl
16:00 exp_evalbot OUTPUT[\7␤]
16:00 TimToady the difference between := and = is that = always applies either item or list context to the right side, whereas := never does
16:00 moritz_ TimToady: is that correct behaviour?
16:01 TimToady no, it's not
16:02 TimToady if you pass (7,8) as a scalar argument to a function, you expect it to turn into [7,8]
16:02 moritz_ ok
16:02 TimToady parens get autoflattened only in list context
16:02 TimToady and binding doesn't commit to that until you see what you're binding to
16:03 fglock isn't passing (7,8) to a function that expects ($x) an error?
16:04 TimToady not if the parens are around a single argument
16:04 TimToady foo((7,8)) should work fine
16:04 TimToady that's what is equiv to $a := (7,8)
16:05 moritz_ pugs: say elems: (3,4)
16:05 exp_evalbot OUTPUT[*** No compatible multi variant found: "&elems"␤    at /tmp/5VI6XrzY3W line 1, column 5-10␤]
16:05 moritz_ pugs: say elems: [3,4]
16:05 exp_evalbot OUTPUT[*** No compatible multi variant found: "&elems"␤    at /tmp/1kOBXuUGnI line 1, column 5-10␤]
16:05 TimToady you can't use : there
16:06 fglock got it - there is a lot of fixing to do
16:06 moritz_ pugs: say elems [3,4]: # that's what I meant
16:06 exp_evalbot OUTPUT[2␤]
16:06 moritz_ and it works with (3,4) as well
16:07 TimToady indeed, the invocant slot is item context
16:07 TimToady the only reason 3,4.elems doesn't work is precedence
16:08 moritz_ we need Acme::MagicDisambiguation for that ;)
16:09 fglock after $a := (7,8) - should $a.perl return "(7,8)" instead of "[7,8]" ?
16:10 moritz_ I don't think so
16:10 TimToady I don't think the Capture notion has to survive binding, so I'd expect [7,8]
16:10 fglock because (7,8) is a List object
16:10 fglock hmm
16:11 TimToady if you bind to |$a, that's explicitly asking to preserve capture info
16:11 TimToady (though you get the whole arglist capture that way)
16:11 TimToady mostly captures are supposed to be invisible to normal folks
16:12 TimToady a capture represents an argument list that we don't know the item/list context of yet
16:12 fglock does $a := (7,8) store a read-only Array ?
16:13 TimToady arguably that's the right thing for parameter binding, which is readonly anyway
16:13 TimToady but in explicit binding to a rw variable, I can argue it both ways
16:14 TimToady it's probably okay to leave it readonly for now, since they can always use explicit [] to get the other
16:14 TimToady and there's likely some benefit to knowing something is readonly
16:15 TimToady benefit to the optimizer, that is
16:17 TimToady on the other hand, I'd hate to see a lot of $a := new Array: 7,8,whatever()
16:18 TimToady but maybe that mostly becomes $a <== 7,8,whatever() in any cse
16:18 TimToady *case
16:20 TimToady so probably the conservative thing is to leave $a := (7,8) readonly on the assumption it's useful and also easy to get around
16:21 fglock ok
16:21 TimToady it's a bit un-Perl5-like though
16:21 amnesiac oi guys, btw, what happened to audreyt?
16:22 TimToady liver problems requiring low stress lifestyle
16:22 amnesiac ah
16:22 amnesiac yeah I'm pretty sure of that
16:23 PerlJam "low stress"?  Is that even possible for audrey?
16:23 amnesiac for anyone, you just have to stay out of IRC :)
16:25 PerlJam amnesiac: frenetic people seem to be in a state of perpetual stress.
16:34 * fglock stares at Container.pm
16:40 pugs_svn r18950 | rhr++ | [evalbot] [untested] use RESULT[] instead of OUTPUT[] when .perl.say is used
16:43 * pmurias thinks rhr is a brave soul (to commit untested changes to the evalbot ;)
16:44 Aankhen`` LOL.
16:48 drupek12 joined #perl6
16:49 rhr kp6: 1
16:49 exp_evalbot r18950: OUTPUT[1␤]
16:49 Aankhen`` Won't it need to be restarted?
16:49 Psyche^ joined #perl6
16:50 rhr I dunno, I don't run the bot :)
16:50 Aankhen`` Heh.
16:58 drrho joined #perl6
17:02 rindolf joined #perl6
17:05 chris2 joined #perl6
17:10 TJCRI joined #perl6
17:14 pugs_svn r18951 | fglock++ | [kp6] "@a = [1,2,3]" does the right thing, but "@a = @b" now fails
17:14 fglock I don't get how is [1,2,3] different from @b in an assignment?
17:14 fglock is it because @b is a container?
17:15 moritz_ kp6: my @a = [1, 2, 3]; say @a.elems
17:15 exp_evalbot r18951: OUTPUT[1␤]
17:15 moritz_ kp6: my @a = [1, 2, 3]; @b = @a; say(@b.perl)
17:15 exp_evalbot r18951: OUTPUT[[ [ 1, 2, 3 ] ]␤]
17:15 moritz_ kp6: my @a = [1, 2, 3]; @b = @a; say(@b.join('|'))
17:16 exp_evalbot r18951: OUTPUT[1 2 3␤]
17:16 moritz_ kp6: my @a = 1, 2, 3; @b = @a; say(@b.join('|'))
17:16 exp_evalbot r18951: OUTPUT[syntax error at position 9, line 1 column 9:␤my @a = 1, 2, 3; @b = @a; say(@b.join('|')␤         ^ HERE␤]
17:16 moritz_ kp6: my @a = (1, 2, 3); @b = @a; say(@b.join('|'))
17:16 exp_evalbot r18951: OUTPUT[1|2|3␤]
17:16 moritz_ that looks right in both cases
17:17 fglock kp6: my @b = (1,2,3); my @a=@b; say @a.perl
17:17 exp_evalbot r18951: OUTPUT[[ [ 1, 2, 3 ] ]␤]
17:17 fglock fixing
17:22 dlocaus joined #perl6
17:25 dlocaus hello
17:26 moritz_ hi
17:27 pugs_svn r18952 | fglock++ | [kp6] several array assignment cases are covered, but t/kp6/44-map.t fails
17:28 fglock i don't understand how an assignment from @x.map(...) is a different case of an assignment from [1,2,3]
17:29 fglock maybe @b and @x.map() return a List object
17:30 fglock but that would be weird, at least in the @b case
17:31 fglock perhaps my concept of List is wrong
17:31 moritz_ I think @x.map() should return a list
17:32 moritz_ because you can't (@x.map())[$index] = 3
17:32 moritz_ so it's gotta be read-only
17:32 fglock actually, you can - if map returns lvalue
17:33 moritz_ ok, but can you .shift and the like?
17:33 fglock i think Array is a special case
17:33 moritz_ pugs: say (map({ $_**2 }, <1 4 5>)).shift
17:33 exp_evalbot OUTPUT[*** Can't modify constant item: VUndef␤    at /tmp/bIZmT8DHX7 line 1, column 5 - line 2, column 1␤]
17:33 fglock when a List is either inside a @a variable, or an anonymous Array container
17:34 moritz_ that's what I meant: the thing returnd by map is a read-only container
17:34 fglock ok - gotta recode that
17:38 fglock brb
17:40 cmarcelo joined #perl6
17:42 barney joined #perl6
17:46 justatheory joined #perl6
17:51 [particle] oh, right, it's wednesday
17:51 [particle] i was in LA yesterday
17:53 [particle] ww
17:54 obra hey particle
18:04 pugs_svn r18953 | dlo++ | [kp6] minor documentation fix
18:08 jjore-m joined #perl6
18:09 ebassi joined #perl6
18:10 pugs_svn r18954 | dlo++ | [kp6] explaination of how the infix_58_... and so on is built
18:18 nnunley Hey obra.
18:19 [particle] hi there obra
18:20 obra hey guys.
18:20 clkao nnunley: you are alive!
18:20 obra nnunley: sounds like I narrowly missed you in sf a couple weeks back
18:21 nnunley obra & clkao: It looks like.
18:22 nnunley obra: I'm probably going to be in Boston Jan 12.
18:22 nnunley clkao: :)
18:22 obra nnunley: shit. I'm likely to be in sf for a wedding
18:22 [particle] maybe you can trade apartments for the weekend...
18:22 nnunley I'll be in sf the week after.
18:23 nnunley Err, Actually, I'll be in sf on the 13th.
18:23 clkao you are just avoiding each other
18:23 * nnunley grins at particle.
18:23 nnunley Could be.
18:25 nnunley clkao: Where are you these days?
18:26 nnunley Hrm. wait. I'm coming back from sf on the 11th, so I'm just confused.
18:26 clkao taiwan
18:26 Tene I want to go to sf again.
18:26 pugs_svn r18955 | dlo++ | [kp6] I think I accidently removed some code, reverting out
18:28 drupek12 joined #perl6
18:28 nnunley clkao: Any likelyhood of you being in the states in the near future?
18:31 obra yeah, clkao. .us hackathon?
18:31 obra .oo { .mx hackathon }
18:33 clkao currently no plan, but we can scsomething
18:33 IllvilJa joined #perl6
18:34 nnunley .mx would be fun.
18:44 cmarcelo_ joined #perl6
18:49 xinming joined #perl6
18:52 xinming_ joined #perl6
18:58 xinming joined #perl6
19:05 pugs_svn r18956 | dlo++ | [kp6] Documented and cleaned up this file
19:11 penk joined #perl6
19:18 pugs_svn r18957 | fglock++ | [kp6] anonymous array is a Container
19:21 exp_evalbot joined #perl6
19:21 moritz_ kp6: 5
19:21 exp_evalbot r18957: RESULT[5␤]
19:21 moritz_ YaY, rhr++
19:22 dlocaus kp6: 1/0
19:22 * dlocaus I didn't do that... the dog did it.
19:23 exp_evalbot joined #perl6
19:23 dlocaus btw, I put in a fix into Global for that, it will now die if you attempt to divide by zero.
19:24 moritz_ that's bad... why does evalbot die with segfault when the kp6 process is forked off first?
19:24 moritz_ kp6: say "back"
19:24 exp_evalbot r18957: OUTPUT[back␤]
19:24 penk joined #perl6
19:24 * dlocaus goes back to looking at signatures.
19:28 zakame_ joined #perl6
19:30 pugs_svn r18958 | fglock++ | [kp6] reverted last commit
19:31 fglock &
19:39 arguile joined #perl6
19:41 justatheory joined #perl6
19:47 DarkWolf84 joined #perl6
19:47 Aankh|Clone joined #perl6
19:50 jisom joined #perl6
19:56 Aankh|Clone joined #perl6
20:00 dlocaus moritz_: I was checking out http://dev.pugscode.org/browser/v6/v6-KindaPerl6/src/KindaPerl6/Visitor/Emit/Perl5.pm#L522
20:00 lambdabot http://tinyurl.com/yv836k
20:01 dlocaus And it occurred to me that
20:01 dlocaus "'do { if (::DISPATCH(::DISPATCH(' ~ $.cond.emit_perl5 ~ ',"true"),"p5landish") ) '"
20:01 dlocaus should really be
20:01 dlocaus "'do { if (::DISPATCH(::DISPATCH(' ~ $.cond.emit_perl5 ~ ',"true"),"true") ) '"
20:01 dlocaus is this correct?
20:17 pmurias joined #perl6
20:17 pmurias dlocaus: no
20:18 dlocaus why not?
20:18 pmurias true returns a kp6 object
20:18 pmurias and p5landish returns a perl5 value
20:19 moritz_ dlocaus: I think you overestimate my kp6 knowledge :/
20:19 dlocaus :)
20:19 dlocaus but what about a Junction?
20:19 dlocaus I was attempting to try this
20:19 dlocaus if ( 1 == any() ) {
20:19 dlocaus say "true";
20:19 dlocaus } else {
20:19 dlocaus say "false";
20:19 dlocaus }
20:20 dlocaus but Junction cannot be rendered into a p5landish "verb"
20:20 pmurias 1 == any() => False => perl5 0
20:21 dlocaus that's not what the code says
20:22 dlocaus my bad
20:22 dlocaus the code does say that
20:22 dlocaus I think I ment to try out this
20:22 dlocaus if ( 1 == all() ) {  say "true" } else { say "false" };
20:23 dlocaus http://dev.pugscode.org/browser/v6/v6-KindaPerl6/src/KindaPerl6/Runtime/Perl6/Junction.pm#L41
20:23 lambdabot http://tinyurl.com/yt29k8
20:23 dlocaus if there are no items in things, then it returns true
20:23 TimToady pugs: if ( 1 == all() ) {  say "true" } else { say "false" };
20:23 exp_evalbot OUTPUT[true␤]
20:24 TimToady pugs: if ( 1 == any() ) {  say "true" } else { say "false" };
20:24 exp_evalbot OUTPUT[false␤]
20:24 pmurias kp6: if ( 1 == any() ) {  say "true" } else { say "false" };
20:24 exp_evalbot r18958: OUTPUT[no method 'p5landish' in Class 'Junction'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤ KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x87942b0)', 'p5landish') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
20:24 exp_evalbot ..main::DISPATCH('HASH(0x87942b0)', 'p5landish') called at - line 18␤]
20:24 TimToady cool
20:25 pmurias the kp6 answer isn't cool at all
20:25 dlocaus well, that is why I was hunting it down... :)
20:25 dlocaus but how can 1 == all() be true?
20:26 TimToady because there are no elements that falsify it
20:26 * dlocaus brain crashes.
20:26 dlocaus What?
20:27 pmurias it makes sense if you understand it in terms of sets
20:28 dlocaus brb, going to the garage to get my college math books
20:28 TimToady my $status = 1; for @elems -> $elem { $status = 0 unless true $elem }; # basic short-circuit "and"
20:29 TimToady well, except with a loop exit
20:29 TimToady for @elems -> $elem { return False unless true $elem }; return True; # basic short-circuit "and"
20:30 moritz_ (set theory)++
20:32 dlocaus perl6--
20:32 dlocaus making me get my old math books!
20:33 moritz_ what's bad about it?
20:33 * pmurias has his math book <3 meters from his computer
20:33 pmurias * books
20:34 dlocaus 1 = all(undef) is true!
20:34 moritz_ no
20:34 moritz_ 1 = all() is true
20:34 moritz_ undef != empty set
20:34 TimToady note that all()/any() are also spelled [&]/[|] with defaults defined the same way
20:34 TimToady actually, you can't assign to 1  :P
20:35 moritz_ 1 == all() # of course
20:35 dlocaus all() !== all(undef)?
20:35 pmurias dlocaus: i makes perfect sense if you think in terms of regulation instead of real world objects
20:35 moritz_ dlocaus: the list (undef) holds one element, the list () holds none
20:36 pmurias all() == everything
20:37 moritz_ a mathematician would express $a == all(X) as 'For all $x in X: $a == $x'
20:37 moritz_ and an empty set always satisfies a "for all" condition
20:37 moritz_ because "for all" is just "not (exists ... (not ... ) )"
20:38 Southen joined #perl6
20:38 dlocaus I haven't had use set theory in like 15 years.. this hurts
20:38 TimToady and likewise, "any" is never satisfied by the empty set
20:39 * moritz_ hears a course on "automaton theory and formal languages", quite interesting
20:39 pmurias moritz_: right now?
20:39 dlocaus I'll make a note to -review set theory  tonight...
20:40 * justatheory sets
20:40 moritz_ I didn't know you could build automatons for regular languages that accept input both on the left and on the right hand side ;)
20:40 dlocaus Which is really bad, because I just started otn "Stalin: The court of the red Tsar", which turning out to be a pretty facinating read.
20:40 moritz_ pmurias: no, the last course was 12 hours ago ;)
20:40 pmurias ok
20:41 moritz_ it's the best course this term
20:41 moritz_ and one of the hardest, I might have to add
20:42 * pmurias has to look into his copy of "Introduction to Automata Theory, Languages, and Computation"
20:42 pmurias moritz_: i thought you were studing physics?
20:44 dlocaus pmurias: so how would I go about making Junction handle p5landish? or is it, I need to make == do a special operation for Junction?
20:45 dlocaus One of my hardest/funest courses was "politics"
20:45 dlocaus All papers, 500 words OR LESS. :)
20:46 moritz_ pmurias: yes, I should ;) but I have to take a second subject, to lesser extend
20:47 TimToady dlocaus: maybe you should look at how Quantum::Superpositions does it.
20:47 dlocaus back in a bit, I have to move my car (street cleaning :)
20:47 TimToady or maybe Damian put a Perl6::Junctions out there too...
20:48 dlocaus peeeking
20:48 TimToady pity that street cleaners aren't smart enough to wash your car en passant...
20:48 dlocaus pity the street cleaners aren't smart enough to wash the street.
20:49 dlocaus After they run by, its like... "huh guys?  you didn't clean anything"
20:49 TimToady must be a union shop...
20:49 dlocaus oh cool
20:50 dlocaus yep that's my home town. very pro union...
20:51 TimToady maybe we should advertise that we want to unionize the pythonistas.  that'd do 'em in...
20:51 TimToady "if you want me to indent that, you'll have to pay me more"
20:52 TimToady though, gee, I wouldn't mind getting paid for whitespace...
20:52 dlocaus back to do performance by KLOC? :)
20:52 dlocaus /do/doing/
20:53 TimToady #comments
20:53 TimToady #are
20:53 TimToady #us
20:53 dlocaus fglock?
20:53 dlocaus fglock ping?
20:55 dlocaus whew, I think I've blown my brains for this morning.  I'm going to eat lunch before I go completely cross eyed.
20:59 pmurias dlocaus: p5landish shouldn't be required for if
21:11 thoughtpolice joined #perl6
21:14 pmurias dlocaus: (hint) methods in kp6 are $::Code, they authothread on their invocant (it's a bug) so $junction.true is still a Junction (it should be a Bit)
21:43 jjore-m joined #perl6
22:08 Havena joined #perl6
22:12 melissa left #perl6
22:38 Alias_ joined #perl6
22:50 snearch joined #perl6
23:38 Limbic_Region joined #perl6

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

Perl 6 | Reference Documentation | Rakudo