pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by Tene on 29 July 2008.
samlh /script load crapbuster.pl 00:20
sorry 00:21
pugs_svn r23004 | ruoso++ | [mildew] make signatures optional 00:27
wayland76 ZuLuuuuuu: If there was a simple way to list and document all the functions, someone would've done it by now 00:41
While it's by no means complete, it was updated by masak on 7th November, and he was asking around at the time trying to get it more complete 00:43
ZuLuuuuuu hmmmm
sorry I'm not that good at programming I guess what I'm trying to ask is a way for "introspection" of the whole system, I don't know if that is the correct word :) 00:44
wayland76 ZuLuuuuuu: sounds right to me :) 00:45
ZuLuuuuuu for example in Io programming language you can get all of an objects methods by: objectName.slots
and also you can get the "body" of a method
wayland76 In Perl5 this is done with the Data::Dumper module
ZuLuuuuuu the "code"
wayland76 although thinking about it, it only gives you the data, not the functions 00:46
ZuLuuuuuu so, in Io programmin language you can easily write a reference document by a few for loops :)
that would be cool in perl 6 too
wayland76 Anyway, I'm no real perl6 expert, so I'm unaware of how you'd do this
I agree :) 00:47
Have you seen perlcabal.org/syn/S12.html#Introspection 00:48
lambdabot Title: S12
wayland76 ?
ZuLuuuuuu hmm no i just began reading the apocalypses and synopsis, I am at "2" :) 00:49
I will look at it though thanks
wayland76 The Apocalypses tend to be out of date 00:50
A quick skim-over indicates that it may be possible to do what you want with the introspection specified 00:51
ZuLuuuuuu hmmm but synopsis are summaries I guess?
wayland76 Well, synopses started as summaries, but eventually became the spec 00:52
so Apocalypses are historical documents, whereas S12 = Synopsis 12 = Spec 12 :) 00:53
ZuLuuuuuu hmmmmm then I will read the synopsis only then exegesis
wayland76 Btw, a note to someone appropriate: I'm getting /~azawawi/html/t/oo/meta_class.t.simple.html
Well, the Exegeses are also historical documents ... :)
ZuLuuuuuu :)
wayland76 Whoops, sorry, Not FOund: The requested URL /~azawawi/html/t/oo/meta_class.t.simple.html was not found on this server. 00:54
(The errors are when I click links in S29) 00:56
@tell azawawi When I click links in S29, I get Not Found: The requested URL /~azawawi/html/t/oo/meta_class.t.simple.html was not found on this server. 01:09
lambdabot Consider it noted.
meppl good night 02:01
wayland76 Saw pmichaud's question about MAIN on the mailing list, and just wanted to suggest that the answer be documented in the MAIN MAN page, and that the documentation be written by the main man. 02:41
...and if you think I'm lyin', then by the lion's mane, man yourself for combat :) 02:42
(ow, you can stop hitting me now :) )
chrisdolan If I have a scalar that is an ObjectRef, how do I get the contained value out via Rakudo? It looks like I want to invoke vtable get_pmc somehow. 05:28
wayland76 $$scalar? 06:44
(guessing)
How are you creating the objectref? 06:47
chrisdolan my $m = PGE::Match.new(""); 06:51
then $m.PARROT yields 'ObjectRef->PGE;Match'
I want to figure out $m.something.PARROT that yields 'PGE;Match' 06:52
wayland76 rakudo: my $m = PGE::Match.new(""); say $m.PARROT 06:57
p6eval rakudo 32633: OUTPUT[ObjectRef->PGE;Match␤]
wayland76 rakudo: my $m = PGE::Match.new(""); say $m.^PARROT 06:58
p6eval rakudo 32633: OUTPUT[Method 'PARROT' not found for invocant of class 'P6metaclass'␤current instr.: 'parrot;Perl6Object;!.^' pc 975 (src/gen_builtins.pir:569)␤]
wayland76 rakudo: my $m = PGE::Match.new(""); say $$m.PARROT
p6eval rakudo 32633: OUTPUT[Statement not terminated properly at line 1, near "$$m.PARROT"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
wayland76 rakudo: my $m = PGE::Match.new(""); say ($$m).PARROT
p6eval rakudo 32633: OUTPUT[Statement not terminated properly at line 1, near "($$m).PARR"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
wayland76 (my Radkudo appears to be to old for this :) ) 06:59
(ie. on my computer :) )
wayland76 rakudo: my $m = PGE::Match.new(""); say $m.[0].PARROT 07:02
p6eval rakudo 32633: OUTPUT[Failure␤]
wayland76 rakudo: my $m = PGE::Match.new(""); say $m 07:03
p6eval rakudo 32633: OUTPUT[␤]
wayland76 rakudo: my $m = PGE::Match.new(""); say $m.WHAT() 07:04
p6eval rakudo 32633: OUTPUT[Match␤]
wayland76 chrisdolan: Don't know, but I'm being called. I guess I'll be back later & 07:05
azawawi_ hello 07:57
azawawi ping 07:57
lambdabot azawawi: You have 1 new message. '/msg lambdabot @messages' to read it.
azawawi @messages
lambdabot wayland76 said 6h 48m 27s ago: When I click links in S29, I get Not Found: The requested URL /~azawawi/html/t/oo/meta_class.t.simple.html was not found on this server.
masak azawawi: hi there.
azawawi masak: hey ;-)
masak another glorious day in Perl 6 land. 07:58
azawawi yeah another November ;-)
masak :) 07:59
azawawi i guess i should be indexing all of t/* instead of t/spec
masak aye.
but that might be a lot more.
azawawi interesting im getting OOM on some files now 08:00
masak t/ is twice as large as t/spec
OOM? 08:01
azawawi Out of Memory
ulimited to 512M...
masak should be enough for anybody. ;) 08:02
azawawi is looking on t/*
so in synopsis we have t/oo too? 08:03
masak: 387 in t/* if we exclude t/spec... 774 in total 08:06
masak azawawi: mm. I was counting kilobytes. 08:07
azawawi masak: and given most of them are not specced.... STD will croak for sure on most
masak does that necessarily follow?
I mean, non-specced things can still be syntactically ok. 08:08
azawawi nop... a lucky guess ;-)
masak but yes, I also except some things to fail outside of t/spec
moritz STD.pm usually parses all of t/ fine
masak there you go :)
moritz type 'make testt' and see (after an hour...) 08:09
azawawi then instead of every 3 hours... will run it every 6 hours
moritz_: first of all good morning ;-)
s/_//
moritz good morning ;)
azawawi you're back on 'moritz' 08:10
moritz oh, that's a mistake 08:10
azawawi im thinking of generating an html at the end as a summary of what failed...
moritz 'moritz' is registered to another user
(on freenode) 08:11
azawawi STD is back using more memory than usual... 08:12
moritz_ TimToady is refactoring it 08:12
azawawi cool 08:13
moritz_ (Cursor.pm that is) 08:13
pasteling "azawawi" at 212.38.144.137 pasted "summary of passes/fails..." (14 lines, 538B) at sial.org/pbot/33198
azawawi yup all of them are OOMs 08:15
azawawi and it now takes twice the amount of time to finish as before 08:16
azawawi is working on t/spec -> t/* 08:17
wayland76 Anyone know the answer to chrisdolan's question from before? (see the logs) 08:19
azawawi hi wayland76 08:20
wayland76 hi :) 08:24
azawawi wayland76: im was only processing t/spec, not t/ ; will fix it soon 08:29
pugs_svn r23005 | azawawi++ | [STD_syntax_highlight] t/spec -> t/ ; this can mean twice the time but 08:38
r23005 | azawawi++ | [STD_syntax_highlight] all smartlinks in Synopsis will work
r23006 | azawawi++ | [STD_syntax_highlight] added a commented sample cron usage 08:50
pugs_svn r23007 | azawawi++ | [smartlinks] updated syntax highlight links to t/ instead of t/spec 08:52
azawawi moritz_: scheduled it to run every 5 hours on all of t/* 08:58
moritz_ ok ;) 09:08
wayland76 azawawi: I'm in no hurry, just as long as someone knows the problem is there :) 09:11
azawawi moritz_: ping 12:27
@tell moritz_ Here is the latest log, please check out the errors at the end (feather.perl6.nl/~azawawi/html/log.txt)
lambdabot Consider it noted.
azawawi @tell wayland76 it is fixed. thanks for reporting the problem. wayland76++ 12:29
lambdabot Consider it noted.
[particle] azawawi: you still get some oom errors 12:31
filename: ../../t/spec/S02-whitespace_and_comments/unspace.t Reason: Out of memory!
azawawi [particle]: TimToady is refactoring Cursor...
[particle] oh, wow, you did all the pugs tests, too 12:33
azawawi [particle]: It took 11734 wallclock secs... ;-)
[particle] well, heck, seems now's a good time to put this on a cron job that only does files changed since the last run 12:34
(or all files if the script changes)
azawawi [particle]: it is scheduled to run every 5 hours...
[particle] but does it take into account the files changed since rXXXXX? 12:35
azawawi [particle]: not yet but im thinking of it...
[particle]: we could record their md5 and rebuild all when they change or STD.pm changes 12:36
[particle] that'd work, too
or parse svn st -r<LAST_REV_RUN_AGAINST>:HEAD
that is, if you can run this against a list of files 12:37
rather than against 1 file, or all files
azawawi it is a separate script... src/perl6/cron_* 12:38
i wonder when we're gonna upgrade feather into a dual quad core or something ;-) 12:43
pugs_svn r23008 | azawawi++ | [STD_syntax_highlight] correct cron script message 12:45
DarkAkorn hey, does moritz_ happen to be around 12:54
lambdabot DarkAkorn: You have 1 new message. '/msg lambdabot @messages' to read it.
azawawi @seen moritz_ 12:55
lambdabot moritz_ is in #perl6. I last heard moritz_ speak 3h 46m 43s ago.
DarkAkorn ok, well if he comes back, or if anyone else can help me with this, here it is 12:57
on the ilbot, I try to run it and it errors with Can't locate IrcLog.pm 12:58
near as I can tell it's not a CPAN module that I'm missing
so I'm wondering what it is that I am missing, and most importantly, how to fix it
moritz_: if you come back, my connection sometimes prevents me from hanging around long enough to get a correct answer, I'll get the messages though when I can get back on, thanks 12:59
azawawi ~/pugs/misc/irclog/lib/IrcLog.pm
does that help?
DarkAkorn that looks like it 13:01
now can I ask another question? How do I install it, I'm used to CPAN whatever module
I'm pretty new at running anything perl, only gotten one other project to work correctly :/ 13:02
azawawi let me see 13:03
DarkAkorn I already have that file uploaded (with the ilbot), but appearently it's not finding it
may have found it 13:05
[particle] you likely need to either 'use lib "dir where IrcLog.pm is"' in your script
DarkAkorn ok, I'll try that too
[particle] or need to pass -Idir_where_IrcLog_lives to perl
azawawi or use perl -I.
[particle]: ;-) 13:06
azawawi lunch & 13:07
DarkAkorn so I insert 13:09
use lib "/lib/IrcLog.pm"
at the top of my script
and it should go well? 13:10
[particle] no
use lib 'lib';
if the lib dir is under the directory where the script lives
DarkAkorn yes 13:11
ok
[particle] use lib must be above use IrcLog in the script
DarkAkorn aye, figured that
yay! 13:13
it works... and doesn't
but at least I get no errors
It says it's trying to connect to the server, but no connection is made 13:17
[particle] that's beyond me, i don't know the code 13:18
DarkAkorn hummm 13:19
[particle] gotta reboot & 13:20
DarkAkorn moritz_ I'll be back shortly if you drop by, I still need help 14:18
pugs_svn r23009 | pmurias++ | [smop] uses the prove selection trick from mildew 16:14
DarkAkorn moritz_? 17:01
pmurias ruoso: now that we have signatures what are the missing features for the metamodel? 17:08
lambdabot pmurias: You have 2 new messages. '/msg lambdabot @messages' to read them.
Exodist is having another wirelss issues day. 17:21
ruoso pmurias, we have to be able to compile ClassHOW.pm completely 17:33
pugs_svn r23010 | pmurias++ | [mildew] signatures in subroutines 17:49
pmurias ruoso: how should the lexical prelude be exposed to the prelude initialisation code? 17:56
ruoso pmurias, I think we should use EXPORT 17:57
and after load the specific class or knohow
bind the things in the EXPORT to the prelude
pmurias you mean having a implicit use Prelude 17:59
?
and adding stuff to the prelude the standard way? 18:00
pmurias is not sure if he should commit code which puts a $LexicalPrelude in the lexical prelude 18:03
ruoso no... 18:06
pmurias, I mean that the code compiled by mildew declares a package for that file (it always should do that) 18:07
and somehow when that compiled code is loaded, it must find out the reference for that package
and when loading the things in prelude
work as if there was an implicit "use" for each of the files in the prelude 18:08
in the beginning of each file
ruoso which basically means 18:09
that the package must have an EXPORT
and that the prelude will bind the items in the EXPORT
to itself
pmurias which means that we need modules to support the prelude... 18:12
ruoso no... it's the oppsosite 18:13
well... kinda...
I'm assuming the prelude is the outermost lexical scope of any lexical scope
which means that things in the prelude become ubiquitous 18:14
but I'd like to make the compilation of the modules/classes that will belong in the prelude to be standard
which means that it's the prelude loading that is special 18:15
because it uses the actual prelude scope as the current scope
which no other code will
but besides that, 18:16
the loading of the prelude is strictly the same as any other
it's something like...
{ use ClassHOW; use Object; use ... }
that's how the prelude is loaded 18:17
that means that when you "use ClassHOW", besides identifying which file to load
you're identifying which package to import the default exports
and which package to create a local alias to 18:18
pmurias but we need module support to implement "use ClassHOW" right?
ruoso ahhh.. 18:19
I see what you mean now...
yes...
we need to support module loading... yes
but before we can "use ClassHOW", we still need to be able to compile ClassHOW... 18:20
pmurias yes...
ruoso pmurias, have you seen that we already support defining a class if you define knohow ClassHOW first? 18:23
mildew: knowhow ClassHOW { method add_method { $OUT.print("Hello!\n"); } }; class Foo { method bar {} }; 18:24
p6eval mildew: OUTPUT[Malformed fate at ../../src/perl6/Cursor.pm line 728.␤]
ruoso mh?
pmurias old lex 18:25
i suspect
ruoso anyway...
one test I was trying is to take the add_method code from ClassHOW, try to put it into a little snippet like the one above and see what happens 18:26
it was failing with some weirdness yesterday 18:27
pmurias one of the reason i prefer to build complex stuff from smaller ast nodes instead of adding new ast nodes is that it's possible to debug the compiler output with --desugar instead of viewing screenfulls of m0ld 18:35
ruoso pmurias, I see... but I think we could simply provide the desugar for Package, MetaCall and If, couldn't we 18:38
pmurias If already has it 18:39
it's the pretty sub 18:40
i'm really tired now, but i'll attempt to convert Package and MetaCall to a "use the result of this node more than once" and other nodes and see how clean do they look like 18:42
later that is
ruoso pmurias, well... feel free to do it, but if you take a look at the code Package generates, it's pretty discouraging... 18:46
I think implementing the proper "pretty" methods for that AST types looks more promising
pmurias it's 3 lines 18:47
ruoso pmurias, MetaCall yes... but that's hardly where the problem is
and I'm not sure the problem is in Package as well
pmurias 3 lines to implement a proper pretty method
ruoso oh... right... 18:48
pugs_svn r23011 | ruoso++ | [mildew] pretty Package and MetaCall 18:52
r23012 | ruoso++ | [mildew] with a newline it is better 18:54
r23013 | ruoso++ | [mildew] add elsif and else to pretty 19:00
r23014 | ruoso++ | [mildew] code failing with weirdness 19:02
ruoso pmurias, take a look at perl mildew --file t/classhow_add_method_real.t --desugar
ruoso TimToady, it looks like STD is not making much difference between the invocant and the first positional parameter of a method signature... at least in the VAST 19:10
ruoso pmurias, I found out what the weirdness is 19:16
the same problem we had earlier... 19:17
when declaring a class, after the how is set it needs a FETCH method
pmurias ower& 19:18
* shower&
pugs_svn r23015 | lwall++ | [Cursor] refactor to trie and Storable implementation, which uses less 19:41
r23015 | lwall++ | time and memory except for programs using overloading
r23015 | lwall++ | now uses a fate cache to avoid dup fate lists; no longer stores intermediate
r23015 | lwall++ | fates as strings, but reproduces from list when debugging
r23015 | lwall++ | [tryfile] now reports time and memory usage (at least on linux)
TimToady ruoso: you have to look at the first param_sep 19:42
TimToady @tell azawawi even with the latest checkin, you're still going to get OOM on any file with multiple overloading; I need to come up with a less memory-intensive way to do that... 19:46
lambdabot Consider it noted.
TimToady commuting & 19:47
pugs_svn r23016 | ruoso++ | [mildew] now we support the invocant, as explained by TimToady++ 23:29
ruoso TimToady, but I should note that having parameter and param_sep in different parts of the data structure is kinda weird