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:04
Limbic_Region joined
00:11
alester joined
00:13
nipotaway is now known as nipotan,
jjore-w joined
00:36
cathyal joined
02:09
Limbic_Region left
02:15
samdc joined
02:18
samdc left
02:32
zakame joined
02:51
alester left
03:07
Auzon joined
03:10
alester joined,
hcchien left,
hcchien joined
03:28
Auzon left
03:29
fridim_ joined
03:34
Psyche^ joined
03:35
eternaleye joined
03:46
Psyche^ is now known as Patterner
03:51
zakame left
04:00
wknight8111 is now known as wknight-away
04:11
stevan_ joined
04:13
lisppaste3 joined
04:33
wknight-away left
04:36
pbuetow joined
05:22
drbean_ joined
05:31
zakame joined
05:37
monomorph joined
05:41
araujo joined
05:47
drbean joined
05:48
drbean left
05:50
krumms_ joined
05:53
monomorph left
05:57
cathyal left
06:06
jjore joined
06:22
iblechbot joined
06:53
lambdabot joined
07:01
luqui joined
07:14
psapo joined
07:18
zakame left
07:22
Schwern joined
07:30
iblechbot left
07:51
Aankhen`` joined
08:00
masak joined
08:14
laye joined
08:17
devogon joined
08:22
marmic joined
|
|||
pugs_svnbot | r19904 | lwall++ | latest whackage on longest-token lexer using TRE (requires re-engine-TRE-0.02) | 08:22 | |
r19904 | lwall++ | can now use tagged DFA info to determine nested alternation fates | |||
diff: dev.pugscode.org/changeset/19904 | |||
lambdabot | Title: Changeset 19904 - Pugs - Trac | ||
08:30
fridim_ left,
lidden joined
09:02
qmole joined
09:11
mattz joined
09:15
zakame joined
09:21
nipotan is now known as nipotaway
09:23
zakame_ joined
09:38
zakame left
09:41
krumms_ left
09:42
ebassi joined
09:47
meppl joined
09:53
zakame__ joined,
zakame__ is now known as zakame
10:02
chris2 joined
10:05
zakame_ left
10:34
ruoso joined
10:36
xinming_ joined
10:52
luqui left
10:55
avar joined
10:58
meppl left
11:15
Botje left
11:17
sri_work joined
11:30
wknight-away joined
11:38
Botje joined
11:54
lambdabot left
11:55
lambdabot joined
12:15
wknight-away left
|
|||
diakopter | pugs: say NoName.HOW.name | 12:21 | |
exp_evalbot | OUTPUT[*** No such subroutine: "&NoName" at /tmp/EmSlgudhqX line 1, column 5 - line 2, column 1] | ||
12:25
aindilis joined
12:27
chris2 left
12:29
aindilis left
12:30
aindilis joined
12:35
zakame_ joined
12:48
zakame left
13:50
ilogger2 joined
13:52
aindilis joined
13:56
monomorph joined
|
|||
rakudo_svn | r25692 | jonathan++ | [rakudo] Big refactoring to the objects implementation to remove a lot of inline PIR from the actions file and to make it earlier to allow different metaclasses to give meaning to various keywords later, as we'll need to do S12. No doubt we'll need futher clear-ups later, but | 13:59 | |
..this is further in the right direction. | |||
r25693 | jonathan++ | [rakudo] Remove another bit of inline PIR in favor of generating PAST nodes. | 14:07 | ||
14:15
IllvilJa joined,
iblechbot joined
|
|||
pugs_svnbot | r19905 | moritz++ | [t] S03-operators/assign.t: more rakudo skips | 14:21 | |
diff: dev.pugscode.org/changeset/19905 | |||
lambdabot | Title: Changeset 19905 - Pugs - Trac | ||
rakudo_svn | r25694 | jonathan++ | [rakudo] Fix accessor/mutator generation for attributes, which got broken. | 14:22 | |
14:26
njbartlett joined
14:27
thepler joined
|
|||
pugs_svnbot | r19906 | moritz++ | [t] assign.t: skip rest that makes rakudo loop | 14:36 | |
diff: dev.pugscode.org/changeset/19906 | |||
lambdabot | Title: Changeset 19906 - Pugs - Trac | ||
pugs_svnbot | r19907 | moritz++ | [t] fixed previous commit | 14:39 | |
diff: dev.pugscode.org/changeset/19907 | |||
lambdabot | Title: Changeset 19907 - Pugs - Trac | ||
pugs_svnbot | r19908 | moritz++ | [t] fudge doesn't like trailing ';' | 14:42 | |
r19909 | moritz++ | [t] ok, fudge needs ; statement separator for 'emit' statements | |||
diff: dev.pugscode.org/changeset/19909 | |||
lambdabot | Title: Changeset 19909 - Pugs - Trac | ||
14:52
njbartlett left
|
|||
ruoso | lunch time is a great time to have intersting ideas.. | 14:53 | |
I've just realised that I can use the constant identifier and native values more powerfully than I first thought | |||
If I define a lowlevel interface for runtime definition of new constants (checking for matching an already defined constant, of course) | 14:54 | ||
The compiler will be able to define every bareword and constant string as a constant value... | |||
TimToady | you've just discovered Lisp symbols :) | 14:55 | |
ruoso | the awesome thing about it, is that most method dispatching will be able to use simple C pointer identity check to find out the method (or methods) by name | ||
TimToady | you are now officially as smart as the inventers of Lisp :) | 14:56 | |
ruoso | hehe | ||
at least I know I'm reinventing a good wheel | |||
TimToady | only about 50 years late... | ||
ruoso | maybe that's a sign that I *should* lern lisp now... | ||
TimToady | we should build a Smop Machine, oh wait... | 14:57 | |
15:03
viklund joined
15:05
jhorwitz joined,
rdice joined
15:07
alester joined
15:12
Psyche^ joined
15:14
Psyche^ is now known as Patterner
15:30
meppl joined
15:32
SinDoc joined
|
|||
ruoso | pugs: say "foo" === "foo" | 15:37 | |
exp_evalbot | OUTPUT[1] | ||
ruoso | pugs: say "foo".WHERE === "foo".WHERE | 15:38 | |
exp_evalbot | OUTPUT[*** No such method in class Str: "&WHERE" at /tmp/wybV0bT3vp line 1, column 5 - line 2, column 1] | ||
ruoso | kp6: say "foo".WHERE | 15:39 | |
exp_evalbot | r19909: OUTPUT[no method 'WHERE' in Class 'Str' at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345 KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x8e4bd28)', 'WHERE') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169 | ||
..main::DISPATCH('HASH(0x8e4bd28)', 'WHERE') called at - line 11] | |||
ruoso | rakudo: say "foo".WHERE | ||
exp_evalbot | OUTPUT[Method 'WHERE' not found for invocant of class 'Perl6Str'current instr.: '_block10' pc 12 (EVAL_10:9)called from Sub 'parrot;PCT::HLLCompiler;eval' pc 789 (src/PCT/HLLCompiler.pir:459)called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1063 (src/PCT/HLLCompiler.pir:586)called from Sub | ||
..'parrot;PCT::HLLCompiler;command_line' pc 1246 ... | |||
TimToady | pugs: say "foo".WHICH | ||
exp_evalbot | OUTPUT[foo] | ||
TimToady | the identity of an immutable value is just the value itself | ||
ruoso | what I'm trying to realise is if pugs optimize "foo" and "foo" to be a single object | 15:40 | |
but I would need WHERE to check that | |||
TimToady | I don't know if it does, but it may, if they're both immutable | ||
ruoso | I'm starting to plan on how to implement that in smop | 15:41 | |
15:42
SinDoc left
|
|||
ruoso | I'll do it before implementing p6opaque, to maximize constant identifier usage in method dispatch | 15:42 | |
as well as private storage dispatch | |||
15:43
Zygo joined
15:44
SinDoc joined
|
|||
ruoso | TimToady, when resolving private storage in the object I'm planning about checking if the Package is the same object, considering that a name should always refer to only one package | 15:44 | |
I mean... | 15:45 | ||
when fetching a private slot, you give the package where it belongs | |||
hmm... reviewing S02, it makes sense, as Package is a mutable type... | 15:46 | ||
so, using === seems like the right thing to do... | 15:47 | ||
pugs: say Object.WHO | 15:48 | ||
exp_evalbot | OUTPUT[*** No such method in class Object: "&WHO" at /tmp/pdFxhSqAjP line 1, column 5 - line 2, column 1] | ||
ruoso | can it be said by syntax when someone is talking about Object the class and Object the package? | 15:49 | |
15:50
dalek joined
15:51
SinDoc left
15:53
fridim_ joined
16:32
ilogger2 joined
|
|||
ruoso | one could ask... wasn't the need for WHO, WHAT etc realised as the implementation started to get to that point? | 16:32 | |
[particle] | i'm sure the next implementation of perl 6 will approach construction even better than smop | ||
TimToady | well, parrot has been mostly trying to bootstrap the p5ish subset of p6, but jonathan is getting some of the metagoop in now... | 16:33 | |
ruoso | [particle], sure it will... my point was actually that smop seems to be the first to try stressing S12 from bottom-up | 16:34 | |
but anyway... it doesn't really matter | 16:36 | ||
TimToady | and that is precisely why it is already being so useful | ||
if you were stressing p6 from an angle that someone else is stressing it, you'd be redundant :) | 16:37 | ||
ruoso | :) | 16:38 | |
that would be an interesting thing to write down in the wiki | |||
TimToady | me, I'm stressing it from the longest-token matching angle, and have just about got it working, for some definition of working | ||
ruoso | it would be nice to have a page listing which aspect is each implementation trying to stress | 16:39 | |
16:39
blindfish joined
|
|||
[particle] | it'd be nice to have an implementation trying to stress completeness :) | 16:39 | |
TimToady | translation: "where each implementation is having trouble" :) | ||
ruoso | heh | 16:40 | |
TimToady | the main problem with developing this longest-token matcher is that it takes pugs about 2 minutes to compile STD_meth.pm... | 16:45 | |
and I don't have any way of saving the compilation for next time | |||
16:46
pmurias joined
|
|||
pmurias | ruoso: kp6 does some meta stuf | 16:46 | |
f | |||
ruoso | pmurias, but it doesn't deal with different representations or native types | 16:48 | |
pmurias | smop doing everything on bare C suits itself better to dealing with representation | ||
it would be mostly the choice between the hash based,array based and inside out representation in kp6 | 16:50 | ||
ruoso | not really | ||
in p5 you could still have different representations | 16:51 | ||
TimToady | and that's why p6opaque is supposed to be opaque even to Perl 6 code... | ||
16:52
Lion3 joined
|
|||
ruoso | pmurias, you could even have a Moose repr | 16:53 | |
alester | Indirect object syntax goes away, right? | ||
Please please say yes. | |||
16:53
pbuetow joined
|
|||
ruoso | alester, kinda | 16:53 | |
it requires a : | |||
foo $obj: | 16:54 | ||
foo $obj: 1,2,3 | |||
TimToady | it's completely unambiguous now | ||
alester | that's good news. | 16:56 | |
perlbuzz.com/mechanix/2008/02/the-p...irect.html | |||
lambdabot | Title: The perils of Perl 5's indirect object syntax - Mechanix, tinyurl.com/2enjt4 | ||
pmurias | ruoso: Moose objects are hash based (by default) | ||
ruoso | pmurias, the repr thing will allow you to create an instance of Int, for instance, using other representation | 16:58 | |
Moose and plain blessed hash are different representations in that sense | |||
16:58
mj41_ joined
|
|||
ruoso | I even think that p5Moose is a reasonable option for a P6 representation (even for smop, once libperl is embedded) | 16:59 | |
pmurias | ruoso: what's the big diffrence between p5Moose and p5hash? | 17:01 | |
ruoso | p5Moose would create a moose object, | ||
p5hash would create a stand-alone blessed hash | |||
that would probably use the keys of the hash directly as private storage | 17:02 | ||
pmurias | a p5Moose is a blessed hash | ||
ruoso | sure, but it's built and maintained differently | ||
it has its dependencies | |||
pmurias | according to data Dumper | ||
ruoso | while p5hash would create a more simpler representation | 17:03 | |
probably supporting less features... | |||
Khisanth | I thought you aren't even supposed to care what a p5Moose is? :) | ||
TimToady | p5hash doesn't do well at preventing attribute name clashes | ||
Khisanth: depends on who "you" are | 17:04 | ||
pmurias | math& | ||
ruoso | if you're the p5 code on the other side, you probably care | ||
ruoso understands that the repr feature is specially important for interoperability means | 17:05 | ||
like... | |||
Int.CREATE(:repr<Glib>) | |||
17:08
rindolf joined
17:11
rindolf left
17:20
rindolf joined
17:24
Lion2 joined
17:29
kyrbe joined
17:30
kyrbe left
|
|||
stevan_ | ruoso: re: p5Moose being diff from p5Hash,.. would the p5Moose version use the Moose instance protocol? | 17:33 | |
if it did, then this would allow it to not care about what Moose uses for it's repr type | 17:34 | ||
in fact, the instance protocol came directly out of the repr issues nothingmuch and I were looking at in p6 metamodel stuff | |||
17:38
macae joined
|
|||
pmurias | stevan_: is there an alternative representation for Moose objects available ? | 17:39 | |
17:41
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
ruoso | stevan_, yeah... p5Moose would certainly use the Moose instance protocol | 17:41 | |
17:42
Lion3 left
17:43
cognominal_ joined
|
|||
stevan_ | pmurias: yes, MooseX::GlobRef::Object and MooseX::InsideOut are two curently out on CPAN | 17:44 | |
17:44
njbartlett joined
|
|||
ruoso | so, we would probably have perl5:MooseX::GlobRef::Object as a repr | 17:45 | |
where p5Moose would just use the default | |||
for moose | |||
stevan_ | ruoso: well, it all depends on how you want to use it | 17:46 | |
if you are talking about the p5 space, then the author controls it through Moose | 17:47 | ||
ruoso | yes, I think using the object in p5 space would be the only reason for using p5Moose | 17:48 | |
stevan_ | k | ||
if p6 uses some variant of the instance protocol, there is no reason why you would *have* to use that | 17:49 | ||
p6opague objects would just work | |||
assuming that the embedded p5 is able to understand their stucture | |||
an C struct based Moose instance type has been on the TODO list forever actually | |||
ruoso | well.. maybe SMOP p6opaque may be that implementation | 17:50 | |
but it would only work inside smop | |||
because of the run loop stuff | |||
stevan_ | ? | ||
forgive me I only skimmed the SMOP docs | 17:51 | ||
ruoso | smop implements a stackless run loop on its own | ||
stevan_ | k | ||
but why does p6opaque care about that? | |||
ruoso | because even p6opaque code relies on that | ||
as "everything is an object" in somp | |||
smop | |||
stevan_ | but how is that connected to the runloop? for the method dispatching? | 17:52 | |
ruoso | all p6opaque code is stackless | ||
stevan_ | what I am thinking is that the p6opaque structure itself could have an XS based wrapper to allow it to be used in p5 | 17:53 | |
ruoso | calling something in p6opaque won't really do anything most of the time | ||
stevan_ | then the wrapper in SMOP would connect it with the runloop | ||
ruoso | it will just set something as the current continuation | ||
stevan_ | but again,.. I dont know SMOP that well, so I am just ahndwaving here | ||
pmurias | stevan_: thanks | ||
ruoso | I'll need to create a cross-runloop between smop and p5 at some time | ||
where one can hand over control to the other at any time | 17:54 | ||
stevan_ | ruoso: I guess I am confused what that has to do with accessing elements in the p6opaque structure | ||
pmurias: no problem | |||
ruoso | because accessing elements of the p6opaque structure may require performing method calls | ||
and that, by definition, | |||
don't recurse using the C stack | |||
it replaces the current continuation of the given interpreter instance | 17:55 | ||
stevan_ | ruoso: hmm, that shouldnt be true | ||
you should have method-free access to your instance structure | |||
no I get the contuation stuff, and why you are doing it | |||
but I think its potentially going to be problematic for you | |||
ruoso | the problem is, how do you ~~ the signature of a candidate method to a given capture without a method dispatch/ | 17:56 | |
stevan_ | in terms of playing well inside p5 space | ||
ruoso: why are methods involved at all? | |||
ruoso | because the method object may have an unknown representation | ||
stevan_ | the slots in an instance should be accessible through some kind of protocol | 17:57 | |
which totally bypasses the methods | |||
and you should always have some kind of idea what the repr would be | |||
ruoso | I can guess in some specific cases | ||
stevan_ | otherwise how could you get at the slots in the first place | ||
ruoso | that's the reason for the "constant identifier" thing | ||
stevan_ | I am not familiar with that | 17:58 | |
something i can read on that? | |||
ruoso | www.perlfoundation.org/perl6/index....mop_oo_api | ||
lambdabot | Title: SMOP OO API / Perl 6 | ||
ruoso | the point on not knowing the representation is exactly so I can cheat | ||
and put in a low-level object | 17:59 | ||
stevan_ | yes | ||
Moose does the same thing | |||
ruoso | but it only works as far as I don't count on knowing the representation | 18:00 | |
stevan_ | ok,.. so ^!initialize_instance_storage | ||
that should also have a !^access_instance_slot or some kind too | |||
ruoso | it has | ||
stevan_ | where is that? | ||
ruoso | method ^!private_storage($object: $package --> Hash ) {...} | 18:01 | |
where the returned Hash will *not* use p6opaque as its repr | |||
stevan_ | ah I see | 18:02 | |
ruoso | but a lowlevel implementation that can access the p6opaque data directly | ||
stevan_ | sort of a tied HASH to put it in p5 terms? | ||
ruoso | yeah... | ||
sort of... | |||
stevan_ | which follows the Hash API, but accesses the underlying p6opaque object | ||
ruoso | because that applies for absolutely any built-in type | 18:03 | |
except the native ones | |||
stevan_ | yes | ||
so I guess what I am thinking then | |||
pugs_svnbot | r19911 | lwall++ | [autolexing] subrules now successfully use precalculated fates for alternation dives | ||
diff: dev.pugscode.org/changeset/19911 | |||
lambdabot | Title: Changeset 19911 - Pugs - Trac | ||
stevan_ | is that you could take that low-level/native repr and wrap it in XS and make a Moose instance type out of it | ||
stevan_ is talking about things below the p6 language level | 18:04 | ||
ruoso | yes... as long as you have the run loop integrated | ||
stevan_ | then (I assume) you would be able to shuffle it over to p5, without needing the runloop | 18:05 | |
oh | |||
hmm, I guess I am just not getting why the underlying native instance structure needs to care about the runloop | |||
but I suspect I just need to read up on SMOP some more | |||
ruoso | because one of the methods declared there may even be a Glib method | ||
stevan_ | :) | 18:06 | |
again,.. why does accessing instance slot need to involve methods? | |||
there should be a non-method related way to do it | |||
I am failing to see the rationale for coupling those together so tightly | |||
ruoso | when you do %{$foo.^!private_storage(Foo::)}{$name}, you can't presume to know the repr of $name | 18:07 | |
you may need to call WHICH | |||
which may need to recurse | |||
stevan_ | yes, but I am talking about *below* the p6 language level | 18:08 | |
ruoso | so am I | ||
but SMOP have a bootstrapped OO system | |||
"everything is an object" | |||
really | |||
stevan_ | ok,.. so you dont have a native instance type then? | ||
ruoso | I only have a few | 18:09 | |
stevan_ | ok,.. those are what I am talking about | ||
ruoso | and no, Object is not a native one | ||
natives are int, bool etc | |||
Method is not a native type | |||
stevan_ | so what is an instance created from? | ||
ruoso | from Object | 18:10 | |
stevan_ | where does Object get it? | ||
ruoso | which is bootstrapped in low-level as a p6opaque | ||
stevan_ | k | ||
so the low-level p6opaque | |||
is created at the C level correct? | |||
not assembled in p6 space | |||
but some kind of | |||
ruoso | not really | ||
stevan_ | call_native_func('create_p6opauqe') | ||
ruoso | there's no such thing as call_native_func in smop | 18:11 | |
stevan_ is making stuff up there | |||
how do you allocate the actual space in memory | |||
ruoso | ok... sure... I'll have a SMOP__OO__p6opaque_create somewhere | 18:12 | |
stevan_ | yes | ||
what that returns, should be wrapped in XS and made Moose compat | |||
ruoso | but that is only the CREATE part of creating an instance | ||
stevan_ | yes | ||
ruoso | which is, basically, a malloc | ||
stevan_ | then you can fill it with data | ||
ruoso | calling the .^!foo API | 18:13 | |
stevan_ | yes | ||
ruoso | which is already a method dispatch | ||
18:13
meppel-san joined
|
|||
ruoso | a special one, but a method dispatch | 18:13 | |
stevan_ | so, the value that SMOP__OO__p6opaque_create returns should be wrapped | ||
er wrappable | |||
ruoso | in a SV*, sure... | 18:14 | |
stevan_ | them the p5 side will just need that value and should be able to do whatever it wants without invoking method dispatch on the p6 end | ||
s/them/then/ | |||
stevan_ wonders if we are not discussing two different things here :) | 18:15 | ||
ruoso | except that the value already implements smop interpreter semantics | ||
stevan_ | expand on that please | ||
ruoso | you need a SMOP interpreter instance to do anything with the p6opaque object | ||
you can always use the interpreter prototype, which is stackfulll | 18:16 | ||
stevan_ | I guess this is where I am lost | ||
I dont understand *why* you need SMOP to mess with the C-struct that SMOP__OO__p6opaque_create returns | |||
if the XS wrapper is well behaved, then I dont see why the coupling | 18:17 | ||
ruoso | because the features of p6opaque are implemented through SMOP_DISPATCH | ||
stevan_ | hmm,.. that sounds problematic | ||
stevan_ again mentions that he is only midly familair with SMOP | |||
but that just has a smell to me | 18:18 | ||
ruoso | the good thing about that | ||
is that SMOP have a polymorfic eval | |||
which means you can implement a naive p5-glue interpreter | |||
spinclad wonders if smop is trying to hard to believe its own story... that is, implement everything the way it really only has to _appear_ to be working | |||
ruoso | www.perlfoundation.org/perl6/index....tation_api | ||
lambdabot | Title: SMOP Interpreter Implementation API / Perl 6, tinyurl.com/yv6sur | ||
ruoso | www.perlfoundation.org/perl6/index....munication | ||
lambdabot | Title: SMOP Inter Continuation Communication / Perl 6, tinyurl.com/yuqcgm | 18:19 | |
ruoso | spinclad, it's the exact opposite.... smop is trying hard to believe what anyone says... | ||
if you say you're a Hsah | |||
Hash | |||
nice, we can talk... no matter how you're implemented | |||
stevan_ | ruoso: I think perhaps your p6opaque type is just too coupled,.. some outside-of-SMOP resource should be able to mess with it | ||
ruoso | stevan_, if you implement an interpreter instance you can do it | 18:20 | |
it can be simple as recurse in the C stack and hold a reference to the p5 interpreter so it can callback | |||
or it can be complex as interfacing the p5 run loop natively and add the OPs you need to | 18:21 | ||
where the first uses XS and the later uses direct OP manipulation | |||
that's the pretty plan on how I to have p5 integration in smop | 18:22 | ||
stevan_ | ok | 18:24 | |
spinclad | (aiui:) if i say i'm a Hash, then i'm presenting a Hash interface, and outsiders must access me through that. this uses SMOP_DISPATCH, and method name, and capture... (more) | 18:26 | |
ruoso | spinclad, exact | ||
it's important to realise that SMOP_DISPATCH represents a single C call | 18:30 | ||
spinclad | within a community, however, insiders may know more strictly: this is a p5hash, that a p5key; this a smop_native_responder_interface, that a smop_native_symbol, the other a .._capture; and be able to access each other by their community protocol | 18:31 | |
ruoso | sure... but I like to consider it an optimization | ||
in fact... smop does it already | 18:32 | ||
the native capture handles differently named arguments when you give it a SMOP__NATIVE__idconst or a regular Object | |||
SMOP__NATIVE__idconst can be matched by C pointer identinty | 18:33 | ||
18:33
rindolf left
|
|||
ruoso | while a regular Object will require method calls | 18:33 | |
spinclad | right | ||
ruoso | the important thing is avoid presuming you know the how something is implemented | ||
you can test for some known cases | 18:34 | ||
18:34
manfred_ joined
|
|||
ruoso | but you must always have a fallback | 18:34 | |
(except for the Perl 6 native types) | |||
which are the only ones you can be sure to know how they are implemented | |||
and that's why smop defines a native capture object | 18:35 | ||
(which I hope TimToady puts in the spec sometime) :) | |||
spinclad | using multidispatch: class Hash { method lookup (Key -> Object) {...} }; class p5hash { method lookup (p5key $key -> Object) { #{ here you know the subtype, can hash its string directly, etc } } } | 18:38 | |
*class p5hash does Hash; class p5key does Key | 18:39 | ||
ruoso | spinclad, yeah... kindof... | 18:40 | |
pugs_svnbot | r19912 | ruoso++ | [smop] the code for creating runtime constant identifiers is already here... The tests are still failing, the problem is probably in the bsearch call on the list of current declared constant identifiers. | ||
diff: dev.pugscode.org/changeset/19912 | |||
lambdabot | Title: Changeset 19912 - Pugs - Trac | ||
18:41
lumi joined
|
|||
spinclad | as you say, smop already does some of this, and it must, to break Zeno's regress... | 18:42 | |
ruoso | yeah... I must be able to reduce everything to the known types at some time | ||
spinclad | (the arrow can neither start nor finish moving) | ||
18:43
riffraff joined
18:45
riffraff left
|
|||
ruoso | btw... spinclad, stevan_, thanks for the peer review... this is the most important thing that smop needs now... | 18:47 | |
18:48
pmurias left,
pmurias joined
|
|||
spinclad | i haven't reviewed the docs enough yet... | 18:48 | |
TimToady | I'm glad you guys are talking | ||
spinclad | meantime, i see multidispatch, while heavy and begging to be optimized away when possible, as the way to enter a community, to take part in possibly much lighter-weight interactions with known peers. | 18:50 | |
ruoso | spinclad, yeah... I see that too... | ||
pmurias | ruoso: why do you base constlist-1 as the size argument to qsort? | 18:51 | |
ruoso | what I don't know is how to keep multi dispatch in the correct order so you dispatch better... | ||
pmurias, it was segfaulting otherwise | |||
spinclad | yes, need a good rep'n for a lattice of types ... | 18:53 | |
need a community of types and type comparison... | 18:54 | ||
ruoso | that's why ~~ is one of the nearest things in the roadmap :) | 18:55 | |
TimToady | actually, ~~ is basically single dispatch on the right arg | ||
so a bad example of multiple dispatch | 18:56 | ||
even if p5 did borrow the old botched mmd semantics | |||
ruoso need to go... later &... will backlog, as usual... | |||
spinclad | multi dispatch is more given $capture { when $signature { ... } ... } | ||
pmurias | ruoso: keeping the indentifiers in an unsorted list would be faster | 18:57 | |
18:57
wilx` joined
|
|||
ruoso | pmurias, would it? | 18:57 | |
anyway... need to go... | |||
later | |||
& | |||
spinclad | the whole given statement | ||
pmurias | O(n) vs O(N*log(N)) | 18:58 | |
spinclad | ruoso: i don't think i said anything you're not well aware of; (same page)++ | ||
class Multi does Hash(Signature --> Single) | 19:01 | ||
*s/Single/Code/ | 19:02 | ||
TimToady | well, you'd want to apply the optimization back to given if all the patterns are signatures :) | ||
just as you can optimize all numbers or all strings | 19:03 | ||
spinclad | except it's called with $multi{$capture} ---> $code is Code($signature) | ||
TimToady | and a switch on native int could be as fast as C's | ||
spinclad | right | ||
TimToady | 'course, thing about mmd is you can't really write a switch unless you're willing to rewrite it every time someone adds a routine of that short name... | 19:05 | |
pmurias | ruoso: sorry misread the code, it wouldn't be (lookups are more common the insertions) but it's possible to insert new elements faster then with qsort | ||
spinclad | class smop_Multi = Multi(smop_Capture, smop_Signature, smop_Code) # specializing | 19:06 | |
TimToady | probably have to work the lexical location in there too, since the candidate lists can vary lexically | 19:07 | |
spinclad | i think i'd take that as already so in Multi, though it takes part in the big specializing homomorphism | 19:08 | |
i may try to make this model runnable... | 19:10 | ||
19:10
wilx` left
|
|||
spinclad | then i'll know what i meant | 19:10 | |
time to shovel snow | 19:13 | ||
~~ & | |||
19:14
chris2 joined
19:20
peeps[work] joined
19:22
rindolf joined
19:46
macae left
20:02
cognominal_ left
20:07
manfred_ left
20:15
japhb joined
20:26
Helios_ joined
20:36
jferrero joined
20:37
buu left,
buu joined
20:43
meppel-san is now known as meppl
21:05
Jamtech joined
|
|||
[particle] | hrmm, so, i've got a private method, and i want to call it inside another method | 21:23 | |
if it's a regular method, i can do '.my_private_method()' yes? | |||
or do i need to say 'self.my_private_method()' | |||
TimToady | self!my_private_method() if it's really private | 21:24 | |
[particle] | so, you're forced to put self there. | 21:25 | |
because !my_private_method() won't do what you expect. | |||
er, what i thought i might expect. | |||
21:25
Helios_ is now known as Helios
21:26
blindfish left
|
|||
TimToady | well, there's presumably $!my_private_method() as well | 21:31 | |
[particle] | do i need to declare my $!my_private_method = method { }; in order for that to work? | 21:32 | |
21:32
rindolf left
|
|||
[particle] | or, has $!... ? | 21:32 | |
TimToady | you use "my method my_private_method" | 21:33 | |
[particle] | my method process_commandline(@args) { ... } ; my @pass_thru_args = $!process_commandline(@*ARGS); # works? | 21:36 | |
21:40
Jedai joined
21:52
Jedai left
22:07
feb joined
22:22
Lorn_ joined
22:28
buchetc joined,
pmurias left
22:29
Lion2 left
22:32
buchetc left
22:39
justatheory joined
22:46
mj41___ joined,
mj41___ is now known as mj41
22:48
justatheory left,
buu left,
peeps[work] left,
yves left,
ead left,
cookys left,
nipotaway left
22:50
chris2 left
22:52
justatheory joined,
buu joined,
peeps[work] joined,
kcwu joined,
hcchien joined,
jjore-w joined,
r0bby joined,
Southen joined,
kane_ joined,
GeJ joined,
nodboy joined,
yves joined,
ead joined,
cookys joined,
nipotaway joined
22:53
GeJ_ joined
22:54
cj joined
22:55
jferrero left,
Helios left,
lumi left,
pbuetow left,
feb left,
mj41_ left,
feb joined,
jferrero joined,
Helios joined,
lumi joined,
pbuetow joined,
Zygo joined,
viklund joined,
IllvilJa joined,
avar joined,
apple-gunkies joined,
kst joined,
jrockway joined,
silug joined,
simcop2387 joined,
nothingmuch joined,
arguile joined,
Maddingue joined,
cognominal joined,
Eidolos joined,
Zygo left,
buubot joined,
japhb left,
[particle] joined,
japhb joined,
broquaint joined,
mugwump joined,
irc.freenode.net sets mode: +o [particle],
ChanServ sets mode: -o [particle]
22:56
nodboy left,
Southen left,
peeps[work] left,
kane_ left,
hcchien left,
yves left,
cookys left,
GeJ left,
justatheory left,
buu left,
kcwu left,
ead left,
nipotaway left,
jjore-w left,
r0bby left,
Zygo joined,
justatheory joined,
buu joined,
peeps[work] joined,
kcwu joined,
hcchien joined,
jjore-w joined,
r0bby joined,
Southen joined,
kane_ joined,
nodboy joined,
yves joined,
ead joined,
cookys joined,
nipotaway joined,
pravus joined
22:57
buubot left
22:58
buubot joined,
buubot left
22:59
buubot joined
23:08
Zygo left
23:10
Jamtech left
|
|||
rakudo_svn | r25700 | jonathan++ | [rakudo] Remove now-unused regex.pir. | 23:24 | |
23:43
alester joined
23:45
charsbar joined
23:52
renormalist joined
23:56
peeps[work] left
|