Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-10-08

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:00 TimToady well, the postmodern term would be "narrative"...
00:00 pmichaud "story" is better.
00:00 TimToady less threatening :)
00:01 TimToady narrative is a power word for people who think that postmoderns should exercise power over all other power structures
00:01 pmichaud that's not a very good story.  :-) :-)
00:01 TimToady nevertheless, you're soaking in it.  :)
00:01 TimToady it's the spirit of our age
00:02 ab5tract ha. and i thought it was a power word to disentangle and disempower power structures
00:03 ab5tract (yes i'm being both facetious and serious at the same time)
00:03 pmichaud also the spirit of our age.
00:03 ab5tract :)
00:03 ab5tract sarcasm: the cause of and answer to all life's confusion
00:03 TimToady that goes without saying/you can say that again
00:06 ab5tract so was there a project to write perl 5 in parrot? i could see it being useful.
00:06 ab5tract s/write/compile/
00:06 wknight8111 There was, "Punie", i think it was called
00:06 ab5tract thats perl 1 iirc
00:06 wknight8111 whatevs, there was a project for it
00:07 wknight8111 I'm too bad with names to remember what it's called
00:07 ab5tract yeah, i was thinking it was something like that too. 'ponie' maybe.
00:08 pmichaud ponie
00:08 ab5tract which would make for the following: punie, pynie, and ponie.
00:08 pmichaud I keep thinking I might write a p5-like translator for parrot, just to see how far we can get.
00:09 pmichaud (_after_ we're much farther along on p6, though)
00:09 ab5tract right. seems like the opposite of necessary atm
00:10 TimToady first concentrate on APL to p6 :)
00:11 TimToady (not so farfetched these days...)
00:11 ab5tract p6 is fully unicoded correct? so i could technically use kanji for method names, etc
00:12 TimToady certainly
00:12 ab5tract nice :)
00:14 TimToady perl6: sub 名前 { say "moshi moshi" }; 名前();
00:14 p6eval elf 22530, pugs, rakudo 31766: OUTPUT[moshi moshi␤]
00:14 pmichaud they all seem to agree :-)
00:14 TimToady wow, they all worked
00:15 pmichaud I'm a little shocked, also.
00:15 ab5tract cool. what're those numbers and why does elf have a different one?
00:15 pmichaud I was a bit concerned about rakudo.
00:15 pmichaud ab5tract: svn revision numbers
00:15 * ab5tract smacks head
00:15 TimToady std: sub 名前 { say "moshi moshi" }; 名前();
00:15 pmichaud I tend to stick an 'r' in front of the revision numbers :-)
00:16 TimToady is there a stdbot?
00:16 p6eval std 22530: OUTPUT[parsed␤]
00:16 TimToady ooh, there is
00:16 pmichaud we use it a fair bit these days :-)
00:16 pmichaud it tells us what works and what doesn't.  For example....
00:17 pmichaud std:  sub a { say 'oops'; };   say a ~~ Sub;
00:17 p6eval std 22530: OUTPUT[parsed␤]
00:17 pmichaud unfortunately, last I checked, that parses as two prefix:<~> operators, though :-)
00:17 TimToady as it should
00:17 TimToady since a is a listop
00:17 pmichaud correct.
00:18 pmichaud it just catches a few people off guard :-)
00:18 TimToady but we should probably catch that one with a warning
00:18 TimToady since there's no good reason to stringify twice
00:18 pmichaud shouldn't be too difficult to catch that.
00:18 pmichaud I even wondered if it's worthwhile to define prefix:<~~> with a warning.
00:19 TimToady I'd fix it right now, but I'm still debugging the damage from the new ~
00:19 TimToady well, that's how I'd probably do it
00:19 pmichaud I like the new ~, but the syntax is a little funky
00:20 pmichaud probably just takes a little getting used to
00:20 pmichaud I definitely like it better than  [ ')' || fail ]
00:22 ab5tract whens the next state of the onion? i've been feeling restless
00:24 TimToady probably won't publish this year's since it was a tech talk/demo of STD.pm
00:24 ab5tract awww... maybe video ?
00:25 ab5tract its not a year without a new onion address
00:26 TimToady well, that's how we'll make the deadline of Christmas This Year :)
00:27 ab5tract in that case this will be a Very Good Year
00:28 TimToady like the legislatures that stop the clock at 11:59 so they don't violate the law on getting a budget passed by Octember 35th...
00:29 ab5tract haha. diabolic
00:38 * ruoso needs to accept the idea of learning haskell... :/... it's a shame that I can't modify M0ld...
00:42 TimToady haskell is easy to learn.  I've done it several times already...
00:43 ruoso I look at the code and it's simply meaningless to me...
00:45 Kitchy I almost decided to learn Haskell last week. I wanted no oo and good text processing. If it was more mainstream I'd learn it.
00:46 TimToady I can read it, I just can't write it.  Well, I can, but I always get into a losing argument with the compiler...
00:47 xuser joined #perl6
00:49 ywc joined #perl6
00:53 * ruoso considers workaround'ing haskell...
00:54 ruoso TimToady, have you ever thought on a identity test for the representation of the object?
00:54 ruoso like... $obj <something> p6opaque
00:56 TimToady surely something that could be returned by reflection without a special operator
00:57 Kitchy Am I the only one who misspells variables named "text" as "test" way too often?
00:57 TimToady I can never type "per" without adding the l :)
00:57 ruoso hehe
01:12 silug joined #perl6
01:26 sail0r joined #perl6
01:27 eternaleye joined #perl6
01:28 sail0r left #perl6
01:34 alanhaggai joined #Perl6
01:45 smg joined #perl6
02:13 cls_bsd joined #perl6
02:19 PZt joined #perl6
02:30 araujo joined #perl6
02:43 BinGOs_ joined #perl6
03:02 elmex_ joined #perl6
03:07 kanru joined #perl6
03:16 xuser joined #perl6
03:19 Ontolog joined #perl6
03:28 alester joined #perl6
03:30 justatheory joined #perl6
03:30 ab5tract joined #perl6
03:40 mberends joined #perl6
03:58 justatheory joined #perl6
04:20 coke joined #perl6
04:29 Coke moritz_: you didn't just kill my process again, did you?
04:31 PerlJam I don't think he's on feather even.
04:32 Coke I am just very suspicious of tests that die before completion now. :|
04:32 Coke PerlJam: how goes?
04:33 PerlJam Good I guess.
04:33 PerlJam Still trying to think of some way to incorporate parrot/perl6 at $work.  :-)
04:34 PerlJam Playing with Moose more and more lately too. It's a nice bridge from perl 5 to perl 6
04:47 Bzek joined #perl6
04:50 Coke left #perl6
05:07 justatheory joined #perl6
05:09 Psyche^ joined #perl6
05:47 alanhaggai joined #Perl6
06:06 meppl joined #perl6
06:32 pugs_svn r22531 | lwall++ | [series.t] syntax error, added a few tests for list return
06:40 ashizawa joined #perl6
06:42 cosimo joined #perl6
06:49 pugs_svn r22532 | lwall++ | [STD] switch to '(' ~ ')' <foo> format for readability and better errors
06:49 pugs_svn r22532 | lwall++ | [gimme5] support for ~ construct and :dba<>
06:55 moritz_ @tell Coke re killing processes, I'm innocent your honor!
06:55 lambdabot Consider it noted.
07:05 pmurias joined #perl6
07:05 pmurias ruoso: hi
07:06 pmurias is there anything in m0ld you want modified?
07:16 Kitchy joined #perl6
07:18 Kitchy Could someone give me a clue about what challenges were posed to Perlmonks in the past regarding Perl 6?
07:18 Kitchy Someone mentioned that yesterday.
07:19 Kitchy I'd like to look up those posts on Perlmonks.
07:20 moritz_ the only challenges I know of were implementing some piece of code in various languages, including perl 6
07:21 moritz_ maybe google for site:perlmonks.org challenge "perl 6"
07:22 Kitchy I'll try. Here's what I'm talking about from yesterday: http://colabti.org/irclogger/irclogge​r_log/perl6?date=2008-10-05,Sun#l226
07:23 lambdabot Title: #perl6 2008-10-05, http://tinyurl.com/3pgxj6
07:27 moritz_ not quite yesterday, IMHO ;)
07:29 moritz_ Kitchy: pmichaud's "sure, I've invited that in the past. It'd be good to do it again." was about offering an entry in the CREDITS file, not about previous challenges
07:29 Kitchy Yeah. I found his two posts on Perlmonks and they're not challenges.
07:29 Kitchy I get my day lengths confused with all this recent Mars stuff.
07:30 moritz_ I forgot that colabti.org "stole" my irc logger CSS ;-)
07:33 iblechbot joined #perl6
07:34 Kitchy @IBLECHBOT What do you do?
07:34 lambdabot Unknown command, try @list
07:35 Kitchy @list
07:35 lambdabot http://code.haskell.org/lambdabot/COMMANDS
07:37 Kitchy I refuse to click that because I just know it will refer me to a phone number or something.
08:02 jferrero joined #perl6
08:07 Jedai joined #perl6
08:21 cognominal §
08:25 Jedai joined #perl6
08:26 zamolxes joined #perl6
08:39 smtms joined #perl6
09:03 tomyan joined #perl6
09:10 Ontolog joined #perl6
09:12 apeiron joined #perl6
09:15 Alias_ joined #perl6
09:15 cognominal joined #perl6
09:15 tewk joined #perl6
09:15 lisppaste3 joined #perl6
09:15 xinming joined #perl6
09:15 s1n joined #perl6
09:15 simcop2387 joined #perl6
09:15 lambdabot joined #perl6
09:15 awwaiid joined #perl6
09:15 c9s joined #perl6
09:15 Helios- joined #perl6
09:15 ilogger2 joined #perl6
09:15 Aisling joined #perl6
09:15 krunen joined #perl6
09:17 Aisling joined #perl6
09:18 c9s joined #perl6
09:21 cognominal joined #perl6
09:36 pmurias joined #perl6
09:40 ruoso pmurias, hi...
09:40 ruoso pmurias, I was wanting to add a test for the RI of an object...
09:40 ruoso pmurias, to test in a signature if the object is a native int
09:40 ruoso for instance...
09:40 sri_work joined #perl6
09:44 pmurias so you want to have a compare RI opcode
09:44 pmurias ?
09:52 ruoso yes
09:52 ruoso so I can write the ACCEPTS code for a :(int, int) signature
09:53 ruoso (I know ~~ was supposed to be used, but as this are native types, we can go directly to the RI)
10:01 agentzh joined #perl6
10:27 Ehtyar joined #perl6
11:07 jferrero joined #perl6
11:20 pmurias joined #perl6
11:21 agentzh joined #perl6
11:23 pmurias @tell ruoso i think m0ld should remain RI oblivious as it can't but the knowledge about the internals of a given object to any (good) use, we *could* extend m0ld with generall memory manipulation stuff (like llvm) and make it RI aware but it's a different topic
11:23 lambdabot Consider it noted.
11:24 pugs_svn r22533 | pmurias++ | [smop] moved adhocsignature to the RI DSL
11:25 jferrero joined #perl6
12:43 masak joined #perl6
12:53 Lorn joined #perl6
12:54 literal left #perl6
12:55 literal joined #perl6
13:11 pmurias joined #perl6
13:21 iblechbot joined #perl6
13:42 masak joined #perl6
13:52 alanhaggai_ joined #Perl6
14:10 Alias_ joined #perl6
14:16 [particle]1 joined #perl6
14:30 icwiener joined #perl6
14:59 alester joined #perl6
15:04 Lorn_ joined #perl6
15:23 jhorwitz joined #perl6
15:30 ispy_ joined #perl6
15:36 Exodist joined #perl6
15:46 justatheory joined #perl6
15:50 zostay_ joined #perl6
16:10 zamolxes joined #perl6
16:18 azawawi joined #perl6
16:20 azawawi hi
16:21 [particle]1 heya
16:22 azawawi thx for committing globals.pir patch
16:22 azawawi rakudo: say [$*OS]
16:22 p6eval rakudo 31789: OUTPUT[linux␤]
16:22 [particle] sure, i have some more to review from you
16:22 azawawi rakudo: say [$*OS,$*OSVER]
16:22 p6eval rakudo 31789: OUTPUT[linux ␤]
16:23 masak is there a rationale for spelling 'linux' with a minuscule 'l'?
16:23 [particle] that's what the operating system returns
16:24 masak as in 'uname'?
16:25 moritz_ uname returns 'Linux' (at least the executable does)
16:25 azawawi moritz: http://irclog.perlgeek.de/search.​pl?channel=perl6&amp;nick=&amp;q="$
16:25 azawawi moritz_: "error on line 53 at column 7: attributes construct error"
16:26 azawawi moritz_: i cant find things like '$*OS' on IRC logs search
16:27 azawawi rakudo: say [$*OS, $*OSVER, $*EXECUTABLE_NAME]
16:27 p6eval rakudo 31789: OUTPUT[linux  ./parrot␤]
16:27 azawawi rakudo: say [$*OS, $*OSVER, $*EXECUTABLE_NAME].perl
16:27 p6eval rakudo 31789: OUTPUT[["linux", "", "./parrot"]␤]
16:27 moritz_ azawawi: search is somewhat broken, but I want to wait for the next KinoSearch release to do it properly this tiime
16:28 azawawi moritz_: looking forward to it ;-)
16:28 REPLeffect joined #perl6
16:29 * moritz_ too
16:29 [particle] aha. i figured out why osver is blank
16:30 [particle] vim src/inter_misc.c +451
16:30 * azawawi thinks about RT #56226
16:33 [particle] bug filed.
16:35 azawawi [particle]++
16:36 * azawawi working on RT #59722
16:38 pugs_svn r22534 | lwall++ | [STD] improve error messages based on dba
16:38 [particle] dba++
16:42 azawawi pugs: say [$?PERLVER]
16:42 p6eval pugs: OUTPUT[*** Undeclared variable: ("$?PERLVER",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb5efc0bd>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0xb6634e65>}),("@_",PELexical {pe_type = (mkType "Array"), pe_proto = <Array:0xb662...
16:43 azawawi pugs: say [$*PERLVER]
16:43 p6eval pugs: OUTPUT[␤]
16:43 azawawi rakudo: say [$*PERLVER]
16:43 p6eval rakudo 31789: OUTPUT[␤]
16:43 moritz_ that is a little more verbose than it needs to be
16:43 moritz_ (the first error message)
16:44 azawawi rakudo: say [$*PERLVER].perl
16:44 p6eval rakudo 31789: OUTPUT[[undef]␤]
16:45 azawawi $*PERLVER => 'rakudo perl6' ?
16:45 moritz_ $*PERLVER => v6.0.0 ?
16:46 azawawi yeah but it is what Perl r u running under...
16:46 moritz_ that would be "implementation", not "version"
16:46 azawawi hmmm ok
16:49 azawawi moritz_: ./perl6 -v => 'This is Rakudo Perl 6, revision 31697 built on parrot 0.7.1-devel for ...'
16:50 moritz_ azawawi: well, -v prints more information than the version
16:51 azawawi moritz_: so 6.0.0 it is...
16:51 azawawi rakudo: [$?OS]
16:51 p6eval rakudo 31789: OUTPUT[Scope not found for PAST::Var '$OS'␤current instr.: 'parrot;PCT::HLLCompiler;panic' pc 151 (src/PCT/HLLCompiler.pir:103)␤]
17:00 [particle] rakudo doesn't implement $?MAGICALS yet
17:00 TimToady up
17:07 pmurias joined #perl6
17:11 pyrimidine joined #perl6
17:13 pugs_svn r22535 | lwall++ | [STD] -> not recognized after listop sets goal
17:16 ruoso joined #perl6
17:16 ruoso pmurias, hi
17:16 lambdabot ruoso: You have 1 new message. '/msg lambdabot @messages' to read it.
17:17 ruoso pmurias, I'm not really sure I understand what you've saud
17:18 pyrimidine perl6: my $i = 0;say 'hello'.trans(/l/ => {ord('A')})
17:18 p6eval elf 22535: OUTPUT[Undefined subroutine &GLOBAL::ord called at (eval 119) line 4.␤ at ./elf_f line 3861␤]
17:18 p6eval ..rakudo 31791: OUTPUT[he6565o␤]
17:18 p6eval ..pugs: OUTPUT[*** Not a keyed value: VRule (MkRulePGE {rxRule = "l", rxGlobal = False, rxStringify = False, rxAdverbs = VUndef})␤    at Prelude.pm line 476, column 22-60␤]
17:21 pmurias ruoso: meant put instead of but
17:21 pmurias typoes--
17:21 moritz_ TimToady: should $0, $1 etc work inside closures of the Str.trans method?
17:22 * ruoso will try to re-read then
17:23 ruoso pmurias, do you think a RI identity operator would mean knowledge about "internals"?
17:23 pmurias what i meant is that m0ld can't access the internals of an object in a non-polymorphic way so it has no business of inquiring how are they implemented undearneath
17:24 pmurias ruoso: it's not very usefull to inquire how an object is implemented withought being able to use that knowledge
17:24 ruoso pmurias, well... it actually is, in the case of signatures...
17:24 ruoso pmurias, it serves to know if we have the type of objects the code knows how to deal with
17:25 ruoso (not type, but repr)
17:25 ruoso considering it will eventually go to native C code...
17:25 ruoso checking for the correct repr before going to the native C is a good idea
17:26 ruoso then the C code can use the knowledge about the internals
17:27 pmurias in a mixed C/m0ld scenario it makes some sense
17:28 * pmurias is eating his dinner so is not very responsive
17:28 ruoso pmurias, the case here is about &infix:<+> for instance... in the :(int, int) variant, it goes straight to C code
17:29 pmurias ~~ could know about RI's
17:30 ruoso I thought about it, but &infix:<~~> is also a sub... so we need a circuit-braker
17:30 moritz_ ~~ is also a macro (don't know if that matters right now)
17:31 ab5tract joined #perl6
17:32 pmurias we can use RI.isa or something else but i don't want to use a uncommonly used operation an opcode
17:33 pmurias s/uncommonly/one which can be expressed with other opcodes easily/
17:33 abra joined #perl6
17:34 TimToady moritz_: if the match sets the $/ in trans's body and then trans calls the closure, I'd think probably yes
17:35 moritz_ TimToady: ok, thanks
17:37 mberends joined #perl6
17:38 pmurias ruoso: a simple &RI_is could be better than a isa method on RI's
17:38 pmichaud TimToady: so,   'foo'.trans(/(.)/ => { ord($0) })    the $0 doesn't refer to the $/ of the surrounding block?  (i.e., the block containing the .trans method call itself)?
17:38 ruoso pmurias, well... I even thought about creating an object that would do the test...
17:38 ruoso but it maybe would be simpler to just test in mold
17:39 pmurias i can write &RI_is
17:40 TimToady pmichaud: I think a block's $/ is initialized with it's CALLER::<$/>, not OUTER::<$/>
17:40 * pmichaud checks.
17:40 ruoso pmurias, you mean create a new object? or as a syntax in mold?
17:40 ruoso pmurias, I even have the test for it already...
17:42 pmichaud ($/ initialized with CALLER::<$/>)  I think that's different from what was discussed earlier.  so, $_ is from OUTER, but $/ is from CALLER?
17:42 ruoso pmichaud, remember that most of the time where $/ would be used CALLER and OUTER are the same thing...
17:43 pmichaud ruoso: TimToady and I had a very specific discussion about this a few months ago.
17:43 TimToady alternately, when you have a construct like /(.)/ it labels it with the current $/ for it to set.
17:43 TimToady could be made to work either; not sure which is better
17:43 pmichaud TimToady: so, in   $foo ~~ $regex   we end up setting the $/ of $regex as opposed to the current $/  ?
17:44 pugs_svn r22536 | ruoso++ | [smop] sketch for the test on checking RI identity
17:44 ruoso pmurias, check test/38
17:44 TimToady maybe.  the OUTER solution is likely more efficient, but I may be imagining things
17:45 TimToady the CALLER solution would propagate inward as long as trans doesn't do its own matching, which is maybe a problem
17:46 pmurias_ joined #perl6
17:46 TimToady maybe $foo ~~ $regex can set multiple $/
17:46 TimToady the current one and the closurely one
17:46 * ruoso .oO( wasn't $/ declared as "my $/ is context<rw>" on every routine, and regex set it by accessing $+/  ? )
17:46 moritz_ S02 says that $/ is always contextual
17:47 TimToady basically, /(.)/ is more like {/(.)/} if we go with OUTER
17:47 moritz_ so that would default to CALLER::
17:47 TimToady that means that you *can* refer to it via CALLER, not that you must
17:47 TimToady OUTER::<$/> is also a valid way to refer to a particular $/
17:47 pmurias_ ruoso: something like the test but with 'postcircumfix:( )' instead of 'check'
17:48 ruoso yeah... you're probably right...
17:48 TimToady the question is what will be dwimmier
17:50 ruoso pmurias_, does the RI DSL knows how to deal with singleton RI's?
17:50 justatheory_ joined #perl6
17:51 pmurias_ not yet
17:52 ruoso pmurias_, should I write it in C? or would you change the DSL to support that?
17:52 pmurias_ i think we should use CCode
17:53 pugs_svn r22537 | lwall++ | [STD] cascaded arglists fail to allow closure as first arg
17:53 TimToady pmichaud: what's your feeling about the relative overhead of initializing $/ with CALLER vs OUTER?
17:54 pmichaud they're about the same in Parrot land
17:54 ruoso pmurias_, instead of a singleton specialized RI?
17:55 pmichaud the other context and the caller context are basically one pointer reference away -- it just depends on which pointer.
17:55 pmichaud s/other/outer/
17:55 TimToady well, a user can always get at caller via $+/ or whatever
17:55 pmurias_ ruoso: yes
17:55 TimToady so I'm inclined to go with outer, but that breaks your trans unless we closurize /(.)/ to grab the current $/
17:56 ruoso pmurias_, that should be ok...
17:56 ruoso pmurias_, that means it won't use the RI DSL...
17:57 pmichaud (closurize /(.)/)    does that then mean that any use of the regex would affect the $/ of the block where it was defined?
17:57 pmichaud that sounds... icky.  I had been thinking that only smart match set $/
17:57 TimToady I suppose {/(.)/} naturally does the right thing, since it would initialize $/ to OUTER
17:57 pugs_svn r22538 | pmurias++ | 38 should use .()
17:57 TimToady or {$_~~/(.)/} if that's so
17:58 pyrimidine pmichaud: that's how .match is implemented currently (you get a Match object, but $/ is not set)
17:58 pmichaud pyrimidine: yes, I know.
17:58 pmichaud $foo = $bar.match(/whatever/)    didn't seem to me to automatically imply setting $/
17:58 pmurias_ ruoso: \
17:58 pmurias_ sorry typo
17:59 TimToady well, that tends to push us toward CALLER init instead
17:59 TimToady esp if we want .subst to work as documented
18:00 pmichaud I don't have any particular heartburn with $/ as CALLER (but haven't thought about it much)
18:00 pmichaud I had been lumping $/ with $_ and $!, but that doesn't have to be the case.
18:00 pmichaud and, of course, I had originally misconceived $_ to be based on CALLER.
18:01 pmurias_ ruoso: who is supposed to be implementing RI test now?
18:01 TimToady well, $! also has CALLER semantics, though not on init
18:01 TimToady $_ is CALLER if the caller passes it as a param
18:01 TimToady and OUTER otherwise
18:01 pmichaud right.
18:01 ruoso pmurias_, I'm doing it ...
18:01 TimToady maybe $/ is similar?  not sure how that'd work...
18:01 pmichaud so they all somewhat act like CALLER, except that $_ is special in that it's the default for $_
18:02 pmichaud er, for  -> $_ = OUTER::<$_> { ... }
18:02 TimToady fail sets $! in CALLER, for instance
18:03 * pmurias_ stops implementing ri test
18:05 pugs_svn r22539 | pmurias++ | [smop] removed old mildew AST definition
18:07 TimToady or we could just go with straight OUTER and force the user to say $+0, $+1 to get to their caller's $/ on trans.  I doubt it would be a FAQ
18:07 TimToady but that doesn't help much with .subst
18:08 pmichaud it came up with .trans on #parrot, fwiw.
18:08 TimToady which probably *would* be a FAQ
18:09 TimToady the alternative would be for .subst and .trans themselves to tweak CALLER::<$/> which would then be visible as OUTER::<$/> in the closure
18:09 TimToady maybe that's the correct solution
18:10 TimToady and .match (and then ~~ has nothing to do with it)
18:10 TimToady that feels like the $! solution, and that gives me warm fuzzies
18:11 wamiks joined #perl6
18:11 * ruoso just hit the "postcircumfix:<( )> signature" issue again!
18:12 TimToady The signature hits back!!!  --more--
18:12 pyrimidine if a transliteration has multiple regexes?
18:13 pugs_svn r22540 | ruoso++ | [smop] ritest in place... but now I hit the "postcircumfix:<( )> signature" issue again!
18:13 TimToady the binding of $/ only has to last till the closure is called
18:13 moritz_ then the one that matches (the longest token) should set $/
18:13 pyrimidine okay
18:14 moritz_ (at least that's my limited understanding)
18:14 TimToady probably need to compose all the regexen into a single alternation anyway
18:14 TimToady so the LTM can have at it
18:14 ruoso TimToady, since method is an object, the actual postcircumfix:<( )> cannot have the :(|$capture) signature, because it needs the actual method object as the invocant of that call...
18:15 TimToady :($self: |$capture)
18:15 moritz_ TimToady: speaking of regexes and captures, I don't think that the current split() semantics are useful...
18:15 ruoso TimToady, hm?
18:15 TimToady you can pull off the invocant and then bind the remaining to $capture
18:15 pmichaud (subst/trans)  - I agree... I came up with the same answer as I stepped away from the desk.  So, .trans and .subst set CALLER::<$/> after each match.  Clean.
18:15 moritz_ TimToady: currently they say that if the regexes has captures, the match objects follow in alternation with the strings between the matches...
18:15 ruoso TimToady, right... but on a method, we need a real invocant...
18:16 moritz_ TimToady: but the question if a regex has captures isn't determined at (regex) compile time
18:16 ruoso if we pull the invocant off, how is it going to find "self"
18:16 moritz_ TimToady: what about having an :preverse named arg that switches between two modes of operation?
18:16 pmichaud ....:perverse?
18:16 * ruoso stands for postcircumfix:<( )> ($capture) instead
18:17 moritz_ erm, :preserve
18:17 moritz_ *blush*
18:17 TimToady if you call the method as a sub it can just use the next arg as invocant, if you unshifted the method object
18:17 moritz_ well, the name isn't good
18:17 TimToady ETOOMANYTHREADS
18:17 moritz_ TimToady: should I take it to the list?
18:17 * TimToady switches context
18:18 ruoso TimToady, but that requires transformations in the capture... is there a reason for avoiding the actual capture as the first positional argument for postcircumfix:<( )> ?
18:18 TimToady moritz_: whether a regex has captures *is* determined at compile time
18:19 TimToady if not, we've botched the design
18:19 moritz_ TimToady: (.)* doesn't produce a $0 if it matches with zero count
18:19 TimToady ruoso: that would work too, I suppose
18:20 moritz_ TimToady: so it is only determined if it has the *potential* to create captures
18:20 ruoso TimToady, but I mean, can I consider adopting it? since my methods and subs are already objects... it's pretty hard to implement the other way...
18:20 TimToady it makes $0 that is an empty array
18:20 TimToady ruoso: sure, that's fine
18:20 ruoso cool
18:21 moritz_ oh, right
18:21 * moritz_ must have confused something very badly
18:21 moritz_ TimToady: so never mind, thanks for the clarification
18:22 pmichaud PGE currently has trouble with    /foo || bar (.)*/    in that $0 isn't created as an empty array if we match 'foo'.
18:23 speckbot r14589 | larry++ | various tweaks and clarifications
18:23 pugs_svn r22541 | pmurias++ | [mildew] added some ast creation helpers, because the Moose constructors are too verbose
18:23 TimToady ruoso: have revised S13 to $capture
18:23 ruoso :D
18:24 ruoso TimToady, thanks!
18:24 TimToady finally back to parsing 100%!!!  whew!!!
18:26 justatheory joined #perl6
18:32 pyrimidine Are we leaving .match as is? (not setting CALLER::<$/>)
18:32 moritz_ is there a god reason for 'make' to clean the lex cache *after* compiling itself?
18:32 moritz_ s/god/good/
18:33 TimToady .match will also set CALLER::<$/>
18:33 TimToady moritz_: no, was just thinking about that myself
18:34 TimToady in terms of "if I just want the gimme5 to run, what if I ^C in the middle of the rm?"
18:35 pugs_svn r22542 | pmurias++ | [mildew] added missing file
18:35 TimToady feel free to rearrange
18:36 moritz_ allright
18:38 TimToady next thing is to add flags to viv such as --ast and --p6, though I think --p5 is maybe default, since that's the name, vi-v
18:38 TimToady maybe we should rename Perl 6 to vi  :)
18:38 pugs_svn r22543 | ruoso++ | [smop] signature for postcircumfix:<( )> is now :($capture) instead of :(|$capture). All tests pass, ritest works, now lets move to multi sub! :)
18:39 TimToady then we could have vi vs Python wars  :)
18:39 pmurias_ vi(m) uses ex as it's scripting language which is disgusting
18:40 * ruoso .oO( on the bright side, at least it's not emacs lisp )
18:40 PerlJam pmurias_: as "a" scripting language.  You may use others I'm pretty sure.
18:40 PerlJam Hmm.   I wonder if we can get parrot embedded in vim  :)
18:41 pmurias_ ruoso: ex is worse than emacs lisp
18:41 ruoso that's hard to imagine
18:41 TimToady hey, no four-letter words please
18:42 ruoso not even "perl"?
18:43 TimToady Perl 6 is a six-letter word, kinda sorta
18:44 * pmichaud still only sees four letters, a space, and a digit.
18:46 fullermd Well, it's two words.  So on average, it's a 2-letter word.
18:47 ab5tract hahaha
18:47 pmichaud or a 3.5-letter word
18:48 TimToady or a 2.4-letter word
18:48 TimToady like the average family
18:49 pmurias_ the vim perl api seems to be better than i remembered
18:49 TimToady Wagner's music is better than it sounds
18:50 * ruoso .oO( well, at least it is not just my brain that is melted... )
18:53 TimToady you're melting as a whole?
19:03 [particle] Perl 6 is a single utf-256 character
19:04 moritz_ let's hope it neer becomes a wtf-257 char ;)
19:04 pmurias_ anyone got a link to Jonathans blog entry on how he implemented mmd?
19:04 [particle] google://rakudo.org ;)
19:05 TimToady it's probably an NFG character :)
19:05 ruoso TimToady, btw, "Last Modified" in S13 has the wrong year
19:06 speckbot r14590 | larry++ | wrong year, ruoso++
19:08 TimToady oh wow, got about twice as much hot sauce as usual.  and when you're talking 550,000 scovilles, that's a real brain melter
19:09 TimToady don't think I'll get anything done the rest of the day, except rewriting Xanadu
19:10 ruoso heh
19:10 ab5tract hehe
19:10 TimToady *both* of them
19:12 ruoso perl6: multi foo(Int $a) { say 1 }; multi foo(Num $a) {say 2}; foo(1); foo(1.1);
19:12 p6eval rakudo 31794: OUTPUT[1␤2␤]
19:12 p6eval ..elf 22543: OUTPUT[2␤2␤]
19:12 p6eval ..pugs: OUTPUT[1␤1␤]
19:14 ruoso is it sane to think that there's a possible pre-ordering of those variants by the fact that Int ~~ Num?
19:14 [particle-split] that makes me happy
19:14 silug joined #perl6
19:15 TimToady I'm so happy you're so happy we're so very happy happy...  --bad stepsisters
19:17 ab5tract hmmm. interesting that elf and pugs output opposite
19:18 moritz_ ab5tract: pugs doesn't really do types yet
19:22 ab5tract i see
19:23 ab5tract elf maybe has problems relating to ruby's type (non)implementation
19:24 ruoso rakudo: multi foo (Int $a, Num $b) { say 1 }; multi foo (Num $a, Int $b) { say 2 }; foo(1,1);
19:24 p6eval rakudo 31797: OUTPUT[No applicable candidates found to dispatch to.␤current instr.: '_block11' pc 31 (EVAL_13:15)␤]
19:24 ruoso hmm... interesting..
19:25 ruoso I suppose that is a bug..
19:25 ab5tract what is the significance of the ␤ character?
19:25 ruoso new line
19:25 ab5tract unicode is yummy
19:26 ruoso TimToady, is it sane to assume that in dubious cases like the one above, the behavior is undetermined? or is there a left-to-right precedence in multi variant ordering?
19:29 azawawi joined #perl6
19:34 pmurias_ ab5tract: elf actually runs on perl5
19:34 pmurias_ it uses ruby only for parsing
19:35 pmurias_ ruoso: you get an ambigiouity error
19:36 ruoso by spec?
19:39 pmurias_ think so can find the place where it's specced
19:40 pmurias_ re postcircumfix:<( )>, it's possible to use a subroutine as a method with the invocant being passed as a positional
19:40 ruoso pmurias_, that would require transforming the capture...
19:41 pmurias_ S12:278
19:43 pmurias ruoso: that would point to having both postcircumfix:<( )>($capture) (perhaps under a different name as CALL) and postcircumfix:<( )>(|$capture)
19:44 ruoso pmurias, actually... not really
19:44 ruoso pmurias, if you look a little bit below, it will show another example...
19:45 ruoso where it uses an anonymous methdo
19:45 ruoso that second example requires postcircumfix:<( )>($capture)
19:45 Lorn__ joined #perl6
19:46 pmurias read the paragraph underneath?
19:46 ruoso pmurias, I think the upper example counts on method-to-sub fallback
19:47 azawawi moritz_: a couple of tests like chomp.t is using is_deeply (Test::More). I cant find it in languages/perl6/Test.pm
19:47 pmurias what would my $method = method ($a:$b,$c) {say "a:$a b:$b c:$c
19:48 moritz_ azawawi: yes, that's a problem
19:48 pmurias "};$method(1,2,3)
19:48 pmurias print?
19:48 ruoso it would probably fail because of a missing invocant and too many positional arguments
19:48 * azawawi scratching his head
19:49 moritz_ azawawi: there is quite some confusion at the moment. Some tests seem to assume that is() uses infix:<eqv> comparison, most assume string comparison
19:50 moritz_ azawawi: so we haven't yet decided what to use. If is() uses eqv, then there's no need for is_deeply, because is() will do that job
19:50 ruoso pmurias, it was the method-to-sub fallback that used to transform the capture, moving the invocant to the first positional argument... but that is no longer the case...
19:50 pmurias TimToady: what do you think of having a t/uncertain directory where we could place tests you could give an official verdict on when you have some spare time?
19:50 pmurias ruoso: so you think it's a relict in the spec?
19:50 ruoso maybe...
19:51 ruoso btw... your example wouldn't fail...
19:51 pasteling "azawawi" at 212.38.154.121 pasted "List of tests using is_deeply" (66 lines, 5.3K) at http://sial.org/pbot/32512
19:51 ruoso actually it would... but just because of too many positional args, not because of missing invocant
19:51 azawawi moritz_: so replacing them with is() will do the trick
19:51 moritz_ azawawi: only if is() actually should do "smart" compaarison.
19:52 moritz_ azawawi: that's the point that's not yet decided
19:52 azawawi moritz_: ok
19:52 moritz_ the ones in hyper.t seem fairly non-sensical to me
19:52 moritz_ is_deeply(~@r, ~@e, "distribution for unary prefix");
19:52 ruoso pmurias, but one thing I know for sure... the "turn the invocant into first arg" thingy was part of the "method-to-sub fallback"
19:52 pmurias ruoso: As a convenient form of documentation, such a closure may also be written
19:52 pmurias in the form of an anonymous method
19:53 moritz_ why the bloody hell do you first convert to string, and then compare the strings deeply?
19:53 PerlJam moritz_: that is craziness.
19:53 * ruoso wonders how many dimensions strings has
19:54 PerlJam perhaps someone thought ~@a meant ~@a[0], ~@a[1], ~@a[2], ...
19:54 pmurias ruoso: that seems to imply an anonymous method is merely a different way of writting an anonymous sub
19:54 ruoso pmurias, not really... it implies that you need to have a method if you want to make a method invocation...
19:55 moritz_ PerlJam: probably cargo-culted crazyness
19:56 * azawawi looking for something to work on
19:56 ruoso pmurias, the key thing here is that "$obj.$method()" requires $method to be a method
19:56 pmurias or a Code
19:56 ruoso pmurias, because there isn't a 'method-to-sub' fallback anymore
19:57 ruoso pmurias, that's the part I thing is relict
19:57 ruoso *think
19:57 ruoso because it's an anonymous implementation of the 'method-to-sub fallback'
19:57 alester joined #perl6
19:58 pmurias it's pointless to discuss it futhermore atm we must now wait for a clarification from TimToady... ;)
19:58 pugs_svn r22544 | moritz++ | [t/spec] tests for Str.trans with regex and closures. One failing on rakudo
19:58 pugs_svn r22544 | moritz++ | (RT #59730).
19:58 TimToady it really has little to do with fallback, and much to do with the fact that references are untyped, &foo could be either a sub or a method
19:59 ruoso TimToady, so it will send the capture unmodified?
20:00 TimToady I think a method object can fake up an invocant if its capture is missing one, and I think a sub can treat an invocant as a first positional if the capture contains an invocant.
20:00 TimToady this is independent of whether the dispatchers fallback
20:00 TimToady but rather the basis for writing dispatchers
20:00 ruoso TimToady, so the default signature is different...
20:00 TimToady phone &
20:01 pmichaud 1 minute.
20:01 pmichaud (for me)
20:02 pugs_svn r22545 | moritz++ | [t/spec] some s/is_deeply/is/ in hyper.t. azawawi++ for noticing
20:02 azawawi moritz_: any update on http://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=56226
20:02 lambdabot Title: #56226: [TODO] implement 'roots' from S29
20:03 * ruoso later &
20:03 * azawawi hates who RT keeps logging him out
20:07 moritz_ azawawi: you're right, the second polar should be unpolar
20:09 moritz_ azawawi: in that patch... I don't understand how polar works
20:10 moritz_ azawawi: and what's N1? shouldn't that be $N1 or something?
20:10 azawawi moritz_: n1 = register
20:11 moritz_ I think the indirect notation ($N1 instead of N1) is preferred these days
20:12 azawawi moritz_: i optimized the polar version from Complex.pir
20:13 azawawi moritz_: i expect it to be x+0i
20:13 moritz_ rakudo: say (1+1i).polar.join(", ")
20:13 p6eval rakudo 31798: OUTPUT[1.4142135623731, 0.785398163397448␤]
20:14 moritz_ is there anything wrong with that?
20:14 azawawi moritz_: my math is a bit rusty ;-)
20:15 fullermd Well, that sounds close enough...
20:15 moritz_ let's ask the other way round - what does the new .polar do that the old one didn't?
20:16 moritz_ 1+1i has magnitude sqrt(2) and angle pi/4
20:16 moritz_ looks right, yes
20:16 moritz_ perl6: say pi/4
20:16 p6eval rakudo 31798: OUTPUT[0.785398163397448␤]
20:16 p6eval ..pugs: OUTPUT[0.78539816339744825␤]
20:16 p6eval ..elf 22545: OUTPUT[Undefined subroutine &GLOBAL::pi called at (eval 119) line 3.␤ at ./elf_f line 3861␤]
20:16 pyrimidine moritz_: I'll take a look at the .trans bug in the next day or two (RT #59730).  I think it's an issue in the mapping.
20:17 moritz_ pyrimidine: ok, no hurry
20:17 pyrimidine rakudo:
20:17 pyrimidine rakudo: say 'hello'.trans( /(l)/ => { ord($_) }, /(h)/ => { $_ });
20:17 p6eval rakudo 31798: OUTPUT[he108108o␤]
20:17 pyrimidine say 'hhello'.trans( /(l)/ => { ord($_) }, /(h)/ => { $_ });
20:17 azawawi moritz_: btw, there isnt a test that tests x.polar
20:18 pyrimidine rakudo: say 'hhello'.trans( /(l)/ => { ord($_) }, /(h)/ => { $_ });
20:18 p6eval rakudo 31798: OUTPUT[hhe108108o␤]
20:18 moritz_ azawawi: that needs to be changed ;)
20:18 moritz_ azawawi: but currently rakudo's (or parrot's) complex math is a bit broken anyway, so I wouldn't invest too much energy until that's fixed
20:19 azawawi moritz_: i was struggling learning p6 + pir + math again ;-)
20:19 * moritz_ wonders which of these three is the hardest ;)
20:21 azawawi moritz_: the unpolar part at the end was the hardest btw (roots.pl)... learning the semantics for $abs.unpolar(...) and discovering it was not the correct one ;)
20:24 aindilis joined #perl6
20:26 * azawawi wonders when will he will be able to re-write PIR code in perl6 runtime
20:44 jferrero joined #perl6
20:48 pmichaud azawawi: we have to get namespaces and "is export" working.
20:49 pmichaud at least, that's what we need if we want it done semi-right.
20:55 azawawi moritz_: ping
20:55 moritz_ azawawi: pong (but still a bit absent...)
20:55 azawawi moritz_: implemented p5chop on lists... ;-)
20:56 moritz_ azawawi: is that even specced?
20:56 azawawi moritz_: my Char multi p5chop ( Str *@strings is rw ) is export(:P5)
20:57 moritz_ ah right
20:58 * azawawi submitting the patch to RT #59552
21:01 donaldh joined #perl6
21:03 azawawi moritz_: done...
21:19 sri_work_ joined #perl6
21:19 wknight8111 joined #perl6
21:54 azawawi moritz_: ping
21:57 azawawi @tell moritz_ any-list.pir p5chop and p5chomp is running all tests now. Patches are on RT. Thanks.
21:57 lambdabot Consider it noted.
21:58 azawawi good night
21:59 ruoso joined #perl6
21:59 pugs_svn r22546 | pmichaud++ | t/spec:  Regress Rakudo a bit due to Complex PMC errors (RT #59630)
22:08 pugs_svn r22547 | pmichaud++ | [t/spec]  Add some ?#rakudo skips after the mmd branch move.
22:08 pugs_svn r22547 | pmichaud++ | Remove the unnecessary #?DOES lines.
22:14 PZt joined #perl6
22:15 Lorn joined #perl6
22:46 pugs_svn r22548 | ruoso++ | [smop] first sketch on the test for multi subs
23:06 bjakbot joined #perl6
23:08 bjakbot test
23:13 zamolxes joined #perl6
23:14 bjakb joined #perl6
23:14 bjakb test
23:19 bjakb register term
23:21 benzo joined #perl6
23:21 benzo hello test
23:21 bjakb ciao test
23:23 silug joined #perl6
23:24 bjakb hi silug
23:29 alester joined #perl6
23:32 meppl good night
23:34 bjakb hi, I've problem with a Pugs installation, can somebody help me?
23:54 Limbic_Region joined #perl6

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

Perl 6 | Reference Documentation | Rakudo