Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-10-24

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:05 sri_work joined #perl6
00:13 aindilis2 joined #perl6
00:18 Alias_ joined #perl6
00:28 ruoso hmpf...
00:29 ruoso if a memory leak is hard to debug, a bad decrease in the refcount is even harder...
00:30 FireMinion joined #perl6
00:31 FireMinion hey everyone
00:39 ruoso for some reason $scalar.FETCH() is being called without an invocant at some point...
00:40 pugs_svn r22713 | ruoso++ | [smop] working on fixing the mess in smop
00:43 araujo joined #perl6
00:52 eternaleye joined #perl6
01:20 wayland76 It's just occurred to me; if we had a C -> Parrot compiler, then it'd be possible to write replacements for lex and yacc that run on parrot :)
01:21 wayland76 ruoso: Ouch.  This is when a big screen and a program state storer/reverser would be kinda cool.  :)
01:23 justatheory joined #perl6
02:05 pmurias joined #perl6
02:44 Psyche^ joined #perl6
03:04 hercynium joined #perl6
03:05 sail0r joined #perl6
03:06 sail0r left #perl6
03:42 azawawi joined #perl6
03:42 azawawi hi
03:42 lambdabot azawawi: You have 1 new message. '/msg lambdabot @messages' to read it.
03:42 azawawi @messages
03:42 lambdabot moritz_ asked 8h 5m 36s ago: did you write something about your syntax hilighter? a blog or something? if not, I could.
03:43 azawawi moritz_: ping
03:47 alanhaggai joined #Perl6
03:50 wayland76 pang? :)
03:50 wayland76 (oh, and hey to FireMinion, in response to his earlier message :) )
03:54 azawawi hi wayland76
04:03 Ontolog joined #Perl6
04:04 Ontolog joined #Perl6
04:12 pugs_svn r22714 | azawawi++ | [STD_syntax_highlight] ETOOMUCHTIME script now copies required web
04:12 pugs_svn r22714 | azawawi++ | [STD_syntax_highlight] resources to the output html directory
04:18 kisu joined #perl6
04:58 alester_ joined #perl6
05:04 pugs_svn r22715 | azawawi++ | [STD_syntax_highlight] general cleanup, no more unused command line options
05:04 pugs_svn r22715 | azawawi++ | [STD_syntax_highlight] more compliant POD, passes podchecker
05:16 alc joined #perl6
05:32 sevz joined #perl6
05:49 AzureStone_ joined #perl6
05:50 pugs_svn r22716 | azawawi++ | [STD_Syntax_Highlighter] html files are now prefixed with an underscore
05:50 pugs_svn r22716 | azawawi++ | [STD_Syntax_Highlighter] to prevent cases like index.t->index.html
05:58 kisu left #perl6
06:04 pmurias joined #perl6
06:14 zamolxes joined #perl6
06:28 moritz_ azawawi: pong
06:37 khisanth_ joined #perl6
06:43 Kitchy joined #perl6
06:47 Kitchy What's going to be the difference between Pugs and Rakudo? Anything?
06:47 Kitchy Or is it just a race and just one will survive?
06:47 moritz_ both aim to implement Perl 6. We'll see if they succeed.
06:47 moritz_ most likely they'll have different backends
06:48 moritz_ Kitchy: there's no reason why not both should survive
06:49 moritz_ but I think most perl hackers love the idea to write the compiler completely in Perl 6 as soon as possible, and bootstrap as soon as one of the current implementations is good enough for that
06:49 moritz_ afk
06:51 azawawi moritz_: ping pong... ;-)
06:52 moritz_ s/ping pong/table tennis/ if you please ;)
06:55 moritz_ azawawi: was [particle] said, you should blog about the syntax hilighter.
06:55 azawawi ;-)
06:55 azawawi or you can do it
06:56 azawawi sorry i forgot about it
06:56 moritz_ I could, if you don't want to
06:56 azawawi sure go ahead
06:56 moritz_ ok, I will (later today)
06:56 azawawi i need to fix the slow too-many nodes bug
06:57 azawawi reducing the number of nodes to nodes containing only text is like 50% of STD.pm but still 30K nodes is too much
06:58 wayland76 Kitchy: If I understand correctly, Pugs doesn't run on Parrot, thus, other things being equal, Rakudo appeals to me more :)
07:03 pmurias joined #perl6
07:03 pbuetow joined #perl6
07:08 elmex joined #perl6
07:20 azawawi moritz_: ?
07:21 moritz_ azawawi: yes?
07:21 azawawi moritz_: what pmurias's name?
07:22 moritz_ azawawi: Paweł Murias
07:24 azawawi moritz_: im updating the POD documentation on STD_syntax_highlight
07:24 moritz_ good.
07:26 azawawi documentation documentation ;-)
07:34 penk joined #perl6
07:50 pugs_svn r22717 | azawawi++ | [STD_syntax_highlight] added AUTHORS and cleaned up POD
07:50 pugs_svn r22717 | azawawi++ | [STD_syntax_highlight] ETOOMUCHTIME now copies JQuery to html at the end
07:52 iblechbot joined #perl6
07:59 cosimo joined #perl6
07:59 ejs joined #perl6
08:41 tomyan joined #perl6
08:45 schmalbe joined #perl6
08:51 pmurias_ joined #perl6
09:05 pmurias ruoso: re bvalue the problem with bvalue was that it should have receive a second parameter to a object which should be released after the bvalue disappears
09:13 pmurias i should have implemented it at once but i was too lazy and then forgot about it
09:26 Turk joined #perl6
09:27 Turk left #perl6
09:33 masak joined #perl6
09:39 zamolxes joined #perl6
09:49 jauaor joined #perl6
09:49 jauaor hello
09:51 masak jauaor: hi
09:52 masak rakudo: if ("f" ~~ m/f/) { my Match $m = $/; }
09:52 p6eval rakudo 31963: OUTPUT[Type check failed␤current instr.: 'parrot;Perl6Object;infix:=' pc 60 (src/gen_builtins.pir:52)␤]
09:52 jauaor hello masak
09:52 jauaor how are you?
09:52 masak jauaor: I'm fine. what can I do for you today?
09:53 jauaor masak: hah, good ... not much for now I think ...
09:53 jauaor just looking around :-)
09:53 masak jauaor: have a look at pugs and rakudo, and let me know if you have any questions. :)
09:53 * jauaor with some free time lately and considering to look closer at perl6
09:53 masak it's worth it.
09:53 masak jauaor: you heard about November, the wiki engine?
09:54 jauaor masak: sure I will ... mainly rakudo ... I have already played a bit with pugs ...
09:54 jauaor masak:  oh .. wiki engine .. in perl6?
09:54 masak aye
09:54 jauaor no I evidently have not
09:54 jauaor link?
09:54 masak http://github.com/viklund/november/
09:54 lambdabot Title: viklund's november at master — GitHub
09:54 masak http://www.november-wiki.org/
09:55 * jauaor didn't know we already had whole projects in perl6
09:55 * jauaor checks
09:55 lambdabot Title: Main_Page
09:55 masak jauaor: if you have free time, we'd love to have you aboard.
09:55 masak it's a great way to get to know Perl 6 and Rakudo
09:56 jauaor wow awesome
09:56 jauaor masak: oh, thanks! .. you know, I have been hanging around for a while now (araujo is my alter ego .. :-P)
09:57 azawawi moritz_: ?
09:57 azawawi hi masak
09:57 masak jauaor: ah.
09:57 jauaor even got a commit bit for pugs long ago .. sadly, I have had not enough time ...
09:58 masak jauaor: the one who meant "box of macaws" in Esperanto. :)
09:58 jauaor now with some free time at hands, I find perl6 really interesting, and I hope to keep a closer eye on it ... (and cooperating if possible)
09:58 jauaor masak: hahaha yeah
09:58 jauaor now I remember you
09:58 jauaor :-)
09:58 masak we all contribute at the level possible for each of us.
09:59 azawawi congratz masak++ on the november wiki p6 engine... im reading the PDF as we speak.
09:59 masak azawawi: thanks.
09:59 jauaor masak: you the author of november?
09:59 masak jauaor: one of them.
09:59 jauaor awesome
09:59 masak we like to think so, yes :)
10:00 jauaor masak: never played with rakudo, I will look into it
10:00 jauaor I have only barely run pugs
10:00 azawawi it is nice to see some real p6 apps in the wild ;-)
10:00 jauaor yeah, I do think so too
10:00 azawawi masak: any online link?
10:00 masak jauaor: I've found translating small scripts from p5 to Rakudo Perl 6 to be very instructive
10:01 masak azawawi: http://www.november-wiki.org/
10:01 lambdabot Title: Main_Page
10:02 azawawi masak: does it cache anything or is this a straight CGI response?
10:02 jauaor masak: I guess that helps a lot yeah
10:02 masak azawawi: right now, no caching. it isn't hard to add, though.
10:03 masak furthermore, the version running on the page is months old, so much has changed
10:03 azawawi masak: so that's good rakudo performance ;-)
10:03 masak azawawi: well, pre-compiled modules helped a lot.
10:04 masak I don't think we can update until that works again in Rakudo
10:04 azawawi masak: precompiled module?
10:04 masak yes, let me fetch you my journal entry about it, hold on...
10:05 masak http://use.perl.org/~masak/journal/37263
10:05 lambdabot Title: Journal of masak (6289)
10:05 azawawi masak: if you need help with anything ajax, let me know ;-)
10:05 masak azawawi: I think we'll be at that point in early 2009
10:05 masak I'll let you know then
10:07 azawawi again masak++ after reading november.pdf
10:08 azawawi masak: btw, im nearly done optimizing the javascript for STD.pm syntax highlighted [77K nodes]
10:08 masak azawawi: cool
10:08 masak azawawi++
10:08 azawawi and next step is gonna be keyword+types highlighting...
10:09 azawawi masak: a cool thing would be to use STD_syntax_highlight for november wiki... ;-)
10:10 masak azawawi: yes.
10:10 masak it's definitely a possible use case.
10:11 masak sounds like a good fit for a plugin, too.
10:11 * azawawi is thinking about a disk cache-able STD_syntax_highlight CGI script
10:11 masak we've sort of begun thinking about plugins in November
10:11 azawawi nice
10:17 pmurias joined #perl6
10:18 pmurias azawawi: how are you optimizing the js output? what i thought of doing is <span class="red">foo</span><span class="green">bar></span>
10:32 pedrob joined #perl6
10:35 ruoso pmurias, but even that way, I think it's the actual lookup that needs to be lazy, even to support autovivification as spec
10:38 azawawi pmurias: i used $("body").mousemove instead of $("span").mouseover...
10:39 azawawi pmurias: so instead of N span .mouseover bind/unbind, only one is needed...
10:39 azawawi pmurias: but it is not in svn yet... fixing a couple of bugs
10:43 ruoso pmurias, anyway... that memory errors seems to be escalating... I decided to hunt them down and get everything on shape again
10:44 smg joined #perl6
10:44 pmurias ruoso: killing them as they appear seems to be the only solution
10:44 ruoso yeah... and we should put valgrind to run at make test...
10:44 ruoso to avoid not detecting them in time
10:46 pugs_svn r22718 | pmurias++ | [smop] valgrind is used to run make test
10:50 ruoso pmurias, I think lookup_key on s1p_hash is not working as expected... could you help me review it?
10:50 pmurias ok
10:51 ruoso just a note, lookup_key is the old postcircumfix:{ }... but it never return a bvalue... postcircumfix:{ } is now always lazy...
10:52 pmurias ruoso: it should be possible to modify SMOP_RELEASE and SMOP_REFERENCE to print their line number would it help?
10:52 ruoso I think it's already doing it
10:53 pmurias yes
10:54 ruoso pmurias, but the problem now is that lookup_key seems to be returning NULL at some point... which simply was not supposed to happen
10:56 ruoso that or m0ld is building a invocant-less capture somewhere...
10:56 ruoso actually... the later seems more likely
10:59 ruoso btw, I'm talking about test/15
11:02 pmurias ruoso: NULL is not supposed to be return by SMOP_DISPATCH ever?
11:03 ruoso yes... I know...
11:05 ruoso ok... now that's weird... there seems to be an invocant returned by native_capture, because the last reference happens at native_capture.c:300
11:06 ruoso but the segfault happens at s1p_scalar:24
11:11 pugs_svn r22719 | pmurias++ | [smop] added SMOP_HUNT_NULLS option
11:11 pugs_svn r22720 | azawawi++ | [STD_syntax_highlight] optimized JS code so that only one mousemove is needed
11:11 pugs_svn r22720 | azawawi++ | [STD_syntax_highlight] instead of N nodes binding mouseover,mouseclick events (N*2)
11:12 azawawi pmurias: any hint why rx.t is so slow with STD tree traversal?
11:13 azawawi pmurias: it takes like 5600-5800 secs to process
11:13 ruoso pmurias, ok... found one problem... the S1P::Scalar prototype is being used as a value, but it is the RI for itself and doesn't special case itself... so it tries to use itself as a scalar...
11:14 pmurias the old fashioned prototypes are just looking for trouble you now
11:14 pmurias ;)
11:14 ruoso :)
11:15 ruoso pmurias, the other problem I already spotted is using refcount on the prototypes that are visible as C symbols
11:15 azawawi @tell moritz_ how did u get STD.pm to work with STD_syntax_highlight... im getting unicode errors?
11:15 lambdabot Consider it noted.
11:15 pmurias ruoso: what's wrong with that?
11:18 pmurias ruoso: not having them as C symbols if possible would be best, as it would free as from having to take care of destroying them manualy
11:18 ruoso pmurias, the destruction order gets confused
11:19 ruoso pmurias, but some of these symbols are used in the destruction process of each other
11:20 pmurias the not being visible from C countes as 1 RELEASE in the prototypes in src/proto.ri right?
11:20 pmurias * counts
11:21 ruoso actually it would count as not doing an additional reference when adding them into the namespace hash
11:21 pmurias or do they get used via their C name?
11:21 ruoso yes, they do
11:21 azawawi i have one question, does that look right? http://feather.perl6.nl/~azawawi/html_for_me/S02-builtin_data_types/_array_mmd.html
11:21 lambdabot Title: ./STD_syntax_highlight ../../t/spec/S02-builtin_data_types/array_mmd.t, http://tinyurl.com/6ex6qp
11:22 azawawi highlight array and you have 4 levels of identifiers
11:22 azawawi *@data to be specific
11:23 pmurias ruoso: do you think we could manage without storing the prototypes as C symbols?
11:23 ruoso I don't think so, at least not easily
11:24 ruoso azawawi++ the syntax tree aside is very cool
11:24 azawawi ruoso: thx, but is right to have 4 nodes of identifiers?
11:24 azawawi ruoso: s/is /is it
11:25 ruoso pmurias, I think it should be easier to make the prototypes that are visible as C symbols not subject to gc
11:25 pmurias yes
11:25 pmurias and makes less of them visible as C symbols
11:26 ruoso so we need two meta-ri?
11:26 pmurias do we have 2 ?!
11:26 ruoso azawawi, it doesn't look right...
11:26 pmurias ruoso: sorry mis read
11:27 * pmurias thinks very unclearly today
11:27 ruoso pmurias, I think src/ri.c should be the one not subject to gc...
11:27 pmurias and the one subject to gc would be?
11:27 ruoso hmmm... wait...
11:27 ruoso this is not a good idea...
11:28 ruoso they are prototypes for a reaosn
11:28 * azawawi is thinking that infix::<..> is causing that strange behavior
11:28 ruoso you need to be able to call the methods of the prototype on it
11:28 pmurias yes and src/ri.c is the this is an RI do *not* call methods on it thing
11:28 ruoso it's just that it needs to special case calls in the RI
11:30 ruoso yeah... src/ri.c is for RI's that are not prototypes
11:30 pmurias the RI IMHO is supposed to handle method call for stuff like JIT
11:30 pmurias src/proto.ri is for the prototype
11:31 ruoso but it still only delegates new
11:31 azawawi finally rx.html works smoothly (49K nodes) over firefox,chrome and ie and no memory leaks or high cpu usage on exit/window.unload()...
11:31 pmurias it can be extended to delegate more thinks
11:31 pmurias * things
11:31 pmurias i thought of having it receive a list
11:32 pmurias it delegates new only as delegation other things by defaults seemed segfaulty
11:33 pmurias the way out of the loading/destruction insanity seems for me to me to split out a core set of RI's and loading the other ones with some loading api without putting them in a C symbol table
11:34 ruoso that's what I plan to do for the built-in types
11:34 ruoso but considering this small set of types we have in smop today.
11:34 ruoso we could simply have them as C symbols
11:34 ruoso and not subject to g
11:34 ruoso gc
11:34 azawawi @tell moritz_ FF3 performance/memory problem is now solved. Please feel free to blog anytime...
11:34 lambdabot Consider it noted.
11:35 pmurias ruoso: i think even the s1p stuff should be separated
11:36 ruoso maybe... but you need a hash to put ::Hash in the namespace...
11:36 pmurias personally i only succeded lately in adding stuff to the loading/destr sequence by repeated trial and error
11:36 pmurias we can have hash and lexicalprelude in the namespace too
11:36 pmurias * lexicalscope
11:37 ruoso er... and how is the namespace implemented, if not accessing the Hash by its C symbol
11:37 ruoso and how do hash autovivifies without accessing Scalar by its C symbol
11:38 pmurias the lexical prelude dosn't need autovivication right?
11:39 ruoso hmmm...
11:41 ruoso I'm quite confused now...
11:41 ruoso but one thing I'm quite sure...
11:41 pmurias me is very confused today
11:42 pmurias ruoso: yes?
11:42 ruoso the problems in the destruction order are related to refcount-based destruction mixed with C-symbol availability
11:42 ruoso So i'd argue that we first make all of them not subject to gc first
11:42 ruoso then move some types out of it
11:42 pmurias it could work...
11:42 ruoso using the plugin thing
11:43 pmurias we could just destroy them all in a bunch without calling the _destr subs
11:43 pmurias just putting them in a list of things to be free'd without any fancy logic
11:44 ruoso there isn't a fancy logic...
11:44 ruoso just dependencies
11:44 ruoso the lists in src/internal.h is just this "list of things"
11:46 pmurias even dependencies seem "fancy logic" today for me ;)
11:46 ruoso heh
11:47 pmurias the one thing i think is important to have all the non-gc things destroyed after the gc thing
11:47 pmurias s
11:47 ruoso right... that's why I suggested that we first make them all not subject to gc
11:47 ruoso then reorganize
11:48 ruoso because it's easier to organize with the code actually working ;)
11:48 pmurias yes ;)
11:48 ruoso I'm turning SMOP__Proto__create gc-less
11:49 pmurias the RI dsl could support a %nongc
11:49 pmurias it's the ri.c you should change i think
11:50 ruoso ri.c is already gc-less
11:50 ruoso isn't it?
11:50 pmurias and proto.ri too
11:50 ruoso yes... I'm working on proto.ri
11:51 pmurias SMOP__RI__create creates gc ri's
11:51 ruoso ok... let's make the RI dsl building non-gc code first
11:51 pmurias we could have a %nongc flag
11:52 ruoso right... but I'd suggest just doing it gc-less and implementing %gc later
11:54 pmurias ok, we can fetch the gc version from revision control later
11:55 pugs_svn r22721 | ruoso++ | [smop] making C-visible prototypes gc-less
11:55 pmurias you don't need to change tools/ri then
11:55 ruoso pmurias, it's needed to change the destr code
11:55 ruoso from SMOP_RELEASE to plain free
11:56 ruoso take a look at s1p_scalar
11:57 ruoso and the call to SMOP__Proto__create is also different...
11:58 pmurias shopping&
11:58 pugs_svn r22722 | ruoso++ | [smop] s1p_scalar looks even better....
12:02 pugs_svn r22723 | ruoso++ | [smop] RI dsl is gc-less
12:14 cosimo joined #perl6
12:16 cognominal joined #perl6
12:26 adc_Penner joined #perl6
12:26 pmurias ruoso: assert(side_effect) is wrong
12:27 ruoso pmurias, where did I do it?
12:28 abra joined #perl6
12:29 pmurias smop_lowlevel_wrlock
12:29 ruoso hmm...
12:29 ruoso please fix it
12:30 * pmurias download & reads pthread docs...
12:33 pugs_svn r22724 | ruoso++ | [smop] some more steps into making smop work again
12:33 pmurias s/download/downloads/
12:36 Lorn_ joined #perl6
12:37 Lorn joined #perl6
12:38 ruoso pmurias, I think I'll change the RI dsl to make the init and destr in two steps
12:38 ruoso one for the declarations
12:38 ruoso and other for the mold initialization and destruction
12:38 ruoso that's one of the points where circular dependencies are arising...
12:39 pmurias makes sense
12:42 pmurias molds are garbage collectable so should be delt with before the RI freeing starts
12:42 ruoso yeah...
12:43 ruoso I think that was the reason I created the last stage in the smop init/destr sequence
12:55 pedrob joined #perl6
12:55 ruoso pmurias, prove doesn't have a "-e" option here
12:57 pmurias ruoso: it might me from a different module
12:58 pugs_svn r22725 | ruoso++ | [smop] things starting to look better...
13:04 pugs_svn r22726 | azawawi++ | [STD_syntax_highlight] types and routines are now highlighted
13:04 pugs_svn r22726 | azawawi++ | [STD_syntax_highlight] light colors are now darker for better contrast
13:07 pugs_svn r22727 | ruoso++ | [smop] figures are a bit better... switched make test back to test::harness but using valgrind... fails 13/35 tests...
13:10 pugs_svn r22728 | azawawi++ | [STD_syntax_highlight] no more podchecker warnings
13:13 smtms joined #perl6
13:13 pmurias ruoso: make test doesn't work for me now
13:14 ruoso heh...
13:14 ruoso which version of Test::Harness you have?
13:15 pmurias 3.13
13:16 pugs_svn r22729 | ruoso++ | [smop] a bit better 9/35 failures... but several leaks are starting to appear
13:17 ruoso pmurias, interesting... which error do you get?
13:17 pmurias Parse errors: No plan found in TAP output
13:18 ruoso weird
13:19 Lunchy joined #perl6
13:19 pugs_svn r22730 | ruoso++ | [smop] 3/35 failures only... but a lot of leaks...
13:21 azawawi rakudo: my @foo = <a b c d>; say @foo.exists(5);
13:21 p6eval rakudo 31963: OUTPUT[0␤]
13:21 azawawi rakudo: my @foo = <a b c d>; say @foo.exists(3);
13:21 p6eval rakudo 31963: OUTPUT[1␤]
13:21 azawawi rakudo: my @foo = <a b c d>; say @foo.exists(4);
13:21 p6eval rakudo 31963: OUTPUT[0␤]
13:22 azawawi question: .exists is a routine right?
13:23 azawawi anyone?
13:23 adc_Penner joined #perl6
13:26 pugs_svn r22731 | ruoso++ | [smop] 2 tests failing... even more leaks...
13:28 azawawi ruoso: i cant find 'exists' in STD.pm %routinename, is that right?
13:28 pugs_svn r22732 | ruoso++ | [smop] trying a different make test to see if that works for pmurias
13:29 ruoso azawawi, exists in that case should be a method name
13:31 just_ joined #perl6
13:33 azawawi rakudo: my @foo = <a b c d>; say exists @foo, 4;
13:33 p6eval rakudo 31963: OUTPUT[0␤]
13:33 azawawi rakudo: my @foo = <a b c d>; say exists @foo, 0;
13:33 p6eval rakudo 31963: OUTPUT[1␤]
13:33 ruoso in that case exists is a sub
13:34 azawawi ruoso: aka a routine right?
13:34 masak nowadays :exists is an adverb, I think
13:34 masak but Rakudo hasn't been updated to reflect that
13:34 ruoso azawawi, yes, but in parsing terms methods and subs are very different things
13:35 ruoso method calls and sub calls I mean
13:35 azawawi ruoso: im interested in highlighting terms (i.e. coloring ;-)
13:36 ruoso then probably it still matters... sub call might be represented in different collors than method calls....
13:36 azawawi ruoso: thx
13:38 PZt joined #perl6
13:38 pochi joined #perl6
13:39 jhorwitz joined #perl6
13:40 pugs_svn r22733 | ruoso++ | [smop] I think things are back in place, we now have a lot of leaks to fix
13:43 ruoso pmurias, btw... have you saw that we now have a 'knowhow' keyword and that it solves the mop circularity?
13:43 pugs_svn r22734 | azawawi++ | [STD_syntax_highlight] method ops are highlighted in bold black
13:43 pugs_svn r22734 | azawawi++ | [STD_syntax_highlight] added missing _routines and _type css
13:45 iblechbot joined #perl6
13:50 pmurias ruoso: i saw it, it makes the mop non-circular
13:51 ruoso and it also allows us to make the compilation of src-s1p completely plain Perl 6
13:51 ruoso without a different compiler
13:53 pmurias but Class.HOW would returns the PurePrototypeHOW that way
13:53 ruoso yes...
13:54 pmurias knowhow is essentially is meta PurePrototypeHOW right?
13:54 pmurias as in Foo meta PurePrototypeHOW
13:54 ruoso yes... it's just that TimToady explained that he expected a different keyword for different metas
13:55 pmurias and how are anonymous metaclasses expected to be used?
13:56 ruoso my $foo = knowhow { ... } ?
13:56 ruoso ah... I see..
13:56 ruoso good question
13:57 ruoso $anonmeta Foo { ... }
13:57 pmurias no...
13:58 pmurias the propably be an is HOW(...) option in the end but using an different keyword is intended to prevent the abuse of the class keyword
13:59 pmurias ruoso: so the current make test doesn't work for you?
13:59 TJCRI joined #perl6
13:59 ruoso it woks...
14:00 [particle]2 joined #perl6
14:00 pmurias it doesn't work for me
14:01 ruoso even the latest one?
14:01 ruoso with prove?
14:02 pmurias i have to prove's on my system
14:03 pmurias s/to/2/
14:03 ruoso hm
14:04 pmurias one came from TAP::Harness the other older one from somewhere else
14:06 ruoso that's why I try to keep /usr/local clean
14:08 pmurias you could check if your prove comes from TAP::Harness
14:10 ruoso it comes directly from perl core
14:10 ruoso it was installed by the "perl" package
14:11 pmurias so it's the old one
14:12 ruoso pmurias, it can't be that old, since it comes with perl 5.1
14:12 ruoso 5.10
14:13 pmurias judging from the copywrite it's 2 years old
14:13 cosimo joined #perl6
14:14 duzy joined #perl6
14:15 ruoso but it is the one that comes with perl
14:15 pmurias the TAP stuff was rewritten and perl 5.10 has the backwards compatible old version i think
14:15 ruoso I'd rather stick with that then requiring people to install yet another dependency
14:16 duzy discuss pct here?
14:18 pmurias parrot compiler tools?
14:18 ruoso pmurias, it seems that the mold frame is the one leaking... the other variables seems to be connected to it...
14:18 ruoso pmurias, I'm using test/35
14:18 duzy yeap
14:18 ruoso which has the shortest leak list
14:18 ruoso test/31, actually
14:19 ruoso duzy, #parrot@irc.perl.org will probably be more effective...
14:19 [particle]2 duzy: better to discuss that on ...yep
14:19 duzy thanks :)
14:20 duzy joined, thanks guys :)
14:30 pmurias ruoso: found it
14:32 pugs_svn r22735 | pmurias++ | [smop] fixed memory leak
14:36 pmurias do we really need S1P::Str?
14:37 pmurias s/really//
14:40 pmurias math&
14:42 ruoso pmurias, I don't think we need S1P::Str...
14:49 alanhaggai joined #Perl6
14:49 pugs_svn r22736 | ruoso++ | [smop] solves S1P::Str leaks...
15:08 ZuLuuuuuu joined #perl6
15:15 ruoso there's still just a leak in test/15
15:24 pugs_svn r22737 | lwall++ | [instance.t] fix two-terms-in-a-row syntax error
15:24 pmurias ruoso: found it, should i fix it?
15:24 ruoso pmurias, sure :P
15:25 pmurias it's a classic overwritting without freeing bug in bind_key
15:25 pedrob joined #perl6
15:34 [particle] joined #perl6
15:38 hercynium joined #perl6
15:41 antares__ joined #perl6
15:41 antares__ left #perl6
15:44 abra left #perl6
15:44 pugs_svn r22738 | pmurias++ | [smop] removed unintendend circular reference from 15_hash
15:44 pugs_svn r22738 | pmurias++ | added a test_ target which works here
15:46 * ruoso .oO( re-encoding a 1hour video in a laptop can hurt your leg )
15:46 ab5tract joined #perl6
15:48 ruoso pmurias, right... I think now we can think about having the plugin-loading of types...
15:49 ruoso and then we can start moving some types out to plugins
15:49 pmurias ruoso: it turned out to be a totally different bug in the test ;)
15:54 pmurias Loader.load("typename") is the only thing that comes to my mind api-wise
15:55 pmurias or even load("typename")?
15:58 TJCRI left #perl6
15:58 ruoso pmurias, load("filename") ?
16:00 pmurias unless there is something specced it seems the best choice
16:01 pmurias not sure if it's the right time to implement it thought
16:02 ruoso S1PLoader?
16:02 ruoso oh... right time, not right name... ;)
16:02 pbuetow joined #perl6
16:03 ruoso well... it might be the right time, since that's how we're going to load the files in src-s1p
16:05 eternaleye joined #perl6
16:06 * azawawi wonders when & from where is util/smartlinks.pl called to generate perlcabal.org/syn/S*.html?
16:06 [particle]2 probably a cron job on feather
16:07 azawawi [particle]2: thx and does it take the latest util/smartlinks.pl from svn?
16:07 [particle]2 probably
16:08 [particle]1 joined #perl6
16:09 pugs_svn r22739 | azawawi++ | [util/smartlinks.pl] Added STD_syntax_highlight-ed hyperlinks
16:10 [particle] azawawi: will that mean that tests inside generated synopses will be syntax-highlighted?
16:11 azawawi [particle]: it will have a hyperlink to it.. but not in the same document
16:12 azawawi http://feather.perl6.nl/~azawawi/syn/
16:13 lambdabot Title: Index of /~azawawi/syn
16:13 [particle] hrmm
16:13 moritz_ that links to http://feather.perl6.nl/~azawawi/html/S02-lexical-conventions/_unicode.html for example, which is empty
16:13 lambdabot moritz_: You have 2 new messages. '/msg lambdabot @messages' to read them.
16:13 lambdabot http://tinyurl.com/5zqyed
16:13 moritz_ @massages
16:13 lambdabot azawawi said 4h 58m 6s ago: how did u get STD.pm to work with STD_syntax_highlight... im getting unicode errors?
16:13 lambdabot azawawi said 4h 38m 58s ago: FF3 performance/memory problem is now solved. Please feel free to blog anytime...
16:14 azawawi moritz_: since it fails, the html file size is 0
16:14 moritz_ ah
16:14 moritz_ well, I didn't do anything. It just worked ;)
16:16 azawawi moritz_: when and where is perlcabal.org/syn html generated [via smartlinks.pl]?
16:18 moritz_ azawawi: some cronjob, dunno
16:19 moritz_ azawawi: perhaps in agentzh's crontab
16:20 azawawi moritz_: but it will take the latest from svn, right?
16:20 moritz_ azawawi: it runs docs/feather/script/update-syn
16:20 moritz_ that calls 'svn up', yes
16:22 azawawi moritz_: keywords, methods and types are highlighted now [being generated atm]
16:30 justatheory joined #perl6
16:41 smtms joined #perl6
16:46 [particle]2 joined #perl6
16:54 kst joined #perl6
16:54 azawawi moritz_: ?
16:55 moritz_ !
16:55 azawawi moritz_: http://feather.perl6.nl/~azawawi/html/S02-builtin_data_types/_array_mmd.html
16:55 lambdabot Title: ./STD_syntax_highlight ../../t/spec/S02-builtin_data_types/array_mmd.t, http://tinyurl.com/597xtr
16:55 azawawi moritz_: highlight 'data'
16:55 azawawi moritz_: strange parse tree
16:56 moritz_ identifier identifier identifier identifier
16:57 ab5tract does anyone know if lwall's presentation about perl6 grammars at reflections|projections was taped?
16:57 azawawi moritz_: yeah happens with multi ...
16:57 moritz_ ab5tract: it wasn't about grammars, but it was taped, yes
16:57 moritz_ http://www.acm.uiuc.edu/conference/2008/videos
16:57 lambdabot Title: Reflections | Projections 2008 : Videos
16:58 ab5tract he keeps mentioning "i'll explain that tomorrow in my talk about grammars"
16:58 moritz_ uuh
16:58 ab5tract in that video
16:58 moritz_ I no nothing about that one
16:58 moritz_ but I guess it's similar to the one on google tech talk
16:59 moritz_ azawawi: it's not the 'multi', but the slurpy '*' that leads to that strange parse
16:59 ab5tract ok
17:00 * azawawi has finished generating the html-s... DONE ;-)
17:02 azawawi moritz_: how did you generate STD_syntax_highlight for STD.pm? i always get a unicode error...
17:02 moritz_ azawawi: I just run it.
17:02 moritz_ azawawi: maybe you have the wrong versions of the wrong modules installed
17:02 azawawi moritz_: ./STD_syntax_highlight STD.pm ?
17:03 moritz_ yes.
17:04 azawawi moritz_: that's strange... maybe feather has the wrong modules then...
17:04 azawawi moritz_: can u try it on feather1?
17:04 moritz_ maybe :(
17:05 * azawawi is trying it on feather3
17:06 moritz_ azawawi: I'll upgrade some modules...
17:06 moritz_ azawawi: does ./tryfile STD.pm work for you?
17:07 ab5tract ha i didn't realize lwall == TimToady
17:07 moritz_ ;)
17:07 * TimToady thinks TimToady is larry
17:08 [particle] ...what does he know...
17:08 moritz_ TimToady: slurpy array parameters seems to get parsed a bit weirdly - it has a tree of 'identifier' rules of depth 4
17:08 ab5tract lol.
17:09 pasteling "azawawi" at 212.38.153.250 pasted "./tryfile STD.pm output on feather1" (7 lines, 371B) at http://sial.org/pbot/32845
17:10 pugs_svn r22740 | lwall++ | [Cursor] generate shorter anonymous class names
17:12 moritz_ azawawi: I started my './STD_syntax_highlight STD.pm' a few minutes ago, and still no error (on feather1)
17:13 TimToady moritz_: yeah, something screwy there, viv shouldn't be spitting out STD classes...
17:13 ab5tract TimToady: i'm a big fan of the perl 6 rewrite.
17:13 moritz_ TimToady: that's even output from STD5_dump_match, I don't think it uses viv techniques
17:14 TimToady btw, my last checkin made "make testt" go from 57 minutes to 44 minutes
17:14 TimToady ab5tract: me too, except for the rewriting part :)
17:14 * azawawi trying it
17:14 ab5tract hah :D
17:15 ab5tract wasn't sure if you receive enough positive feedback. a substantial portion of the perl community seems to have written p6 off :(
17:16 azawawi moritz_: what's your $PATH?
17:16 TimToady moritz_: probably missing a cursor_fresh or a SUBSUME somewhere that is confusing parse levels
17:16 ab5tract but it ain't hard to tell that rakudo 1.0 is going to be a game changer
17:16 moritz_ azawawi: /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
17:17 TimToady ab5tract: when we have p6, a substantial portion of the perl community will write p6 back on again  :)
17:18 TimToady so I don't worry about the writer-offers much, I just concentrate on finishing :)
17:19 ruoso TimToady++ #  http://www.acm.uiuc.edu/conference/2008/videos is really cool
17:19 lambdabot Title: Reflections | Projections 2008 : Videos
17:19 TimToady well, that's more or less my standard stump speech
17:20 TimToady and yes, the grammar talk was a mutated form of the google talk, albeit with input from Al Aho :)
17:21 azawawi is svn down?
17:21 TimToady seems to be
17:22 TimToady svn: PROPFIND of '/pugs': SSL negotiation failed: Connection reset by peer (https://svn.pugscode.org)
17:22 azawawi same error but with http:
17:23 TimToady on the other hand, if you're on feather, that's the same machine...
17:23 * moritz_ restarts apache
17:24 TimToady fixed
17:25 azawawi perfect
17:25 moritz_ /usr/local/bin/incredibly_ugly_hack_to_restart_apache++
17:25 TimToady that's what you call peddling hard to stay in the same place...  :)
17:26 ab5tract TimToady: yeah. i was happy to hear about the "sprint to the finish" grant.
17:27 * ab5tract wishes he had more money and time to donate to perl and parrot foundations
17:28 ruoso does ::$foo means looking for $foo string as the name of a package?
17:29 TimToady looks like a syntax error to me
17:29 TimToady and to STD
17:29 ruoso how do I look for a package having a string with its name?
17:29 TimToady ::($foo)
17:29 ruoso ok...
17:29 TimToady sym refs are explicit in p6
17:29 meppl joined #perl6
17:30 TimToady also, :: isn't really a sigil, so it's not like @$arrayref
17:30 meppl good evening
17:31 pugs_svn r22741 | ruoso++ | [smop] P6Meta is now named Class and it is a knowhow, not a class
17:35 TimToady shower &  # thinking about how to get rid of TRE
17:40 [particle] ab5tract: we'll happily take whatever money you do have ;)
17:40 ispy_ joined #perl6
17:41 strelok7 joined #perl6
17:42 moritz_ all of it. ;-)
17:43 pugs_svn r22742 | ruoso++ | [smop] STD parses knowhow Class {...}... first shot on a "dispatch" method
17:48 azawawi moritz_: Perfect. Perl6 Specs + STD syntax highlighting are now online... ;-)
17:54 ruoso azawawi, the code examples inside the specs also?
17:54 moritz_ no
17:55 ruoso that would be cool
17:55 moritz_ I objected to that (because of too much load on the browser)
17:58 ruoso it could just be the syntax highlight... without the tree display
17:59 [particle] i'd like very much to see the examples and test snippets inside as highlighted
17:59 [particle] azawawi++ for this amazingly cool application of std
18:00 azawawi moritz_: i think we should generate an optimized version for inlined scenarios. Having lots of <SPAN> is really too much for any browser...
18:00 [particle] agreed
18:00 ruoso yeah.. .filtering out to include only the SPANs that represent highlight
18:01 azawawi Generally browsers can display 50k html elements in 3 secs on today's computers...
18:01 ruoso moritz_, maybe the display in the spec for the smartlinks could be enhanced a bit... like, showing the test number once, and than having two links...
18:02 ruoso s/test number/test name/
18:03 azawawi STD.pm is ~77k nodes; filtered to text only nodes is like ~30k
18:06 genio joined #perl6
18:09 diakopter joined #perl6
18:10 [particle]1 joined #perl6
18:15 pmurias azawawi: i'll do it then
18:16 pmurias or do you have something started?
18:16 azawawi pmurias: no i was just thinking how to do it ;-)
18:17 azawawi pmurias: maybe --simple option to generate it
18:17 [particle] --filter=text-only
18:18 azawawi hmmm cool
18:18 pmurias color-only maybe?
18:18 azawawi --optimized also...
18:19 azawawi pmurias: please choose one and let us do it ;-)
18:20 TimToady maybe some solution involving indirecting each routine out to a separate file
18:21 TimToady or each subpackage
18:21 pmurias you mean to keep the structure and load each snippet with an iframe?
18:22 pmurias azawawi: i would go for --simple
18:22 ruoso pmurias, I undestood as generating more than one file at each pass
18:22 TimToady was thinking in terms of each function/package a clickable link
18:23 azawawi pmurias: if you use an iframe, then you have to put the foo.html on the same hostname [cross-site restrictions]
18:23 pmurias azawawi: what i'm thinking is to generate a tag only on color change
18:23 pmurias * thinking of
18:24 [particle]3 joined #perl6
18:24 pmurias azawawi: is parsing the CSS sane or do we convert it to YAML?
18:25 azawawi pmurias: parsing css is easy... no need for YAML for now.
18:26 azawawi pmurias: let us find things that have color; and then filter out the rest via a simple s{}{}
18:26 pmurias you mean lets instead of let us
18:27 azawawi ;-)
18:30 ruoso azawawi, in fact, you could simply ignore elements which class is not present in the css
18:30 azawawi yup
18:35 azawawi after we finish this, i was thinking of doing a CGI version of it with a limited disk cache to enable easy web syntax highlighting. Cache key is the md5 of the input file sent...
18:37 ruoso a perl6 paste bot with syntax highlight ;)
18:38 azawawi an igoogle gadget with syntax highlight, ... etc ;-)
18:50 pmurias an irc bot
18:50 pugs_svn r22743 | pmurias++ | [STD_syntax_highlight] proof of concept simple option
18:51 * azawawi is testing it
18:58 azawawi pmurias++: gr8 but it seems to remove newlines...
19:00 azawawi pmurias: my bad, works like a charm when you add <html>...<pre> tags to it
19:01 [particle] i'm curious about the size savings
19:02 azawawi it is not done yet; but will calculate it when done
19:02 [particle] ah, you're running it already :)
19:03 azawawi pmurias: do u need help with it?
19:03 pmurias it = ?
19:04 * pmurias is currently eating cake
19:04 azawawi pmurias: it = --simple full implementation
19:04 azawawi lol
19:04 ruoso pmurias, I think it's time for we to review the REPR API
19:04 pmurias ok
19:04 ruoso I started to play with Class and I realized it needs a lot of reworking...
19:05 azawawi pmurias: im gonna continue working on your POC now... thx
19:07 pmurias ruoso: what do we need?
19:07 ruoso pmurias, well... at this moment it is declaring methods and multimethods separated
19:07 ruoso and it is an array instead of a hash
19:07 ruoso which looks quite awkward
19:08 eternaleye joined #perl6
19:08 ruoso well, it's only on array in the Class code, which is wrong
19:08 ruoso but splitting methods and multimethods might not be a good idea
19:10 [particle]1 joined #perl6
19:10 pmurias a multi method is view as a single Code right?
19:10 ruoso yeah... I think so..
19:11 ruoso but one thing that crossed my mind is the possibility of turning every Code object into a potential multi
19:11 pmurias we could change the List to a Hash?
19:11 ruoso meaning that every code would start being a multi of a single variant
19:11 ruoso and that every Code would support a method to traverse the variants
19:11 ruoso even if it has a single variant
19:12 pmurias i think it's fine
19:12 ruoso of course the dispatch would need to check for "only"
19:12 ruoso and stop there...
19:13 ruoso pmurias, have you seen the proposed multi sub implementation (the %mildew dispatch(...) {..} in s1p_multi.ri?
19:13 ruoso that code already implies that every code implements .variants()
19:14 ZuLuuuuuu hello, will we be able to use multiline comments in perl6?
19:14 [particle]1 yes
19:14 ZuLuuuuuu great, /* */ or something else?
19:15 [particle]1 http://perlcabal.org/syn/S02.html#Whitespace_and_Comments
19:15 lambdabot Title: S02
19:16 ZuLuuuuuu thanks
19:20 ruoso TimToady, what do you think of turning every Code into a potential multi? meaning that every Code object would need to support .variants(), even if returning itself...
19:21 ruoso this simplifies the dispatching, because it could then be a single process of dispatch
19:21 ruoso which could stop when finding a proto or an only
19:27 * ruoso assuming that for now... please shout if that is a bad idea...
19:31 ruoso the REPR API lists Class storage... is there really a Class storage? or does everything goes to the lexical scope and through methods?
19:32 * ruoso tempted to think that there's no such thing as Class storage
19:38 * ruoso will assume that also... again, please shout if that is a bad idea...
19:40 jan__ joined #perl6
19:41 TimToady seems fine, in the same sense that .[0] is a no-op on something that is not an array
19:42 TimToady some MOP instances may choose to provide user storage, but p6 doesn't require it
19:43 ruoso TimToady, one last thing... can a Role have a submethod?
19:43 TimToady why not?
19:44 ruoso well.. it's not inheritable... it could be not composable...
19:44 TimToady to the first approximation, everything in a role just gets pasted into the class :)
19:45 ruoso ok...
19:45 ruoso I think I just realized how to solve the CGI::Simple ~~ CGI issue
19:45 TimToady well, that tests for the CGI role, not the CGI class
19:46 jauaor joined #perl6
19:46 ruoso well.. re-stating the issue... if some method has the signature :(CGI $query)
19:47 ruoso you want to be able to send a CGI::Simple object there
19:47 TimToady as long as CGI::Simple does CGI, you're fine
19:47 ruoso exactly... the thing is that CGI::Simple doesn't CGI
19:47 ruoso because CGI is that specific implementation
19:47 TimToady no, the CGI role can at most have a suggested implementation
19:48 ruoso (this issue is about bad design in signatures)
19:48 TimToady the CGI class has the real implementation
19:48 ruoso suppose there isn't a CGI role
19:48 ruoso just a CGI class
19:48 ruoso but you want to use CGI::Simple instead
19:50 ruoso then a CGI::Simple object would need to be accepted by a :(CGI $query) signature
19:50 ruoso in the end, it would get to CGI::Simple ~~ CGI during Signature.ACCEPTS...
19:51 TimToady well, you can always lie about Liskov
19:51 * jauaor greets around
19:51 ruoso that's the point I got...
19:51 ruoso I found a way to effectively lie about it
19:51 ruoso the REPR api provides both .^!isa and .^!does
19:51 ruoso the .^!does is only used for introspection... not for MRO
19:52 ruoso because the methods in the role were copied to the class
19:52 ruoso during composition time
19:52 TimToady I...see
19:52 ruoso then you could put a class inside .^!does
19:52 ruoso without doing the copy
19:52 ruoso of the methods
19:52 ruoso and tada!
19:52 ruoso it works
19:52 TimToady Don't be evil.
19:52 TimToady :)
19:53 TimToady 'course, the nice thing about google's slogan is that you can always redefine evil to be one step more murderous than what you're currently doing
19:54 TimToady Hence, I prefer "Be good."
19:54 ruoso does that mean I shouldn't consider it?
19:54 ruoso or that I should?
19:54 TimToady "Be wise as serpents, and innocent as doves."
19:55 * ruoso sometimes gets confused by TimToady's koan
19:55 TimToady that one's not mine, I'm quoting Jesus.
19:56 ruoso I know, but the context is yours
19:56 diakopter "I have said, Ye are gods; and all of you are children of the most High. But ye shall die like men, and fall like one of the princes"
19:56 TimToady anyway, you may certainly consider it, just don't do it. :)
19:57 ruoso well... I won't... but the people implementing CGI::Simple-like will do it ;)
19:58 TimToady well, if they want to consider that failing the complicated things is fulfilling the CGI contract, that's their decision
19:58 ruoso the worst thing about strong typing is how bad it can get if misused...
19:59 ruoso TimToady, that's precisely the point... sometimes you want to be able to replace legacy code that has a bad signature design
20:00 TimToady I need to commute or fall asleep...
20:00 ruoso one thing I learned from my Java years is that few people know that you should use interfaces instead of classes in most method's signature...
20:00 ruoso and in Java you still have to choose which of the many interfaces that does almost the same thing
20:00 ruoso and that are unrelated, most of the time
20:02 * ruoso .oO( I think the excessive Java Core API is even worse then the crappy syntax )
20:03 TimToady .oO(there's never time to do it right, but there's always time to do it over...)
20:04 * ruoso wash dishes &
20:12 cognominal oops, git msg :fatal: Untracked working tree file 'v6/smop/m0ld/m0ld.hs' would be overwritten by merge
20:19 ruoso cognominal, I think you can remove your local copy and continue the pull
20:20 cognominal thx
20:27 pedrob joined #perl6
20:37 pedrob joined #perl6
20:50 pugs_svn r22744 | azawawi++ | [STD_syntax_highlight] more --simple fixes (loads the css); but nothing concrete
20:53 azawawi im sleepy... going to fix it tomorrow; good night &
20:53 pmurias good night
20:56 ruoso pmurias, I've simplified a bit the REPR API
20:56 pmurias ruoso: looking
20:56 ruoso (in the wiki, not in src-s1p/)
20:57 ruoso pmurias, we know need the RW HOW API... like add_method, compose_role...
20:57 ruoso s/know/now/
20:58 pmurias on think that seems a bit odd in the REPR API is that an object can have either one prototype or storage
20:58 ruoso that's an arbitrary limit...
20:58 ruoso it has the purpose of blocking turning Undef defined
20:59 ruoso because otherwise, one could call Object.BUILDALL
20:59 ruoso and it would become defined
20:59 ruoso I already thought on removing that limit...
20:59 ruoso but I haven't made my mind yet
20:59 pmurias shouldn't the metaclass implement the policy side of things
20:59 pmurias ?
20:59 ZuLuuuuuu left #perl6
20:59 ruoso maybe...
20:59 ruoso but it would require a check in every method call
21:00 ruoso because BUILDALL is a method like any other
21:00 ruoso I even thought on letting the user shoot his feet
21:01 pmurias is that typo likely?
21:01 ruoso as a typo, maybe...
21:01 ruoso but as a logic error, it's a bit more likely
21:01 ruoso $foo might contain undef (which happens to be the Object prototype), and it might call $foo.BUILDALL
21:02 pmurias that seems a version of the problem we encouter with lowlevel prototypes only it doesn't segfault ;)
21:03 ruoso heh
21:03 ruoso does that mean we're  being successful in bootstrapping the type system?
21:03 pmurias hmm, is the Object prototype shared?
21:03 ruoso by shared you mean...
21:04 ruoso s/.../?/
21:04 pmurias if i do my Object $foo;my Object $bar; does $foo and $bar contain the same thing?
21:06 ruoso "my Object $foo" only means a constraint in the Scalar '$foo' to contain only that type...
21:06 ruoso the content of $foo at that moment is "uninitialized"
21:06 pmurias my Foo $foo;$foo = $foo.new() works
21:07 ruoso hmmm.. it does?
21:07 ruoso stupid me...
21:07 ruoso yes... it does..
21:07 ruoso because 'my Foo $foo .= new()' also works
21:07 pmurias yes
21:07 ruoso unless the metaoperator is a special case
21:08 * pmurias doubts it
21:08 ruoso rakudo: class Foo {}; my Foo $foo; $foo = $foo.new(); say $foo;
21:08 p6eval rakudo 31963: OUTPUT[get_string() not implemented in class 'Foo'␤current instr.: 'print' pc 14650 (src/gen_builtins.pir:9033)␤]
21:08 ruoso ok...
21:09 ruoso rakudo: class Foo{}; my Foo $foo; my Foo $bar; say $foo === $bar;
21:09 p6eval rakudo 31963: OUTPUT[1␤]
21:09 pmurias so $foo.BUILDALL might be a valid way of creating an object
21:09 ruoso not creating... but building
21:09 pmurias yes
21:09 ruoso creating is the part that returns a new reference
21:09 ruoso building is the part that initializes that thing
21:10 ruoso after create, it's undefined...
21:10 ruoso after buildall, it's defined..
21:11 ruoso rakudo: class Foo{has $.a}; my Foo $foo; my Foo $bar; say $foo === $bar; $foo.BUILDALL; say $foo === $bar; $foo.a = 1; say $bar.a;
21:11 p6eval rakudo 31963: OUTPUT[1␤Method 'BUILDALL' not found for invocant of class ''␤current instr.: '_block11' pc 181 (EVAL_11:76)␤]
21:11 pmurias so maybe the restriction is unessesary
21:11 ruoso hm... strange... it seems rakudo doesn't implement S12 correctly
21:12 moritz_ I don't think there's any synopsis it implements correctly yet.
21:12 ruoso pmurias, BUILDALL is spec
21:12 ruoso everything that is an Object needs to support it
21:12 pmurias i know
21:13 ruoso but the code above would make $bar.a return 1
21:13 ruoso I mean... calling BUILDALL by hand is not something people do all the time
21:14 ruoso in fact... people is not supposed to call BUILDALL at all
21:14 ruoso unless defining a new constructor
21:14 moritz_ does BUILDALL call bless()?
21:14 [particle]1 c:\Users\particle\dev\parrot\trunk\languages\perl6>ack BUILDALL
21:14 [particle]1 c:\Users\particle\dev\parrot\trunk\languages\perl6>
21:15 ruoso moritz_, src-s1p/Object.pm has a proposed implementation of that
21:15 ruoso moritz_, no... it's bless that calls BUILDALL
21:15 moritz_ ok
21:18 pmurias ruoso: so we might remove the restriction
21:18 ruoso pmurias, yeah... I'm quite convinced we can...
21:19 ruoso this has an important advantage
21:19 ruoso mixins can be made in the actual object
21:19 ruoso no need to make a new anonymous type
21:20 pmurias shower&
21:20 * ruoso removing the restriction from the wiki...
21:22 ispy_ joined #perl6
21:26 ruoso but I think I'll still keep the "instanceof" thing
21:26 ruoso to simplify the lookup for plain objects
21:27 ruoso and that also defines the return of WHAT
21:32 ruoso I think I'm going to simplify that a little bit
21:33 ruoso I'll drop .^!instance, .^!bless and .^!unbless
21:33 ruoso and have .^!instanceof to be a little smarter
21:34 ruoso if there's a single isa and no other definition, it'll return the isa
21:34 ruoso if there's more than one isa and/or any other definition it'll return itself
21:37 ruoso and every object will need to have the .^!how set
21:38 ruoso even if an instance
21:39 pmurias ruoso: isn't it a bit of a magic rule?
21:40 ruoso which part
21:40 pmurias the .^instanceof
21:40 pugs_svn r22745 | ruoso++ | [smop] ^bless sets .^!isa and .^!does instead of calling .^bless on the REPR
21:41 ruoso pmurias, .^!instanceof will be used basically to return WHAT
21:41 ruoso it won't be part of the dispatch, actually
21:42 pmurias do you know what is .add_method going to do internally?
21:42 ruoso well... probably .^!methods{$name} = $code
21:43 * ruoso dinner &
21:43 aindilis joined #perl6
21:49 adc_Penner joined #perl6
22:02 ruoso pmurias, I'm back
22:07 ruoso method compose_role($how: $object, $role, *%initialize) {...}
22:07 ruoso can role composition receive initializing parameters?
22:09 ruoso or is it really external to the composition process, as S12:1394 seems to imply?
22:15 ruoso perl6: my $foo = 0 but True; say $foo.WHAT;
22:15 p6eval pugs: OUTPUT[/home/evalenv/pugs/pugs: error while loading shared libraries: libsmop.so: cannot open shared object file: No such file or directory␤]
22:15 p6eval ..rakudo 31963: OUTPUT[Int␤]
22:15 p6eval ..elf 22745: OUTPUT[Undefined subroutine &GLOBAL::infix_but called at (eval 119) line 3.␤ at ./elf_f line 3861␤]
22:15 pmurias ruoso: i think it's just special syntax
22:16 ruoso meaning it is external
22:16 pmurias sleep&
22:16 pmurias yes
22:35 ZuLuuuuuu joined #perl6
22:35 ZuLuuuuuu left #perl6
22:36 ZuLuuuuuu joined #perl6
22:37 mberends joined #perl6
22:39 ruoso rakudo: class Foo { method bar (Int $a) { say 1 } }; class Bar is Foo { method bar (Str $a) {say 2 }}; Bar.bar(1); Bar.bar("a");
22:39 p6eval rakudo 31963: OUTPUT[Parameter type check failed␤current instr.: 'die' pc 13159 (src/gen_builtins.pir:8135)␤]
22:40 ruoso rakudo: class Foo { multi method bar (Int $a) { say 1 } }; class Bar is Foo { multi method bar (Str $a) {say 2 }}; Bar.bar(1); Bar.bar("a");
22:40 p6eval rakudo 31963: OUTPUT[Parameter type check failed␤current instr.: 'die' pc 13159 (src/gen_builtins.pir:8135)␤]
22:41 ruoso hmpf...
22:45 jfredett joined #perl6
22:46 ruoso elf: class Foo { method bar (Int $a) { say 1 } }; class Bar is Foo { method bar (Str $a) {say 2 }}; Bar.bar(1); Bar.bar("a");
22:46 p6eval elf 22745: OUTPUT[2␤2␤]
22:51 avar elf: class Foo { method bar (Int $a) { say $a + 1 } }; class Bar is Foo { method bar (Str $a) {say $a ~ "b" }}; Foo.bar(1); Bar.bar("a");
22:51 p6eval elf 22745: OUTPUT[2␤ab␤]
22:51 avar elf: class Foo { method bar (Int $a) { say $a + 1 } }; class Bar is Foo { method bar (Int $a) {say $a ~ "b" }}; Foo.bar(1); Bar.bar("a");
22:51 p6eval elf 22745: OUTPUT[2␤ab␤]
22:52 avar mm fail type checking
22:58 elmex_ joined #perl6
23:00 jauaor joined #perl6
23:00 meppl joined #perl6
23:00 xuser joined #perl6
23:00 kcwu joined #perl6
23:01 ZuLuuuuuu left #perl6
23:19 pcbuetow joined #perl6
23:20 Ehtyar joined #perl6
23:22 Helios- joined #perl6
23:41 Limbic_Region joined #perl6
23:42 [particle] joined #perl6
23:57 mjk joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo