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:00 alester joined 00:09 justatheory left 00:16 Schwern left 00:17 nipotan is now known as nipotaway 00:24 nipotaway is now known as nipotan, timbunce joined 00:39 Alias__ left, justatheory joined, ruoso joined
ruoso pmurias, hi 00:40
00:45 justatheory left
meppl good night 00:50
ruoso meppl, good night 00:51
meppl ;) 00:53
00:54 meppl left 00:56 Limbic_Region left
ruoso pmurias, I'm not sure how you're going to be able to differentiate public methods from private attributes 00:58
01:04 nipotan is now known as nipotaway
ruoso pmurias, but just a sanity check... 01:05
you're thinking about a special "metadata" key in the storage hash that would contain isa, does, method definitions, attribute definitions? 01:06
or are you planning on doing a simple class-based implementation?
pmurias, I think I understand how you mean to implement it 01:07
pugs: say Int.HOW 01:09
p6eval pugs: OUTPUT[<obj:Class>␤]
ruoso pugs: say 1.HOW 01:13
p6eval pugs: OUTPUT[^Int␤]
ruoso sa 1.WHAT
pugs: say 1.WHAT 01:14
p6eval pugs: OUTPUT[Int␤]
ruoso say Int.WHAT
pugs: say Int.WHAT
p6eval pugs: OUTPUT[Int␤]
ruoso pmurias, I've been thinking too much prototype-oriented in the last few months... 01:15
pmurias, but one way or another, it seems you also need to have a "$.what" in the p6opaque structure 01:18
pmurias, actually... I can't really think how you can eliminate any of the items in www.perlfoundation.org/perl6/index....ementation (besides the optimal_* stuff) 01:20
lambdabot Title: SMOP p6opaque Implementation / Perl 6, tinyurl.com/2z5spt
01:20 simcop2387 left, simcop2387 joined 01:24 elmex left 01:33 Alias_ joined 01:36 alester left 01:39 Schwern joined
ruoso pmurias, I've updated the p6opaque wiki description... take a look at www.perlfoundation.org/perl6/index....ementation 01:49
lambdabot Title: SMOP p6opaque Implementation / Perl 6, tinyurl.com/2z5spt
01:54 nixfu joined 01:55 nixfu left 02:25 alester joined 02:27 kanru left 02:32 BinGOs_ joined 02:36 BinGOs left 02:54 kanru joined 02:59 scrottie_ left 03:02 Psyche^ joined 03:03 wknight8111 left
pmurias ruoso: hi 03:08
i suppose i should get to sleep now though as it's 5 in the morning and i have been watching movies all night 03:09
03:09 pmurias left 03:14 Patterner left, Psyche^ is now known as Patterner 03:22 timbunce left 03:43 pbuetow_ joined 03:55 pbuetow left 04:36 alester left 04:38 alester joined 04:39 alester left 04:43 timbunce joined 04:53 justatheory joined 05:10 ashizawa joined 05:20 Psyche^ joined 05:32 timbunce left 05:36 Patterner left, Psyche^ is now known as Patterner 05:46 timbunce joined 06:06 timbunce left 06:15 timbunce joined 06:26 timbunce left, timbunce joined 06:29 justatheory left 06:45 armagad joined 06:48 timbunce left 07:00 barney joined 07:06 masak joined 07:20 BinGOs_ is now known as BinGOs 07:33 barney left 07:37 xinming left 08:30 mj41_ left 08:34 mj41 joined 08:43 iblechbot joined 08:45 bacek left 08:47 armagad left, Jedai joined 09:08 smtms left 09:20 meppl joined 09:22 chris2 joined 09:25 xinming joined 09:27 smtms joined 09:29 araujo left 09:42 donaldh joined 10:00 elmex joined 10:06 ashizawa_ joined, wknight8111 joined 10:12 ashizawa left 10:19 pmurias joined 10:21 penk joined 10:25 barney joined 10:37 ruoso left 10:48 wknight8111 left 11:01 jferrero joined 11:03 ashizawa_ left
pugs_svn r21435 | fglock++ | [PCR] added unicode property 'isLr' 11:13
11:21 meppl left, jferrero left 11:23 ruoso joined 11:34 wknight8111 joined
pugs_svn r21436 | fglock++ | [PCR] better error message 12:00
12:00 ruoso left 12:05 ruoso joined 12:17 wknight8111 left 12:19 jferrero joined 12:20 jferrero left, jferrero joined
pmurias ruoso: hi 12:26
what are the proto_storage keys? 12:28
should it be a scalar instead of a hash 12:32
12:47 schmalbe joined, barney left 12:57 schmalbe left, barney joined 13:10 cmarcelo joined, penk left 13:15 pbuetow_ left, pbuetow joined 13:26 jferrero left 13:29 masak left 13:46 fullermd left
ruoso pmurias, yes... a scalar... sorry 14:03
14:04 fullermd joined
ruoso pmurias, the point is that all of the elements in proto_storage are actually required by Perl 6 features 14:10
pmurias ruoso: and what is the difference between isa and does? 14:23
ruoso role composition is different from class composition
pmurias soup& 14:24
ruoso pmurias, remember that the proto_storage has no caching at all
so every information needed for a rebuilding the composition need to be available 14:25
14:26 iblechbot left
pmurias i wouldn't bother about caching and other optimalisations now 14:39
does only deals with runtime role composition? 14:42
14:48 mofino left 14:49 mofino joined 14:55 hercynium left
pugs_svn r21437 | fglock++ | [PCR] fixed character-class name rule 14:55
14:56 hercynium joined 14:59 Exodist joined, Exodist left
pugs_svn r21438 | fglock++ | [PCR] grammar tweak 14:59
14:59 Exodist joined 15:26 TJCRI joined
pmurias japhb: got my copy of OpenGL Superbible today ;) 15:30
pugs_svn r21439 | fglock++ | [PCR] some unicode fixes 15:33
pmurias @seen fglock
lambdabot I haven't seen fglock.
moritz_ perlbot, seen fglock
15:36 araujo joined
japhb pmurias: good! 15:39
pmurias: let me know if you have questions, there's a chance I might be able to answer ... 15:40
15:41 timbunce joined 15:42 _timbunce joined 15:45 timbunce left 15:59 PZt left 16:03 PZt joined 16:11 _timbunce left, timbunce joined, ruoso left 16:22 iblechbot joined 16:25 armagad joined 16:26 meppl joined 16:28 alester joined
[particle] moritz_: it's likely that TimToady, pmichaud, and i won't be available for perl6-soc this week due to oscon 16:47
tomorrow at about that time has a whole bunch of perl 6 talks going on
moritz_ [particle]: ok, I'll bore Auzon++ on my own then ;-) 16:48
[particle] ):
:) even
Auzon .oO(oh no!)
moritz_ Auzon: or, if you have no questions yet, we might drop it 16:49
16:50 mj41 left
moritz_ (assuming you write a report for week 8) 16:50
Auzon Yeah, I'll do that real soon now. Last week was pretty bad :-; 16:51
:-/
16:51 mj41 joined
moritz_ happens from time to time 16:52
16:53 kanru left
moritz_ Auzon: so do we meet tomorrow? 16:55
Auzon No, I don't see a need 16:56
you'll be here for questions, right?
moritz_ wrote Perl6::Str over the weekend, other than that no time/motivation for hacking
Auzon: ok, and yes
Auzon Sounds good :)
[particle] Auzon: i have a paper that may help you... sorry i didn't think of it earlier
www.benderrbt.com/Ambiguityprocess.pdf
lambdabot Title: The Ambiguity Review Process
[particle] it's a great reference for writing spec-based tests 16:57
pugs_svn r21440 | lwall++ | [STD] now does reduce tokens correctly; we now use a variable length
r21440 | lwall++ | string as pattern cache key to parse zillions of reduce operator
r21440 | lwall++ | tokens without blowing up TRE
r21440 | lwall++ | [t/spec] various bugs found by STD. We now parse >80% of t/spec.
Auzon Thanks [particle] :)
[particle] TimToady++ # nice progress! 16:58
17:01 Jamtech joined 17:04 donaldh left 17:05 timbunce left 17:06 timbunce joined
moritz_ TimToady: it seems that STD can't parse 'my @array[10]' 17:09
[particle] does that create an array of size 10? 17:10
moritz_ yes
17:12 barney left 17:19 Schwern left
moritz_ current version of trystd fails after use v6; in most test files 17:19
17:23 justatheory joined 17:24 ruoso joined
ruoso pmurias, yes... does is only about runtime role composition (which other type there is?)... 17:25
17:25 Schwern joined
moritz_ class Foo does Num { ... }? 17:26
17:26 cognominal_ left
moritz_ from a language level POV 17:26
17:26 cognominal_ joined
ruoso moritz_, yes... but in the end it translates as a runtime composition... 17:29
moritz_, unless the class composition happens at compile time (which I doubt) 17:31
moritz_ ruoso: why not? in clas {...} the ... is executed at compile-time as the body of a method of the meta class 17:32
17:32 meppl left
moritz_ and class foo does bar {...} is the same as class foo { does bar; ... } 17:32
ruoso moritz_, "compile-time"? are you sure? doesn't it require a BEGIN to be executed at compile-time?
moritz_ perlcabal.org/syn/S12.html In either case, the code represented by ... executes at compile time as the body of a method of the metaclass, ... 17:33
lambdabot Title: S12
ruoso moritz_, that's unexpected 17:35
how does that relate with bytecode?
pmurias class Foo does Bar {} must be done at compile times, as classes can be closed at compiletime 17:38
moritz_ oh, but compile time is also just run-time of a BEGIN-block 17:39
ruoso anyway... in the end that translates as runtime operations...
in fact... that's one point I'm not sure on how you're goin to be able to actually split compile-time/run-time 17:40
meaning...
17:40 Schwern left
ruoso a perl module in bytecode will have limited functionality 17:40
a Perl 6 module that can use any feature can only be stored in some "bytecode" format, as long as this bytecode format is actually a freeze of the machine state 17:41
pmurias bytecode meaning a storage format in general in this case 17:42
ruoso unless you consider you have a multi-pass compiler and your bytecode is just a first stage of the compilation 17:43
pmurias i think freezing the vm state is a good option
ruoso pmurias, it's not a good option for modules in general
it is only usefull as to freezing an entire application
pmurias we can only freeze a part of the vm state 17:44
17:45 timbunce left
ruoso can we? 17:46
is it possible to guarantee a consistent state?
17:46 meppl joined
pmurias consistent state - explain please 17:46
ruoso pmurias, dependencies and stuff 17:47
pmurias i'm assuming the freezing of the state is done in a relatively smart way, not just dumping the memory 17:48
it shouldn't be significatly more complex than a normal compile 17:49
and likely easier than the way kp6 collected side effects from BEGIN blocks 17:51
ruoso: dependencies - you are refering to the other modules used by the one we are compiling, we can look where the things which are part of the vm state come from and emit code to load them 17:53
ruoso pmurias, and the way we can't really know what modules do in terms of side-effects 17:54
17:54 mofino left, alester left
pmurias ruoso: they can either export stuff, or do thing in BEGIN {...} blocks 17:55
* things
ruoso which means that the module can do absolutely anything
and that this side-effects might be part of the state required after the compile-phase 17:56
moritz_ ruoso: they can do very much. Like exporting grammar rules ;-)
ruoso yes...
moritz_ ruoso: but the general perl 6 design favors pre-compiled modules, iirc
ruoso yes... but it doesn't explain how to make the compilation state mergeable with other compilation states 17:57
pmurias ruoso: my carefull coding ;)
* by
ruoso I'm not sure that is possible...
it's the same reason perlcc doesn't work very well
pmurias side affects like io happen at compile time
ruoso pmurias, side effects like changing the namespace 17:58
pmurias we can serialise this
one
18:00 Alias_ left
pmurias i could start a mockup compiler to shake out the issues 18:00
18:01 alester joined
pmurias and if other will be willing to help it might grow into a real one (as at least i need a vaguely decent perl6->perl5 one) 18:02
18:03 timbunce joined 18:05 timbunce left
ruoso pmurias, it would be even more interesting to see how that relates with the SMOP runtime 18:05
18:06 mod_cure joined 18:07 PZt left
pmurias ruoso: i think it would be mostly runtime independent, as after the parsing the namespace and the lexical scope will be traversed and everything found will be serialised by the emitter 18:08
ruoso pmurias, I don't really see how it won't be specific for the runtime where the compiler is running on
moritz_ do you have an example of how a module can change the namespace (I think that example popped up earlier) 18:09
pmurias the things to be serialised are perl6 objects 18:10
18:11 alester left 18:12 alester joined
moritz_ rakudo: say (1, 2, 3).perl 18:13
p6eval rakudo 29681: OUTPUT[[1, 2, 3]␤]
ruoso pmurias, I'm not sure if all .perl serializations are possible as implementation-independent 18:15
perl6: class Foo { has $!a; has $.b; has %.c }; say Foo.perl;
p6eval elf 21440: OUTPUT[Parse error in: /tmp/npf6EZ3mui␤panic at line 1 column 12 (pos 12): Missing right brace␤WHERE: class Foo { has $!a; has $.b; has %.c }; s␤WHERE: /\<-- HERE␤ STD_red/prelude.rb:99:in `panic'␤ STD_red/std.rb:255:in `_block_rest'␤ STD_red/std.rb:242:in `block in
..block'...
..pugs: OUTPUT[::Foo␤]
..rakudo 29681: OUTPUT[Method 'perl' not found for invocant of class ''␤current instr.: '_block11' pc 24 (EVAL_13:15)␤]
ruoso perl6: class Foo { has $!a; has $.b; has %.c; }; say Foo.perl;
18:16 Alias_ joined
p6eval elf 21440: OUTPUT[Parse error in: /tmp/kDQ4jXyKxY␤panic at line 1 column 12 (pos 12): Missing right brace␤WHERE: class Foo { has $!a; has $.b; has %.c; }; ␤WHERE: /\<-- HERE␤ STD_red/prelude.rb:99:in `panic'␤ STD_red/std.rb:255:in `_block_rest'␤ STD_red/std.rb:242:in `block in 18:16
..block'...
..pugs: OUTPUT[::Foo␤]
..rakudo 29681: OUTPUT[Method 'perl' not found for invocant of class ''␤current instr.: '_block11' pc 24 (EVAL_12:15)␤]
moritz_ ruoso: the class name holds the proto-object, not the class definition
ruoso: I don't know if that's accessible at all
ruoso it's even worse than, how that relates with prototype-based and class-based support 18:17
pmurias ruoso: yes, some object might require a bit more reflection that it's currently speced but none major smop redesignes would be nessesary 18:19
ruoso anyway... that's one reason I'm not really concerned about splitting compilation and runtime
18:20 peeps[work] joined
ruoso I think specific compiler options would allow forbidding any side effect at compile time to allow a splitted compile-time 18:20
18:21 timbunce joined
pmurias it's best to push as much as possible to compile-time 18:22
ruoso I think we would need a "shared object" compilation 18:24
pmurias like in c shared object files 18:25
pugs_svn r21441 | moritz++ | [spec] one more test for @list.perl
ruoso and to compile a "shared object" some restriction are set
no-side-effects might be one of them 18:26
pmurias modules are noops withought side effects 18:28
18:30 Schwern joined
ruoso pmurias, no side-effects at compile-time I mean, not at run-time 18:36
pmurias ruoso: modules have to export stuff at compile-time as they change extend the lexical pad 18:37
ruoso pmurias, this specific compiler option could process the "export" as something specific to be executed at "use" time 18:38
18:40 hcchien left 18:48 JoshuaP0x joined 18:49 Chillance joined 18:52 PZt joined 18:55 armagad left 18:56 justatheory left 18:59 timbunce left, timbunce joined 19:00 Schwern left 19:07 Schwern joined 19:09 alester left 19:23 REPLeffect left 19:29 _timbunce joined 19:30 justatheory joined 19:31 JoshuaP0x left, justatheory left, timbunce left 19:44 masak joined
masak pugs: class A is B {}; class B is A {} 19:45
p6eval pugs: RESULT[undef]
masak I guess there should at least be a warning for that... 19:46
moritz_ unless the implementation deals properly with it 19:47
masak moritz_: you mean it is allowed in Perl 6?
moritz_ masak: dunno
19:47 Schwern left
masak moritz_: I wouldn't allow it, if I were in charge :) 19:47
ruoso moritz_, class A is B {}; is a statement that requires "B" to exist... 19:49
masak moritz_: well, it does exist... later in the code
moritz_ ruoso: that's what forward declarations can be used for
class A {...}; class B is A {}; class B {}; 19:50
19:50 alester joined
masak ruoso: what are forward declarations? 19:50
19:50 Schwern joined
masak ruoso: oops 19:50
ruoso Perl 6 doesn't really have forward declarations
masak moritz_: but do I have to forward declare?
ruoso it has declaration and "is also" declaration
class A {...}; class B is A {...}; Class A is also {...}; 19:51
moritz_ class A is also { is B; }
masak moritz_: it seems to me that the compiler would just have an 'overview' over the whole file, and that I could declare classes in any old order 19:52
moritz_ masak: I think for some cases the compiler needs to know if an identifier is a sub name or a type name 19:53
masak moritz_: ah. then a bug report of mine for rakudo the other day was wrong 19:54
ruoso moritz_, that's again a point where compile-time × runtime gets really confusing...
moritz_ masak: I'm not sure, though
masak I reported that `class A is B {}; class B {}` didn't work
moritz_ yes, I remeber
ruoso the runtime is the one that can emit a warning about a circular class hierarchy
masak lambdabot: ask TimToady is `class A is B {}; class B {}` allowed in Perl 6? 19:55
moritz_ ruoso: but again, from a language POV, inheritance is done mostly at compile time
masak @ask TimToady is `class A is B {}; class B {}` allowed in Perl 6?
lambdabot Consider it noted.
masak @thanks
lambdabot you are welcome
ruoso moritz_, but what is the language without the runtime? 19:56
the AST?
moritz_ ruoso: I don't understand your question. The backend is free to do whatever it wants, as long as user visible the runtime/compiletime distinction looks as specced 19:58
ruoso moritz_, I mean, how can the compiler check wtf is B without the runtime? 19:59
moritz_ ruoso: well, class declarations happens at compile time
ruoso: so it knows at compile that B is actually a class
ruoso: and 'class A is B' also happens at compile time 20:00
ruoso so B must be *loaded* and not only *compiled*
which makes the difference between runtime and compile-time very hard 20:01
20:01 Schwern left
moritz_ why? loading happens with 'use', and 'use' happens at compile-time again 20:01
ruoso but you need to be able to introspect B when compiling A... which means that you're in runtime already for a long time, and just compiling/loading more modules 20:03
just like p5
moritz_ so the compiler needs access to the runtime libs 20:04
that can be done, I think
and needed anyway for BEGIN blocks
ruoso so we end up with a confuse distinction of compile-time × run-time 20:06
just as we have in p5 20:07
moritz_ not confused, mixed ;-)
pmurias the compile-time is the compilers run-time
moritz_ bascially use and BEGIN promote run-time to compile-time, and eval() does it the other way round
pmurias moritz_: eval is still run-time 20:08
20:08 justatheory joined
pmurias or a different compile time if you view it from a different perspective 20:08
moritz_ pmurias: yes, but you have a compile-time phase in an eval()ed string 20:09
ruoso just like p5
moritz_ aye 20:10
pmurias eval is not nice
ruoso evil eval
zamanfou is now away: In the rain my tears are forever lost.
ruoso zamanfou, can you please remove this f* away notice? 20:11
I have a strong feeling that Perl 6 will require a very p5-like approach to modules initialization... 20:12
masak ruoso: in what sense?
ruoso masak, in the sense that it will be very very hard (if not impossible) to compartimentalize each module's initialization... you'll have a complete state of your interpreter, and that's very hard to serialize or to generate a bytecode of some form... 20:13
moritz_ except that Perl 6 allows modules to be compiled only once (as opposed to perl 5)
I don't say it's easy to do, though
ruoso the only possibility I see ATM to support that is a strict "shared object" compilation mode which denies any side effect at compile-time and defers "exports" to be run at "use time" 20:14
moritz_ the rakudo folks are working on that now (pre-compiling modules)
ruoso: it's just specced that side effects like IO from modules can be ignored by the compiler 20:16
so a BEGIN { say "hi" } in a module that is used in script might have no effect at all if you compile and run your script
ruoso moritz_, the problem is all the state-building that can be done at compile-time 20:17
ad-hoc modifications of the namespace
intialization of native libraries
masak ruoso: could you give a concrete example? 20:18
20:18 Alias_ left
ruoso class CSVGtkTreeModel does GtkTreeModel {...} 20:19
masak how is that a problem?
ruoso masak, for that to be evaluated it needs a GtkInit call 20:20
pmurias GtkTreeModel is a C class
masak aha
20:21 c1sung left, luqui joined
pmurias native classes need a custom hook 20:22
ruoso reads custom hook as XS 20:23
ruoso hides
20:23 Alias_ joined
ruoso and you always have the modules that change the grammar globally (including for the eval'ed strings) 20:25
moritz_ I don't think you can change the grammar globally (ie not for modules in different files) 20:26
ruoso anyway... even then there are a lot of side effects... 20:27
pmurias you can only change it lexicaly (unless you beat the compiler to a pulp with unspecced evils)
ruoso pmurias, that doesn't seem very unlikely 20:28
pmurias shower& 20:29
20:40 justatheory left 20:41 justatheory joined 20:44 Ara4n joined
pmurias ruoso: re custom hooks, i meant the future XS replacement will have to make sure native libraries get appropriatly serialized 20:44
20:47 Arathorn left, masak left 20:48 luqui left
ruoso pmurias, which basically means they will not be initialized at compile time or that they will be intialize twice, or else we have something like p5 20:49
(the other option is still to have the special "shared object" compilation option)
moritz_ I think in the general case it needs to be initialized twice, and perhaps uninitialized once 20:50
ruoso moritz_, and then the question is... how do you guarantee that at the second time you have the exact same state you had at the other time? 20:51
moritz_ ruoso: I don't think you can
pmurias ruoso: i guess the will be initalized twice
* they
moritz_ ruoso: if your runtime looks up class definitions in a database, and the database changes between compile time and run time, you're basically screwed 20:52
ruoso moritz_, the changes can be more subtle than that 20:53
pmurias but it's your fault
ruoso you would have something as sensible as c binary dependency
20:53 wknight8111 joined, jan__ left
pmurias you mean sensitive? 20:54
ruoso yeah yeah...
that one ;) ;)
pmurias those are tricky issues, but the p5 way is unacceptable 20:55
ruoso I think the "shared object compilation with no compile-time side effects" might be a solution
pmurias compile-time side effects are unclear 20:56
20:56 jan__ joined
pmurias their definition is 20:56
the C(++) compilation model is extremely bad, so being simpilar to it is likely a warnings sing 20:57
* warning
i'm opposed to having a seperatly and non-seperatly compiled modules 20:59
21:10 Arathorn joined 21:11 Ara4n left
pugs_svn r21442 | fglock++ | [PCR] unicode fixes 21:14
21:17 TJCRI left 21:26 jferrero joined 21:32 alester left 21:35 k3153y joined 21:38 jferrero left 21:39 jferrero joined
ruoso home & 21:39
21:40 ruoso left 21:41 iblechbot left 21:45 hercynium left 21:51 pmurias left 21:53 explorer__ joined, explorer__ left 22:14 revdiablo left, cmarcelo left 22:22 peeps[work] left 22:23 Jamtech left 22:25 justatheory left, jferrero left 22:26 jferrero joined 22:27 chris2 left 22:34 k3153y left 22:39 justatheory joined, alester joined 22:44 pbuetow left 22:46 Limbic_Region joined 22:57 k3153y joined 23:05 Exodist left 23:12 k3153y left 23:13 Auzon joined 23:16 mod_cure left, mod_cure joined 23:22 alester left, araujo left, nnunley left, r0bby left, silug left, rlb3 left, Limbic_Region left, wknight8111 left, Chillance left, smtms left, awwaiid left, apeiron left, audreyt left, pjcj left, justatheory left, jiing left, lumi left, rhr left, thepler left, integral left, Limbic_Region joined, alester joined, justatheory joined, wknight8111 joined, Chillance joined, araujo joined, smtms joined, jiing joined, awwaiid joined, apeiron joined, audreyt joined, nnunley joined, lumi joined, rhr joined, r0bby joined, silug joined, pjcj joined, rlb3 joined, integral joined, thepler joined, TreyHarris joined, spinclad joined 23:48 Chillance left