pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, smop: etc.) || We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/ Set by TimToady on 25 January 2008. |
|||
00:05
namelessuser joined,
devogon left
00:29
icwiener left,
cognominal_ joined
00:30
cognominal__ joined
00:31
cognominal_ left
00:34
Auzon left
00:40
__Ace__ left
00:45
silug left
00:49
pbuetow left
00:50
pbuetow joined,
Limbic_Region joined
00:57
ruoso left
01:09
nipotaway is now known as nipotan
01:13
silug joined
01:26
pbuetow left
01:29
kanru joined
01:30
wtgee joined
|
|||
meppl | good night | 01:30 | |
01:31
Limbic_Region left
01:35
meppl left
01:44
blindfish left,
justatheory left
01:53
DaGo left
01:58
rando joined
01:59
Southen_ joined
02:12
cathyal left
02:20
Southen left
02:26
rando left
02:35
wtgee left
02:50
namelessuser left
03:26
justatheory joined
03:32
justatheory left
03:46
jferrero left
05:03
meteorjay joined
05:11
peeps[work] joined
06:04
nothingmuch left
06:08
njbartlett_ left
06:24
buubot left,
buubot joined
06:42
aindilis left
06:44
peeps[work] left
06:46
alester left
06:49
PerlJam joined
06:55
nothingmuch joined,
devogon joined
07:23
psapo left
07:24
psapo joined
07:30
jisom joined,
ludan left
|
|||
pugs_svn | r19830 | moritz++ | [t] moved regex/from_perl6_rules/pos_modifier.t to S05-modifier/, | 07:35 | |
r19830 | moritz++ | cleaned up POD, inserted fudge directives | |||
r19831 | moritz++ | spec/S05-modifier/pos.t: .pos is now $/.to | 07:44 | ||
07:44
BinGOs left
08:06
BinGOs joined
08:07
renormalist left
08:16
Aankhen`` joined
08:23
iblechbot joined
08:25
cosimo joined
08:32
Schwern joined
08:49
cosimo left
08:51
meppl joined,
meppel-san joined,
meppel-san left
08:57
pravus left
09:14
pravus joined
09:42
pravus left
09:44
pravus joined
09:48
ruoso joined
09:49
jisom left
10:02
ebassi joined
10:03
smtms left
10:07
jeffreykegler joined
10:08
IllvilJa left
10:10
jeffreykegler left
10:11
jeffreykegler joined
10:14
jeffreykegler left
10:18
smtms joined
10:27
IllvilJa joined
|
|||
ruoso | pugs: class Foo { method a { "a" } }; class Bar is Foo { sub a { "b" } }; my $a = Bar.new(); say $a.a; | 10:33 | |
exp_evalbot | OUTPUT[b] | ||
ruoso | pugs: class Foo { method a { "a" } }; class Bar is Foo { sub a { "b" } method b { self.a } }; my $a = Bar.new(); say $a.b; | 10:34 | |
exp_evalbot | OUTPUT[b] | ||
10:34
meppl left
|
|||
ruoso | is this correct? Method call vs. Subroutine call in S12 seems to imply otherwise | 10:34 | |
moritz_ | pugs: class F { sub a {'a' }} say F.new.a | 10:40 | |
exp_evalbot | OUTPUT[a] | ||
ruoso | in theory, class F { sub a { 'a'} } actually register "a" in *package* F, and not in class F. Which means that "a" is not part or the F prototype. That would make it unavailable to the method resolution, and when the calling fall back to sub dispatch, it would, as being inside package F, have "a" declared in the scope, and so it could be called. | 10:49 | |
but the question is, when it converts the method notation to sub dispatch, does it takes the sub from the object's package? as p5 would, for instance... | 10:50 | ||
10:50
cognominal_ joined
10:51
cognominal__ left
|
|||
ruoso | pugs: class F { sub a { "a" } }; my $f = F.new(); $f.a; F::a(); | 10:51 | |
exp_evalbot | RESULT["a"] | ||
ruoso | pugs: class F { sub a { "a" } }; my $f = F.new(); say join ',', $f.a; F::a(); | ||
exp_evalbot | OUTPUT[a] | ||
ruoso | pugs: class F { sub a { "a" } }; my $f = F.new(); say join ',', F::a(); | ||
10:51
blindfish joined
|
|||
exp_evalbot | OUTPUT[a] | 10:51 | |
ruoso | pugs: class F { sub a { "a" } }; my $f = F.new(); say join ',', $f.a; | ||
exp_evalbot | OUTPUT[a] | ||
ruoso | pugs: class F { sub a { "a" } }; my $f = F.new(); say join ',', $f.a, F::a(); | ||
exp_evalbot | OUTPUT[a,a] | ||
Alias_ | hmm | 10:52 | |
I need to finish LetMeIn so moritz_ can use something other than commitbit :) | 10:53 | ||
pugs_svn | r19832 | moritz++ | [irclog] fixed double logging of /topic changes | 10:54 | |
10:54
rff_ joined
|
|||
moritz_ | Alias_: I'm not the only commitbit user, I guess ;) | 10:54 | |
Alias_ | Well, there's some history there | ||
In the beginning, there was Insurrection | 10:55 | ||
Which I used to use on my open repository, and lots of people liked | |||
But was absolutely impossible to install | |||
So after much wailing and gnashing of teeth (Jesse|Audrey) made a clone of it | |||
Thus, commitbit | 10:56 | ||
A clone of insurrection based on Jifty | |||
Only problem for me is I can't ever seem to get Jifty installed EITHER | |||
moritz_ | lol | ||
Alias_ | So I've made ANOTHER clone, using absolutely as little code and modules as possible | ||
Simple cgi only | |||
No look and feel, so it works on my mobile phone crappy browser | 10:57 | ||
Or on Nintendo Wii, or in EVE Online, Second Life, et al | |||
svn.ali.as/ | |||
And it only has one file, and 2 dependencies | |||
All of which are pure perl | |||
And it doesn't need a database... | 10:58 | ||
Just works directly off the .htpasswd file that svn uses natively | |||
moritz_ | cool | ||
Alias_ | It's just not quite polished enough to release :) | ||
11:17
agentzh joined
11:18
nipotan is now known as nipotaway
11:20
chris2 joined
|
|||
ruoso | would $foo.^addmethod(...) be the same as $foo.WHAT.^addmethod(...) ? | 11:36 | |
moritz_ | ruoso: did you see my remark about vienna.pm's winter of code? | 11:37 | |
ruoso | I did... thanks... I'm just thinking a little longer on what I'll do... | ||
moritz_ | ok | 11:38 | |
ruoso | if we consider $obj.HOW !=== $obj.WHAT.HOW, that is a way to add a method to that object instance only, which may be usefull, and make the runtime composition more natural | ||
that causes the protoobject to have the same representation as the object, which is certainly a good thing | 11:41 | ||
and probably a mandatory feature for autovivification to work | 11:42 | ||
11:44
kanru left
11:48
kanru joined
11:58
monomorph joined
12:09
DarkWolf84 joined
12:21
zamolxes joined
|
|||
ruoso | www.perlfoundation.org/perl6/index....ementation | 12:26 | |
lambdabot | Title: SMOP p6opaque Implementation / Perl 6, tinyurl.com/2z5spt | ||
ruoso | I now have an interesting design of the p6opaque structure | ||
the object and the protoobject have the same structure | 12:27 | ||
and I have an interesting feature which is that an object might be its own prototype, when runtime composition is made in it... | 12:28 | ||
12:28
rff_ left
12:37
cosimo joined
12:41
pbuetow joined
13:33
cmarcelo joined
13:50
alester joined
13:53
alester left
14:33
njbartlett joined
14:46
kyrbe joined
14:47
kyrbe left
14:51
DarkWolf84 left
|
|||
kolibrie | TimToady: I've misplaced a script called 'uni' which I believe you wrote (for looking up unicode characters). Is it available somewhere? | 14:53 | |
15:04
spx2 joined
|
|||
spx2 | does perl6 understand how to add arrays like vectors in R^n ? | 15:04 | |
moritz_ | yes, with hyper ops | 15:05 | |
spx2 | moritz_, is it possible in perl5 as well ? | ||
moritz_ | pugs: say (1, 2, 3 »+« 9, 8, 7).perl | ||
exp_evalbot | OUTPUT[decodeUTF8': bad data: '\187'decodeUTF8': bad data: '\171'*** Hyper OP only works on lists at /tmp/v1t3iHfJI2 line 1, column 5 - line 2, column 1] | ||
spx2 | what key is that ? | 15:06 | |
>> ? | |||
moritz_ | pugs: say (1, 2, 3 >>+<< 9, 8, 7).perl | ||
exp_evalbot | OUTPUT[*** Hyper OP only works on lists at /tmp/JYOE9uJQ7I line 1, column 5 - line 2, column 1] | ||
15:06
njbartlett left
|
|||
moritz_ | pugs: say ((1, 2, 3) >>+<< (9, 8, 7)).perl | 15:06 | |
exp_evalbot | OUTPUT[(10, 10, 10)] | ||
pasteling | "rhr" at 65.94.10.253 pasted "kolibrie: uni" (20 lines, 450B) at sial.org/pbot/30217 | ||
moritz_ | spx2: in p5 you can use PDL | ||
spx2 | cool ! | ||
moritz_, thanks | |||
moritz_ | spx2: you're welcome | 15:07 | |
spx2 | moritz_, I was thinking of using this in some golf conding but seeing they have only perl 5.8.8 I think I'll have to abandon the ideea... | ||
the dudes hosting the contest are totally deprecated | |||
moritz_ | not totally, 5.10 is only 2 month old | ||
spx2 | I'm sure if they would install perl6 all contests would be won by perl6 people ... | ||
moritz_ | with the small caveat that p6 isn't yet ready | 15:08 | |
kolibrie | rhr: thank you! | ||
spx2 | moritz_, yes I'm waiting for it for some time | ||
moritz_ | spx2: don't wait, help! | 15:09 | |
spx2 | moritz_, theres a book on perl6 out on apress do you think it would be a good read/help ? | ||
moritz_ | spx2: there's "Perl 6 and Parrot Essentials", but it's outdated | ||
spx2 | moritz_, yes someone told me that here before and thats sad | 15:10 | |
moritz_ | and there are the synopsis here: perlcabal.org/syn/ | ||
lambdabot | Title: Official Perl 6 Documentation | ||
spx2 | moritz_, its sad because the manual/docs arent always as friendly as a book is | ||
moritz_ | the book is now open source, you can update it if you want | ||
the perl6 parts are somewhere in docs/ in the pugs repository | 15:11 | ||
15:11
gbacon left
|
|||
spx2 | I haven't closely watched of perl6 development | 15:12 | |
and no offence | |||
moritz_ | 'course | ||
spx2 | but I have the feeling of total chaos and disorganised people ... | 15:13 | |
very smart but totally disorganised | |||
moritz_, what do you think about this ? | |||
moritz_ | spx2: well, it's a volunteer's effort, you can't tell people what to do | 15:14 | |
spx2: the parrot part of the development is backed by TPF and well organized | |||
spx2 | moritz_, yes but I heard from a friend that perl6 people have received serious funding recently | ||
moritz_ | that's the parrot part, yes | 15:15 | |
The Perl Foundation seems to think that parrot is the one and only way to implement perl 6 | |||
and I agree that it is likely to be successfull, but that diversity is also a good thing | |||
spx2 | diversity=>work dispersed across several directions leading to same things done differently | 15:16 | |
coagulation of work=>faster development of perl6 | |||
coagulation of work=>good estimates of when perl6 will be out | 15:17 | ||
and we all want perl6 out ! | |||
moritz_ | pugs proved that wrong | ||
spx2 | moritz_, how did it prove it wrong ? | ||
moritz_ | you can't spec a language without developing it | ||
spx2 | can't all the people work on the same stuff ? | 15:18 | |
moritz_ | and the fast pugs development lead to big improvement in the specs | ||
[particle] | there's no way to get a good estimate of (largely unpaid) volunteer effort | ||
moritz_ | which makes it easier for the parrot folks much more directed, and easier | ||
spx2 | [particle], but mozilla pumped some dough ... | ||
moritz_ | spx2: as I said, that mostly goes into parrot, which is well organized already | ||
[particle] | mofo gave one man a grant for four months' work | ||
and that work is progressing nicely, we've already seen the benefits | 15:19 | ||
moritz_ | aye | ||
[particle] | i'd *love* to see the other perl 6 implementations get more organized, and receive funding | 15:20 | |
ruoso | TimToady, when you have some time, could you please take a look at www.perlfoundation.org/perl6/index....ementation ... I'm hoping that this model can implement P6 OO gracefully, but I really would appreciate your review | ||
lambdabot | Title: SMOP p6opaque Implementation / Perl 6, tinyurl.com/2z5spt | ||
moritz_ | [particle]: do you know if PGE supports the <token> ** <other_token> syntax? | 15:22 | |
15:22
renormalist joined
|
|||
[particle] | i don't believe it does. | 15:22 | |
moritz_ | ok, thanks | ||
[particle] | what does that mean? | ||
15:22
TJCRI joined
|
|||
moritz_ | a sequence of <token>s separated by <othertoken>s | 15:23 | |
[particle] | ah, hrmm | ||
moritz_ | <item>**',' is a comma separated list | ||
[particle] | nice syntax. | ||
no, you'll still have to do <item>? [ ',' <item> ]* | 15:24 | ||
15:24
kanru left
|
|||
moritz_ | without the first ? | 15:24 | |
[particle] | actually, for the example you gave, forget the ? | ||
moritz_ | ;) | ||
[particle] | i think pge only gets <item> ** {3} | 15:25 | |
15:28
rindolf joined,
spx2 left
15:31
peeps[work] joined
15:32
spx2 joined
16:01
Aankhen`` left
16:06
Aankhen`` joined
16:09
cosimo left
16:12
aindilis joined
16:21
manfred joined
16:27
DarkWolf84 joined
16:29
Psyche^ joined
16:34
cathyal joined
16:35
namelessuser joined
16:39
Patterner left,
Psyche^ is now known as Patterner
16:42
kst left
|
|||
cj | moin moin | 16:52 | |
16:58
lisppaste3 left
17:10
Helios- left
17:12
renormalist left
17:18
lisppaste3 joined
|
|||
TimToady | bleah, it's way too early for it to be this late... | 17:23 | |
rindolf | Hi all. | ||
Hi TimToady | |||
TimToady | ruoso: the $a.a mess was a fossil from the old design of p6 that purposefully confused 0-argument methods with 1-argument subs | 17:24 | |
that is now solved with "is export" on methods, so $a.a should never see a "sub a" | |||
so it's a pugs buglette | |||
17:25
spx2 left,
spx2 joined
|
|||
pasteling | "TimToady" at 71.139.8.150 pasted "The uni script" (23 lines, 520B) at sial.org/pbot/30223 | 17:27 | |
TimToady | kolibrie: see above | 17:28 | |
kolibrie | TimToady: thanks! | ||
ruoso | so, method dispatch does not fallback to sub dispatch? | ||
TimToady | never, we just install a sub alias if they explicitly say "is export" | ||
ruoso | nice... that makes thing simpler | 17:29 | |
TimToady | which makes it easy to have both push(@array: 1,2,3) and push(@array, 1,2,3) | ||
with the same impl | |||
bphillips | just curious (if anyone knows) is the current expectation that Audrey probably won't be able to return to the project? | ||
TimToady | indeed, if anyone wants to fix pugs... | ||
I would not expect it; her health is much more important | 17:30 | ||
ruoso | so, class F { sub a { "a" } method a { "b" } }; is valid... | ||
17:30
njbartlett joined
|
|||
bphillips | TimToady: agreed - I just hadn't heard any news on that topic in a long time | 17:30 | |
ruoso | where the sub install it in the package and the method install it in the prototype | ||
TimToady | I can argue it both ways | 17:32 | |
I think anyone who installs both a sub and a method of hte same name is crazy | |||
and the package has always been the record of the public interface of a class | |||
in p5 | |||
ruoso | well... in fact, it's the same case as push(@array and @array.push | 17:33 | |
[particle] | ...enough rope... | ||
can you have a module and a class with the same name? | |||
TimToady | yeah | ||
question is how you want someone external to the package to name methods | |||
(if you want to allow it) | |||
but that solution of course does not extend to anon classes | 17:34 | ||
moritz_ | is the double colon all gone? | ||
TimToady | we still have :: | ||
ruoso | isn't that the meaning of HOW ? | ||
I mean... | |||
HOW is the interface to mess with the class definition | |||
even if it is anonymous | |||
17:35
TJCRI left
|
|||
TimToady | sure, and certainly that will be the primary way of looking up methods | 17:35 | |
as I said, I can argue it either way | |||
17:35
namelessuser left
|
|||
TimToady | for now assume that the method doesn't have to also live in the packge | 17:35 | |
since that's simpler | 17:36 | ||
ruoso | actually, that's how I'm planning to implement p6opaque | ||
in smo | |||
TimToady | if someone wants to install such aliases for external use, we can think about it pragmatically later | ||
ruoso | smop | ||
even an anon-class can have methods, that won't probably be in any package | 17:37 | ||
[particle] | hrmm, i should implement 'is export' in rakudo. it'll clean up the sub wrappers we have around many of our methods | ||
ruoso | TimToady, did you have a chance to see the sketches on the smop p6opaque implementation? | 17:38 | |
TimToady | I've skimmed it, but I'm not awake enough yet to think it through | 17:40 | |
ruoso | ok.. | ||
btw... S12 needs to be updated to reflect the current status | |||
Method call vs. Subroutine call | |||
17:42
meppl joined
|
|||
ruoso | if I go on with the current p6opaque plan, the following will be possible: my $foo = 0 but True; my $bar = $foo.new(); say $bar ?? "1" !! "0"; # the result is 1 | 17:42 | |
moritz_ | that's... astonishing ;) | 17:43 | |
TimToady | oh, I had forgotten about the failover from method to sub, so maybe it's not a pugs bug... | ||
17:43
cathyal left
|
|||
TimToady | told you I wasn't awake yet... | 17:43 | |
ruoso | heh | ||
so... does the failover exist or not? | 17:45 | ||
TimToady | for now it does, but you don't have to worry about unless the method dispatch fails completely first, so I wouldn't worry about it at all right now | 17:46 | |
ruoso | ok... but one important thing | ||
packages doesn't inherit from each other, right? classes do... does the fallback goes through the object hierarchy *again* trying to find the sub? | 17:47 | ||
TimToady | no | ||
17:47
sri_work joined
|
|||
TimToady | it's just a translation of $a.foo to foo($a) and try the multiple dispatcher | 17:47 | |
ruoso | that is possibly unexpected... | ||
17:47
lumi_ joined
|
|||
TimToady | possibly | 17:48 | |
moritz_ | but multi dispatch honors inheritance | ||
ruoso | so, foo would have to be declared in the current scope? | ||
and not in the object's package | |||
TimToady | only if you declared multi a, not sub a | ||
ruoso | or would it be the same semantic as in p5... | 17:49 | |
where $foo.a translates to $($foo.WHO)::a() | |||
TimToady | on your 0 but True example, it is supposed to work that way, but I think you're thinking of the protoobject as its own class, whereas I was thinking that "but" creates an anonymous class shared by $foo and $bar | 17:50 | |
17:50
Helios- joined
|
|||
ruoso | well... in my example, $bar is $foo | 17:51 | |
:) | |||
and $foo is Int does True | |||
because my current plan allows the object itself to have more definitions | |||
and it become its own class | |||
when you do runtime composition | 17:52 | ||
TimToady | but you can also just create a new anon class whenever you need to external to the object, if you want to implement it that way | ||
Q is whether your approach forces overhead onto classy objects unnecesarrily | |||
since most of them will share a class | |||
ruoso | I see | 17:53 | |
TimToady | maybe we can have more than one P6opaque :) | ||
ruoso | probably we will | ||
TimToady | one optimized for prototype, one optimized for class-based | ||
17:54
jferrero joined
|
|||
TimToady | whole point of having a representation knob is that it can have more than one setting | 17:54 | |
but on the user side of .HOW you shouldn't easily be able to tell the difference | 17:55 | ||
and HOW is really a macro that can cheat as much as it likes | 17:56 | ||
so we probably have to restrict the set of possible representations to that known by the HOW in the current lexical scope | |||
which implies that an application might have to predeclare its representations | |||
before we can know what's safe to put into a HOW macro | |||
ruoso | well... | 17:57 | |
[particle] | HOWs fair if you predeclare | ||
ruoso | the whole point in smop is enabling different representations | ||
the thing here really is that we are going to need an HOW API | 17:59 | ||
and a Representation API | |||
for them to be interchangeable | |||
I mean... during BUILD, the class will have to talk with the HOW, and the HOW will have to talk with the Representaiton | 18:00 | ||
and in the end, there must be a complete object, independent of its representation | |||
that's one of the most scary features of Perl 6, and the one I most like | 18:01 | ||
in theory, you can create a Int that uses a Glib representation | |||
it's insane, and I love it | 18:03 | ||
TimToady bows, and gestures to the Cabal for their share of applause | 18:05 | ||
18:05
agentzh left
|
|||
ruoso | heh | 18:13 | |
18:28
ebassi left
18:31
zamolxes left
18:34
rindolf left
18:44
justatheory joined
18:49
Lorn_ joined
19:01
Aankhen`` left,
Aankhen`` joined
19:02
spx2 left,
spx2 joined
19:05
Helios- left
19:06
Lorn left,
Helios_ joined
19:07
Helios_ is now known as Helios-
19:09
fridim_ joined
19:15
chris2 left
19:17
gbacon joined
19:27
sri_work left
19:35
buchet joined
|
|||
ruoso | www.perlfoundation.org/perl6/index....mop_oo_api | 19:40 | |
lambdabot | Title: SMOP OO API / Perl 6 | ||
ruoso | first sketches on the Object/HOW/REPR API | ||
19:42
spx2 left
|
|||
ruoso | as usual, any review is more than appreciated. | 19:43 | |
home & | 19:44 | ||
19:52
njbartlett left
20:05
manfred left
|
|||
buchet | I try to write some tests for S17; so perhaps I need a commit bit. Do somebody have one for me? | 20:07 | |
[particle] | i can give you one | 20:08 | |
is S17 in the pugs repo? | |||
20:09
zev left,
zev joined
20:10
mofino_ joined
|
|||
buchet | isn't it docs/Perl6/Spec/Concurrency.pod? | 20:10 | |
20:10
avarab joined
|
|||
jnthn | Concurrency tests? Oooh... :-) | 20:11 | |
buchet | I said: I will try....:-) | 20:12 | |
wolverian | is that up to date / official? | 20:13 | |
[particle] | ok, gimme your email and username, i'll send you your bit | ||
20:14
mofino left
20:15
mofino_ is now known as mofino
20:21
avar left,
Aankhen`` left
|
|||
moritz_ welcomes our new concurrency overlord | 20:26 | ||
[particle] | buchet: email/username? i'd like to welcome our new overlord, too :) | 20:28 | |
20:33
buchet left
20:34
namelessuser joined
20:40
TJCRI joined
|
|||
TimToady | n | 20:43 | |
TimToady .oO(...) | |||
cognominal_ | you can use ... as argument of method call too? | 20:45 | |
moritz_ | just as a prototype indicator | 20:46 | |
pugs_svn | r19833 | rhr++ | [irclog] add CPS and PCT to abbr.dat | ||
cognominal_ | if it commes with an array context, you may get away thx to lazyness :) | ||
s/commes/comes/ | 20:47 | ||
it may translate in some sort of array thunk that evaluates to an error :) | 20:49 | ||
[particle] wonders what the oO() method on the current topic does. pull a news item from perl.org? | |||
> perl6 -e'.oO()' | 20:51 | ||
lambdabot | Improperly terminated character constant at "'" (column 15) | ||
[particle] | This Week on perl 5-porters - 27 January-2 February 2008 | ||
:) | |||
20:51
buchetc joined
|
|||
cognominal_ | grinder++ | 20:51 | |
[particle] | buchetc: you need to '/msg nickserv identify buchetc' in order to send private messages | 20:54 | |
cognominal_ | I wish that irc could somehow use openids too | 20:55 | |
[particle] | that'd be nice, yeah. | 20:56 | |
20:57
cj left
|
|||
[particle] | buchetc: it's customary to add your name to AUTHORS to test your commit bit. welcome! | 21:04 | |
TimToady | buchetc: nevermind my email then, if it gets to you :) | 21:05 | |
21:08
avarab is now known as avar
|
|||
pugs_svn | r19834 | buchetc++ | test commit bit | 21:19 | |
moritz_ | welcome buchetc ;) | 21:20 | |
TimToady | buchetc: feel free to ask questions about (or even edit) S17 as it seems appropriate | 21:25 | |
21:26
Schwern left
|
|||
moritz_ | and this is a good read for inspiration: www.seas.upenn.edu/~lipeng/homepage/unify.html | 21:27 | |
lambdabot | Title: Unifying events and threads | ||
21:29
cathyal joined
21:34
IllvilJa left
|
|||
[particle] | parrot's concurrency pdd is a good read, too. especially because it has been implemented already :) | 21:39 | |
TimToady | so implement gather/take :) | 21:46 | |
21:53
justatheory left
|
|||
[particle] | TimToady: looking at S09, it's not clear what 'my @array[-5];' will do | 21:55 | |
it think it's clear what it *should* do. | |||
how do i ask an array whether it's fixed size or not? | 21:56 | ||
21:58
buchetc left
|
|||
TimToady | @array[-5] should always fail, probably at compile time | 21:59 | |
lambdabot | Unknown command, try @list | ||
TimToady | oh, didn't see the "my" | ||
should still fail... | |||
22:00
njbartlett joined
|
|||
[particle] | that's what i imagine. | 22:00 | |
jnthn returns from $REALLIfE | 22:01 | ||
[particle] | but the spec is ambiguous by omission | ||
TimToady | as for inspection, that's what .shape should tell you | ||
[particle] | ah. shape. great. | ||
i'll ack that in the docs | |||
TimToady | it's mentioned in S09 | 22:02 | |
the only argument for [-5] being allowed is the same reason we allow 0..-5 for a null range | 22:03 | ||
but it seems a stretch | |||
[particle] | so 'my @array[5];' desugars to 'my @array = Array.new(:shape<5>)' or somesuch | ||
well, perhaps [0-5] or [*-5] | |||
but i think [-5] is bad | 22:04 | ||
TimToady | well, more like my @array := Array.new | ||
[particle] | right, sorry. should be bound. | ||
TimToady | the type of the container includes its shape | 22:05 | |
[particle] | but how do i know that it can't be extended? | ||
shape doesn't tell me if it's fixed or resizable | |||
TimToady | if it's a resizable dimension it uses * instead | 22:06 | |
22:06
TJCRI left
|
|||
[particle] | ok, so .shape would return Whatever in that dimension | 22:06 | |
TimToady | yes | 22:07 | |
[particle] | and i can fix an array's size after creation, using .shape(...) | ||
and if that makes the array smaller, does it return the values it's culled? | 22:08 | ||
22:08
meppl left
22:09
buchetc joined
|
|||
TimToady | well, you'd have to use .=shape, and it might well fail | 22:12 | |
[particle] | hrmm. | ||
so, 's possible .shape() can only set during bind | 22:13 | ||
TimToady | .new really | ||
[particle] | er, yeah. right-o. | ||
hrmm. my Array @x is ro; | 22:14 | ||
oops | |||
my Array @x[5] is ro; | |||
is that just the shape that's read-only, or the contents too? | |||
TimToady | um, you've just declared an array of Array | 22:15 | |
[particle] | hee. so i have. | ||
my Foo ... | |||
TimToady | but the ro is applied to @x as a whole | ||
"is" always aims at the entire declaratoin | 22:16 | ||
[particle] | the container and the contents | ||
TimToady | is applies the trait to the container, and the container may apply it to its contents if it wishes | ||
[particle] | ok, so it seems much better to use 'constant' rather than 'is ro' on container. | ||
TimToady | use readonly if you want to bind to something that varies at run time but you don't want to modify otherwise | 22:17 | |
constant can't vary at run time even | |||
that's why parameters are readonly rather than constant | |||
they get rebound on each call | 22:18 | ||
[particle] | ah | ||
TimToady | but over the life of the call they're invariant | ||
[particle] | i know some people like that | ||
TimToady | well I should commute | 22:19 | |
later & | |||
22:20
Limbic_Region joined
22:44
monomorph left
22:46
iblechbot left
22:54
wknight8111 joined
|
|||
rakudo_svn | r25590 | jonathan++ | [rakudo] Work around the class/role ordering issue for now, so people can play with OO in Rakudo until we work out a Real Solution. | 22:58 | |
22:59
cmarcelo left
23:01
justatheory joined
23:06
avar is now known as avarab
23:16
buchetc left
23:20
BinGOs_ joined
23:21
lambdabot left
23:22
peeps[work] left
23:25
BinGOs__ joined
23:32
BinGOs left
23:35
sri_work joined
23:39
BinGOs_ left
23:47
namelessuser left
23:48
namelessuser joined
23:57
avarab is now known as avar,
fridim_ left
23:59
sri_work left
|