»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: , or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by diakopter on 25 January 2010.
00:03 Guest24562 left 00:18 justatheory left, payload left 00:25 ihrd joined, ihrd left 00:26 rgrau left 00:28 mssm left, lichtkind left 00:33 lestrrat is now known as lest_away 00:46 colomon left 00:49 nihiliad left, f00li5h left, Grrrr left, f00li5h joined, arnsholt left 00:50 cotto left 00:51 Grrrr joined 00:58 nihiliad joined, cotto joined 01:00 arnsholt joined, jferrero left 01:10 meppl left 01:12 justatheory joined 01:13 LaVolta joined 01:16 hudnix joined 01:17 synth left 01:20 payload joined 01:23 colomon joined 01:24 lest_away is now known as lestrrat 01:26 drbean joined 01:30 yinyin joined 01:39 Chillance left 01:40 brianherman joined 01:41 jaldhar joined
brianherman is perl 6 finished? 01:41
01:41 ascent_ joined
Juerd brianherman: No 01:43
brianherman: Is Perl 5 finished? :)
brianherman oh
good point
01:44 lestrrat left
brianherman maybe i mean is perl 6 stable? 01:44
the best part of perl 6 is that butterfly
that thing is cute
diakopter brianherman: see perl6.org/specification/ 01:45
significant parts of the specification are in flux and/or unimplemented and/or conjectural 01:46
01:47 lestrrat joined
zorgnax what keyboard commands do I have available in the rakudo repl? 01:52
the history commands dont work (up down C-p C-n) 01:53
colomon zorgnax: up down works fine for me in the REPL... 01:56
02:05 fookyou joined
fookyou test 02:05
zorgnax I'm not sure whats wrong in my setup then. I just did a git pull and rebuilt it so I know everything is up to date 02:06
fookyou Can anyone unban me from #perl?? I dunno why I'm banned.... Just came to the channel after like months...
colomon zorgnax: what platform?
zorgnax ubuntu karmic 02:07
diakopter zorgnax: I think you have to build parrot with readline 02:08
which I'm not sure rakudo does by default 02:09
zorgnax parrot?
diakopter afk&
zorgnax I thought that type of functionality would be in the code for perl6
02:10 fookyou is now known as blahnickblah
colomon zorgnax: it works for me on OS X and CentOS, with Rakudo built with --gen-parrot. 02:11
zorgnax that's all that I did 02:12
diakopter blahnickblah: this channel really doesn't have much to do with #perl 02:15
blahnickblah: probably someone else using your IP address/block got banned.
blahnickblah Yeah, just was hoping.... I love using perl and I'm never on freenode, so I dunno why I'm banned...
I did refresh my ip recently..... I dunno...
diakopter use the web interface
webchat.freenode.net/ 02:16
just be sure not to mention you're banned, or else they'll likely kick you :)
blahnickblah lol
brianherman lol
blahnickblah I'll just change my ip?! Maybe it some range that's banned?? 02:17
I don't really care enough tho.... I got my question answered in #ubuntu.... But if I did it's probably a range ban anyways...
Hows perl6 going anyways??! 02:18
Is it gonna be really different??!
02:21 alester joined 02:22 jaldhar left 02:23 blahnickblah left 02:37 k23z__ left 02:38 brianherman left 02:40 jaldhar joined 02:52 cognominal left 03:08 agentzh joined
sjohnson "Is it gonna be really different??!" 03:11
elegantly phrased question
04:03 LaVolta left 04:34 alester left 04:37 jaldhar left 04:40 jaldhar joined 04:45 justatheory left 04:47 rekhajos joined 04:52 tuxdna joined, nihiliad left 05:08 LaVolta joined 05:20 cjk101010 joined 05:43 TiMBuS joined 05:59 gabiruh left 06:06 gabiruh joined 06:16 hcchien joined, hcchien left 06:31 addicted joined 06:37 addicted left 06:49 agentzh left 06:51 tarbo2 joined 07:19 kaare joined 07:20 kaare is now known as Guest75057 07:31 Su-Shee joined, LaVolta left
Su-Shee good morning 07:32
07:32 Baggiokwok joined 07:41 agentzh joined 07:44 drbean left 08:03 [particle]1 joined 08:18 iblechbot joined 08:44 rgrau joined 08:59 Baggiokwok left 09:06 dakkar joined 09:09 gfldex joined 09:12 drbean joined
moritz_ good morning 09:13
09:14 renormalist|work joined 09:16 mtve joined 09:22 renormalist|work left 09:23 renormalist|work joined
diakopter hi 09:27
09:28 Baggiokwok joined
moritz_ how is it going? 09:31
jnthn morning 09:33
09:34 k23z__ joined, moritz_ sets mode: +ooo jnthn diakopter sjohnson 09:37 colomon2 left 09:45 yinyin left 09:56 yahooooo left 09:57 yahooooo joined 10:02 ejs joined 10:06 ejs left 10:07 drbean left 10:12 ejs joined 10:19 ruoso left 10:27 JimmyZ joined 10:33 JimmyZ left 10:36 agentzh left 10:39 renormalist|work left, renormalist|work joined 10:46 mathw joined 10:48 patspam left 10:53 mssm joined
colomon morning 11:01
11:12 payload left 11:20 lestrrat is now known as lest_away 11:23 TiMBuS left
sjohnson hi guys 11:25
araujo hello 11:30
11:30 mj41 left 11:31 moritz_ sets mode: +C 11:33 mj41 joined, drbean joined 11:43 payload joined 11:47 payload left 11:48 payload joined 11:50 Woody2143 joined 11:53 payload left 11:54 payload joined 11:55 Baggiokwok left 11:57 payload1 joined 11:58 colomon left, rekhajos left 12:00 payload left 12:02 colomon joined, payload1 left 12:03 payload joined 12:08 payload left 12:10 LaVolta joined 12:13 Woody2143 left 12:17 bluescreen joined 12:21 lest_away is now known as lestrrat 12:22 uniejo joined 12:25 iblechbot left 12:26 f00li5h left, f00li5h joined 12:33 cotto left
colomon > (1..*).map({ last if $_ > 100; $_.say; }).eager 12:39
lambdabot <no location info>: parse error on input `{'
colomon now works perfectly in my local copy of ng1. :) 12:40
jnthn colomon: Nice! 12:41
12:43 payload joined 12:44 meppl joined 12:45 plainhao joined, k23z__ left 12:46 SmokeMachine joined
colomon though it only works for numbers, because I don't know the Inf equivalent for, say, strings. (Actually, range iterators only work for numbers, too, because of the dispatch bug.) 12:46
actually, based on the Range spec, it seems like there needs to be some sort of interface where you can determine the min and max possible values for types you can call succ on. 12:47
12:49 cotto joined
colomon ng: say Inf.WHAET 12:58
p6eval ng 22b55c: OUTPUT«Method 'WHAET' not found for invocant of class 'Float'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
colomon ng: say Inf.WHAT
p6eval ng 22b55c: OUTPUT«Num()␤»
12:59 mberends joined 13:07 pmurias joined
pmurias in svn.pugscode.org/pugs/misc/camelia.txt in line 21 it should be "or any other"? 13:10
moritz_ probably 13:11
oh wait 13:12
I think TimToady really meant "only the language"
13:18 uniejo left 13:21 bluescreen left, bluescreen joined 13:23 mberends left 13:29 bbkr joined
colomon ng: say 3 lt 5 13:35
p6eval ng 22b55c: OUTPUT«1␤»
colomon ng: say 11 lt 5
p6eval ng 22b55c: OUTPUT«1␤»
colomon Whoops.
bbkr hi. why there is no news on rakudo.org about 25th release?
moritz_ colomon: what's "Whoops" about that? 13:36
colomon: that's how string comparison works
colomon moritz_: ng's Range is always using string comparison to check Range membership.
moritz_ colomon: ouch
colomon I think I was thinking that lt and gt went with cmp, not leg. 13:37
moritz_ colomon: it should use cmp, which is polymorphic
colomon moritz_: actually, before and after, which are the cmp equivalents of < and > (or vice versa)
of course, at least for now before and after are implemented in terms of cmp. :)
moritz_ bbkr: probably pmichaud++ forgot to put up the notice 13:38
colomon This is why I am always a bit suspicious of TDD: 106 tests for basic Range functionality, but none of them could distinguish between comparing two numbers as strings and comparing two numbers as numbers.
moritz_ this is why I think our test suite is way too small 13:39
in the end no methodology can replace careful thinking
colomon moritz_: exactly. 13:45
13:49 Woody2143 joined 13:56 pmurias left 13:57 jaldhar left, hicx174 left, hicx174 joined 13:59 ignacio_ joined 14:04 uniejo joined 14:07 uniejo left, uniejo joined 14:11 ruoso joined 14:12 synth joined 14:14 k23z__ joined 14:19 jaldhar joined 14:25 ignacio_ left, drbean left, hicx174 left 14:26 [particle]1 left
bbkr "perl6 -v" on 25th release still returns "Copyright 2006-2009, The Perl Foundation.", year should be changed. 14:27
moritz_ bbkr: thanks for the hint, I'll change that 14:29
14:30 rgrau` joined, Baggiokwok joined 14:32 ignacio_ joined 14:34 [particle] joined, iblechbot joined 14:36 hicx174 joined 14:38 uniejo left, ignacio_ left 14:42 hicx174 left, hicx174 joined 14:45 ejs left 14:49 ejs joined 14:53 ignacio_ joined 14:55 Exodist joined, Guest75057 left 15:02 hicx174 left, PacoLinux joined 15:04 payload left 15:22 hicx174 joined 15:24 wasy joined
sjohnson another sleepless night 15:28
i generated some python -> clipper code translation using perl. it is good to use perl again 15:29
Perl's slogan should be "Perl... is there anything it can't do?"
15:30 pmurias joined 15:32 Baggiokwok left 15:33 hanekomu joined 15:34 Psyche^ joined 15:35 Psyche^ left, Patterner left, Patterner joined 15:36 ejs left 15:40 payload joined 15:41 iblechbot left 15:42 k23z__ left 15:44 jferrero joined
pmichaud good morning, #perl6 16:00
16:02 jaldhar left
pmichaud colomon: ping 16:04
sjohnson hi 16:06
16:06 jaldhar joined 16:08 nihiliad joined 16:16 LaVolta left 16:18 payload left 16:19 payload joined
diakopter moritz_: going well 16:24
16:26 ejs joined
diakopter TimToady: is there really an S09 rewrite pending? 16:37
pmichaud I'd guess that the recent changes to slice design is likely to spill into S09 16:41
so, it's not necessarily a rewrite, as much as "figure out how to get S09 to work with new information regarding slices"
diakopter oh 16:42
pmichaud (which may well end up in being a rewrite :-) 16:43
16:46 justatheory joined 16:47 payload left 16:55 mberends joined
colomon pmichaud: pong 16:57
pmichaud colomon: for Ranges, I don't think we should be converting Whatever into Inf
I think it should remain as a Whatever
colomon pmichaud: really?
pmichaud in particular, (3..*).perl should probably return "3..*" and not "3..Inf"
colomon will that work better for non-numeric types?
ng: say 2 < * 16:58
p6eval ng 22b55c: OUTPUT«too few positional arguments: 3 passed, 4 (or more) expected␤current instr.: 'perl6;Code;new' pc 11858 (src/builtins/Positional.pir:169)␤»
pmichaud it should work better for non-numeric types, yes.... but it's likely also going to be important for @a[3..*] handling
in the places where we do comparisons on a range endpoint, we'll need to explicitly check for Whatever 16:59
colomon okay, can do.
(I was wondering if there was a shortcut around that.)
pmichaud note that 2 < * produces a WhateverCode object
colomon pmichaud: that's what I thought.
okay, I can have that for you in a few minutes here, I think.
pmichaud no problem or rush... just wanted to make that opinion known :-) 17:00
colomon yeah, but it's too fun to put off. 17:02
Is there a better Whatever check than ~~ ::Whatever? 17:03
pmichaud not that I know of 17:04
colomon ng: my $a = *; say $a.perl 17:07
p6eval ng 22b55c: OUTPUT«too few positional arguments: 3 passed, 4 (or more) expected␤current instr.: 'perl6;Code;new' pc 11858 (src/builtins/Positional.pir:169)␤»
colomon ng: sub foo($a) { say $a.perl; say $a.WHAT; }; foo(*) 17:08
p6eval ng 22b55c: OUTPUT«too few positional arguments: 3 passed, 4 (or more) expected␤current instr.: 'perl6;Code;new' pc 11858 (src/builtins/Positional.pir:169)␤»
17:11 fda314925 joined
colomon pmichaud: when I try to pass that Whatever to bless, it balks at it with that same "too few positional arguments" message. 17:13
ng: my $a = *; 17:14
p6eval ng 22b55c: OUTPUT«too few positional arguments: 3 passed, 4 (or more) expected␤current instr.: 'perl6;Code;new' pc 11858 (src/builtins/Positional.pir:169)␤»
17:14 fda314925 left
pmichaud I'm not sure that Whatever has been implemented in ng/ng1 17:15
colomon pmichaud: it was working when I passed it in using 1..* and Range.new converted it to Inf. 17:16
pmichaud ng: say Whatever.WHAT;
p6eval ng 22b55c: OUTPUT«too few positional arguments: 3 passed, 4 (or more) expected␤current instr.: 'perl6;Code;new' pc 11858 (src/builtins/Positional.pir:169)␤»
colomon Huh.
pmichaud something looks very wrong with whatever there :-)
it may be that the dispatcher is having trouble dealing with threading 17:17
sorry, with whatever-dispatch
colomon yeah, I thought that was just the message for when it tried to bind it to a closure and failed.
(er, whatever the proper term for that trick is.)
pmichaud anyway, jnthn++ is probably the person to check with on that 17:18
we can leave the Inf/-Inf conversions in place for now so that Range "works", but eventually I think it needs to be the type
colomon okay, maybe I won't have it for you in a few minutes. :)
funny thing is, I think I have the right code for the Whatever version already (at least for iteration) but it is full of fail with that issue. 17:19
(I mean, locally, not the version I checked in.)
17:21 fda314925 joined
spinclad (question: why doesn't 1..* produce a WhateverCode?) (answer: it's special cased.) (special case smell?) 17:21
colomon spinclad: why should it? 17:22
bbkr ng: my %h = * => "a"; say %h{"this whatever is fake :P"} 17:23
p6eval ng 22b55c: OUTPUT«Confused at line 1, near "my %h = * "␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (src/stage0/HLL-s0.pir:328)␤»
colomon spinclad: I guess I see 1..* as being not that different from foo(*)... 17:25
spinclad in @a[0..*] (or should that be @a[0..^*]?) it seems it should act as a WhateverCode, taking @a's limit index as argument.
but by itself 0..* is supposed to be 0..Inf ... i don't quite see how that works both ways. 17:26
pmichaud spinclad: yes, but you don't typically want my @a = 3..*; to act as though you're creating an array with a WhateverCode object
in the case of @a[0..*] it's not a WhateverCode, it's a Range. Trying to make it a WhateverCode will in fact be problematic
because if @a has 10 elements, then @a[0..10] is in fact incorrect 17:27
spinclad right, so i wondered 0..^*
pmichaud * doesn't mean "last element", it means "whatever" 17:28
it's probably a mental mistake to try to make it mean "last element"
(or, more precisely, "index of last element"
let me put it this way 17:29
we know that for @a[3..7] the postcircumfix:<[...]> needs to be able to handle an argument of type Range
so _that's_ the point at which we check the Range for any whatevers 17:30
spinclad well... inside an index, if it _is_ a WhateverCode, it's handed ... not 'index of last element', but the one after that, the first past the end.
pmichaud right
if a WhateverCode is passed as a subscript, then we evaluate the WhateverCode with the length of the array 17:31
spinclad right
17:33 fda314925 left 17:34 araujo left
colomon rakudo: my @a = 1..10; say @a[*-2]; say @a[{$_ - 2}]; 17:35
p6eval rakudo 1d4928: OUTPUT«9␤9␤»
spinclad (otoh, in @a[0..*], with 0..* a Range, it looks like one iterates the Range until one falls of the end of @a, without complaint. ... )
pmichaud rakudo would seem to have that wrong.
I'm not sure what the second one should've produced. Possibly it should have not bound at all (no matching multi) 17:36
colomon I was just exploring what would happen if 1..* was the same as { 1..$_ } 17:37
spinclad ng: my @a = 0..9; say @a[0..*]; say @a[0..100]
p6eval ng 22b55c: OUTPUT«too few positional arguments: 3 passed, 4 (or more) expected␤current instr.: 'perl6;Code;new' pc 11858 (src/builtins/Positional.pir:169)␤»
spinclad rakudo: my @a = 0..9; say @a[0..*]; say @a[0..100]
TimToady note that subscripts are defined to not care if their final range runs off the end, so it doesn't matter what * expands to, as long as it's >= elems -1
p6eval rakudo 1d4928: OUTPUT«0123456789Use of uninitialized value␤␤0123456789Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of
TimToady that does imply keeping the info around somewhere that the final element of the list is a range 17:38
spinclad hm.. interesting difference there.. 0..* stops on first failure, 0..100 keeps going
rakudo: my @a = 0..9; say @a[0..^*] 17:39
p6eval rakudo 1d4928: OUTPUT«0123456789␤»
spinclad huh. looks like a WhateverCoded Range to me. 17:40
(btw, in colomon's example, i think the 9's are correct. 17:41
17:41 ejs left
TimToady rakudo: my @a = <a b c>; say @a[0..10000]; # supposed to work by current spec 17:42
p6eval rakudo 1d4928: OUTPUT«abcUse of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use
..of un…
TimToady see S09:220
spinclad heh. works fine.
17:43 k23z__ joined
TimToady *not* fine if you want to interate down the array one slice at a time and merely return a truncated final element 17:44
*iterate, even
17:44 k23z__ left
TimToady and the current policy solves the ..* vs ..^* ambiguity by make it not matter 17:46
I doubt that part of S09 is going to change, even if the rest does... :)
17:47 pmurias left, cjk101010 left 17:49 jferrero left 17:51 iblechbot joined
spinclad rakudo: (0..*).perl.say 17:53
p6eval rakudo 1d4928: OUTPUT«{ ... }␤»
spinclad (*-1).perl.say
rakudo: (*-1).perl.say 17:54
p6eval rakudo 1d4928: OUTPUT«{ ... }␤»
17:54 fda314925 joined
spinclad (*-1).WHAT.say 17:55
17:55 cjk101010 joined
spinclad rakudo: (0..*).WHAT.say 17:55
p6eval rakudo 1d4928: OUTPUT«!whatever_closure␤»
17:56 rdice joined 17:57 fda314925 left
spinclad ok, thanks. so rakudo trunk _does_ make 0..* a WhateverCode, but that's outdated spec, and should indeed be special cased to Range; and trunk likewise doesn't truncate index ranges per spec. seems sensible design, even with the small bit of special casing. 18:01
18:02 kst joined 18:03 Chillance joined
TimToady well, it should work even if it does return a WhateverCode, as long as the code in question still returns a recognizable range 18:06
'tis the truncation that is the key
spinclad sure 18:09
colomon Is @a[*..5] also supposed to work? 18:10
TimToady no 18:11
colomon why not?
TimToady truncation is defined only at the end
and 0 isn't that hard to type
spinclad ... but if 0..* be a WhateverCode, then i think other uses of it like for 0..* {...} would fail: no argument given to the WhateverCode 18:12
18:12 fda314925 joined
colomon TimToady: isn't it possible to create a Positional whose index range doesn't start at 0? 18:13
TimToady spinclad: unless the argument defaults to Inf
spinclad aha... 18:14
@a[*..*] # robotic grin
lambdabot Unknown command, try @list
18:14 ShaneC joined
TimToady colomon: by current spec, .[] is always 0-base, and you use .{} to get something else 18:20
18:20 cdarroch joined, cdarroch left, cdarroch joined
colomon TimToady: ah. okay. :) 18:20
vorner TimToady: can't you create multi operator and do something else in it? 18:21
TimToady you can do anything you like, with enough work :)
Perl 6 is designed to mutate into any language you like, even if you're into horror... 18:22
vorner but I guess you would handle all the whatevers in it yourself anyway
TimToady if it comes down to it, you can always write macros or grammar rules 18:23
or change out the semantic analysis routimes
but yes, multiple dispatch is lexically scope, so you can always override those easily 18:25
vorner Right, I heard that, I just wondered if the axiom that index is 0-based couldn't hurt somewhere 18:26
TimToady hasn't seemed to hurt C that much :)
at some point, one just switches to functions instead of subscripts 18:27
vorner but C doesn't have things like whatevers and so on, any zero-based things are done by programmer who knows if he makes the array something-else based 18:28
TimToady S09 just says that something-else-based just uses .{} instead of .[]
.[] implies UInt
and the type inferencer can depend on that 18:29
colomon Perl 6 has a type inferencer?! Cool!
TimToady in the abstract...
nobody's written it yet 18:30
colomon That probably explains why I've not heard of it. :)
TimToady but it's all swept under the carpet of "If the compiler is able to detect that something will fail at run time, it may complain at compile time." 18:31
jnthn We only do it in one place in Rakuod so far. :-)
(the case of multi fact(0) { 1 } style things)
colomon jnthn: so, about ng and Whatever.... :) 18:32
TimToady we do not, however *require* type inference, since that also requires the user to be quite sophisticated to do the meta-type-inference
see ML etc.
jnthn colomon: oh noes, what discussion have I just wondered into from while debugging a memory leak... :-)
colomon has an entire collection of half-read functional programming books for much that reason... 18:33
jnthn colomon: I suspect ng may not know a whole load about Whatever yet. 18:34
colomon jnthn: as you can see from the backlog, it gives "too few positional arguments: 3 passed, 4 (or more) expected" almost anytime you do anything with it other than ~~ ::Whatever.
jnthn colomon: Oh, maybe bit-rot. 18:35
That could be easily fixable.
colomon As pmichaud said, jnthn++. :) 18:36
jnthn For introducing bitrot? ;-) 18:37
TimToady afk &
jnthn Wow, I got karma for rotting too. :-)
colomon for knowing how to fix it...
jnthn I'll try and fix it in a moment...think I know why $work-app is leaking some gigs...
colomon cool. 18:38
18:43 ignacio_ left 18:44 dakkar left 18:49 SmokeMachine left 18:56 jonasbn joined 18:58 ignacio_ joined 19:00 SmokeMachine joined
colomon pmichaud: one other thing which keeps worrying me about Iterators. How does @a.map(-> $a is rw { ... }) work? 19:00
19:02 stephenlb joined 19:03 rdice left 19:09 REPLeffect joined 19:12 cognominal joined 19:14 cognominal left, cognominal joined, user__ joined 19:15 user__ is now known as dr_df0 19:16 ejs joined
dr_df0 perl6: say 'test' 19:17
p6eval elf 29603, pugs, rakudo 1d4928: OUTPUT«test␤»
jnthn ng: *
p6eval ng 22b55c: OUTPUT«sh: ./perl6: No such file or directory␤»
jnthn colomon: ah, not quite what I thought...gotta go for dinner now...actually seems there is two issues, not just one. 19:18
erm, there are...
colomon k. talk to you later, then.
jnthn cu
pmichaud colomon: @a.map(-> $a is rw { ... }) works because the result of iterating @a is each of the elements of @a 19:20
colomon pmichaud: but how does it work wrt iterators? 19:21
diakopter ng: *
p6eval ng 22b55c: ( no output )
colomon pmichaud: I mean, .get is returning a value, right, not a reference to a value.
pmichaud colomon: no, .get returns the actual container, not a value 19:22
19:24 jaldhar left
pmichaud afk, lunch 19:24
19:25 jaldhar joined 19:34 wasy left, wasy joined 19:35 wasy left 19:37 wasy joined 19:48 payload joined 19:49 araujo joined 19:52 ignacio_ left, k23z__ joined 19:54 cotto_work joined 20:01 nihiliad left 20:06 ignacio_ joined 20:13 plainhao left
pugs_svn r29604 | lwall++ | [S02,S06] continue de-confusing flat and eager 20:15
PerlJam good day all
colomon o/
20:21 hercynium left 20:22 cognominal left 20:29 dr_df0 left
pugs_svn r29605 | lwall++ | [S02,S03,S04] more @@ removal; some s/Capture/Parcel/ cleanup 20:34
20:35 mberends left
Tene ng: say (*+5).WHAT 20:35
p6eval ng 22b55c: OUTPUT«too few positional arguments: 3 passed, 4 (or more) expected␤current instr.: 'perl6;Code;new' pc 11858 (src/builtins/Positional.pir:169)␤»
Tene ng: say 1..*
p6eval ng 22b55c: OUTPUT«too few positional arguments: 3 passed, 4 (or more) expected␤current instr.: 'perl6;Code;new' pc 11858 (src/builtins/Positional.pir:169)␤»
Tene What part of Perl 6 determines that * with .. is different from * with other operators? 20:36
ruoso TimToady, considering "say flat(<1 2> Z <3 4>)" and "say slice(<1 2> Z <3 4>)"... does a simple "say <1 2> Z <3 4>" still flattens? 20:37
I'm assuming it does, because the signature of say is "(@items)"
it is (*@items)
and I somehow think that slurpy does flatten the result 20:38
er... not result, the parameters...
pmichaud (the arguments :-)
I haven't read the updates -- but before all of these latest changes I had been thinking that slice(...) would remove the flattening behavior of any of its arguments 20:39
20:39 cdarroch left
ruoso right... and flat preserves it 20:39
so what is the default?
pmichaud actually, I'd think that flat forces it
ruoso ah... right...
pmichaud there are three levels
Tene "A C<Parcel>s is normally flattened..." -- typo
pmichaud flat - forces it
slice - denies it 20:40
(list) -- allows it
where "it" == "flattening"
ruoso so "sub say(*@items) {...}" will flatten
pmichaud if the arguments to @items are flattening arguments
but the result of slice() never flattens
ruoso or will it still depend on how @items is used?
pmichaud I need to read latest spec updates 20:41
on another topic -- I'm thinking that perhaps we just switch ng1 branch to master within 48 hours
Tene pmichaud: have a list of topics you'd like to see worked on before then? 20:42
pmichaud anything that currently fails "make spectest" :-)
Tene I was planning on looking at * tonight.
pmichaud but short term, I'd like to bring the iterator stuff up-to-spec with the latest changes
whatever would be good also
but I think looking at * isn't much help before we get closures and thunks fixed.
Tene nods. 20:43
20:43 sjohnson sets mode: +o PerlJam 20:48 mberends joined
TimToady I don't have a sig notation for slice context yet, but it might be **@foo, or maybe something liek *@foo! to make it bind like a positional 20:51
also considering whether -> args should just default to slurpy always
pmichaud how strongly are you trying to stick with ASCII for slice notation? 20:52
I keep thinking of 20:53
§ as a possibility
20:53 cdarroch joined, cdarroch left, cdarroch joined
TimToady well, we'll come up with some way to be explicit about which kind of binding we want, but how to default -> the other way is a problem 20:54
pmichaud I don't quite see the problem with ->
TimToady you posed it as Pm-19 20:55
did you see what I wrote? 20:56
pmichaud yes, but let me re-read
TimToady it just occurred to me that a 3rd approach was to always make -> assume it's in a slurpy setting unless specifically marked otherwise 20:57
pmichaud I would think that if I want a slice that I'd use (old notation) --> @@x
20:57 _ash joined
pmichaud or, more specifically, if I want a non-flattening item 20:57
TimToady yes, but the question is how the default gets to be flattening? 20:58
ordinary mandatory positionals don't flatten
pmichaud true, but there we're binding to a parcel instead of an iterator
in the case of map, we're doing repeated binding against an iterator 20:59
TimToady yes, so the binding has to behave differently than an ordinary call
how does the binder know that?
pmichaud (bad guess) ... because it's against an iterator instead of a standard parcel? 21:00
i.e., inside of .map, we'd be doing &block(|$iterator) instead of &block(|(parcel)) 21:01
TimToady the ordinary call is also binding against the iterator embedded in the Capture
jnthn It maybe pretends to. ;-)
jnthn has seen captures as rather more low-levelish thingies. :-) 21:02
pmichaud I think that's still a difference -- a binding against an iterator is different from binding to a capture (that has an iterator)
many times we end up performing operations on objects for which the first step is "get an iterator for this object", and the behavior is different than if we were performing the operation directly on an iterator
jnthn The capture may be Iterable, which means it can provide an iterator, I'm not sure that means it "has an" iterator (as in $.has)
pmichaud perhaps what I'm trying to say is that I think that binding to a capture should be a "succeed/fail" sort of thing, while binding to an iterator is the way we think of partial binding (more) 21:06
jnthn Anyway, I'm inclined to agree with pmichaud that I'd prefer to see the two separate.
pmichaud I also feel like this is relevant to the handling of feeds
jnthn pmichaud: +1
pmichaud that what gets passed among feeds are iterators with partial bindings, and not completed captures 21:07
TimToady how does map tell the lambda's binding that it's okay to leave extra args?
jnthn TimToady: Presumably because you invoke with an iterator rather than a capture, no? 21:08
pmichaud yeah, something like that
jnthn TimToady: Or are you wanting to distinguish it in a different way?
colomon: Locally:
> my $a = *; say $a.WHAT 21:09
lambdabot <no location info>: parse error on input `='
jnthn Whatever()
/kick lam...
colomon \o/
pmichaud jnthn, colomon: 20:40 <pmichaud> on another topic -- I'm thinking that perhaps we just switch ng1 branch to master within 48 hours
TimToady okay, I'm binding a signature, $x, $y, $z for something. How does the binding of $y know whether to call .get or .getitem?
colomon stupidly thought lambdabot's response was what jnthn was getting locally... 21:10
TimToady it might be a simple lambda supplied to a map, or it might be the where-the-rubber-meets the road of an ordinary sub or method
colomon pmichaud: there have been a couple minor changes on ng since ng1, I think.
TimToady this has to distribute over the parameters so each one knows whether to .get or .getitem
pmichaud colomon: presumably they can be merged into ng1/master also 21:11
TimToady it's not the same throughout the signature
jnthn TimToady: Wait...huh
jnthn is confused now
TimToady then don't vote +1 :P
colomon pmichaud: is there a decent chance we can get spectest back to ng levels before making the switch? it's sort of too broken for regular hacking at the moment.
pmichaud colomon: is anyone actively hacking on ng? 21:12
colomon pmichaud: I don't think so.
pmichaud (whether to call .get or .getitem) ...this is partially why I prefered it to be always .get (which acts like .getitem), instead of trying to put flattening directly into the iterator
21:13 payload left
TimToady then you're re-inventing the iterator inside the binder, I think 21:13
pmichaud then .map would handle flatten-versus-not-flatten in what it passed to the lambda
yes, I recognize this is also problematic
colomon pmichaud: actually, looks like the only patch ng has that ng1 doesn't is turning on spectests.
TimToady or inside map