Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-07-15

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:02 sorear \$c requires me to actually have capture objects, though
00:02 * sorear would like a light weight way to not contextualize an argument
00:07 TimToady that's what I think \$c does (though I'm not yet convinced that .item should mean much anything, since every object is already an item...)
00:08 lue y o hai o/
00:09 TimToady I'm wondering what breaks if simply $c is the minimal contextualization?
00:13 TimToady or if we want to hide Parcels and Captures from the eyes of mere mortals, we could just put them outside of Any, and do an auto-thready thing to coerce them to a user-visible type
00:14 TimToady then your no-context is simply
00:14 TimToady Capture $c or Parcel $p
00:14 TimToady much like you can work with a bare Junction if you declare Junction $j
00:15 TimToady it would be really nice if we could keep things like .item out of the hot path of binding
00:17 TimToady jnthn: ^^^ might simplify a lot of things, but we'd have to generalize junctional autothreading to Capture/Parcel argument rewriting
00:18 TimToady but we've already talked about such a generalization for an Each type
00:18 jnthn TimToady: Generalizing dispatch fail-over doesn't immediately scare me.
00:18 phenny jnthn: 14 Jul 22:39Z <masak> tell jnthn &mkdir seems to create the cache/ dir without any permissions whatsoever here. so the fetch fails in proof-of-concept because git doesn't have enough permission.
00:19 jnthn phenny: tell masak upgrade to Windows
00:19 phenny jnthn: I'll pass that on when masak is around.
00:19 TimToady each is in S09:1063
00:19 jnthn .oO( I'm gonna get smacked for that. )
00:19 jnthn TimToady: I'm not sure what the fallout would be otherwise.
00:19 jnthn TimToady: Keeping hot paths hot is, of course, a nice thing though.
00:19 TimToady will anything terrible break if we put Capture and Parcel outside of Any
00:20 TimToady might be worth an experiment
00:20 jnthn TimToady: I expect quite a lot would. (more)
00:20 lue jnthn: if pir::issame isn't right, then what is? [looking...]
00:20 sorear Why are we hiding Capture and Parcel, anyway?
00:20 jnthn TimToady: The question is whether anything breaks in a way that isn't easily patched up by having fallback.
00:20 TimToady basically, anything outside of Any is more of a lazy linguistic construct than a normal object
00:20 TimToady and Parcels and Captures can be viewed as lazy linguistic constructs
00:21 TimToady like Each and Junction
00:21 jnthn TimToady: It'd be good to get pmichaud++'s input.
00:21 TimToady in that case you should mention his nick...oh wait...
00:22 jnthn TimToady: He has a better sense than I do of how Parcel fits into the overall model of listy things.
00:22 jnthn TimToady: On captures, I'm not sure what the fallback action would be.
00:22 TimToady it feels like a simplification to me, in the sense that it could entail removing a lot of introspection, which might be work
00:22 sorear Capture already itemizes to itself
00:22 sftp joined #perl6
00:22 jnthn TimToady: That is, if I pass a Capture where Any is expected, what happens.
00:22 sorear I think the only standard type with a non-identity .item is Parcel
00:23 jnthn sorear: Yes, Capture .item's to itself for sure.
00:23 TimToady so maybe only Parcel needs to be considered linguistic
00:23 sftp joined #perl6
00:23 jnthn Aye
00:23 jnthn Passing Captures around is actually quite useful.
00:23 sorear but being able to define stuff with interesting item context behavior is useful for user code
00:24 TimToady it violates some principle or other
00:25 sorear TimToady: S06:2502?
00:25 plobsing joined #perl6
00:26 TimToady that could be handled by grabbing the whole arglist capture
00:26 jnthn TimToady: fwiw, here are the things in Rakudo that define an item method: Iterable, Junction, Parcel, Mu
00:26 TimToady and that seems powerful enough to me
00:26 sorear I don't understand
00:26 sorear I don't see an arglist there
00:26 TimToady 1,2,3 is an arglist
00:27 jnthn TimToady: The one in Mu is identity
00:27 lue Are there any other comparison ops besides what's at  http://docs.parrot.org/parrot/latest/html/src/ops/cmp.ops.html ?
00:27 jnthn TimToady: So is the one in Junction.
00:27 lue out of all of them, issame seemed like the 'most right' one.
00:27 TimToady Iterable or Iterator?
00:28 sorear TimToady: S06:2502 doesn't have 1,2,3?
00:28 jnthn TimToady: That just leaves Parcel (which Seqs it)
00:28 jnthn And Iterable which...er...I don't understand what that code is doing. :-)
00:28 TimToady 2502 is a blank line
00:28 jnthn TimToady: Certainly Iterable, not Iterator
00:28 TimToady but I see what you're pointing at
00:29 sorear jnthn: I understand Iterable.item
00:29 sorear it's a Rakudo-specific hack
00:29 sorear variables in Perl 6 can be listy or scalary; Iterable.item is used to clear the list bit
00:30 TimToady Iterable is supposed to just be a role that supplies a way to pull an iterator from a non-iterator
00:30 jnthn sorear: It's not really a hack as far as I can tell
00:30 jnthn sorear: As in, it needs to clear the flatten bit
00:30 jnthn sorear: That's just how Rakudo represents that information.
00:31 TimToady flattening is not really an attribute of an object, it's how it's interpolated and bound
00:31 sorear jnthn: the flatten bit is really part of the ref, not the object; it should be cleared in the binder
00:32 jnthn sorear: Note that it's setting the property on the container, not the object.
00:32 TimToady $x := @x, then $x never flattens, @x might iff bound to slurpy
00:32 jnthn (setprop, unlike most other v-table methods, is not transparent here)
00:33 jnthn TimToady: Anyway, it seems there's just two places that .item does something != identity.
00:34 jnthn TimToady: So it may not be epic upheavel.
00:35 jnthn TimToady: In the multi case we may be able to do some caching junction-style for the speed win too.
00:36 jnthn (when Rakudo's multi-dispatcher falls back to exploding a junction, it installs a dispatch cache entry so the next time around it can jump straight to doing that)
00:39 TimToady really, the flatten bit is just an instruction to the next binding, so throwing it away is kinda out of band to the notion of context; it should just always happen in any case
00:40 lue rakudo: my $a = 3; my $b := $a; say "{$a.WHERE}, {$b.WHERE}"
00:40 p6eval rakudo c3f559: OUTPUT«116903632, 116903632␤»
00:41 TimToady it could even be done with a hidden arg in the capture that is always skipped and never bound
00:42 TimToady or a hidden bitmap in the capture that is thrown out after binding, say
00:42 TimToady and then only slurpies need look at the bitmap
00:43 TimToady and binding $x := @x doesn't raise the danger of propagating a flatten bit
00:43 jnthn Hmm
00:43 jnthn Sounds at least plausible.
00:43 TimToady p6 is all about attaching data to the right spot :)
00:44 justatheory joined #perl6
00:44 TimToady when you throw away the capture, you automatically throw out the flatten flags with it
00:45 TimToady and for 1,2,3 the bitmap can even be empty
00:46 TimToady and for a proto without a slurp, the bitmap need not be generated
00:46 TimToady lots of room to get down to very fast scalar binding
00:46 TimToady I've had .item in my crosshairs for some time now, but not a good explanation for why I dislike it
00:47 TimToady bbl &
00:49 gbacon joined #perl6
00:56 sjohnson "#perl6... the friendliest place on Earth (freenode)" -- official #perl6 slogan
00:57 ingy moritz_: you around?
00:58 sorear sjohnson: I approve.
00:58 sorear Is &infix:<//> a macro?
00:58 ingy moritz_: how would you feel about ufo building .pir files in a blib/ instead of in lib/ ?
00:59 ingy moritz_: the lib thing is annoying me mostly because of tab completion
00:59 * ingy actually _uses_ perl 6 ALL DAY LONG!
00:59 sjohnson i gotta get into this perl 6 stuff
00:59 sjohnson kind of afraid to try compiling rakudo
01:00 sjohnson gcc and configure scripts seem to dislike me
01:00 ingy sjohnson: really?!
01:00 ingy what os?
01:00 sjohnson they afraid me
01:00 sjohnson ingy: desktop-wise i am a Win 7 x64 kinda guy... but for actual perl stuff, ubuntu
01:00 sjohnson usually just log in and i built a perl 5 sandbox that i play around in very oftne
01:00 sjohnson often*
01:00 ingy nod
01:01 sjohnson and my friends $cow, $pig, and $chicken are regulars there
01:01 sjohnson and @farm; :)
01:01 ingy :)
01:01 ingy rakudo is a pretty tame build imho
01:01 sjohnson adds a bit of fun to perl coding at work
01:03 tylercurtis sjohnson: git clone $RAKUDO_URL; perl Configure.pl --gen-parrot; make; # wait for the build to complete; # enjoy the goodness of Perl 6.-$n
01:03 sjohnson nice
01:03 sjohnson wow
01:03 sjohnson Configure.pl
01:03 sjohnson a novel idea!
01:03 sjohnson :thumpsup:
01:08 jnthn TimToady: You mentioned in a previous muttering something about Num.REPR (or maybe Int.REPR) as part of the storage constraint. However, if we want Num.REPR to be fixed to e.g. some representation that just stores a numeric value, how does that fit with people then wanting to mix things into it? Could be say that they can only mix things that add methods into such a thing, or subclass Num in a way that adds methods, not stroage?
01:08 lue jnthn: I noticed your comments on the use of issame. As far as I could tell, it's the 'most right' opcode. Any suggestions?
01:08 lue [ I'm wondering if using the .WHERE's is cheating and unreliable... ]
01:09 jnthn TimToady: Also further to your spec tweak the other day, I take it we can also assume that if some type T has repr contraint P6Object and S ~~ T, S must also have that same constraint?
01:09 jnthn TimToady: (If not, the whole exercise becomes vaguely pointless from the optimization angle, I fear.)
01:09 jnthn lue: Let me go check what Parrot's issame opcode does.
01:11 jnthn lue: yeah, it's fail for =:=
01:11 jnthn lue: the op does
01:11 jnthn if ($2 == $3)
01:11 jnthn $1 = 1;
01:11 jnthn else
01:11 jnthn $1 = VTABLE_is_same(interp, $2, $3);
01:11 jnthn That is, it delegates to the PMC's idea of same-ness rather than just a check on "is this the same thing"
01:11 jnthn (e.g. a reference-y check)
01:12 jnthn lue: re .WHERE - it's certainly a better approximation than issame.
01:12 jnthn lue: Parrot also has an op eq_addr
01:12 jnthn lue: or maybe eqaddr
01:13 lue rakudo: sub xyzzy($a) { say $a.WHERE }; my $b; xyzzy($b); say $b.WHERE
01:13 p6eval rakudo c3f559: OUTPUT«96505936␤96505936␤»
01:13 lue rakudo: sub xyzzy(\$a) { say $a.WHERE }; my $b; xyzzy($b); say $b.WHERE
01:13 p6eval rakudo c3f559: OUTPUT«96505936␤96505936␤»
01:19 lue > my $a = 3; my $b := $a; $a =:= $b
01:19 lue 1
01:20 jnthn TimToady: On another question, how hidden are representations beyond just being a string name? I know that it's spec'd as a string argument to CREATE rather than P6opaque being something that appears as an object a user can play with. Do you envision that changing? It somewhat drastically affects the whole "what is the most primitive thing" question in a sense.
01:20 lue > say 3
01:20 lue Too many positional parameters passed; got 2 but expected 1
01:20 lue I think I broke say and print though :D
01:20 jnthn Congrats!
01:22 sjohnson jnthn: yo
01:22 lue I don't see how. I only modified src/core/operators.pm and src/cheats/relops.pir ...
01:22 skyheights joined #perl6
01:22 jnthn sjohnson: hi!
01:23 sjohnson how's that windows-based OS treatin ya
01:23 sjohnson heh
01:24 jnthn TimToady: My feeling at the moment is that they're just something that is name-able from user-space and not much more. I guess this comes down to, is method dispatch more primitive than storage, and we have some object you can make calls on to set up storage, or is storage more primitive and we build on top of it something that can store methods and look them up.
01:25 jnthn sjohnson: Just fine. ;-)
01:25 payload1 joined #perl6
01:26 jnthn TimToady: Of course, if the repr things are strings it can go either way. If they're meant to be object-y then we kinda somehow probably want to have dispatch as the primitve thing and state is arrived at by those methods containing magical low-level things that can allocate state etc.
01:28 jnthn TimToady: I'm liable to call it as "representation is most primitive" since I think that can go faster at first blush, and it likely makes my life easier. But it'd be nice to know your latest thinking on the area.
01:29 jnthn lue: diff?
01:30 lue http://gist.github.com/476369
01:31 jnthn well. wtf.
01:32 jnthn lue: The only thing that uses it is RoleToRoleApplier.nqp
01:32 jnthn (in Rakudo core)
01:32 jnthn In src/metamodel/
01:32 jnthn It'd be odd for that to lead to the issue you've got though. :S
01:33 jnthn oh
01:33 jnthn also taht is nqp code
01:33 lue rakudo: say "something to clarify that this is an issue with my code"
01:33 p6eval rakudo c3f559: OUTPUT«something to clarify that this is an issue with my code␤»
01:33 jnthn which won't compile down to the &infix:<=:=> in Rakudo anyway
01:34 lue lemme switch branches and see something [I remembered the branches thing]
01:36 crythias joined #perl6
01:39 lue ...well, seems switching branches isn't helping me. It still has changes I put in my local branch.
01:39 jnthn lue: Did you commit them?
01:40 lue yes. I commited, then did git rebase xyzzy [local branch name]. Is there a command that could help you [like git status] ?
01:41 jnthn oh, did you want to switch branch?
01:41 lue yes, to see if I screwed up something regardless of my =:= changes
01:42 * lue considers setting up a junk git repo to practice
01:44 jnthn git checkout master # switches to the master branch
01:44 jnthn lue: git takes some learning/getting used to :-)
01:44 lue don't you me gitting used to? :)
01:45 lue I am there, and I can tell something went wrong when vim src/cheats/relops.pir doesn't show =:= code I removed.
01:45 jnthn :S
01:45 lue lue@twigil:~/rakudo$ git checkout master
01:45 lue Already on "master"
01:45 lue Your branch and 'origin/master' have diverged,
01:45 lue and have 12 and 2 different commit(s) each, respectively.
01:45 jnthn And git diff shows nothing
01:45 jnthn ?
01:47 lue lue@twigil:~/rakudo$ git diff
01:47 lue lue@twigil:~/rakudo$
01:47 jnthn I'm confused then.
01:48 sjohnson eval: print "4 + 4";
01:48 lue I followed these commands: [branch xyzzy] git add [changed files]; git commit; git checkout master; git pull; git rebase xyzzy
01:48 sjohnson buu: how do you get buubot to start speaking in p5?
01:48 lue [ I'll ask on #git later, then ]
01:48 jnthn buubot: eval print "4 + 4"
01:48 sjohnson you haven't pushed
01:48 buubot jnthn: 4 + 41
01:48 ash_ lue: you have diverged, you need to re-merge the branch with the target branch you were working from
01:48 buu sjohnson: eval
01:48 sjohnson i tried eval, but no luck
01:49 buu What?
01:49 sjohnson buu: works in #perl though
01:49 buu buubot: eval: 2+2
01:49 buubot buu: 4
01:49 sjohnson oh
01:49 buu It's in address only mode here
01:49 sjohnson oh i c
01:49 jnthn lue: shouldn't have even needed the pull and rebase there, btw
01:49 sjohnson buu: eval: use v5.10.0
01:49 sjohnson buubot: eval: use v5.10.0
01:49 buubot sjohnson: No output.
01:49 sjohnson buubot: eval: use v5.14.0
01:49 buubot sjohnson: ERROR: Perl v5.14.0 required--this is only v5.10.1, stopped at (eval 39) line 2. BEGIN failed--compilation aborted at (eval 39) line 2.
01:49 sjohnson nice
01:49 sjohnson thank yous
01:51 lue lue@twigil:~/rakudo$ git merge master xyzzy
01:51 lue Already up-to-date. Yeeah!
01:51 lue I'll figure it out later, I'm trying to find out how to build my own oscilloscope right now.
01:51 jnthn Think it's time for me to sleep.
01:51 jnthn night all o/
01:52 lue goodnight o/
01:52 sjohnson cya
01:52 sjohnson git is a big deal.
01:52 sjohnson i just got my Pro Git book in the mail today.  work will pay for it
01:53 sjohnson probably should have just read it online... buut i like smelling books
01:53 sjohnson and owning one
01:54 hercynium joined #perl6
01:54 lue there should be a --navi option or some such, so that when you excecute a command that doesn't do anything, it tries to see what you meant to do :)
01:55 mikehh joined #perl6
01:56 sjohnson there is a dry run command already
01:56 sjohnson for some things
01:56 sjohnson --no-commit
01:56 sjohnson use that sucker when you're doing a merge test
01:57 sjohnson oh
01:57 sjohnson this site says you need something else maybe
01:57 sjohnson http://stackoverflow.com/questions/501407/is-there-a-git-merge-dry-run-option
01:57 sjohnson ive definitely had a merge screw up on live data
01:57 sjohnson and i was spanked
02:00 lue > git --navi merge master xyzzy
02:01 lue Nothing. HEY LINK HEY HEY   [ >.< ]
02:02 sjohnson where are you getting navi from
02:02 sjohnson this link i posted says to use two args, none of which say navi
02:02 sjohnson --no-commit --no-ff
02:02 sjohnson ahh, someone said this still changes stuff
02:02 sjohnson not a true dry run yet
02:03 lue sjohnson: have you ever played The Legend of Zelda: Ocarina of Time ?
02:04 sjohnson i played it about a month ago
02:04 sjohnson and didn't really get into it
02:04 sjohnson busted out the ol n64
02:04 sjohnson not a huge fan of the 3d zeldas
02:04 sjohnson i prefer Zelda I && II for the NES
02:05 stephenlb joined #perl6
02:05 sjohnson kind the same way i prefer final fantasy 1-6 games, and nothing past 6
02:06 lue If you ever play the whole thing, then Navi's [the fairy's] annoying phrases will be imprinted in your head.
02:07 sjohnson hahaha
02:07 sjohnson nice
02:08 sjohnson now that makes more sense :)
02:08 sjohnson git needs --dry-run, and --just-do-it! ... it's opposite
02:08 sjohnson anyways gtg, cya!
02:08 lue bai o/
02:13 drbean_ joined #perl6
02:18 tylercurtis rakudo: say "\n\n" ~~ /\h+/
02:18 p6eval rakudo c3f559: OUTPUT«␤»
02:18 drbean joined #perl6
02:19 tylercurtis rakudo: say ("\n\n" ~~ /\h+/).Bool;
02:19 p6eval rakudo c3f559: OUTPUT«0␤»
02:26 dukeleto joined #perl6
02:26 dukeleto hola
02:26 * dukeleto is at PDX.pm, where we are having a "Rakudo feet-wetting"
02:26 duckyd joined #perl6
02:26 notbenh1 joined #perl6
02:29 * tylercurtis hates something that he lives in what is essentially the middle of nowhere.
02:29 mikehh_ joined #perl6
02:35 drewk joined #perl6
02:42 sahadev joined #perl6
02:47 felliott joined #perl6
02:50 dukeleto perl6: say.time().WHAT
02:50 p6eval rakudo c3f559: OUTPUT«␤Method 'time' not found for invocant of class 'Bool'␤  in main program body at line 20:/tmp/n7e8trzSvF␤»
02:50 p6eval ..pugs: OUTPUT«␤*** No compatible multi variant found: "&time"␤    at /tmp/tMPlrvowWL line 1, column 1 - line 2, column 1␤»
02:51 duckyd perl6: time().WHAT.say
02:51 p6eval rakudo c3f559: OUTPUT«Num()␤»
02:51 p6eval ..pugs: OUTPUT«Rat␤»
02:51 duckyd http://perlcabal.org/syn/S32/Temporal.html#time
02:51 duckyd says Int
02:57 destiney joined #perl6
02:57 ash_ that might be a fossil (in the implementations) Temporal has been getting modified a lot recently
02:58 dukeleto what type should time() return? The spec says Int, Perl6::Doc say Rat and Rakudo says Num
02:58 duckyd ash_: you're thinking it will be Int in the [near] future?
02:59 ash_ yea
02:59 duckyd thanks :)
02:59 felliott joined #perl6
02:59 ash_ r31678 changed it to an int, that was 12 hours ago
03:00 ash_ yeah, that was a fairly recent change, it was Num for a long time though
03:04 duckyd cool, thanks
03:04 ash_ i think the correct way of looking at this problem is the spec is correct, the implementations are out of date :P by about 12 hours
03:11 masonkramer joined #perl6
03:17 ashleydev joined #perl6
03:21 snarkyboojum joined #perl6
03:27 dukeleto how does one add something to proto.perl6.org ?
03:28 sorear commit it to the proto github repository
03:28 sorear hugme: show proto
03:28 hugme sorear: the following people have power over 'proto': P⁣erlJam, T⁣imToady, [⁣particle], c⁣olomon, j⁣nthn, m⁣asak, m⁣oritz_, p⁣michaud. URL: http://github.com/masak/proto/
03:28 sorear ping one of those people
03:39 dukeleto sorear++
03:40 notbenh1 left #perl6
03:43 felliott joined #perl6
03:47 duckyd left #perl6
03:50 agentzh joined #perl6
03:52 tylercurtis .u smile
03:52 phenny U+2323 SMILE (⌣)
03:52 tylercurtis .u smiley
03:52 phenny tylercurtis: Sorry, no results for 'smiley'.
03:52 tylercurtis .u happy face
03:52 phenny tylercurtis: Sorry, no results for 'happy face'.
03:52 tylercurtis .u smiling face
03:52 phenny U+263A WHITE SMILING FACE (☺)
04:14 jaldhar joined #perl6
04:14 supernovus joined #perl6
04:17 mberends sorear: giving neicza a spin here, just had to clear out my own PERL6LIB ("cannot open unicode maps from ...") and it Just Worked through to test.pl. With mono 2.4.4. Kudos!
04:19 supernovus I have found an interesting 'bug' in the REPL.
04:22 supernovus If you 'use' a module that exports a subroutine, on its own line, the subroutine is not exported unless you 'use' it twice.
04:24 supernovus rakudo: use DateTime::strftime; say strftime('%A', DateTime.now)
04:24 p6eval rakudo c3f559: OUTPUT«Thursday␤»
04:24 tylercurtis rakudo: use Test; plan 5;
04:24 p6eval rakudo c3f559: OUTPUT«1..5␤# Looks like you planned 5 tests, but ran 0␤»
04:26 supernovus That works as it is on one line. It also works in a .p6 file on separate lines. But if you try to use it in the REPL on separate lines, it says it cannot find a subroutine named strftime(). Unless you do the "use DateTime::strftime;" twice.
04:30 supernovus I tested it with another class I just wrote that exports a subroutine, and the same thing. If you don't "use" the module twice, it doesn't find the exported subroutine.
04:32 snarkyboojum joined #perl6
04:40 sahadev joined #perl6
04:42 drewk joined #perl6
04:42 supernovus Bug submitted.
04:50 cxreg hm, would be nice to be able to pass a -j option to make in build/gen_parrot.pl
04:50 * cxreg patches
04:55 sorear mberends: nice!  for STD that's pretty good
04:57 mberends sorear: reading your source is also nice. Commented, unlike most @other ;)
04:58 sorear Rather less so than it should be
04:58 sorear I've commented everything that I expect to myself forget
04:58 sorear but a lot of the less nasty stuff needs more exposition
04:59 mberends It's a good start. Yes, the holes are also evident.
05:00 cxreg :q
05:00 * hugme hugs cxreg, good vi(m) user!
05:00 cxreg oops
05:02 * mberends remembers to poke Zavolaj
05:02 sorear er.
05:02 sorear mberends: what stage broke?  afaict PERL6LIB should always be overwritten
05:03 cxreg meh, this is harder than expected.  all opts to that script go directly to parrot's Configure.pl which doesn't care about make opts
05:03 TimToady phenny: tell jnthn I don't think reprs need to be types, but I hesitate to make the strings too simply because we might want to make them objects of their own type someday.  So maybe just enum constants so we don't need quotes.
05:03 phenny TimToady: I'll pass that on when jnthn is around.
05:04 sorear cxreg: if you're doing anything interesting I recommend NOT using --gen-parrot
05:05 sorear build your own Parrot from svn.parrotcode.org sources, perl Configure.pl --optimize, make, sudo make install
05:05 cxreg $interesting ?
05:05 TimToady phenny: tell jnthn re deriving with a different repr, I've always assumed if we detected a repr mismatch we'd emulate derivation with delegation at that point somehow, so as long as classes agree, they can optimize together
05:05 phenny TimToady: I'll pass that on when jnthn is around.
05:05 cxreg sorear: isnt that what gen-parrot does?
05:05 cxreg sorear: i just read the code, it sure looked that way
05:05 TimToady phenny: tell jnthn the same thing presumably happens when we cross repr boundaries that happen to span language boundaries
05:05 phenny TimToady: I'll pass that on when jnthn is around.
05:06 mberends sorear: with a rogue PERL6LIB niezca make failed at `cd stage0 && ./std CORE.setting`
05:06 sorear ah.  that's deep in the STD.pm6 build system
05:06 sorear not sure if I can sanely fix it
05:07 sorear STD.pm6 is really not designed to be a reusable software component
05:07 mberends right
05:08 * sorear remembers that mberends is no stranger to this problem (*cough* vill)
05:08 mberends heh
05:08 * cxreg wonders if jnthn ever got a chance to kick zavolaj
05:09 mberends no, zavolaj was last kicked by jnthn in April
05:13 lue hai o/
05:14 mberends cxreg: if your Zavolaj appears to be br0k3n, is the timestamp on your installed NativeCall.pir older than your parrot? That could be a Bad Thing.
05:23 snarkyboojum joined #perl6
05:24 ingy greetings \o
05:24 tylercurtis Hello, ingy.
05:24 mberends \o
05:25 sorear Greetings, ingy.
05:25 sorear +o mberends
05:25 ingy :)
05:25 sorear ok that's a new one.
05:26 sorear (/msg #perl6 ...)
05:27 * mberends loves the taste of cinnamon buns (@) in the morning..
05:28 * ingy still needs to get his rakudo waiver thing to pmichaud
05:28 cxreg mberends: i rebuilt it a few times
05:28 ingy maybe I'll hand deliver at oscon.
05:28 sorear What is the correct signature for &infix:<=>
05:28 sorear ?
05:32 ingy _crickets_
05:34 * snarkyboojum chirps
05:40 sorear the crickets around here are all dead.
05:41 * snarkyboojum keels over
05:43 mberends cxreg: Zavolaj is broken here too. The symptoms changed after rebuilding NativeCall.pir, most likely because of a recent change in Parrot or Rakudo. I'll try to bribe jnthn++ to take a look.
05:47 moritz_ good morning
05:48 mberends \o moritz_
05:52 sorear good morning
05:59 moritz_ ingy: re blib/, I'm all for it
06:02 cjk101010 joined #perl6
06:03 cxreg mberends: "expected OpaquePointer but got Failure instead"
06:03 cxreg mberends: look familiar?
06:03 mberends cxreg: exactly
06:04 cxreg mberends: yeah, i already asked jnthn, he had some ideas
06:06 cxreg my Failure $self; # emo perl 6
06:09 uniejo joined #perl6
06:14 sorear Compilation failed: 1012 error(s), 0 warnings
06:17 moritz_ cxreg, mberends: I have two ideas what could be the cause 1) the lexicals/closure fix and 2) different containerization (might need a pir::descalarref__PP($ojb) in some places)
06:19 cxreg it's probably a good opportunity for me to poke a little deeper anyway
06:22 mberends moritz_: those look like good hunches, especially 2) so I'll try a patch
06:22 moritz_ rakudo: say 1
06:22 p6eval rakudo c3f559: OUTPUT«1␤»
06:23 moritz_ mberends: there's also a suspicious pir::clone in NativeCall.pm6:101
06:23 moritz_ rakudo: die 1
06:23 p6eval rakudo c3f559: OUTPUT«1␤  in main program body at line 20:/tmp/DROjpwICNW␤»
06:23 moritz_ rakudo: ...
06:24 p6eval rakudo c3f559:  ( no output )
06:24 snarkyboojum joined #perl6
06:24 cxreg what's |$c mean?
06:25 moritz_ interpolation of $c into a signature
06:25 cxreg ah
06:25 moritz_ rakudo: sub f() { ... }; f(); say "alive";
06:25 p6eval rakudo c3f559: OUTPUT«alive␤»
06:26 moritz_ ah, it's probably a soft failure
06:26 moritz_ rakudo: sub f() { ... }; say f(); say "alive";
06:26 p6eval rakudo c3f559: OUTPUT«alive␤»
06:26 cxreg man, NativeCall is some real wizardry :/
06:26 moritz_ but *that* should die
06:28 cxreg what is the general consensus for Perl 6 code that uses pir:: stuff, wrt portability and other implementations?  should such code be clearly marked "Rakudo ONLY!"?
06:28 moritz_ I'd say that pir:: marks it as Raudo only :-)
06:29 moritz_ I avoid it in high-level modules
06:30 cxreg i guess if someone wanted to be clever, they could write wrappers in the pir:: space that emulated it
06:31 mberends unfortunately pir::based code seldom gets checked by the test suite. It would be very Rakudo specific.
06:31 sorear pir:: stuff isn't Rakudo only; it's Parrot only
06:32 sorear pmichaud says that post R* Rakudo is going to become less Parrot-specific
06:32 cxreg hr m
06:32 sorear i.e. other VMs will potentially be supported
06:33 mberends yes, there might be nqp::stuff in future as well for greater portability
06:35 * moritz_ would prefer vm::
06:35 cxreg vms::
06:35 sorear oh dear no not vms::
06:35 moritz_ OH NOEZ
06:35 cxreg :-)
06:43 pugssvn r31692 | lwall++ | [t/spec] mark various tests that intentionally declare things that are not used
06:45 PZt joined #perl6
06:45 sorear #OK not used ?
06:45 sorear is that like /*ARGSUSED*/ ?
06:52 TimToady it says suppress it if there's a warning like $x is declared but not used
06:52 TimToady which STD finds many of in the test suite
06:53 TimToady because tests are strange that way
06:53 TimToady especially tests that are testing binding and multis
06:55 TimToady std: multi foo (Str $s) { 'Str' }  # many tests look like this
06:55 p6eval std 31691: OUTPUT«Potential difficulties:␤  $s is declared but not used at /tmp/oSbqqm2MdC line 1:␤------> [32mmulti foo (Str [33m⏏[31m$s) { 'Str' }  # many tests look like th[0m␤ok 00:01 115m␤»
06:55 TimToady std: multi foo (Str $s) { 'Str' }  # many tests look like this #OK not used
06:55 p6eval std 31691: OUTPUT« not used␤ok 00:01 111m␤»
06:56 TimToady whoops, looks like theres a debugging message in there somewhere...
06:57 sorear niecza: sub foo($) { 'Str' }
06:57 p6eval niecza:  ( no output )
06:57 baest joined #perl6
06:58 sorear # shouldn't the tests look like these?  even my two-week-old compiler supports that
06:58 TimToady sometimes they're testing it both ways
06:59 TimToady and changing the tests that drastically isn't my main concern at the moment, esp if the arg names are serving as documentation
07:00 TimToady and maybe it points out that we need a way to say 'anon' inside a sig somehow
07:01 TimToady or maybe they could just turn into :s($)
07:02 TimToady but I recognize that #OK is a bit kludgey
07:02 TimToady I'll want it for other warnings too though
07:03 TimToady like testing to see if 000042 has the value 42  :)
07:06 saaki maybe 34? =o
07:07 sorear I'm not terribly opposed to magic comments, but I'd like them to be more recognizable
07:07 sorear all caps and no spaces in the lint(1) tradition is what I'd naturally take
07:11 meppl joined #perl6
07:12 TimToady #OK is all caps and no spaces :)
07:12 moritz_ rakudo: multi f(Str $) { 'Str' }
07:13 p6eval rakudo c3f559:  ( no output )
07:13 TimToady and you can use it by itself to suppress any warning, but it helps to say which warning you're suppressing
07:13 moritz_ std: multi f(Str $) { 'Str' }
07:13 p6eval std 31692: OUTPUT«ok 00:01 114m␤»
07:13 moritz_ std: multi f(Str $x) { 'Str' }
07:13 p6eval std 31692: OUTPUT«Potential difficulties:␤  $x is declared but not used at /tmp/gnom0i58_z line 1:␤------> [32mmulti f(Str [33m⏏[31m$x) { 'Str' }[0m␤ok 00:02 111m␤»
07:13 _pid joined #perl6
07:15 sorear TimToady: under what circumstances is the optimizer allowed to break CALLER::<> ?
07:16 sorear e.g. my $bar; if $foo { CALLER::<$bar> }  # should this work?
07:16 sorear sub cow { CALLER::CALLER::<$bar> };  my $bar; if $foo { cow; }  # how about this?
07:22 TimToady well, technically the caller of the block is statement_control:<if>, which has no $bar
07:23 TimToady though I guess caller only really looks at routines
07:23 TimToady so nevermind that
07:23 sorear I thought statement_control was a macro and had no associated CallFrame
07:24 TimToady sure, that sort doesn't matter since caller ignores blocks anyway
07:24 TimToady *sorta
07:25 TimToady but cow has one too many CALLERs in the first place
07:25 TimToady and $bar isn't marked as dynamic, so isn't visible anyway
07:26 TimToady CALLER::<$_> would presumably be visible though, and make it difficult to inline cow
07:26 TimToady not impossible though
07:26 sorear CALLER skips over blocks?
07:31 TimToady S06:2426
07:31 TimToady well, 3 lines below that
07:32 TimToady S04:649 is probably incorrect, if the block is marked as inlined according to S06
07:34 TimToady anyway, the larger intent is that only "real" calls get a CALLER scope, for some definition or other
07:35 TimToady presumably an inlining optimizer would have to undo CALLER to OUTER or MY
07:35 sorear well, the interesting case is the second one I gave, I think
07:36 sorear if $foo { some-function; }  # what if some-function calls callframe?  can it observe the fact that the if creates a dynamic scope?
07:37 pugssvn r31693 | lwall++ | [STD] fix some 'not used' warning buglets
07:38 TimToady well, something has to decide to run the thunk
07:38 TimToady but I don't think we can guarantee that callframe will see every possible frame that the optimizer would like to get rid of
07:39 TimToady in some sense it just has to deal with what's there, even you've done tail recursion optimization, for instance
07:39 TimToady alternately we record some number in the current callframe that says how many are missing :)
07:40 TimToady in general we want to be identifying call frames by pattern match or id, not by position
07:42 TimToady I'm inclined to push the defaults in favor of the optimizer, and require explicit pessimization where required by the foibles of the code
07:47 sorear ehehehe... I had my $x defaulting to 'ro'
07:47 sorear no wonder it exploded when I implemented ro checks
07:47 TimToady well, that's good for SSA style, at least :)
07:48 TimToady I'd better go thunk on my pillow
07:48 sorear 'night
07:48 TimToady zzz &
07:48 sorear niecza now has all tests passing again
07:48 sorear w/ item and list context implemented
07:49 dalek niecza: 432a3a1 | sorear++ | Kernel.cs:
07:49 dalek niecza: Describe structure of new lvalue stuff
07:49 dalek niecza: review: http://github.com/sorear/niecza/commit/432a3a13a87570ce77d062609bcc17f0c738962c
07:49 dalek niecza: 4d47d8d | sorear++ | Kernel.cs:
07:49 dalek niecza: implement new variable + bind handling
07:49 dalek niecza: review: http://github.com/sorear/niecza/commit/4d47d8d3fe355417f87fc950a0253c3b314e9282
07:49 dalek niecza: 2e6fcc0 | sorear++ | Kernel.cs:
07:49 dalek niecza: Eliminate .item
07:49 dalek niecza: Discussion with TimToady leads to the conclusion that Parcel lives outside Any
07:49 dalek niecza: and turns into Seq during fallback.
07:49 dalek niecza: review: http://github.com/sorear/niecza/commit/2e6fcc03039389bf9c3e5a810e5061c644f6b31b
07:49 dalek niecza: cf20652 | sorear++ |  (2 files):
07:49 dalek niecza: rename niecza to niecza_eval to avoid collision with Niecza/ (snarkyboojum)
07:49 dalek niecza: review: http://github.com/sorear/niecza/commit/cf20652cb9512be858bf543690290ce06ba1ef3b
07:49 dalek niecza: aeb0302 | sorear++ |  (10 files):
07:49 dalek niecza: Yak shave until it builds.  Tests still somewhat broken.
07:49 dalek niecza: review: http://github.com/sorear/niecza/commit/aeb0302775a37264c0d462a96c84b489d387cd5a
07:49 dalek niecza: b9f8bd4 | sorear++ |  (2 files):
07:49 dalek niecza: my $x really shouldn't default to ro.  All tests pass again
07:49 dalek niecza: review: http://github.com/sorear/niecza/commit/b9f8bd46dd36802d8e3a38bc48a6a47142df39e1
07:51 sorear moritz_: you can pull again; note that the niecza runner script has been renamed for HFS+ compatibility
08:05 * moritz_ pulls
08:09 pugssvn r31694 | moritz++ | [evalbot] track name change in niecza
08:13 dalek niecza: f68a8eb | sorear++ | CodeGen.pm:
08:13 dalek niecza: Separate codegen ops into internals, primitives, and derived
08:13 dalek niecza: review: http://github.com/sorear/niecza/commit/f68a8eb86fce1eebfd0fcbc32fbfbe5cf3d02e65
08:15 moritz_ evalbot control restart
08:16 p6eval joined #perl6
08:16 moritz_ niecza: say 2
08:16 p6eval niecza: OUTPUT«2␤»
08:16 moritz_ so it picked up the new executable name
08:17 sorear er
08:18 sorear niecza: 1 = 2;  # NEW FEATURE
08:18 p6eval niecza: OUTPUT«␤Unhandled Exception: System.Exception: assigning to readonly value␤  at Niecza.Kernel.AssignC (Niecza.Frame th) [0x00000] in <filename unknown>:0 ␤  at Niecza.Frame.Continue () [0x00000] in <filename unknown>:0 ␤  at EntryPoint.Main () [0x00000] in <filename unknown>:0 ␤"mono --de…
08:20 moritz_ sorear: should I filter out these over-long backtraces in p6eval?
08:20 sorear moritz_: if you want.  I consider them a bug
08:20 moritz_ back when rakudo emitted parrot backtraces, I would simply cut off after the first line
08:21 sorear niecza doesn't use the CLR stack, so the fact that it uses CLR exceptions is broken
08:21 sorear but I don't have the p6 stack unwinder working yet
08:21 Mowah joined #perl6
08:22 sorear niecza: 2.cow # watch as the exception unwinder itself crashes!
08:22 p6eval niecza: OUTPUT«␤Unhandled Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.␤  at System.Collections.Generic.Dictionary`2[System.String,System.Object].get_Item (System.String key) [0x000a8] in /home/p6eval/perlesque/mono/mono-2.6.4/mcs/cla…
08:22 sorear aww, it cut off before showing the 'Throw' in the backtrace
08:22 moritz_ sorear: I'm curious, what's your overall plan for niecza? slap on more features and attract users? or explore some cornerns of the spec? speed? all of them?
08:23 sorear in the very long term, all of them
08:23 sorear in the merely long term, I'm trying to get STD.pm6 to run on it
08:24 moritz_ so, bootstrapping
08:24 sorear yes
08:24 * moritz_ likes that
08:24 sorear lists are a big priority right now because of regex backtracking
08:24 moritz_ (not that I have any say in it...)
08:27 sorear once lists are working, other things that STD definitely needs are roles, multimethods, and regexes
08:27 sorear and packages
08:37 cxreg Perl 6: There's An Op(erator) For That(tm)
08:48 dakkar joined #perl6
08:50 Mowah joined #perl6
08:50 thebird joined #perl6
08:56 timbunce joined #perl6
08:56 clintongormley joined #perl6
08:56 xabbu42 joined #perl6
09:01 ejs joined #perl6
09:12 dimid_ joined #perl6
09:13 zachy joined #perl6
09:14 HarryS joined #perl6
09:18 pugssvn joined #perl6
09:18 christin1 joined #perl6
09:18 hudnix joined #perl6
09:18 snarkyboojum joined #perl6
09:18 uniejo joined #perl6
09:18 drewk joined #perl6
09:18 christine joined #perl6
09:18 lue joined #perl6
09:18 Lorn joined #perl6
09:18 proller joined #perl6
09:18 pnate joined #perl6
09:18 szabgab joined #perl6
09:18 pmichaud joined #perl6
09:18 BinGOs joined #perl6
09:18 gabiruh joined #perl6
09:18 Juerd joined #perl6
09:18 m6locks joined #perl6
09:18 phenny joined #perl6
09:18 cxreg joined #perl6
09:18 frodwith joined #perl6
09:18 wolverian joined #perl6
09:18 Woody2143 joined #perl6
09:18 lestrrat joined #perl6
09:18 ingy joined #perl6
09:18 meteorjay joined #perl6
09:18 DemoFreak joined #perl6
09:18 jnthn joined #perl6
09:21 xabbu42 joined #perl6
09:33 timbunce_ joined #perl6
09:39 dju joined #perl6
09:41 dju joined #perl6
09:42 dju joined #perl6
09:43 jnthn morning o/
09:43 phenny jnthn: 05:03Z <TimToady> tell jnthn I don't think reprs need to be types, but I hesitate to make the strings too simply because we might want to make them objects of their own type someday.  So maybe just enum constants so we don't need quotes.
09:43 phenny jnthn: 05:05Z <TimToady> tell jnthn re deriving with a different repr, I've always assumed if we detected a repr mismatch we'd emulate derivation with delegation at that point somehow, so as long as classes agree, they can optimize together
09:43 phenny jnthn: 05:05Z <TimToady> tell jnthn the same thing presumably happens when we cross repr boundaries that happen to span language boundaries
09:45 moritz_ \o morning
09:48 sorear morning jnthn
09:50 arnsholt std: sub foo is bar { ... }
09:50 p6eval std 31694: OUTPUT«ok 00:01 111m␤»
09:50 arnsholt std: sub foo is bar, blech { ... }
09:50 p6eval std 31694: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed block at /tmp/lLRSVqu1wH line 1:␤------> [32msub foo is bar[33m⏏[31m, blech { ... }[0m␤    expecting any of:␤     circumfix␤        routine_def␤      trait␤Parse failed␤FAILED 00:01 107m␤»
09:50 arnsholt std: sub foo is bar, blech { ... }
09:50 p6eval std 31694: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed block at /tmp/aeACtafx1w line 1:␤------> [32msub foo is bar[33m⏏[31m, blech { ... }[0m␤    expecting any of:␤     circumfix␤        routine_def␤      trait␤Parse failed␤FAILED 00:01 107m␤»
09:50 arnsholt Whoops. Hit arrow up instead of shift.
10:03 Ross joined #perl6
10:04 xinming hmm, Maybe a dumb quesiton, Since perl 6 is still in design phase, Which means there might be a big change on syntax, How about rules? Is rules stabilized as I found parrot use it extensively.
10:05 moritz_ xinming: grammars/rules are rather stable these days
10:05 mathw We're well past the stage where the syntax is being modified
10:06 moritz_ xinming: they are not frozen (ie no guarantuees), but most changes these days are minor
10:06 moritz_ mathw: *cough*
10:06 xinming Oh, ok, thanks, In fact, I found I need to learn more regex, which reminds me perl 6 rules. :-)
10:06 mathw moritz_: in any large-scale significant manner, most days :P
10:06 moritz_ "Mastering Regular Expressions" is a great book
10:06 xinming That's why I asked. :-)
10:07 mathw but I don't think we're in danger of suddenly upping sticks and rewriting Perl 6 to use s-expressions
10:07 moritz_ mathw: yeah, that's true
10:07 xinming moritz_: So, the rule engine is now implemented by parrot already, right?
10:07 xinming in c
10:07 moritz_ xinming: not in c
10:08 moritz_ xinming: there's a compiler for a subset of Perl 6, called npq-rx
10:08 xinming hmm, well, maybe I missed something.
10:08 sorear there is no rule engine
10:08 moritz_ it supports some basic Perl 6, and many regex features
10:08 sorear rules are compiled to the same bytecode as all other perl 6 syntax
10:08 moritz_ and it's mostly written in nqp-rx, so it's bootstrapped
10:09 sorear a*b just means $¢.STAR(-> $¢ { $¢.one('a) }).map(-> $¢ { $¢.one('b') })
10:10 sorear (in the abstract; also the method names used are NOT spec)
10:10 moritz_ ugh. Perl 5 syntax.
10:25 jnthn Opinions on http://rt.perl.org/rt3/Ticket/Display.html?id=76514 ?
10:25 jnthn Tempted to reject as "not a bug".
10:25 jnthn Default values should be subject to checking too.
10:26 moritz_ +1
10:26 jnthn (and sticking in the Range type object is just a kinda default value)
10:26 moritz_ the correct solution is to supply a custom default value, of cause
10:30 jnthn OK, thanks. :-)
10:33 TiMBuS id think the typecheck would only be ran if an argument was passed?
10:33 moritz_ rakudo: say 5 div 2
10:33 p6eval rakudo c3f559: OUTPUT«2␤»
10:33 moritz_ TiMBuS: why?
10:34 jnthn TiMBuS: No, it should apply to the default value too.
10:34 jnthn TiMBuS: Otherwise you can't trust what the constraints in the signature say.
10:34 moritz_ TiMBuS: a type check is there to ensure that the value conforms to some expectation of the routine
10:34 moritz_ violating these expectations at a whim seems like a very bad idea to me
10:34 jnthn Same here.
10:35 TiMBuS maybe I have it wrong. does a '?' denote an optional parameter
10:35 jnthn And as I mentioned in the ticket, there's two easy solutions.
10:35 jnthn TiMBuS: Yes.
10:35 jnthn TiMBuS: But note that if not passed, it has to take up *some* value.
10:35 jnthn TiMBuS: And the default value it takes up needs to be in line with the type constraints placed on the parameter.
10:36 jnthn Otherwise we get wonders like
10:36 jnthn sub foo(Int $x = "oh lol") { }
10:37 jnthn rakudo: sub foo(Int $x = "oh lol") { }
10:37 p6eval rakudo c3f559:  ( no output )
10:37 moritz_ fun for the static type checker if we ever write one :-)
10:37 jnthn rakudo: sub foo(Int $x = "oh lol") { }; foo()
10:37 p6eval rakudo c3f559:  ( no output )
10:37 jnthn rakudo: sub foo(Int $x = "oh lol") { }; foo(); say "alive"
10:37 p6eval rakudo c3f559: OUTPUT«alive␤»
10:37 moritz_ oh ouch
10:37 jnthn Oh..
10:37 moritz_ now *that's* a bug
10:37 jnthn I still have that ticket open in my browser window as in progress :-)
10:37 jnthn I thought I'd finished fixing it
10:38 jnthn I think I only got half way.
10:38 TiMBuS I didnt take default declarations into account. That makes sense
10:38 jnthn rakudo: sub foo(Int $x?) { say $x }; foo()
10:38 p6eval rakudo c3f559: OUTPUT«Int()␤»
10:38 jnthn Yeah, I fixed that half of the problem.
10:38 jnthn Which is pre-req to fixing the other one.
10:39 jnthn rakudo: say *.WHAT
10:39 p6eval rakudo c3f559: OUTPUT«_block65␤»
10:40 jnthn I guess .WHAT is macro-ish and shouldn't curry.
10:50 dalek niecza: 750e66a | sorear++ |  (2 files):
10:50 dalek niecza: Remove premature and heavily code duplicating Op context optimization
10:50 dalek niecza: review: http://github.com/sorear/niecza/commit/750e66a052c6bfce45c38200ecd9ff323b849e5d
10:50 dalek niecza: 040a58b | sorear++ |  (5 files):
10:50 dalek niecza: Add a new tree-based IR between Op and CodeGen
10:50 dalek niecza: The goal is to eventually deduplicate Op/Decl/Body logic, create a nicer
10:50 dalek niecza: syntax for low-level code, and allow more CodeGen refactoring.
10:50 dalek niecza: review: http://github.com/sorear/niecza/commit/040a58b83e569b6fb7b3daa0077b022154bf908f
10:59 gbacon joined #perl6
11:13 sahadev joined #perl6
11:17 sorear What's the list method for sorting and removing duplicates?
11:18 * sorear perl6 -e '.say for slurp("Decl.pm").comb(/"CgOp::" w+/)' | sort -u
11:18 * sorear is starting to naturally use p6 in the toolkit
11:19 jnthn sorear: .uniq
11:20 sorear awesomes
11:21 pmurias joined #perl6
11:21 jnthn > sub circumfix:<` `>($n) { say 'oh lol ' ~ $n }; `42`
11:21 jnthn oh lol 42
11:30 * sorear out.
11:34 sbp rakudo: sub circumfix:<` `>($n) { say 'oh lol ' ~ $n }; `42`
11:34 p6eval rakudo c3f559: OUTPUT«error:imcc:syntax error, unexpected '\n'␤  in file 'EVAL_1' line 90␤===SORRY!===␤syntax error ... somewhere␤»
11:37 jnthn sbp: ENOTYETPUSHED ;-)
11:38 sbp WINSTANTGRATIFICATIONREQUIREDINMODERNAGE
11:44 jnthn rakudo: say INIT 42
11:44 p6eval rakudo c3f559: OUTPUT«␤»
11:48 masonkramer joined #perl6
11:49 seeee joined #perl6
11:55 mberends hai jnthn, seen the Zavolaj breakage discussion? I tried some NativeCall tweaks, without success.
11:55 jnthn mberends: Ah. :/
11:55 jnthn mberends: Any idea where it's broken?
11:56 jnthn mberends: Just return values, or is it not making calls at all?
11:57 mberends it's probably the return value, because an error sometimes only appears on a second native call.
11:58 jnthn OK
11:58 frettled mberends: O hai, Hai!
11:58 mberends \o frettled
11:59 envi^home joined #perl6
12:00 mberends .oO( would anything stop us calling fork() using Zavolaj? )
12:00 JimmyZ joined #perl6
12:00 jnthn mberends: ew!
12:00 isBEKKaml joined #perl6
12:00 jnthn mberends: Technically, no.
12:01 jnthn mberends: However, quite what'd happen after that is a whole different matter.
12:01 mberends jnthn: no, not you! just Un*x users!
12:01 jnthn :P
12:01 isBEKaml joined #perl6
12:01 isBEKaml hi, #perl6! :)
12:01 jnthn mberends: Doesn't you has portable Makefile foo?
12:01 jnthn *fu
12:02 rlb3 joined #perl6
12:02 jnthn mberends: I started getting pls to work on Win32 yesterday
12:02 jnthn mberends: And got to the point where it's busted 'cus the generated makefile also is.
12:02 jnthn (Uses unportable features.)
12:03 mberends jnthn: it brings back memories of porting proto to Win32. nmake, dmake schmake.
12:03 takadonet joined #perl6
12:03 xabbu42 joined #perl6
12:03 takadonet morning all
12:03 jnthn mberends: My other thought was "why generate a Makefile, why not just run commands"
12:04 mberends jnthn: for many tasks ExtUtils::Command is enough
12:05 mberends jnthn: but you drifted very close to the "let's design yet another make replacement" meme
12:06 isBEKaml memes must die! :)
12:06 jnthn mberends: I accidentally the suggestion, but I've no idea how ideal toolchain is formed.
12:07 mberends jnthn: some say world domination by one system is the answer
12:07 jnthn mberends: seriously though, saying "we're gonna run these series of commands" rather than "we're going to write a Makefile that runs these series of commands" hardly feels like re-inventing make. :-)
12:08 skids joined #perl6
12:10 mberends jnthn: :-) pls is the new make. There needs to be a Plsfile spec.
12:12 pugssvn r31695 | jnthn++ | [t/spec] wtf? How'd this end up as Multi, not multi? Corrected test.
12:12 jnthn mberends: :P
12:13 Kodi joined #perl6
12:13 jnthn mberends: Well, at the moment pls either (1) runs the Makefile that it finds or (b) generates a Makefile and runs that.
12:14 mberends jnthn: it's fine to eliminate make from (b)
12:15 jnthn mberends: Would you consider that more desirable than trying to teach pls to write portable makefiles?
12:18 pugssvn r31696 | Kodi++ | [S32/Temporal] Permit day-of-month on Dates.
12:19 mberends jnthn: no, I would rather teach pls to write portable makefiles. Despite the general correctness ufo, there are cases where a Makefile template is useful and hard to replace.
12:19 moritz_ uhm, isn't day-of-month just .day?
12:19 moritz_ Kodi: ^^
12:19 Kodi moritz_: Yes.
12:20 Kodi moritz_: So why, you ask, does it exist?
12:20 Kodi moritz_: Because masak likes it, basically.
12:20 jnthn mberends: OK.
12:20 moritz_ Kodi: as long as .day continues to exist, works for me :-)
12:20 Kodi I figure, if we're gonna have it all, it should allowed on both DateTimes and Dates.
12:20 jnthn mberends: I'll see what I can do in that directoy - help welcome.
12:20 jnthn mberends: I think you're more clueful than I on such things.
12:22 mberends Kodi, moritz_ : but Tene doesn't like aliases: http://irclog.perlgeek.de/perl6/2010-07-14#i_2554867
12:22 Kodi mberends: Yeah, I'm not so crazy about them either.
12:22 dalek rakudo: 3615ece | jonathan++ | src/Perl6/Grammar.pm:
12:22 dalek rakudo: First cut at implementing custom circumfixes. Also, for things we don't know how
12:22 dalek rakudo: to augment the grammar for, die nicely rather than with a blood-curdling PIR
12:22 dalek rakudo: syntax error.
12:22 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3615eceacc59129d551137f693035cc35816ddfc
12:22 dalek rakudo: 727782e | jonathan++ | src/Perl6/ (2 files):
12:22 dalek rakudo: Add term:sym<circumfix> as found in STD, which we were missing in the Rakudo
12:22 dalek rakudo: grammar.
12:22 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/727782e1ed92c9562b137d6be9c73060a710a1fb
12:25 felliott joined #perl6
12:26 mberends jnthn: portable Makefiles seems to involve guesswork and trial/error about what @other-make-utils are prepared to swallow. The lowest common denominator functionality is usually too low, then it becomes a gamble whether a particular command/function will fly everywhere.
12:28 jnthn mberends: joy.
12:28 mberends jnthn: surprisingly, $(shell yada) (from zavolaj's Makefile) has not had any complaints
12:29 mathw Make is not a cross-platform system
12:29 mathw It relies too much on the underlying platform to do stuff
12:29 mathw It's pretty awesome though :)
12:30 colomon wasn't there a make functionality replacement tool in CPAN?
12:30 isBEKaml hmm, ExtUtils::MM doesn't work right here?
12:30 isBEKaml MakeMaker?
12:30 JimmyZ_ joined #perl6
12:31 mariano__ joined #perl6
12:31 jnthn mberends: I should take a look at that one
12:33 moritz_ ExtUtils::MakeMaker abstracts away system commands
12:45 mariano__ joined #perl6
12:52 dju joined #perl6
12:56 dju joined #perl6
12:57 dalek rakudo: 3d0399a | jonathan++ | src/Perl6/Actions.pm:
12:57 dalek rakudo: Should not curry .WHAT and other interogative macros.
12:57 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3d0399a4561742fe50472f0ab647620ac27e5105
12:57 dalek rakudo: 9819740 | jonathan++ | src/pmc/p6role.pmc:
12:57 dalek rakudo: One more role type-object undefinedness fix.
12:57 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/98197408222176d90e537123d61c542f013d6ad8
12:59 * takadonet git pulls, perl Configure.pl and time make -j6
13:00 moritz_ takadonet: how many cores?
13:00 moritz_ parallel build speeds up parrot compilation quite a bit, but rakudo not so much
13:00 moritz_ it takes long to compile the setting, and so far we haven't found a way to split it up
13:01 takadonet takadonet: I have 8 cores :)
13:01 takadonet i know but I love doing make -j6 while still running two virtual machines
13:02 jnthn rakudo: say "a {} b"
13:02 p6eval rakudo 727782: OUTPUT«a  b␤»
13:02 jnthn rakudo: say "{}"
13:02 p6eval rakudo 727782: OUTPUT«␤»
13:02 moritz_ another Null PMC access fixed :-)
13:02 jnthn moritz_: giving you the ticket
13:02 moritz_ jnthn: ok
13:03 isBEKaml rakudo: say 4 = Any
13:03 timbunce joined #perl6
13:03 isBEKaml huh?
13:03 p6eval rakudo 727782: OUTPUT«4␤»
13:03 isBEKaml rakudo: say (4 = Any)
13:04 p6eval rakudo 727782:  ( no output )
13:04 [Coke] moritz_: thank you for reminding me to split up partcl's NQP files. =-)
13:04 isBEKaml isn't that a bug? lvalues cannot be literals, right?
13:04 isBEKaml rakudo: say (4 = 2)
13:05 p6eval rakudo 727782:  ( no output )
13:05 isBEKaml rakudo: 1 = 2;
13:05 bcubas joined #perl6
13:05 p6eval rakudo 727782:  ( no output )
13:05 jnthn oh, it's p6eval acting up I think
13:05 jnthn > 1 = 2;
13:05 jnthn Cannot modify readonly value
13:06 jnthn > say 4 = Any
13:06 jnthn 4
13:06 jnthn Cannot modify readonly value
13:06 isBEKaml Oh
13:08 isBEKaml Sorry, disregard what I said. False alarm. :/
13:08 pmurias joined #perl6
13:11 dju_ joined #perl6
13:24 M_o_C joined #perl6
13:38 albert__ joined #perl6
13:51 tylercurtis joined #perl6
14:12 arnsholt joined #perl6
14:13 plainhao joined #perl6
14:20 timbunce_ joined #perl6
14:23 ashleydev joined #perl6
14:23 jnthn 2 files changed, 21 insertions(+), 51 deletions(-) # I like these kinds of patches :-)
14:24 moritz_ indeed :-)
14:24 takadonet jnthn: what did you fix?
14:25 jnthn takadonet: More refactored than fixed
14:25 sahadev joined #perl6
14:25 jnthn takadonet: Was making BEGIN handling fit into the overall phasers model
14:25 dju_ joined #perl6
14:25 jnthn Which meant making that a bit smarter, and then tossing lots of duplicate stuff.
14:25 takadonet nice
14:25 jnthn However, I now can say INIT 42 and it says 42 :-)
14:26 jnthn So those bits are fixed at least.
14:26 unixdaemon left #perl6
14:26 jnthn Time for a break.
14:27 jnthn rakudo: class A { say (method foo { 23 }).WHAT };
14:27 p6eval rakudo 727782: OUTPUT«Code()␤»
14:27 jnthn ESTILLRONG
14:27 moritz_ time for a break - what do you want to break today? :-)
14:29 jnthn Well, want to is a bit strong, but it seems I did break t\spec\S04-phasers\rvalue.rakudo :-(
14:29 jnthn ooh
14:30 jnthn rakudo: INIT { say 42 }
14:30 p6eval rakudo 727782: OUTPUT«Could not find sub &say␤  in main program body at line 20:/tmp/gw4ucFuXEr␤»
14:30 jnthn I had a hack for BEGIN that evidently I need to port into the general phasers code. :-)
14:31 jnthn Eh well, after break.
14:31 * mberends eated a fresh stroopwafel. Thursday afternoon is local market time :)
14:31 * arnsholt is jealous
14:32 * moritz_ too
14:33 cotto joined #perl6
14:38 _mpu joined #perl6
14:40 felliott joined #perl6
14:45 frettled My teeth are not jealous.  :)
14:46 rgrau` joined #perl6
14:48 justatheory joined #perl6
14:52 M_o_C joined #perl6
14:57 jnthn mberends: Mmmm :-)
14:58 mberends jnthn: you'll have to be here on a Thursday afternoon...
14:58 jnthn mberends: Maybe the Thursday afternoon before OSDC in Paris. ;-)
14:59 mberends perfect :)
14:59 Juerd FYI: I'm removing "consolekit" from feather. I don't know why we'd need it, and its "console-kit-daemon" has a memory leak.
14:59 arnsholt In fact, I'm so jealous I'm gonna pop out and get some hot buns instead
14:59 pugssvn r31697 | pmurias++ | [STD-dist] change files names from .pmc to .pm as the .pmc are handled
14:59 pugssvn r31697 | strangely by the toolchain
14:59 Juerd If anyone knows why it'd be important, please let me know.
14:59 pugssvn r31698 | pmurias++ | [smop] do not use pthread, -g , enable SMOP_HUNT_NULLS
14:59 pugssvn r31699 | pmurias++ | [mildew] use Test works
15:04 gbacon joined #perl6
15:04 Mowah joined #perl6
15:04 pugssvn r31700 | Kodi++ | [t/spec/S32-temporal] Reorganization and many additions.
15:07 hercynium joined #perl6
15:09 kensanata joined #perl6
15:13 sukria joined #perl6
15:15 envi_home2 joined #perl6
15:16 Juerd And something makes Apache use lots of memory
15:16 moritz_ too many open workers at once?
15:16 moritz_ the default config starts far too many for most casual users
15:17 PerlJam scrap apache for lighttpd or nginx or something  :)
15:17 Juerd moritz_: No, lots of memory *per* process.
15:17 Juerd PerlJam: I'd love that, but it's probably things like mod_perl that cause this.
15:18 Juerd I think svn is to blame
15:19 Juerd Hard to test without shutting it down.
15:21 moritz_ then shut it down
15:21 moritz_ won't hurt very much if it's only 2 or 5 minutes
15:21 Juerd I guess that's true
15:22 Juerd It's something else.
15:23 moritz_ commitbit/jifty?
15:25 dukeleto moritz_: could you add me to proto? i have some projects that I would like to add to projects.list
15:25 Juerd It appears to be svnweb
15:25 Juerd http://feather.perl6.nl/server-status
15:25 Juerd 9671 www-data  20   0  124m  88m 6100 S   80  3.7   0:36.42 apache2
15:26 Juerd 7-0967124/24/24C46.540505872.50.070.0766.249.71.119feather.perl6.nlGET /svn/pugs/view/t/spec/S32-temporal/DateTime-strftime.t?rev=
15:26 moritz_ hugme: add dukeleto to proto
15:27 hugme moritz_: ERROR: Can't add dukeleto to proto:  404 Not Found
15:27 Juerd And a googlebot IP again, of course
15:27 moritz_ dukeleto: what's your github ID?
15:27 moritz_ hugme: add moritz to svg
15:27 hugme moritz_: sorry, I don't know anything about project 'svg'
15:27 moritz_ hugme: add moritz to svg-plot
15:27 * hugme hugs moritz. Welcome to svg-plot!
15:27 dukeleto moritz_: leto
15:27 moritz_ hugme: add leto to proto
15:27 * hugme hugs leto. Welcome to proto!
15:27 * bbkr is away for 1 week. Czech roadtrip!
15:27 dukeleto moritz++
15:28 Juerd diakopter: Could you please find out why svnweb is using so much memory, and fix that?
15:28 jnthn bbkr: Oh awesome! Enjoy it. Especially the pivo!
15:28 bbkr jnthn: thanks :)
15:33 [Coke] bah. are nicks ascii only?
15:34 moritz_ yes
15:34 [Coke] *&%!
15:34 Kodi An excellent choice of nick.
15:34 phenicsl joined #perl6
15:35 [Coke] (was hoping I could use Cöke or something.)
15:35 TimToady though someone might accidentally swear your real name and do magic on you
15:35 PerlJam joined #perl6
15:36 tylercurtis [Coke]: IRC servers aren't written in Perl 6.
15:36 Kodi tylercurtis: Yet!
15:36 Juerd svnweb is mod_perl. Everytime I see huge apache processes, mod_perl is somehow involved :(
15:37 [Coke] tylercurtis: but clÆrly they cåån handle ünicode elsewhere.  ÃƒÅ¾
15:37 Juerd Should've known.
15:37 aubreyja joined #perl6
15:38 macdaddy joined #perl6
15:39 TimToady if they allow latin-1, you might be able to fake it with the UTF-8 encoding of characters
15:40 [Coke] TimToady: Cöke isn't allowed, even.
15:40 Juerd Only 64 ascii characters are allowed iirc
15:41 Juerd a-zA-Z{|}~`[\]^_
15:41 Juerd Still missing some, or I remembered the number wrong.
15:42 dalek rakudo: c9b7229 | jonathan++ | src/ (2 files):
15:42 dalek rakudo: Make phasers implementation able to remember value produced by phaser.
15:42 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c9b7229cd4061fc4cc0e6e1aab720ec7f068b1c4
15:42 dalek rakudo: 8ce9aff | jonathan++ | src/ (2 files):
15:42 dalek rakudo: Remove special handling of BEGIN and make add_phaser a littler smarter about
15:42 dalek rakudo: BEGIN (ends up much less code duplication than what we had before.)
15:42 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8ce9aff4cce660fe8ce74ca86e6e7f5815f61c85
15:42 dalek rakudo: d51e99a | jonathan++ | src/Perl6/Actions.pm:
15:42 dalek rakudo: Put the 'run in lexical scope of the setting' hack that was in the old BEGIN
15:42 dalek rakudo: implementation into add_phaser, so now say and stuff works in all phasers.
15:42 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d51e99a4e07efd41d27aeaab3df6b9dd70ce9a3e
15:43 cxreg set phasers to lexical
15:43 jnthn Weather cooler. Can patch again. Phew.
15:43 Juerd http://2rfc.net/1459#2.2  # Interesting. For IRC, uc("{}|") is "[]\"
15:43 azert0x joined #perl6
15:43 cxreg jnthn: wrt zavolaj, moritz_ mentioned a suspicious pir::clone in NativeCall.pm6:101
15:43 cxreg it's all greek to me though
15:44 jnthn cxreg: Yes, I was expecting to toss that clone
15:44 azert0x joined #perl6
15:44 Juerd Which makes sense if you look at an ASCII table, but on a normal US keyboard they're the wrong way around, shiftwise.
15:44 jnthn cxreg: Greek? huh? I thought I'd written it in Russian...
15:44 jnthn ;-)
15:44 cxreg heh
15:48 [Coke] jnthn: shouldn't *.WHAT say "EVER"? ;)
15:49 PerlJam jnthn: does that mean that say is available in roles now?  If not, could the same hack work for that?
15:50 jnthn PerlJam: I'm currently trying to pick my any(<fix hack>) for that :-)
15:50 jnthn [Coke]: Oooh. :-)
15:50 sahadev greetings, all.
15:50 jnthn o/ sahadev
15:50 sahadev hi jnthn
15:51 jnthn PerlJam: At least I've now done the refactor to BEGIN I told pm I'd do two weeks ago though. :-)
15:52 sahadev trying to setup proto. getting errors:
15:52 sahadev maximum recursion depth exceeded
15:52 sahadev in 'Any::postcircumfix:<{ }>' at line 1
15:52 sahadev in 'Any::postcircumfix:<{ }>' at line 1631:CORE.setting
15:52 sahadev ...
15:52 * Kodi submits his Temporal patch (finally!).
15:52 [Coke] isn't pls now favored over proto?
15:52 sahadev [Coke]: don't know about pls. let me check.
15:54 sahadev http://github.com/masak still shows 'proto', but not 'pls'. Is it somewhere else?
15:55 moritz_ sahadev: it's in a branch in the proto repo
15:55 [Coke] pls?
15:55 moritz_ yes
15:56 moritz_ afk
15:56 [Coke] infobot?
15:57 Kodi left #perl6
16:01 ruoso joined #perl6
16:03 helterskelter joined #perl6
16:03 helterskelter left #perl6
16:15 masak joined #perl6
16:15 masak oh hai, #perl6!
16:15 phenny masak: 00:19Z <jnthn> tell masak upgrade to Windows
16:15 masak hugme: hug jnthn
16:15 * hugme hugs jnthn
16:15 TimToady oh hai oh
16:15 masak loliblogged! http://use.perl.org/~masak/journal/40447
16:16 masak it's a bit on the gutsy/gory side, but I had a lot of fun thinking about phasers, and I wanted to share. :)
16:16 jnthn GORE!
16:16 jnthn rakudo: say INIT { say 4; 2 }
16:16 p6eval rakudo 981974: OUTPUT«Could not find sub &say␤  in main program body at line 20:/tmp/wDu86wuXym␤»
16:16 jnthn ETOOSOON
16:18 tadzik joined #perl6
16:19 jnthn masak: nice post
16:19 jnthn masak++
16:19 masak thankz.
16:20 masak I wrote the post in POD, then wrote a simple Perl 6 filter to format it as use.perl.org wants it :)
16:20 jnthn :-)
16:20 jnthn I need to write my Last Post to there at some point.
16:21 TimToady ooh, an action item :)
16:23 masak eeew, 'mid($r, $l)' !
16:23 jnthn masak: mid brings back memories of QBasic
16:24 masak eeew!
16:24 masak but yes. it does.
16:24 cdarroch joined #perl6
16:24 cdarroch joined #perl6
16:25 jnthn iirc it was for getting stuff out of the middle of a string :-)
16:25 masak hm, which one wins between an infix and a circumfix? seems to me "LTM" is the first-approximation answer, but they might still tie on that.
16:25 masak jnthn: yes. there was LEFT, RIGHT and MID.
16:26 jnthn masak: I'm not sure tbh
16:26 jnthn rakudo: sub circumfix:<` `>($n) { say 2 * $n }; `21`
16:27 p6eval rakudo 981974: OUTPUT«42␤»
16:27 jnthn rakudo: sub circumfix:<| |>($n) { say 2 * $n }; |21|
16:27 p6eval rakudo 981974: OUTPUT«===SORRY!===␤Confused at line 20, near "|21|"␤»
16:27 jnthn The opening | is equal length to prefix | I guess
16:28 jnthn rakudo: sub circumfix:<{| |}>($n) { say 2 * $n }; {|21|}
16:28 p6eval rakudo 981974: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 20␤»
16:28 jnthn Grr
16:28 jnthn Think we're hitting on LTM issues there.
16:29 Mowah joined #perl6
16:29 masak cognominal: "in essence there is no value to test" -- this is manifestly false in Perl 6. for example, an optional array or hash parameter starts its life as an *empty* array or hash if none is sent in. not as an undefined one, but as a defined-but-empty one.
16:29 tylercurtis masak: do use.perl.org journals have RSS feeds?
16:29 moritz_ yes
16:29 masak tylercurtis: yes, I believe so.
16:29 masak tylercurtis: or you can go with Planet Perl 6.
16:29 moritz_ otherwise planetsix couldn't pick up the postings :-)
16:29 masak well, theoretically...
16:29 jnthn moritz_: Is there any issue with planetsix re Wordpress blogs these days?
16:30 jnthn I seem to remember colomon++ had some "fun"
16:30 moritz_ jnthn: works now
16:30 jnthn \o/
16:30 jnthn moritz_: Good good. I'm moving my blogging to a Wordpress blog.
16:30 jnthn It's so much more fun to use.
16:31 jnthn And will probably lead to me blogging more.
16:31 isBEKaml hey guys, ops like +=, -=, *= don't work?
16:31 jnthn ?
16:32 jnthn rakudo: my $x = 40; $x += 2; say $x;
16:32 p6eval rakudo 981974: OUTPUT«42␤»
16:32 isBEKaml rakudo: sub postfix:<y>($n) { my $foo *= $_ for 1..+$n; say $foo; }; 6y; #some factorial, really
16:32 p6eval rakudo 981974: OUTPUT«720␤»
16:32 isBEKaml wow!
16:33 isBEKaml I got something different locally. But I tried it with vim's ! escape.
16:33 tylercurtis masak: Nevermind. I'm subscribed to Planet Perl 6... Google Reader just was failing at updating.
16:33 masak ah.
16:33 moritz_ isBEKaml: http://www.perlmonks.org/?node_id=839112
16:36 isBEKaml moritz_: ah, yes. I remember reading this a while ago. I occasionally follow posts on PM. :)
16:36 isBEKaml moritz_++
16:38 isBEKaml dannnit! vim recognises the $_ ??
16:38 moritz_ why not?
16:38 masak gentletwitterer @uasi is concerned about the "Dispose pattern" in Perl 6: http://twitter.com/uasi/status/18602349670
16:38 isBEKaml Malformed my at line 1, near "*= /usr/bi"
16:39 isBEKaml when I tried it with vim's shell escape to perl6, this was what I got. $_ got expanded to /usr/bin/ something. :|
16:40 masak isBEKaml: don't do that, then.
16:40 tylercurtis moritz_: I tried making a method-based thing similar to that(although also with units for type-checking unitted math), but it doesn't work because of this:
16:40 jnthn masak: Can be shortened to given open('file');
16:41 jnthn er
16:41 jnthn given open('file') -> $f { ... LEAVE { $f.clonse } }
16:41 isBEKaml masak: escape all $s. :D
16:41 masak jnthn: aye.
16:41 tylercurtis rakudo: use MONKEY_TYPING; augment class Int { method k { self * 1000; } }; say 5; say 5.k; say 5.k.k;
16:41 p6eval rakudo 981974: OUTPUT«5␤5000␤Method 'k' not found for invocant of class 'Integer'␤  in main program body at line 20:/tmp/zCsehWrJAO␤»
16:41 masak jnthn: I'm not sure the LEAVE'll actually trigger if there's an exception, though.
16:41 jnthn masak: I'd have to re-check S04
16:41 masak me too.
16:42 masak there's some wording there about stack rollback.
16:42 jnthn However, I'd rather go for a stroll in the park right now. :-)
16:42 jnthn bbiab for more Rakudo hacking
16:42 masak I'm going to go see if someone made me some nom. :)
16:42 tylercurtis masak: LEAVE is supposed to trigger on any exit, no?
16:42 * tylercurtis has bad timing.
16:44 isBEKaml tylercurtis: something to do with what the method returns, I guess.
16:45 isBEKaml rakudo: use MONKEY_TYPING; augment class Int { method k { self * 1000; }; }; say 5; (5.k).WHAT.perl.say;
16:45 TimToady LEAVE always run; KEEP and UNDO look at the return
16:45 p6eval rakudo 981974: OUTPUT«5␤Int␤»
16:45 TimToady oh, that method :)
16:45 tylercurtis isBEKaml: it's a known bug with augmenting Int iirc.
16:46 isBEKaml tylercurtis: oh, I was thinking - maybe the return type didn't match or something.
16:46 isBEKaml turns out not the case. Happy to be wrong. :)
16:47 * moritz_ just listened to the perlcast interview with Stevan Little
16:47 ashleydev joined #perl6
16:48 tylercurtis http://rt.perl.org/rt3/Public/Bug/Display.html?id=75114
16:48 TimToady but someday it'll just be: given open('file') -> $f will leave {.close} {...}
16:50 isBEKaml tylercurtis: but it worked for 5.k ?
16:50 isBEKaml tylercurtis: maybe, it's chaining?
16:51 tylercurtis rakudo: use MONKEY_TYPING; augment class Int { method k { self * 1000; } }; say 5; say 5.k; say (5 * 1000).k;
16:51 p6eval rakudo d51e99: OUTPUT«5␤5000␤Method 'k' not found for invocant of class 'Integer'␤  in main program body at line 20:/tmp/zDhDrtJEVH␤»
16:52 isBEKaml rakudo: use MONKEY_TYPING; augment class Int { method foo { say "OHHAI"; }; }; 5.foo;
16:52 p6eval rakudo d51e99: OUTPUT«OHHAI␤»
16:52 isBEKaml ?
16:52 tylercurtis isBEKaml: The problem appears to be that (5*1000) doesn't actually return Perl 6's Int but the bare Parrot Integer.
16:53 isBEKaml tylercurtis: yes, return type mismatch. so, I was not too far off the first time.
16:53 isBEKaml TIL P6 Int and Parrot Integer are different types. :)
16:53 isBEKaml as seen by rakudo, ofcourse.
16:56 isBEKaml rakudo: say (5*100000).WHAT
16:56 p6eval rakudo d51e99: OUTPUT«Int()␤»
16:57 tylercurtis rakudo: say 5.WHAT =:= 5.1000.WHAT;
16:57 p6eval rakudo d51e99: OUTPUT«0␤»
16:57 isBEKaml it's still printing Int while actually seeing bare Integer.
16:57 tylercurtis rakudo: say 5.WHAT =:= (5 * 1000).WHAT;
16:57 p6eval rakudo d51e99: OUTPUT«1␤»
16:57 [particle] i'm curious about that typing, a bit, if the input to * is lhs Int vs rhs Int vs both Int
16:58 tylercurtis rakudo: say &infix:<+>.signature
16:59 p6eval rakudo d51e99: OUTPUT«get_attr_str() not implemented in class 'Perl6MultiSub'␤  in main program body at line 1␤»
16:59 [particle] rakudo: say Int(5) * 1000; say 5 * Int(1000); say Int(5) * Int(1000); say Int(5 * 1000);
16:59 p6eval rakudo d51e99: OUTPUT«Could not find sub &Int␤  in main program body at line 20:/tmp/gq3y4_LqJU␤»
16:59 [particle] crap, forgot WHAT
17:00 isBEKaml rakudo: say 5.Int; say Int(5);
17:00 p6eval rakudo d51e99: OUTPUT«5␤Could not find sub &Int␤  in main program body at line 20:/tmp/dX2CghbALe␤»
17:00 tylercurtis rakudo: say &infix:<+>.^methods.perl
17:00 p6eval rakudo d51e99: OUTPUT«[{ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ...
17:00 p6eval ..}, { …
17:00 isBEKaml rakudo: say 5.Int * 1000; say 5 * 1000.Int;
17:00 p6eval rakudo d51e99: OUTPUT«5000␤5000␤»
17:00 [particle] rakudo: say (5.Int * 1000).WHAT; say (5 * 1000.Int).WHAT; say (5.Int * 1000.Int)WHAT; say (5 * 1000).Int.WHAT;
17:00 tylercurtis rakudo: say &infix:<+>.^methods
17:00 p6eval rakudo d51e99: OUTPUT«===SORRY!===␤Confused at line 20, near "say (5.Int"␤»
17:00 p6eval rakudo d51e99:
17:00 p6eval ..OUTPUT«multicandidatesnamewrapcandounwrapassumingcandidatesACCEPTSaritycountsignaturereturnsperldoofassumingcallwithStrnewmultinamecotancosechatan2ucfirstcombtanatancosacosfmtevaltranschoprindextanhsubstNumericchompindexchracotanhtrim-trailingfrom-radianscapitalizepredatanhcosecexplcp5cho…
17:01 tylercurtis rakudo: say &infix:<+>.^methods.join(' ')
17:01 isBEKaml tylercurtis: sort, join, perl. :)
17:01 p6eval rakudo d51e99: OUTPUT«name multi candidates cando unwrap assuming candidates wrap arity count ACCEPTS name signature returns perl do of assuming callwith Str new multi cosh cosec succ chars sign roots ucfirst samecase tan log10 cos capitalize fmt bytes flip lc p5chop to-radians Numeric asinh acotan
17:01 p6eval ..cota…
17:01 tylercurtis rakudo: say &infix:<+>.signature
17:01 p6eval rakudo d51e99: OUTPUT«get_attr_str() not implemented in class 'Perl6MultiSub'␤  in main program body at line 1␤»
17:01 tylercurtis Should that be happening?
17:01 [particle] parrot shouldn't bleed through
17:04 TimToady I don't know what rakudo is doing with =:=, but it isn't spec.  just use === to compare values.  =:= should blow up on non-conatiners
17:04 TimToady *ta
17:06 tylercurtis rakudo: say 5.WHAT === (5 * 1000).WHAT
17:06 p6eval rakudo d51e99: OUTPUT«1␤»
17:11 dju_ joined #perl6
17:13 PZt joined #perl6
17:14 Tene phenny: tell masak that I'd like to chat with him about synonyms/aliases/whatever.
17:14 phenny Tene: I'll pass that on when masak is around.
17:15 sorear good * #perl6
17:15 isBEKaml What exactly are immutable types? That is, if we do any operation on a variable of an immutable type, we should be getting a new variable and not the same variable mutated to the state as done by the operation. Going by that, what immutable types do we have in P6?
17:16 sorear Int, Num, Str, Rat, etc
17:16 sorear Role
17:16 TimToady S02:1238
17:16 isBEKaml rakudo: my Int $foo = 25; say $foo++;
17:16 p6eval rakudo d51e99: OUTPUT«25␤»
17:17 perlrocks joined #perl6
17:17 isBEKaml rakudo: my Int $foo = 25; say ++$foo;
17:17 p6eval rakudo d51e99: OUTPUT«26␤»
17:17 isBEKaml geez...
17:17 TimToady rakudo: 25++
17:17 sorear [Coke]: To be super pedantic, IRC nicks are required to be in the old 7-bit Finnish character encoding, which looks like ASCII but replaces [ \ ] { | } with ä ë ö Ä Ë Ö.  Now you know why trigraphs were invented!
17:18 p6eval rakudo d51e99:  ( no output )
17:18 TimToady ah, so it's really C]ke   :)
17:18 sorear Maybe
17:19 sorear I don't actually remember the order of the vowels
17:19 isBEKaml rakudo: say 25++
17:19 Mowah joined #perl6
17:19 p6eval rakudo d51e99:  ( no output )
17:19 isBEKaml rakudo: say ++25;
17:19 TimToady p6eval is refusing to report the error
17:19 sorear isBEKaml: p6eval doesn't do errors
17:19 sorear use a real installed perl6
17:19 p6eval rakudo d51e99:  ( no output )
17:20 moritz_ sorear: that's not quite correct
17:20 TimToady I think p6eval should report errors (again).
17:20 moritz_ rakudo: die 24
17:20 p6eval rakudo d51e99: OUTPUT«24␤  in main program body at line 20:/tmp/hMWH5lqQHF␤»
17:20 pmurias ruoso: hi
17:21 pugssvn r31701 | lwall++ | [STD] allow leading whitespace on charnames
17:22 tylercurtis rakudo: my $/ = { foo => 5 }; say :$<foo>;
17:22 p6eval rakudo d51e99: OUTPUT«===SORRY!===␤Redeclaration of symbol $/ at line 20, near " = { foo ="␤»
17:22 tylercurtis rakudo: $/ = { foo => 5 }; say :$<foo>;
17:22 p6eval rakudo d51e99: OUTPUT«===SORRY!===␤Confused at line 20, near "say :$<foo"␤»
17:23 tylercurtis rakudo: my $foo = 5; say :$foo
17:23 p6eval rakudo d51e99:  ( no output )
17:23 moritz_ :$<foo> is probably not allowed
17:23 pragma_ joined #perl6
17:23 moritz_ std: :$<foo>
17:23 p6eval std 31700: OUTPUT«[31m===[0mSORRY![31m===[0m␤Bogus statement at /tmp/hJpRDS8q85 line 1:␤------> [32m<BOL>[33m⏏[31m:$<foo>[0m␤Parse failed␤FAILED 00:01 113m␤»
17:23 moritz_ should it? :-)
17:24 Guest96912 joined #perl6
17:24 pugssvn r31702 | lwall++ | [S06] ss/is context/is dynamic/ fossil
17:25 TimToady well...$<> is special form anyway, so it doesn't have to behave exactly like $/<>
17:26 sorear masak++
17:26 tylercurtis std: class Foo { has $.a; method bar ($.a) { $.a; } };
17:26 p6eval std 31700: OUTPUT«ok 00:01 111m␤»
17:27 tylercurtis rakudo: class Foo { has $.a is rw; method bar ($.a) { $.a; } }; my Foo $foo .= new; $foo.bar(5); say $foo.a;
17:27 p6eval rakudo d51e99: OUTPUT«5␤»
17:27 [Coke] sorear: my nick is currently [Coke] - why is not rendering as äCokeö ?
17:28 isBEKaml [Coke]: unidirectional, not bidirectional. ;)
17:29 [Coke] if I can't use them, and I can't see them, I question their existance. =-)
17:30 tylercurtis I just thought :$<foo> might work like with other twigils. Although I'm not really sure if the spec actually specifies that :$.a === a => $.a
17:30 dju_ joined #perl6
17:30 moritz_ tylercurtis: if the spec doesn't, the test suite fills that gap :-)
17:31 isBEKaml so immutable types are meant to work with value identity in === and work well with literals being ro?
17:32 pugssvn r31703 | moritz++ | [evalbot] try not to loop infinitely on errors
17:32 p6eval joined #perl6
17:32 moritz_ isBEKaml: I don't know if that holds for all immutable types, but it's true for things we call "value types"
17:33 tylercurtis moritz_: What do you mean?
17:33 moritz_ I meant what I said :-)
17:33 moritz_ which point is unclear?
17:33 pmurias rakudo: { die "hi";CATCH {default {} };say "there"; };say "here";
17:33 p6eval rakudo d51e99: OUTPUT«here␤»
17:34 tylercurtis Are you saying that there are tests for :$.a and such?
17:34 moritz_ yes
17:34 moritz_ I'm not sure if all cases are tested, but there should be quite a few
17:34 moritz_ S06-signature/named-parameters.t
17:35 moritz_ though maybe they really belong into S02-literals/pairs.t
17:35 isBEKaml moritz_: ok, thank you.
17:36 sorear [Coke]: because most IRC clients pretend the wire encoding is ASCII
17:36 sorear [Coke]: you can observe it through case mapping
17:36 tylercurtis moritz_: ah. There's my problem. I was looking at S02-literals/pairs.t.
17:36 sorear [Coke]: try /whois {Coke}
17:36 dju__ joined #perl6
17:38 TimToady tylercurtis: thing is, . is a true twigil, and < isn't, so $<foo> would need to be special-cased specialler than it is
17:38 dju_ joined #perl6
17:39 pugssvn r31704 | lwall++ | [STD] don't carp 'not used' about dynamic vars
17:40 pugssvn r31705 | lwall++ | [caller.t] use 'is dynamic' instead of 'is context'
17:40 pugssvn r31705 | change old readonly policy to use ::= instead
17:41 SmokeMachine joined #perl6
17:43 tylercurtis TimToady: Which twigils do have the special :$a/:$.a behavior? All of them except for $<a>? Or are there more that don't? Perhaps that could use some clarification somewhere in S02?
17:44 patspam joined #perl6
17:45 tylercurtis std: :$*foo
17:45 p6eval std 31703: OUTPUT«ok 00:01 110m␤»
17:45 tylercurtis std: { :$^foo }
17:45 p6eval std 31703: OUTPUT«ok 00:01 107m␤»
17:45 tylercurtis std: { :$:foo }
17:45 p6eval std 31703: OUTPUT«ok 00:01 107m␤»
17:45 tylercurtis std: { :$?foo }
17:45 p6eval std 31703: OUTPUT«Potential difficulties:␤  Unrecognized variable: $?foo at /tmp/eDZ5dmOdRq line 1:␤------> [32m{ :$?foo[33m⏏[31m }[0m␤ok 00:01 107m␤»
17:46 tylercurtis std: :$=foo
17:46 p6eval std 31703: OUTPUT«ok 00:01 107m␤»
17:47 tylercurtis rakudo: say ({:$^foo }).(5)
17:47 p6eval rakudo d51e99: OUTPUT«foo        5␤»
17:47 tylercurtis std: :$~MAIN;
17:47 p6eval std 31703: OUTPUT«ok 00:01 107m␤»
17:51 [Coke] sorear: there is no such nick {Coke}
17:52 sorear weird.
17:52 sorear it works here.
17:52 sorear 12:52 [freenode] -!- [Coke] [~coke@cpe-72-228-52-192.nycap.res.rr.com]
17:53 [Coke] I get that for [Coke], not {Coke}
17:53 sorear I get it for both.
17:54 sorear I guess maybe one of the freenode servers has finally moved into the 21st century
17:55 [Coke] in /any/ case, none of that helps me with my basic premise: IRC sucks, and freenode doubly so. =-)
17:55 sorear that's my premise too.
17:55 sorear IRC needs to die, it's stupidly designed in more ways than I can count
17:55 sorear it's a pity none of the replacements have critical mass
17:57 pmurias what's an acceptable irc replacement?
17:57 sorear I don't know yet
17:57 pugssvn r31706 | lwall++ | [STD] recognize :$<foo> as if < were a real sigil
17:59 pugssvn r31707 | lwall++ | [t/spec] more warning suppressions
17:59 PerlJam sorear: you'd have to make something that speaks the IRC protocol, but works better/faster/shinier in some way so that you can co-opt the existing IRC servers/clients into your new world order
17:59 tylercurtis TimToady++: ooh. That works, too.
17:59 PerlJam sorear: sort of like git:  it speaks http, but the git protocol is much better
17:59 tylercurtis .u smiling
17:59 phenny U+263A WHITE SMILING FACE (☺)
17:59 [Coke] we have the same problem with lily, something developed at RPI in the 80s. has a dedicated core community but no one will leave it for new and shiny.
18:00 [Coke] so any plans to replace it require coopting either the look and feel or the protocol.
18:04 sorear the IRC server protocol is a lost cause
18:04 sorear it is basically designed entirely around the notion that the connection graph has no redundancy
18:05 cxreg $ perl6 -e '(1,4,9...100).join(", ").say'
18:05 cxreg Unable to figure out pattern of series
18:06 cxreg tee hee
18:06 [Coke] I think there's plenty of wiggle room in XMPP to build something nice.
18:06 [Coke] but that's a discussion for another channel. =-)
18:09 moritz_ unless you build it with Perl 6 :-)
18:10 pugssvn r31708 | Util++ | [t/spec] Restore one line erroneously removed by r31692. Fixes slurpy-params.t compile failure.
18:11 pugssvn r31709 | lwall++ | [STD] don't complain about state vars that are not used
18:17 PerlJam joined #perl6
18:17 TimToady Util: that line should not be necessary; the class decl should introduce its own name immediately as a type name
18:17 TimToady and, in fact, it should be carping about a redeclared class
18:18 TimToady unless the first def has ...
18:18 moritz_ TimToady: 'X' ne 'Y'
18:18 moritz_ I didn't notice it at first sight either
18:19 TimToady .oO(never could tell the difference between zip and cross ops :)
18:19 TimToady that would explain why STD isn't carping about it too :)
18:20 moritz_ and 'Y' ne 'Z' :-)
18:20 * TimToady thinks he should make a noise like a hoop and roll away
18:21 [Coke] hoop noise?
18:24 TimToady sorry, a Lord Peter Wimsey allusion
18:25 TimToady and, in fact, if I'd looked at the snaptest run I did after that, I'd've notice it complaining about
18:25 TimToady In parameter declaration, typename 'X64814' must be predeclared (or marked as declarative with :: prefix) at /home/larry/pugs/t/spec/S06-signature/slurpy-params.t line 241:
18:27 pmichaud good morning, #perl6
18:29 tadzik joined #perl6
18:30 PerlJam pmichaud: good afternoon  :)
18:32 Util TimToady, moritz_: So, the removal of the X64814 line was a thinko (that I thought was a typo), but restoring the line has completly resolved the issue?
18:33 uniejo joined #perl6
18:36 xabbu42 joined #perl6
18:36 sorear good * pmichaud
18:39 TimToady Util: yes, it's fine as it was
18:40 TimToady one never knows on which day one is going to make his Bad Mistake of the Week on...
18:40 pmichaud I thought my Bad Mistake was going to be on Monday, but I was mistaken about that.
18:40 [Coke] TimToady: if you're me, it's really just all of them.
18:41 ashleydev joined #perl6
18:42 tadzik is fakedbi renamed to minidbi?
18:42 pmichaud tadzik: I believe so, yes.
18:42 pugssvn r31710 | lwall++ | [t/spec] more warning suppressions; remaining STD warnings are mostly bugs in test or STD
18:42 pmichaud it was decided that "fake" was too strong a word.
18:42 tadzik sounds more marketingy :)
18:43 PerlJam good
18:43 PerlJam (perl has needed some good marketing for a while :)
18:44 tadzik sure it does :)
18:44 * tadzik will be agitating Perl6 on local Perl workshop in a few days
18:44 xabbu42 joined #perl6
18:47 tylercurtis At least some of the FakeDBI stuff isn't fake anymore iirc.
18:50 jakk joined #perl6
18:51 pugssvn r31711 | moritz++ | [t/spec] unfudge tests for custom circumfixes
18:53 baest joined #perl6
18:58 pugssvn r31712 | moritz++ | [t/spec] RT #76382, role type objects should be undefined
19:00 kensanata joined #perl6
19:01 pugssvn r31713 | moritz++ | [t/spec] test for RT #76234, interpolating empty block into a string
19:01 xabbu42 joined #perl6
19:01 * jnthn back from noms
19:02 jnthn hi pmichaud :-)
19:02 pmichaud aloha jnthn!  :-)
19:02 jnthn pmichaud: Still sunny and beautiful over there?
19:03 pmichaud jnthn: yes.  A bit sunnier today than yesterday, even :-)
19:03 jnthn Nice :-)
19:03 * moritz_ is glad that today wasn't as sunny as yesterday :-)
19:03 jnthn Here it's also sunny, but thankfully not so hot and stuffy. I can actually concentrate long enough to write a patch now. :-)
19:04 jnthn pmichaud: You'll be delighted to know that BEGIN now works through add_phaser again :-)
19:04 pugssvn r31714 | moritz++ | [t/spec] tests for RT #73460, Whatever stars and variables
19:04 lue ohai o/
19:04 pmichaud jnthn: I'm delighted to hear that!
19:04 jnthn \o/
19:04 jnthn rakudo: say INIT 42 # this works too
19:04 moritz_ jnthn: and I've closed the tickets that you handed to me today :-)
19:04 p6eval rakudo d51e99: OUTPUT«42␤»
19:04 jnthn moritz_: yay!
19:05 jnthn moritz_++
19:05 pmichaud outstanding!  I should go on vacation more often.  :-)
19:05 moritz_ rakudo: my $x; say $x; INIT { $x = 5 };
19:05 p6eval rakudo d51e99: OUTPUT«Lexical '$x' not found␤  in main program body at line 20:/tmp/I5pWUqrLCZ␤»
19:05 jnthn I didn't fix *that* one yet. :P
19:05 moritz_ well, one can always hope and try :-)
19:05 jnthn I hope to fix it and I'm sure I'll try at some point. :-)
19:06 cono joined #perl6
19:06 jnthn pmichaud: I'm srsly pondering a branch that s/loadinit usage/add_phaser/
19:06 jnthn pmichaud: For one because I'm pretty sure I can fix the whole roles not seeing the setting thing with it.
19:06 pmichaud jnthn: I think it'd be worth experimenting with, yes.  I'm not sure it's a good idea pre-R*
19:07 pmichaud jnthn: if it works out cleanly, though, I'd say go for it :)
19:07 jnthn pmichaud: We *have* to fix the setting not visible from role bug somehow.
19:07 jnthn (Before R*.)
19:07 pmichaud (you still end up with loadinit stuff, it's just that the loadinit stuff triggers phasers instead of doing it directly)
19:07 jnthn It's a major fail.
19:09 pmichaud anyway, I say it's worth a try (and not hard to do)
19:10 jnthn Aye
19:10 pmichaud but I think the problem may be related more to the composition logic than the loadinit stuff.
19:10 jnthn The problem boils down to, we take closures from within a loadinit
19:10 pmichaud we'll still be doing that with phasers
19:10 pmichaud unless you do something other than BEGIN
19:10 jnthn Yeah but phasers have a hack to deal with that.
19:11 pmichaud they do?
19:11 jnthn rakudo: BEGIN { say "huh" }
19:11 p6eval rakudo d51e99: OUTPUT«huh␤»
19:11 masak joined #perl6
19:11 pmichaud oh, okay.
19:11 jnthn pmichaud: Er, they do now. ;-)
19:11 * pmichaud pulls, checks.
19:11 jnthn pmichaud: I took it from the stuff I did with BEGIN before.
19:12 lue Where is the code for &say and &print [things like say 'hi']? I broke it, and need to check on it.
19:12 pmichaud lue: src/core/IO.pm
19:12 jnthn pmichaud: And now it's just in add_phaswer
19:12 pmichaud jnthn: I don't see it in add_phaser
19:12 masak Tene: ok. don't know exactly what you're referring to, but it sounds interesting.
19:12 phenny masak: 17:14Z <Tene> tell masak that I'd like to chat with him about synonyms/aliases/whatever.
19:13 jnthn Line 592
19:13 pmichaud in actions.pm?
19:13 jnthn Yes
19:13 pmichaud oh
19:13 jnthn oh. :-)
19:13 pmichaud I thought you meant !add_phaser
19:13 jnthn sub add_phaser($/, $bank) {
19:13 jnthn No no :-)
19:16 pmichaud oh.
19:16 jnthn I said it was a hack
19:16 pmichaud you chose to have Actions.pm fire the BEGIN phasers instead of phasers.pir ?
19:16 jnthn OTOH, I'd prefer to have one hack in one place
19:16 jnthn pmichaud: Yeah (more)
19:17 jnthn I'm not convinced that we will *always* want to have BEGIN stuff run immediately. If I'm going to put class-y things in using BEGIN we wanna wait until we compiled and run them after that.
19:18 jnthn pmichaud: I'm thinking of giving add_phaser an optional $run_now = 0 arg.
19:18 jnthn pmichaud: And the real BEGIN blocks throw along a "1" there
19:18 pyrimidine joined #perl6
19:19 pmichaud "wait until we compiled and run" sounds more like CHECK than BEGIN
19:19 jnthn Well, here's the nasty we have.
19:19 pmichaud -1 to the $run_now arg.  that feels even more hackish.
19:19 jnthn We can't just run BEGIN blocks at compile time.
19:19 pmichaud I'd rather just issue the explicit call to !fire_phasers
19:20 jnthn We need them to end up in the PIR too
19:20 pmichaud I understand that part.
19:20 jnthn So is your premise that maybe class construction wants to go at...INIT?
19:20 pmichaud CHECK.
19:20 pmichaud CHECK comes before INIT.
19:20 jnthn Oh, yes
19:21 pmichaud although currently it's LIFO instead of FIFO
19:21 pmichaud afk for a bit
19:21 jnthn k
19:21 pmichaud oh, I have another answer
19:21 pmichaud (will take a bit to explain -- bbi5
19:26 masak phenny: tell moritz_ that he has an unclosed <code> somewhere in http://perlgeek.de/blog-en/perl-6/contribute-now-samecase-for-subst.html
19:26 phenny masak: I'll pass that on when moritz_ is around.
19:27 * moritz_ goes looking
19:27 phenny moritz_: 19:26Z <masak> tell moritz_ that he has an unclosed <code> somewhere in http://perlgeek.de/blog-en/perl-6/contribute-now-samecase-for-subst.html
19:28 Tene masak: like this: http://irclog.perlgeek.de/perl6/2010-07-14#i_2554862
19:28 masak moritz_: also, looking through your list at http://perlgeek.de/blog-en/perl-6/rakudo-star-wish-list.html , I think the "same list or iterator twice" bug has been shown to be Not Dead Yet by colomon.
19:29 masak Tene: looking.
19:29 moritz_ rakudo: say <a b c>.kv.kv.perl
19:29 p6eval rakudo d51e99: OUTPUT«Cannot resume dead coroutine.␤  in 'Any::join' at line 1␤  in 'List::perl' at line 2522:CORE.setting␤  in main program body at line 20:/tmp/d9x_Y7gxGI␤»
19:29 masak Tene: ah, those synonyms. yes, I'll happily talk about those.
19:29 pmichaud jnthn: nm, my idea won't work anyawy
19:29 masak I thought about them a bit when reading the backlog.
19:29 pmichaud actually, it might
19:29 sorear TimToady: Is it reasonable to be wanting some sort of conditional compilation for p6?
19:30 Tene masak: What's the utility?  That seems to just increase confusion, for negligible benefit, to me.
19:30 pmichaud anyway, you can attach to $*UNITPAST.loadinit
19:30 pmichaud but I think that might end up being very first instead of very last.
19:30 masak Tene: we're actually removing a lot of the synonyms from CPAN's DateTime.
19:31 pmichaud jnthn: really, though, the question is "when should class construction take place?"
19:31 masak Tene: I kept this pair because I saw a use case for each of the forms.
19:31 cls_bsd joined #perl6
19:31 masak Tene: namely, .year/.month/.day is symmetrical, so we want to keep that one. but sometimes you want extra clarity, or want to contrast .day-of-week with .day-of-month, so we want to keep the latter.
19:31 jnthn pmichaud: I've been pondering this quite a lot. (more)
19:32 masak Tene: I would never want this with a CORE(tm) module, but DateTime is only almost core.
19:32 chitragupt joined #perl6
19:32 rv2733 joined #perl6
19:32 jnthn pmichaud: One of the things I'm going to need to be able to do for the work I plan under my grant is interact with meta-classes of things at compile time.
19:32 Tene masak: Sure, but then someone's reading the code, and sees the two forms used in different places, and assumes they must mean different things.
19:32 jnthn Or to get decent optimizations anyway
19:33 jnthn Where "compile time" is a bit blurry :-)
19:33 Tene Or you're searching for uses of one form, and miss uses of the other.
19:33 pmichaud jnthn: sure, makes sense.
19:33 jnthn pmichaud: Anyway, I increasingly wonder if we're going to be able to hang on to our whole-file-in-one approach to compilation.
19:33 pmichaud I don't understand "whole-file-in-one" approach.
19:34 jnthn pmichaud: We take a whole file and translate it all down to, e.g. PIR.
19:34 jnthn pmichaud: As opposed to, we say "ah, we're done with this class, let's compile it" and then fix up outer links later on.
19:35 jnthn pmichaud: I'm not particularly advocating we switch to the second, because it's going to be annoying.
19:35 pmichaud I'm pretty certain we can keep the whole-file-in-one approach.  PAST may need to come up with some better mechanisms for .loadinit stuff.
19:35 Tene masak: Okay, I think I understand your reasons now.
19:35 jnthn pmichaud: That's also entirely possible, yes.
19:35 masak Tene: I'm not fundamentally opposed to just keeping one of the forms. I guess .day-of-month'd go in that case.
19:36 pmichaud I do agree with the idea that it should all happen with phasers.
19:36 masak Tene: I understand yours, too. it's all a matter of taking opposing forces into account.
19:36 jnthn pmichaud: I do worry about things like class Foo { }; BEGIN { Foo.new } though.
19:36 jnthn pmichaud: I'm not sure how legal (or otherwise) that is.
19:36 pmichaud if the BEGIN for class Foo takes place at the closing brace, it's probably okay.
19:36 masak Tene: your 'searching' argument could equally be applied to things like the .{} and .<> syntaxes.
19:37 masak ENOTENE
19:37 jnthn pmichaud: Right, but that's what I mean about not being able to compile the whole program in one chunk.
19:37 jnthn pmichaud: Anyway, that's a much bigger discussion.
19:37 skangas joined #perl6
19:37 pmichaud jnthn: we can still come up with a single .PIR that has the results of the compilation (more)
19:38 pmichaud jnthn: but yes, during compilation we may also be invoking specific chunks
19:38 pmichaud (which we do now for a variety of things)
19:38 jnthn Aye, true.
19:38 jnthn Anyway, that's certainly too big a change for pre-R*. :-)
19:38 jnthn Probably one of those things that YAPC::EU would provide a good chance to bat around. :-)
19:39 masak pmichaud: ooc, what's your estimation of the difficulty/ETA of http://rt.perl.org/rt3/Ticket/Display.html?id=73608 ?
19:39 Tene joined #perl6
19:40 pmichaud masak: I'm still planning pre-Parrot release.
19:40 masak ok.
19:40 masak Tene: [re-posted] your 'searching' argument could equally be applied to things like the .{} and .<> syntaxes.
19:40 dalek niecza: 4fcb9ab | sorear++ |  (4 files):
19:40 dalek niecza: Move Decl to CgOp
19:40 dalek niecza: review: http://github.com/sorear/niecza/commit/4fcb9abfa0eb1adac3daa1bddbb74a4ec9626253
19:40 dalek niecza: 6dac3ce | sorear++ |  (6 files):
19:40 dalek niecza: Move everything else to CgOp
19:40 dalek niecza: Only CgOp and Q:NIL know about the codegen op set now.
19:40 dalek niecza: review: http://github.com/sorear/niecza/commit/6dac3ce3e977e44a5447a40be969463cfa988409
19:40 pmichaud likely this Sunday.
19:40 masak \o/
19:40 jnthn pmichaud++ # yay!
19:40 pmichaud that's one of those things that I think has to be done for R*
19:40 masak that's one of the more serious remaining bugs.
19:40 jnthn Aye, me too
19:40 Tene masak: Yes, but those are functionally different.
19:41 masak Tene: please elaborate.
19:41 Tene masak: <> quotes its arguments.
19:41 masak pmichaud: this one is quite important as well: http://rt.perl.org/rt3/Ticket/Display.html?id=66782
19:42 jnthn masak: Is it a problem for .subst or just .= ?
19:42 masak Tene: oh, sure. right. they're not identical, like .day and .day-of-month are.
19:42 pmichaud .subst, I suspect.  I suspect $/ still isn't being bound properly.
19:42 masak aye, .subst
19:42 jnthn OK
19:42 pmichaud that one is particularly tricky.
19:43 masak Tene: but to keep the analogy intact, I wouldn't use .day and .day-of-month interchangably either.
19:43 Ross joined #perl6
19:43 masak Tene: (even though they return the same thing)
19:43 pmichaud because we really have to monkey with the lexpads to get it even close to right.  last time moritz++ and I looked at it we ended up in a catch-22 situation, iirc.
19:43 masak ok. keywords "monkey" and "catch-22" make me set my hopes not-too-high for that one. :)
19:44 masak guess we can handle *one* FAQ on the channel. :P
19:45 jnthn pmichaud: Is it essentially that $/ normally comes from outer, but in this case we want it to go in dynamically?
19:45 pmichaud I think there's a design hole there somewhere that likely needs addressing.  Let me see if I can dig up the relevant discussion.
19:46 pmichaud jnthn: somewhat.   It's not just dynamically either.
19:46 kbenson joined #perl6
19:46 kbenson left #perl6
19:47 [Coke] pmichaud: there's planning? I thought I was just going to pull a trigger and boom.
19:47 masak bah, p6l werves into Temporal discussion that was settled months ago. how will I be able to read this and not lose interest or blow a fuse? :)
19:47 * pmichaud hopes there's a :-) missing from Coke's message :)
19:47 jnthn masak: You could always not read it. ;-)
19:48 masak jnthn: right... :)
19:49 IRSeekBot joined #perl6
19:49 jnthn masak: I read p6l quite selectively. :-)
19:49 TimToady .subst is always supposed to set CALLER::<$/>
19:49 TimToady just like everything else is, if you assume that regex matches always have helper routines
19:49 pmichaud but by default,  closures tend to look at OUTER::<$/>
19:49 masak (Mark J. Reed)++ # has apparently googled, AND read Temporal.pm, AND read ISO 8601.
19:49 nimiezko joined #perl6
19:49 masak I feel better now.
19:49 TimToady closures are supposed to have their own $/
19:50 pmichaud which defaults to... ?
19:50 TimToady which defaults to outer
19:50 jnthn masak: oh wow! :-) \o/
19:50 pmichaud so how does that work, then?
19:50 jnthn TimToady: Oh, so essentialy
19:50 masak yary-- # wanting to add more bikeshedding to an already large shed
19:50 TimToady $/ is always scoped to the current block, but defaults to a copy of its outer match
19:50 jnthn say $x.subst(/(\d+)/, { $/ + 42 });
19:51 jnthn .subst sets CALLER::<$/>
19:51 pmichaud TimToady: right, that's what we have now.
19:51 TimToady which is OUTER to the closure
19:51 jnthn And that caller is the outer of the closure?
19:51 jnthn (We assume that it is..)
19:51 TimToady that's the plan
19:51 pmichaud wait
19:52 pmichaud I need to find the example that failed for that.
19:52 lue masak: maybe I should comment on this recurring discussion about time, but I'd have to do some research first :)
19:52 masak lue: you would, or you'd have to answer to me. :>
19:52 pmichaud okay, I was thinking of a different problem.
19:53 lue [ not to mention the part where I can afford to ignore my email for a couple of days, so I haven't noticed it's going on :) ]
19:53 masak lue: I've only used my cinnamon bun once, and that was during a Temporal discussion.
19:53 masak 哈哈
19:54 pmichaud same is true for .match ?
19:54 TimToady yes
19:54 pmichaud looking
19:54 TimToady if m// uses match internally, it'll have to hoist $/ an extra level
19:55 TimToady same for any helper that delegates to .match or .subst that wants to set user's $/
19:55 pmichaud right
19:55 pmichaud I think that .subst uses .match internally, so it has to do the same.
19:56 lue masak: just don't expect me to give ISO money to read up on ISO-8601 :)
19:56 TimToady but as with $!, the intent is to clobber the caller's variable so it persists after the call
19:56 jnthn Heh. Maybe it's time for me to implement CALLER::
19:56 pyrimidine left #perl6
19:56 TimToady well, callframe.my<$/> will do :)
19:57 jnthn ooh, yes :-)
19:57 TimToady er, callframe(Routine,1).my maybe
19:57 jnthn Something like that
19:57 TimToady go to the current Routine callframe and one out from there
19:57 masak lue: ISO money? I'm picturing square coins which look like rhombuses because the angle is sorta weird. :)
19:58 lue very punny :)
19:58 sorear lue: google around a bit, almost all of the interesting ISO and ANSI standards have legal free versions floating around the net
19:58 TimToady I think S06 finesses the definition of caller to work for non-inline lambda calls too, though
19:58 TimToady but if you know you're in a Routine, that's probably good enough
19:58 tylercurtis masak: Wouldn't a "square" with the angle sorta weird be a rhombus and not a square?
19:59 masak lue: what sorear said. I certainly haven't paid any ISO money. I basically read the Wikipedia article, which was goodenuf.
20:00 masak tylercurtis: nono, they're squares, but they're lying flat on a table or something, and viewed from a non-straight-above angle.
20:00 tylercurtis masak: Oh. Okay.
20:00 lue I know. I'm only saying don't expect me to go that far to seem knowledgeable :)
20:00 masak tylercurtis: http://en.wikipedia.org/wiki/File:IsometricFlaw_2.svg
20:01 jnthn And Microsoft paid for it to be spec'd that way, and have a patent on the angle.
20:01 masak lue: this is the Internet. I'm not expecting anything. :)
20:03 lue "I have bought a hard copy of every single ISO standard in existence!"  "Have you read any of them?"  "...maaaybee."
20:07 c1sung joined #perl6
20:15 eternaleye joined #perl6
20:15 moritz_ the w3 xhtml validator is funny: I removed 28 errors by adding 4 missing closing tags
20:17 lue .oO[ either they overcount, or it's just to scare you into fixing it :) ]
20:18 pmichaud class LexPad is Associative {
20:18 pmichaud o_O
20:18 pmichaud "is Associative"?
20:18 moritz_ uhm
20:18 moritz_ should be 'does', I assume :-)
20:18 jnthn Yes :-)
20:18 TimToady or is Hash :)
20:18 pmichaud why isn't it just   "is EnumMap", ooc?
20:18 * moritz_ changes, and spectests
20:18 * sorear wonders how to turn off 'two terms in a row'
20:18 pmichaud I have other changes to make there.  :)
20:18 moritz_ what would we gain from that?
20:19 pmichaud I would expect all of the methods available for EnumMap to be available for LexPad
20:19 moritz_ pmichaud: ok, then I'll let you do it
20:19 pmichaud like .pairs, and the like.
20:19 moritz_ and Associative doesn't provide .pairs?
20:19 pmichaud no.
20:19 moritz_ I kinda expected it would, in the end
20:20 pmichaud .pairs tends to come from Any-list
20:20 Tene sorear: what would you be trying to achieve by doing that?
20:20 pmichaud EnumMap overrides that.
20:21 * TimToady wonders why sorear++ thinks turning off 'two terms in a row' would be anything close to a good idea
20:21 moritz_ a Mathematica-style   2 x to mean 2 * x
20:21 TimToady since that's the main thing that keeps Perl grammars from descending into a mazy of twisty little error messages, all wrong
20:22 sorear TimToady: because I'm working in a subgrammar with entirely different rules, and it's just confusing me
20:22 moritz_ but... right, we'd lose most error messages
20:22 * sorear is trying to use STD.pm6 to parse s-expressions
20:22 moritz_ uhm
20:22 moritz_ but you're not using a precedence parser for that, are you?
20:22 TimToady okay, well, if you're parsing a different language, I'll note that STD::Regex can juxtapose terms
20:23 TimToady but you'll note that most Regex error messages are "Couldn't find the ]" or some such
20:24 pmichaud does LexPad need to be its own type?  How about if we just used an EnumMap for it?
20:24 moritz_ I guess they won't be much more advanced for s-exprs :-)
20:24 TimToady you can't turn it into an EnumMap till you're done compiling the scope
20:24 pmichaud TimToady: this is at runtime, atm.
20:24 moritz_ pmichaud: I saw that Stash is a type of its own... but currently it doesn't need to be one (where it = LexPad)
20:25 Cyrus joined #perl6
20:25 TimToady it's mostly to get methods on it in P5 :)
20:25 pmichaud callframe(0).my.WHAT    # ?
20:25 TimToady == MY.WHAT
20:25 pmichaud ...and that would be?   ;-)
20:25 japhb joined #perl6
20:26 moritz_ Stash? LexPad? Hash?
20:26 pmichaud Hash implies mutability of keys; not sure we want that.
20:26 TimToady you do at compile time
20:26 pmichaud good point.
20:26 TimToady or when constructing an EnumMap in general...
20:27 lorev joined #perl6
20:28 TimToady well, .my is kind of a fake hash that looks up in the stash but really returns the current lexpad's entry
20:28 pmichaud I think I'll just make it a Hash for now in Rakudo.
20:29 TimToady probably a hash of offsets into the frame's associated lexpad
20:30 TimToady so maybe written .my('$foo') rather than .my<$foo> so that you don't have to synthesize an array that is just a wrapper
20:31 TimToady maybe close over the lexpad and return a fake hash if they just ask for .my() though
20:31 TimToady sort of a pessimal thing to want
20:34 dalek niecza: e32cb27 | sorear++ |  (3 files):
20:34 dalek niecza: Add a concrete syntax for CgOp
20:34 dalek niecza: review: http://github.com/sorear/niecza/commit/e32cb2739bd07ce6ce467b3f448b4d75813c8555
20:34 dalek niecza: e9e5685 | sorear++ |  (3 files):
20:34 dalek niecza: Start moving setting to Q:CgOp
20:34 dalek niecza: review: http://github.com/sorear/niecza/commit/e9e5685bf29fab24136f1d3823f43cda69f21791
20:36 Cyrus joined #perl6
20:39 lorev .my is msia
20:39 lorev ok nvm
20:40 pmichaud locally:
20:40 pmichaud > $_ = 'food for thought';  say .subst(/o+/, { $/.chars }, :global);
20:40 pmichaud f2d f1r th1ught
20:40 pmichaud spectesting.
20:40 jnthn \o/
20:41 TimToady \ö/
20:41 pmichaud rakudo: $_ = 'food for thought';  say .subst(/o+/, { $/.chars }, :global);
20:41 p6eval rakudo d51e99: OUTPUT«Method 'chars' not found for invocant of class ''␤  in <anon> at line 20:/tmp/gO5gzpz3Qw␤  in 'Cool::subst' at line 2068:CORE.setting␤  in main program body at line 20:/tmp/gO5gzpz3Qw␤»
20:41 pmichaud right.
20:42 pmichaud (making sure I actually fixed something :-)
20:42 jnthn pmichaud: I can patch up the s/// form if your patch doesn't make that work too :-)
20:42 pmichaud example using s/// form?
20:42 pmichaud does it automatically make a closure out of the second // ?
20:42 jnthn Yes
20:43 jnthn oh wait
20:43 jnthn More itneresting is
20:43 tadzik hmm. Is division by zero no longer a bad thing?
20:43 jnthn my $x = 'food for thought'; $x ~~ s[o+] = $/.chars; say $x;
20:43 moritz_ it's bad, but not necessarily fatal
20:44 pmichaud jnthn: did that work before?
20:44 jnthn sure it doesn't
20:44 pmichaud fsvo work?
20:44 moritz_ rakudo: say (1/0).perl
20:44 p6eval rakudo d51e99: OUTPUT«1/0␤»
20:44 jnthn rakudo: my $x = 'food for thought'; $x ~~ s[o+] = $/.chars; say $x;
20:44 p6eval rakudo d51e99: OUTPUT«Method 'chars' not found for invocant of class ''␤  in <anon> at line 20:/tmp/STnN8NtWLc␤  in 'Cool::subst' at line 2068:CORE.setting␤  in 'Substitution::ACCEPTS' at line 5472:CORE.setting␤  in 'infix:<~~>' at line 411:CORE.setting␤  in main program body at line
20:44 p6eval ..20:/tmp/STnN8NtWLc␤»
20:44 tadzik moritz_: then you should update your exceptions chapter :)
20:44 tadzik (in Perl 5 to 6)
20:44 pmichaud > my $x = 'food for thought';  $x ~~ s[o+] = $/.chars;  say $x;
20:44 pmichaud f2d for thought
20:45 moritz_ \o/
20:45 moritz_ ship it!
20:45 jnthn \o/
20:45 jnthn Oh, it'd want to me s:g[o+] ... for all of them.
20:45 pmichaud > my $x = 'food for thought';  $x ~~ s:g[o+] = $/.chars;  say $x;
20:45 pmichaud Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 1
20:45 pmichaud ...can't have everything just yet.  :)
20:46 moritz_ s:g parsing considered non-trivial
20:46 jnthn my $x = '1 2 3'; $x ~~ s[\d+] *= 2; say $x; # how about this?
20:46 jnthn oh, I think I dind't implement parsing of that yet
20:46 moritz_ rakudo: s[a] += 2;
20:46 p6eval rakudo d51e99: OUTPUT«===SORRY!===␤Missing assignment operator at line 20, near "+= 2;"␤»
20:46 jnthn Aye
20:46 jnthn Heh
20:46 jnthn May do that, it's cute.
20:47 [Coke] \Å‘/
20:47 pmichaud I get a fail in action-stubs.t
20:48 pmichaud method TOP($/) {
20:48 pmichaud "a\nb".subst(/\n+/, '', :g);
20:48 pmichaud what should happen here?
20:49 pmichaud does .subst  rebind CALLER::<$/>  or does it assign to it?
20:49 moritz_ return "ab"
20:49 pmichaud ($/ is readonly here)
20:49 moritz_ I'd kinda hope it gets its own $/
20:50 pmichaud no, TimToady++ said above that .subst modifies CALLER::<$/>
20:50 moritz_ ok
20:51 * pmichaud changes it to  TOP($/ is rw) for now to pass the test.
20:51 moritz_ +1
20:51 jnthn pmichaud: Sounds sane.
20:51 moritz_ tadzik: fixed
20:52 moritz_ tadzik++ # pointing out outdatedness in my posts
20:53 tadzik heh, yw. It's still the most reading-friendly docs for Perl 6 imo
20:54 moritz_ I kinda toyed with the idea of making a mini-book out of them
20:56 tadzik I'd love some KnR style book. Nothing fancy, just explaining the language step by step, with some easy examples
20:57 [Coke] tadzik: have you looked at the perl6 book in github?
20:58 tadzik yep, but it's not exactly what I'm looking for. It's nice though, I'm watching its progress
20:59 whiteknight joined #perl6
21:07 jnthn http://rt.perl.org/rt3/Ticket/Display.html?id=68752 # closable now?
21:08 moritz_ +1
21:12 lorev just curious
21:12 lorev OT
21:12 lorev russians invented trinary coding ?
21:12 lorev is this true?
21:12 ashleydev joined #perl6
21:14 jnthn Хуй знает, може быть
21:14 jnthn :-)
21:14 lorev any idea folks?
21:15 mberends lorev: no. and it's handly useful. http://en.wikipedia.org/wiki/Trinary_logic
21:15 mberends *hardly
21:15 [Coke] Хуй?
21:16 lorev mberends: what do you mena? it's not very useful?
21:16 jnthn [Coke]: "Хуй знает" together is like "Hell knows"
21:17 lorev mberends: much was done to prevent russians from using it
21:17 [Coke] jnthn: has a more interesting direct translation. =-)
21:17 lue meh, I go for quantum logic :)
21:17 jnthn lorev: Having on or off turned out to be a bunch simpler than trying to differentaite 3 levels with noise margins. :-)
21:17 jnthn [Coke]: <innocent look>
21:18 [Coke] FAIL.
21:18 lorev jnthn: nods
21:18 ejs joined #perl6
21:18 lue rakudo: say !False ~~ True
21:18 p6eval rakudo d51e99: OUTPUT«1␤»
21:19 jnthn lorev: Looks like Polish from the article mberends++ linked.
21:19 lue rakudo: say !rw ~~ readonly
21:19 p6eval rakudo d51e99: OUTPUT«Could not find sub &readonly␤  in main program body at line 20:/tmp/na1Z0TMnlq␤»
21:19 lorev jnthn: polish?
21:19 jnthn Wow. Back in the days when Lvov was part of Poland, even. :-)
21:19 ejs left #perl6
21:20 jnthn lorev: http://en.wikipedia.org/wiki/Jan_%C5%81ukasiewicz
21:20 lorev ok mberends pasted this http://en.wikipedia.org/wiki/Trinary_logic
21:20 lorev not sure where you got that link from
21:20 lorev :P
21:20 mberends lorev: compared with binary, which is easy to make and gives us so much value, ternary/trinary seems more complex to implement and solves only a small number of problems.
21:21 jnthn lorev: From the aritcle mberends linked ;-)
21:21 pmichaud I think I'm going to regress on RT #71514.
21:22 lue rakudo: say (True&False) ~~ (False&True)
21:22 p6eval rakudo d51e99: OUTPUT«0␤»
21:22 lue \o/ quantum-compatible
21:23 jnthn woo, back down to 650 RT tickets
21:23 jnthn oh, 649 even
21:23 pmichaud about to go back to 651 :-)
21:23 mberends \o/ a very patchy Rakudo HTTP::Server::Simple::PSGI just said Hello World to a browser, bringing a Perl 6 Dancer a few steps closer
21:23 lorev jnthn : ah
21:23 jnthn 650 :P
21:23 pmichaud 650 even.  :-)
21:23 lorev mberends: indeed
21:24 jnthn pmichaud: Gonna leave trying to fix taht role outer bug until tomorrow.
21:24 pmichaud jnthn: wfm
21:25 jnthn pmichaud: It seems that it happens because we do the clone in a loadinit
21:25 jnthn pmichaud: At a time when the block never got captured.
21:26 jnthn pmichaud: er, a get_closure I guess in current terminology
21:26 jnthn pmichaud: And that's not directly in a load init, but in a call chain has a loadinit in it.
21:27 pmichaud jnthn: right.
21:27 pmichaud that's what I meant by "I think it's more than just a loadinit issue"
21:28 jnthn pmichaud: Well, we need to make closures or our role variants'll get messed up.
21:29 pmichaud they are closures
21:29 jnthn Right.
21:29 pmichaud the problem is when the closure gets initialized.
21:29 jnthn Yes, which is from a load init.
21:29 pmichaud when does the body of  a role or class get executed?
21:30 jnthn Given
21:30 jnthn role R { }
21:30 jnthn class C does R { }
21:30 pmichaud currently the spec says (iirc) that the body acts like a bare block.
21:30 jnthn Part of the call to build class C is
21:30 jnthn trait_mod:<does>($class-we're-making, R)
21:30 jnthn And it's within there
21:30 jnthn So it's within the code that creates C
21:30 jnthn The problem is that a role body can't be a bare block.
21:31 pmichaud so, if i have
21:31 jnthn Consider role R[::T] { say T }
21:31 pmichaud role R { say 'hello' }
21:31 pmichaud right
21:31 jnthn So roles have to be different from classes in that sense.
21:31 pmichaud so, it gets executed whenever ... ?
21:32 jnthn whenever the role is done
21:32 jnthn That is
21:32 jnthn class C does R { } compiles down to two things
21:32 jnthn Something we do a loadinit time that makes all the meta-class calls. Including the trait_mod:<does> call that forces R's body to run and produce a role
21:32 jnthn *at loadinit time
21:33 jnthn And the other thing is the bare block.
21:33 pmichaud and R is currently scoped where?
21:33 pmurias left #perl6
21:33 pmichaud i.e., where does the body of R get placed in the PAST tree?
21:33 pmichaud if the body of R is in the loadinit, that's probably wrongish.
21:33 jnthn No, it shoudln't be at all
21:34 jnthn I'm sure it's just as if you'd written multi R { } or so
21:34 pmichaud Istr thinking "the role body is in the wrong place" when working on the closure stuff.
21:34 timbunce joined #perl6
21:34 jnthn Oh
21:34 jnthn Let me check
21:34 jnthn My *intention* at least is that it's just like a class's bare block, but it's a sub rather than a bare block.
21:35 pmichaud that seems reasoanble.
21:35 pmichaud *reasonable.
21:35 lorev sorry
21:35 lorev but anyone understands german here?
21:35 lorev es ist ziemlich hier jetzt, Wunder warum, <- what does this mean?
21:35 jnthn pmichaud: It's correct
21:36 jnthn pmichaud: The outer of the role body is just the main program body in a "role R { }" example.
21:37 pmichaud but it gets executed via a .loadinit, yes?
21:37 jnthn Yes
21:37 jnthn It's dynmaic chain is a loadinit
21:37 pmichaud that's likely an issue.
21:37 jnthn It's static one is not
21:37 jnthn pmichaud: Compare:
21:37 pmichaud because at the point it gets invoked,   the main program body hasn't been set_outered to the setting yet.
21:37 jnthn rakudo: role Foo { method m { say 42 } }; class C does Foo { }; C.new.m
21:37 pmichaud (indeed, the main program body isn't compiled yet)
21:37 p6eval rakudo d51e99: OUTPUT«Could not find sub &say␤  in 'm' at line 20:/tmp/lZXCGXQjLm␤  in main program body at line 20:/tmp/lZXCGXQjLm␤»
21:37 jnthn rakudo: my role Foo { method m { say 42 } }; my class C does Foo { }; C.new.m
21:38 p6eval rakudo d51e99: OUTPUT«42␤»
21:38 jnthn (my classes are not set up in a loadinit)
21:38 jnthn Or even
21:38 jnthn rakudo: role Foo { method m { say 42 } }; my class C does Foo { }; C.new.m
21:38 p6eval rakudo d51e99: OUTPUT«42␤»
21:38 pmichaud jnthn: see above.
21:38 mberends lorev: something like "it is fairly here now, wonder why". It may make more sense in context.
21:38 lorev mberends: thanks:)
21:38 jnthn pmichaud: Right, that's exactly the case.
21:39 pmichaud I don't know how to fix that.
21:39 jnthn Me either. :-(
21:39 pmichaud I mean, the role body needs an outer context at the point where it's executed, but its outer isn't finished compiling yet.
21:40 pmichaud wait
21:40 jnthn pmichaud: Well, it's been compiled, but the lexical relationshipos haven't been set up, that's for sure.
21:40 pmichaud with  "class C does Foo { }"
21:41 pmichaud when does the .loadinit for C get invoked?
21:42 timbunce joined #perl6
21:43 pmichaud jnthn: I think we need to just think about it some more :-)
21:43 jnthn pmichaud: The code to set up C goes into a .sub "!class_init_10" which is called from a loadinit attached to the main program body.
21:44 pmichaud jnthn: and it assumes that the role body has already been compiled, yes?
21:44 jnthn What do you mean by "compiled"?
21:44 jnthn But yes, it assumes that.
21:44 pmichaud already converted to PIR and loaded.
21:44 jnthn Just as class A is B { } assumes that B is already compiled in that sense.
21:44 pmichaud i.e., if you switched  the class init to be BEGIN, it wouldn't work.
21:44 DemoFreak joined #perl6
21:44 pmichaud because the role wouldn't be compiled yet (unless it was also done via BEGIN)
21:45 jnthn Right, it relies on the class and the role being compiled in the same "stage" (e.g. both in BEGIN or both in INIT) and the calls to the code to set them up being made in the order that they appear in the program.
21:46 jnthn I mean, with classes it's also the case that the outer isn't really set up either.
21:46 pmichaud okay, I think I have a partial answer, here.
21:46 gbacon joined #perl6
21:46 jnthn rakudo: INIT { C.m }; my $x = 42; class C { method m { say $x } } # curious
21:46 p6eval rakudo d51e99: OUTPUT«Could not find sub &C␤  in main program body at line 20:/tmp/ojV72FrLc5␤»
21:46 jnthn oh duh
21:46 pmichaud C not declared.
21:46 jnthn rakudo: my $x = 42; class C { method m { say $x } }; INIT { C.m } # this ;-)
21:47 p6eval rakudo d51e99: OUTPUT«Lexical '$x' not found␤  in 'C::m' at line 20:/tmp/5TkBcjmdhz␤  in main program body at line 20:/tmp/5TkBcjmdhz␤»
21:47 jnthn pmichaud: That is an exhibition of probably the same issue
21:47 pmichaud I'm thinking the solution is to have a very early .loadinit that sets the mainline's outer.
21:47 pmichaud so that it's done before the other .loadinits take place.
21:48 jnthn pmichaud: We just get lucky with classes because need to pre-declare = usually they don't get used until we got a pass over the class body to capture_lex 'em.
21:48 pmichaud right.
21:48 pmichaud anyway, early .loadinit on mainline sounds like what we need.
21:48 jnthn So it's not that classes lack the problem so much as it's less apparent.
21:48 jnthn Yes, that sounds promising.
21:48 pmichaud since I just refactored the startup sequence I'm familiar with it -- I'll give it a try.
21:49 jnthn pmichaud: Great - I haven't sync'd my branes up with the refactoring there yet.
21:49 pmichaud right
21:49 jnthn Guess this is a good time for me to read through it though.
21:49 pmichaud it's pretty simple now, although it may become more complex after this fix.
21:49 pmichaud but it still won't be overly complex.
21:50 pmichaud but yes, if we get the mainline set_outer'd properly before the other loadinits take place, I think that may solve it.
21:50 jnthn Wow, $*SETTING_MODE survived your refactoring. :-)
21:50 pmichaud it wasn't in my way :-)
21:50 pmichaud I get rid of things that get in my way :)
21:58 HarryS joined #perl6
21:59 pmichaud okay, we now have trouble that with   $x .= subst(/l/, 'o');    the caller of subst isn't the thing that has $/
21:59 pmichaud or, more to the point
22:00 pmichaud $x .= subst(/o+/, { $/.chars } )
22:00 pmichaud subst's caller isn't the closure's outer
22:00 jnthn pmichaud: Yeah, the .= helper needs to be a tad more invisible.
22:00 pmichaud (its caller is the .=)
22:01 Tene does a .subst set $/ in the context of the call?
22:01 pmichaud it sets $/ of the caller to .subst
22:01 jnthn pmichaud: .= is perhaps tweakable to deal with this.
22:01 Tene pmichaud: and the caller of .subst is the outer of the {}
22:01 jnthn pmichaud: Though not sure if that's the right approach.
22:02 pmichaud Tene: in the normal case, yes.
22:02 Tene That's how I always thought that that would work.
22:02 pmichaud but as currently implemented in rakudo,   $x .= subst(...)
22:02 pmichaud the caller of .subst is the   &infix:<.=>
22:02 pmichaud which is not the outer of the closure.
22:02 Tene ahh
22:02 Tene .= isn't just syntactic?
22:03 Tene I guess it wouldn't be.  Huh.
22:03 pmichaud foo() .= subst(...)    # can't be purely a syntactic transformation
22:04 pmichaud well, it *can*, but it's not simply    foo() = foo().subst(...)
22:04 Tene Right.
22:04 Tene Save the result in a temp, and then mutate.
22:04 jnthn Yeah, I've done it syntactically before and it's just messy.
22:04 * Tene nods.
22:04 jnthn Do-able though, for sure.
22:05 pmichaud we also have to deal with .*subst  and .?subst and the like
22:05 Tene You could also check the caller, and walk a step further out if it's .=, but that's kind of evil.
22:05 pmichaud so I don't think the answer is to simply fix  .=
22:05 TimToady or callframe(Mumble,1).my needs to have a proper Mumble that skips metas
22:06 bkeeler joined #perl6
22:06 Tene pmichaud: could you have .= bind its caller's $/ ?
22:06 pmichaud TimToady: does  .subst  assign to $/ or rebind it?
22:07 pmichaud Tene:  .= rebinding $/ to be its caller might work, yes.
22:07 TimToady depends on whether the defaulting to OUTER::<$/> is an alias or a copy
22:08 pmichaud currently the defaulting is an alias
22:08 pmichaud not a copy
22:08 TimToady so if you assign, the inside $/ leaks outward
22:08 TimToady further than it should
22:08 pmichaud correct.
22:08 Tene That wouldn't quite work in general, though, as any other method that referred to a CALLER:: would potentially break.
22:08 TimToady if it were copied in, you could assign
22:08 TimToady but with alias, I think bind is needed
22:09 TimToady to unalias it
22:09 pmichaud so,  if we have
22:10 Guest20767 joined #perl6
22:10 pmichaud 'abc' ~~ /./;   'def'.subst(/e/, { 1 });    #  $/ is set to 'e'
22:10 pmichaud 'abc' ~~ /./;   { 'def'.subst(/e/, { 1 }); }   #  $/ is set to 'a'
22:10 TimToady maybe there's a 'is service' trait that refrains from allocating $_, $/, or $!, and CALLER always skips those
22:11 pmichaud TimToady: does what I just wrote seem correct?  i.e., .subst setting $/ doesn't leak outside of the block?
22:11 TimToady or just starts searching for those dynamic variables, and doesn't find 'em, so keeps on going to the user's code
22:12 TimToady we already have search for dynamic vars, I presume
22:12 pmichaud if we have some way of designating a sub/block that doesn't have a $_, $/, or $! that helps a bit
22:12 pmichaud because we can indeed use dynamic vars there.
22:12 pmichaud we've run into some issues where converting a helper sub to core/p6 has introduced an unwanted $/  dynamic var
22:13 TimToady well, how 'bout 'is helper' or some such
22:13 TimToady and you always have to write everything explicitly in helpers
22:13 pmichaud seems reasonable
22:14 TimToady that seems like a cleaner course to me
22:14 pmichaud so then .subst always sets the dynamic $/ ?
22:14 pmichaud (excluding its own, of course)
22:14 TimToady .subst itself could be marked 'helper'
22:14 pmichaud true
22:15 pmichaud but it still sets the dynamic $/ ?
22:15 pmichaud and is that an assign or a bind?  ;-)
22:15 TimToady if we know $/ is dynamic, then it would always just look for where it occurs innermost
22:15 pmichaud I thought that $/ was always dynamic.  (It was at one point)
22:17 pmichaud S02:2695
22:17 pmichaud " (C<$_>, C<$!> and C<$/> are always
22:17 pmichaud dynamic, as are any variables whose declared names contain a C<*> twigil.)
22:17 pmichaud "
22:17 TimToady yes, but the new trick is not to create one every level
22:17 pmichaud right
22:17 pmichaud no problem there.
22:17 pmichaud so then my question is still "assign or bind"?
22:18 TimToady and may answer is still, depends on how it's initialized to OUTER
22:18 pmichaud okay
22:18 pmichaud and we don't know that yet?
22:18 TimToady you said it's an alias, so you need a rebind
22:18 pmichaud (currently  we have    $/ = OUTER::<$/>, almost like a parameter  bind
22:18 pmichaud er
22:18 TimToady if it were a copy, you could assign
22:18 pmichaud $/ := OUTER::<$/>
22:19 HarryS_ joined #perl6
22:19 pmichaud I guess my question is really "do you think it should be a copy or an alias?"
22:19 pmichaud i.e., if I have:
22:20 TimToady well, alias is cheaper when it works, but if so, we have to be able to rebind a dynamic var in place
22:20 pmichaud 'abc' ~~ '.';   if $other { 'def' ~~ /./ };    say $/
22:20 pmichaud or even
22:20 pmichaud 'abc' ~~ '.';   if $other { $/ = 'hello'; };    say $/
22:20 TimToady that should keep the outer $/ the same, yes
22:21 TimToady I think...
22:21 pmichaud and I meant /./ above, not '.'
22:21 TimToady nod
22:21 pmichaud and "outer $/ the same" meaning "result of the match, not of the inner assignment"?
22:21 pmichaud c.f.
22:21 TimToady yeah, sorry
22:21 sbp (cf.)
22:21 pmichaud $_ = '3';   if $other { $_ = '4' };   say $_;
22:21 TimToady but that kinda implies not an alias
22:22 TimToady or some kind of COW
22:22 pmichaud well, "alias"  is really something along the lines of "is rw"
22:22 pmichaud "not an alias"  is really something along the liens of "is copy"
22:22 pmichaud *lines
22:23 TimToady can we make subst's $/ := match rebind the caller's lexical $/ slot?
22:23 pmichaud yes, I think so.
22:24 pmichaud I mean, I know we can do it in rakudo.
22:24 pmichaud (might have to do some tricks, but yes.)
22:24 TimToady so dynamic variables are bvalues, potentially
22:24 TimToady $*ENV := my_new_env
22:24 pmichaud oh, I see what you're saying.
22:24 TimToady that's what it implies
22:24 pmichaud we do have a   store_dynamic_lex opcode available to use, yes.
22:24 pmichaud it rebinds the symbol itself, as opposed to the container.
22:25 pmichaud so yes, I can do bvalue there
22:25 TimToady considering you had to look it up in a name space somewhere, it had to have traversed its bvalue somehow :)
22:25 pmichaud well, looking it up is   find_dynamic_lex
22:25 pmichaud and it just gives me the container, not the the pad
22:25 pmichaud but yes, I can rebind it.  :-)
22:25 TimToady you'd need the pad to replace the pointer to the container
22:25 pmichaud store_dynamic_lex replaces it in the pad
22:26 TimToady maybe doing that needs a MONKEY_PATCHING equivalent
22:26 TimToady or permissing from the var
22:26 TimToady *sion
22:27 TimToady or we just say its erroneous if the optimizer has assumed a particular binding and you change it
22:27 TimToady I think certainly we shouldn't allow rebinding of a dynvar that is intialized with ::=
22:28 pmichaud is that true for vars in general or only dynvars?
22:28 * TimToady doesn't know, but likes generality when it doesn't get in the way
22:28 IllvilJa joined #perl6
22:29 pmichaud well, last interpretation of ::= that I had was that vars could be rebound.
22:29 pmichaud since it's the same as parameter binding
22:29 pmichaud (read-only parameter binding, taht is)
22:29 TimToady right
22:29 TimToady I'm pretty consistently inconsistent. :)
22:30 pmichaud anyway, your current feeling is that setting of $/ by .subst and .match shouldn't leak into outer scopes?
22:30 TimToady perhaps there's an 'is rebindable' trait that is default on for parameters
22:30 pmichaud I can make that work for now and see what happens.
22:31 TimToady but could default to off in other places; but it would be on for $/ and $! and $_ too
22:31 pmichaud seems like is rebindable would be defaulted on for most everything
22:31 pmichaud except dynvars, maybe.
22:31 TimToady the optimizer might like it off for most lexicals
22:31 pmichaud right
22:37 pmichaud time for lunch here
22:37 pmichaud bbl
22:40 HarryS joined #perl6
22:52 kfo joined #perl6
22:53 kid51 joined #perl6
23:05 DemoFreak joined #perl6
23:07 masonkramer joined #perl6
23:07 jimk joined #perl6
23:07 DemoFreak joined #perl6
23:11 dalek rakudo: 98163f7 | jonathan++ | src/Perl6/Actions.pm:
23:11 dalek rakudo: Fix generation of attribute initializers so that the generated anonymous method
23:11 dalek rakudo: is in the correct lexical scope. Needs a little care not to break the case where
23:11 dalek rakudo: we have attribute initializers inside parametric roles that reference the role
23:11 dalek rakudo: parameters too.
23:11 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/98163f71d754123f10a193bab1eff64b966bfe3c
23:11 xabbu42 joined #perl6
23:12 eternaleye joined #perl6
23:18 TimToady rakudo: module Foo; class A is export {}
23:19 p6eval rakudo d51e99: OUTPUT«===SORRY!===␤Could not find sub &chars␤»
23:19 jnthn ...uh.
23:20 jnthn Looks like a meta-error. :S
23:20 TimToady I can't rewrite TrigTestSupport to be happy to STD without exporting classes, sigh
23:21 jnthn Oh?
23:21 colomon what's up with it?
23:21 * jnthn looks at it
23:21 TimToady well, currently it just pokes some packages into global that aren't related to the name of the file
23:22 TimToady so STD picks up the first package name, and saves a AngleAndResult.pm.syml file
23:22 jnthn TimToady: Is that STD limitation or Rakudo fail?
23:22 TimToady so I try making it a module TrigTestSupport;, and then I have to export
23:22 jnthn TimToady: Rakudo looks in the namespace and and spots the typenames.
23:23 TimToady STD uses the package name, not the file name, because otherwise it doesn't know where in foo/bar/baz/blech.pm the module name starts
23:23 TimToady could be blech, or baz::blech, or bar::baz::blech
23:23 jnthn Ah, OK
23:23 TimToady so it assumes all modules have a class name matching the 'use' name
23:23 TimToady (or module name, package name really)
23:23 TimToady but TrigTestSupport breaks that
23:25 colomon would it work if it were renamed AngleAndResult.pm?
23:25 TimToady no, because then the other classes wouldn't show up in the .t
23:26 sorear is what TrigTestSupport does considered good form?
23:26 TimToady probably not PBP  :)
23:27 sorear P6BP?
23:35 TimToady the more fundmantal problem is that rakudo is treating the argument to 'use' as primarily a filename rather than primarily a module name
23:39 TimToady there is a piece of data out there named 'module Foo::Bar;' and 'use Foo::Bar;' needs to find that piece of data regardless of how that name gets mapped onto storage, which might not even be a file system
23:42 TimToady iow the module name space is intended eventually to be completely independent of filesystem names in the same sense that URLs are
23:44 ingy greetings!
23:44 ingy TimToady: wanna help me design a language?
23:44 jnthn TimToady: Well, we already have module location and module loading factored out into different classes, which are called from the actions. So it's already separated out somewhat.
23:45 ingy TimToady: I need an infix operator for `index`
23:45 TimToady so write one :)
23:45 ingy TimToady: I'm just askin for that TimToady feel, man
23:46 ingy it's not for p6
23:47 ingy it's an assertion op for testml. this string contains that string...
23:48 TimToady well, there's always 'this string' ~~ /that string/
23:48 TimToady if you only care about whether
23:48 jnthn ~.. (at start of string), ..~ (at end of string), ..~.. (somewhere in the string) ;-)
23:48 Tene .u ELEMENT OF
23:48 phenny U+2208 ELEMENT OF (∈)
23:48 Tene Why not that?
23:48 TimToady er, cause strings aren't sets?
23:48 Tene Eh, I guess.
23:50 Tene .u CONTAINS AS A MEMBER
23:50 phenny Tene: Sorry, no results for 'CONTAINS AS A MEMBER'.
23:50 lue they can be if you look at them as a series of bytes :)
23:50 ingy I was considering ~~, but this is a DumpMatchâ„¢
23:50 ingy grr
23:50 ingy DumbMatchâ„¢
23:51 jnthn lue: Nooooooooo!!!!! :-)
23:52 ingy lue: sets have unique elements
23:52 lue "hello there".powerset # muhahahahahahaha
23:52 * ingy is probably wrong :)
23:53 * lue now has an idea to create infinite cardinals in P6 (again)
23:56 Psyche^ joined #perl6
23:59 sorear I wonder if it would make any sense to declare that final classes don't have undefined type objects.

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

Perl 6 | Reference Documentation | Rakudo