# IRC log for #perl6, 2009-03-18

All times shown according to UTC.

Time Nick Message
00:00 TimToady std: constant π = atan2(1,1)*4; say π;
00:00 p6eval std 25878: OUTPUT«ok 00:05 42m␤»
00:00 p6eval std 25878: OUTPUT«Undeclared routine:␤   π used at 1 ␤ok 00:02 34m␤»
00:01 TimToady rakudo: constant π = atan2(1,1)*4; say π;
00:01 p6eval rakudo 521a5f: OUTPUT«Malformed declaration at line 1, near "\u03c0 = atan2("␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
00:02 * skids learns cats do not cover their mouths when sneezing.  The hard way.
00:03 jnthn skids: Yeah, but they're cute... :-)
00:04 jferrero joined #perl6
00:07 TimToady actually, right out of S04:
00:07 TimToady std: constant Num π  = atan(2,2) * 4;
00:07 p6eval std 25878: OUTPUT«ok 00:02 35m␤»
00:07 FurnaceBoy joined #perl6
00:08 TimToady jnthn: it probably takes LTM with backoff to work right though
00:09 TimToady since the lexer can't determine whether an identifier is a type or not
00:09 TimToady and whichever you guess first, it might be wrong
00:11 TimToady rakudo: constant π = atan2(1,1)*4; say π / 4;  # s/b term, not listop
00:11 p6eval rakudo 521a5f: OUTPUT«Malformed declaration at line 1, near "\u03c0 = atan2("␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
00:11 TimToady std: constant π = atan2(1,1)*4; say π / 4;  # s/b term, not listop
00:11 p6eval std 25878: OUTPUT«ok 00:02 35m␤»
00:11 jnthn s/b?
00:11 jnthn oh
00:12 TimToady e() is an error
00:12 jnthn Does that need LTM or just knowing what is a typename?
00:12 jnthn We already do the later.
00:12 TimToady a name, if not a typename
00:12 jnthn OK.
00:12 TimToady in any case, a value that doesn't expect an arg
00:13 jnthn *nod*
00:13 TimToady though in a sense, what you say is not inaccurate, since any value may behave as a type
00:13 TimToady which is why sub foo (1) {...} works
00:13 jnthn Aye, I need to look at how STD.pm parses that.
00:13 jnthn And replicate it best I can in Rakudo.
00:14 jnthn After that it's pretty easy to get the rest of the way since it's just like \$ where 1
00:14 TimToady type_constraint includes <value> as an alternative
00:14 jnthn Aha.
00:15 jnthn OK, that's probably not going to be hard at all then.
00:15 TimToady that's what distinguishes noun from value
00:15 moritz_ that's.. unintuitive
00:15 jnthn Wait, does what mean "my 1 \$x" works?
00:15 jnthn std: my 1 \$x
00:15 p6eval std 25878: OUTPUT«##### PARSE FAILED #####␤Malformed "my" declaration at /tmp/38iwWDqMFO line 1:␤------> [32mmy [31m1 \$x[0m␤    expecting scoped declarator␤FAILED 00:02 34m␤»
00:15 TimToady that's not a type_constraint as used by parameter
00:16 jnthn oh, type_constraint, not...right. :-)
00:16 jnthn std: our Int multi foo()
00:16 p6eval std 25878: OUTPUT«##### PARSE FAILED #####␤Malformed "our" declaration␤Malformed "multi" definition␤Malformed routine definition at /tmp/mrSwOc5LCl line 1:␤------> [32mour Int multi foo()[31m[0m␤FAILED 00:02 34m␤»
00:16 TimToady type_constraint is only used by parameter
00:17 jnthn TimToady: With regard to the above, I thought this is what:
00:17 jnthn | <fulltypename>+ <multi_declarator>
00:17 jnthn Inside rule scoped
00:17 jnthn Is handling?
00:17 jnthn I'm fine with it not being valid syntax, but that line in STD.pm makes me think it should be accepted?
00:18 TimToady it's probably a regression from the constant fix
00:18 jnthn OK, so the thing you were saying a couple of days back was wrong was things like "Int multi foo()"
00:18 alc joined #perl6
00:18 jnthn Without a scope declarator before it?
00:19 TimToady huh, it parses here...
00:19 TimToady oh, you need {...}
00:19 jnthn oh duh
00:19 jnthn Sorry
00:19 japhb jnthn: where are you posting rakudo day updates these days?  I seem to have lost the link ....
00:19 jnthn Missed them by accident...
00:20 jnthn japhb: http://use.perl.org/~JonathanWorthington/journal/ and on rakudo.org
00:20 japhb jnthn: thanks!
00:20 jnthn Erm. But rakudo.org is a bit...sub-optimal...for finding them at the moment.
00:21 jnthn (alester++ already said he'd deal with that when I asked though)
00:21 [particle]2 joined #perl6
00:21 japhb Yeah, I think that before the design change, that's what I had been using.
00:21 jnthn Best for now is http://www.rakudo.org/tracker
00:21 jnthn But really needs something with just stories on it.
00:21 jnthn And linked to as Blog or News from the top.
00:22 jnthn Anyway, I keep posting at both.
00:22 japhb excellent.
00:22 jnthn This issue aside, rakudo.org is a bit improvement over before for people coming to it wanting to know how to get and play with Rakudo etc.
00:22 jnthn *big
00:23 japhb nodnod
00:23 skids rakudo: my \$a; my \$b; my \$c; :(Str \$a, Num \$b, Int \$c) = "OH HAI", 5.4, 3;
00:23 p6eval rakudo 521a5f: OUTPUT«too few arguments passed (0) - 3 params expected␤current instr.: '_block14' pc 40 (EVAL_17:28)␤»
00:24 skids not implemented yet?
00:24 * jnthn tries to remember if that's meant to work...
00:25 jnthn I think it is meant to...
00:25 jnthn So yes, unimpl.
00:25 skids It's sorta implied in I think S03 and was kinda left not firmly decided on p6l.
00:25 jnthn std: my \$a; my \$b; my \$c; :(Str \$a, Num \$b, Int \$c) = "OH HAI", 5.4, 3;
00:25 p6eval std 25878: OUTPUT«ok 00:04 39m␤»
00:26 jnthn Well, it parses.
00:26 skids It'll make the S&M folks happy in coroutines, so I hope it stays in the spec.
00:27 skids Yeah the typecheck fiends.
00:27 skids (Not that types aren't very useful mind you :-)
00:28 jnthn Oh, I'd rather have typed \$a, \$b and \$c in that case...
00:28 jnthn At the point of declaration.
00:28 jnthn I mainly see the signature syntax like that really useful for unpacking.
00:29 jnthn Mmmm...unpacking. Want to implement. :-)
00:29 skids Yeah there's no declaration of yield points, really, unless we define a special syntax.
00:30 skids http://www.abrij.org/~bri/S17.tempurl.pod
00:30 skids What I'm leaning towards so far on S17, the notes on coroutines in specific.
00:31 jnthn skids: Ah, you're hacking on S17?
00:31 skids wayland asked me to, yes.
00:31 jnthn Cool.
00:32 jnthn I'm too tired now to give reviewing that the attention it needs. I'll try and do it soon. Poke me if I forget.
00:33 skids will do.  Really I'm not comitting it yet because I want it "quietly" glossed over by each implementation more as a question than an assertion.
00:34 skids And I don't have a pugs svn bit anyway :-)
00:35 jnthn Sure.
00:35 jnthn I'll try and give some decent feedback.
00:35 jnthn I'm interested in working on concurrency stuff.
00:35 skids I'm interested in working concurrency stuff :-)
00:39 skids where has wayland been at BTW?
00:40 jnthn Don't remember seeing wayland today...
00:40 jnthn Well, people have lives. :-)
00:40 skids Some people at least :-)
00:41 jnthn I even managed to have some offline time recently. ;-)
00:41 skids I suppose the day job counts, sorta.  I mean, I'd be more pathetic without one. :-)
00:42 jnthn I work from home, so don't get that excuse to head out each day.
00:44 jnthn When I take vacation I tend to spend a lot of it outdoors as a result.
00:44 skids I don't think I'd even bother to get dressed :-)
00:44 jnthn I do take the liberty of sleeping until 10am or 11am and staying up until 2am-3am. :-)
00:45 jnthn I actually work better that day.
00:45 jnthn *way
00:45 jnthn Dunno why.
00:45 skids Yeah me too actually, but office hours are what they are.  Dunno why either.
00:46 jnthn I guess equally there's something nice about having a job you can leave at 5pm or whatever and know the day's work is done (if you have a job that doesn't cause you a bunch of overtime, that is...)
00:47 skids Or tethered to a pager :-/
00:47 Tene Let's see if my mail to perl6-users goes through.
00:47 * jnthn should probably subscribe to p6u
00:47 Tene I remember having trouble posting last time I tried.
00:48 Tene Hmm.  I don't see it showing up... Maybe it's going to take a while...
00:48 jnthn Tene: Is p6u quite low traffic?
00:48 Tene jnthn: i see seven messages in the last five days.
00:48 jnthn Ah, that's fine.
00:48 Tene I have no idea how typical that is.
00:55 s1n joined #perl6
01:03 pugs_svn r25879 | lwall++ | [STD] improve error message when {...} is required
01:08 * jnthn -> sleep
01:28 pugs_svn r25880 | lwall++ | create more semantic distance between terms and 0-ary functions
01:32 pugs_svn r25881 | lwall++ | [STD] treat COMPILING:: as deferred scope
01:32 pugs_svn r25881 | lwall++ | [constant.t] uneval tests, use fudge now when necessary
01:33 TimToady someone will need to fudge that ^ test for rakudo
01:35 [particle]1 joined #perl6
01:37 Kimtaro joined #perl6
02:28 Tene My mail still hasn't gone through to perl6-users
02:28 Tene anyone know who maintains it that I could harass?
02:32 ced-2 joined #perl6
02:35 Kisu joined #perl6
03:37 sahadev rakudo: my %hash; my @array = 1..3; %hash{'a1'} = @array; say "hash => ", %hash.perl; @array = 'a'..'c'; say "array modified => ", @array.perl; say "hash => ", %hash.perl
03:37 p6eval rakudo 521a5f: OUTPUT«hash => {"a1" => [1, 2, 3]}␤array modified => ["a", "b", "c"]␤hash => {"a1" => ["a", "b", "c"]}␤»
03:44 meppl good night
03:47 s1n anyone seen "could not locate method 'map' to invoke..."?
03:54 Tene s1n: what code?
03:55 s1n Tene: trying to get my fork back up to date
03:55 s1n Range in particular
03:55 s1n i'm wondering if there was a change elsewhere that i missed
03:55 Tene does Range have a map method?
03:56 s1n supposed to, see t/spec/S03-operators/range.t
03:56 pugs_svn r25882 | putter++ | [elfparse] <![foo]> are now zero width.  ./elfdev -r1 -e 'say 3' works.
03:57 Tene s1n: right, but there's no .map() method defined on Range.
03:58 Tene This would be a good choice to implement in the Setting
03:58 s1n Tene: currently, that test will pass and is not fudged
03:58 s1n that indicates to me there _is_ a map method
03:59 Tene s1n: what test?
03:59 s1n maybe on something it inherited
03:59 s1n S03-operators/range.t
03:59 s1n #77, near the bottom
04:00 pugs_svn r25883 | lwall++ | [STD,viv] viv -6 now produces a perfect copy of STD.pm
04:00 pugs_svn r25883 | lwall++ | (now to rewrite gimme5 as viv -5...)
04:01 Tene s1n: okay, but that *doesn't* work for you?
04:01 s1n Tene: let me know if anything pops out at you
04:01 Tene It passes for me.
04:01 s1n oh no it passes
04:01 s1n for the upstream
04:01 s1n i'm trying to get my fork back in shape and it's failing there
04:02 Tene What fork?
04:02 s1n github fork
04:02 Tene Okay.  What have you been patching there?
04:02 s1n small Range related things
04:03 s1n but i'm going to get it back to it (it's a little dated), and i was just wanting to know what added the map function to range
04:03 Tene Okay, it's probably related to your changes, I'd suspect.
04:04 s1n maybe but i suspect it's related to poor fork management, i'm missing something that is in the upstream
04:05 Tene s1n: look at src/setting/Any-list.pm
04:05 s1n hmm, no diffs
04:05 Tene that's where map() is defined.
04:08 s1n i really don't want to have to refork
04:09 Tene Sorry I can't help.
04:09 s1n if anyone has any ideas, github.com/s1n/rakudo, i need to know what gave Range support for map/grep
04:09 Tene s1n: it comes through Any-list.pm
04:10 Tene I told you
04:10 s1n Tene: i'm still inheriting that, so there must be something else
04:10 pugs_svn r25884 | lwall++ | [viv] clean out deadwood from older implementation
04:11 s1n Tene: see github.com/s1n/rakudo/blob/master/src/classes/Range.pir
04:12 s1n 'parent'=>'Any'
04:13 s1n i'll have to come back to this tomorrow
04:13 s1n bed&
04:24 Kimtaro_ joined #perl6
04:35 awarefish joined #perl6
04:40 alester joined #perl6
04:43 frooh joined #perl6
04:44 frooh s1n: you here?
04:57 PacoLinux_ joined #perl6
05:05 NoirSoldats joined #perl6
05:11 Kimtaro joined #perl6
05:28 Kimtaro joined #perl6
05:59 WootKit joined #perl6
06:12 Kimtaro_ joined #perl6
06:20 dalek rakudo: 1ca2109 | (Stephen Weeks)++ | build/Makefile.in:
06:20 dalek rakudo: Fix a bug with rakudo trying to rebuild pbc_to_exe
06:20 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1ca21097287003b9a222d787f768370b8fb71f1d
06:21 DemoFreak joined #perl6
06:31 ewilhelm_ joined #perl6
06:42 maerzhase joined #perl6
07:35 moritz_ rakudo: (1..5).map: { \$_ * 2 }
07:35 p6eval rakudo 1ca210: RESULT«[2, 4, 6, 8, 10]»
07:36 mberends joined #perl6
07:38 amoc rakudo: map { \$_ * 2} 1..5
07:38 p6eval rakudo 1ca210: OUTPUT«Statement not terminated properly at line 1, near "1..5"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
07:38 amoc rakudo: map { \$_ * 2}, 1..5
07:38 p6eval rakudo 1ca210: RESULT«[2, 4, 6, 8, 10]»
07:39 maerzhase joined #perl6
07:41 clkao_ joined #perl6
07:41 bacek joined #perl6
07:43 kcwu_ joined #perl6
07:47 Matt-W Morning
07:48 mberends Matt-W, morning! how is Form coming along?
07:48 Matt-W Just filed perl #63958 which is kind of a blocker at the moment
07:49 Matt-W well, it is for some things
07:49 Matt-W problems with modules including other modules or something of that sort
07:49 Matt-W very strane
07:51 moritz_ Matt-W: can you work around it by using the short name? ie B instead of A::B::B?
07:51 Matt-W no, because that triggers another bug for wihch the workaround is to use the fully-qualified name
07:53 mberends maybe A::A is a container around the module A::B declaration. Then the true path would be A::A::A::B::B for the role
07:54 Matt-W ow
07:54 Matt-W ow ow ow
07:54 Matt-W that has to be a bug!
07:54 Matt-W although it must be said, there are some hints in the backtrace that this might be what Rakudo's doing
07:55 moritz_ Matt-W: it might be easiest do define the roles and classes directly with their long name, and not to put them into a separate module
07:55 quappa joined #perl6
07:55 Matt-W that would just be a workaround though
07:57 moritz_ it would
07:57 moritz_ better than being blocked
07:57 mberends moritz_, did you get to \$*PROGRAM_NAME yesterday? I think it should be \$?PROGRAM_NAME, but the former is how it currently works
07:57 moritz_ it's good that you submitted the ticket, but don't let it block you if there's a workaround
07:58 moritz_ mberends: I didn't, but I didn't tried really hard either
08:04 Matt-W moritz_: turns out saying A::A::A::B::B does indeed work. Ewww.
08:05 Matt-W oh
08:05 Matt-W maybe it doesn't
08:05 Matt-W just shows up later instead
08:06 mj41 joined #perl6
08:10 zamolxes joined #perl6
08:11 Matt-W oooh I think I found another bug
08:13 birefringent joined #perl6
08:13 Matt-W aww crap
08:13 Matt-W not a simple test case
08:13 riffraff joined #perl6
08:14 moritz_ http://www.perlmonks.org/?node_id=751341
08:15 Matt-W Somehow I've managed to trigger an infinite loop by calling a subroutine
08:16 Matt-W and no, it's not one that has an infinite loop in it
08:19 Matt-W this is too mysterious for my cold-fuddled brain
08:20 Matt-W I'll probably go back to bed once I've called work to say I'm not coming
08:34 masak joined #perl6
08:42 maerzhase1 joined #perl6
08:54 viklund joined #perl6
08:57 viklund masak: are you planning on commiting prakashk's patch to proto now?
08:57 masak viklund: haven't gotten that far yet.
08:57 viklund masak: ok, I'll do it then, if that's ok
08:57 masak it is.
08:57 masak I trust your judgment. :)
08:59 viklund I feel honoured
09:00 masak viklund: and I still feel a bit deflated after last night. but that's ok. :)
09:01 masak as long as good software is the end result...
09:02 jferrero joined #perl6
09:03 moritz_ why are there so many open branches? do they still all server a purpose?
09:03 masak moritz_: not most of them, no.
09:03 masak I know there is a way to remove them, but it's not obvious to me.
09:04 moritz_ masak: http://github.com/guides/remove-a-remote-branch
09:04 masak moritz_: gracias.
09:04 viklund dang, moritz_ got there first
09:05 masak he often does.
09:06 viklund ;)
09:06 moritz_ well, I have to have some kind of qualification :-)
09:07 masak moritz_: remind me never to duel you in the sunset.
09:08 * moritz_ reminds masak never to duel him in the sunset
09:13 amoc joined #perl6
09:18 masak viklund: origin/tests, do we need that one open?
09:22 bacek joined #perl6
09:27 viklund masak: no
09:27 * masak axes it
09:27 viklund masak: plugin is so out of date that it can be removed too
09:27 masak ok
09:28 masak those left now are asterisk, dispatch, and mediawiki-lists.
09:28 masak I've @asked ihrd about the two first ones, and the last one is still kinda useful to me.
09:33 masak moritz_: do you have a suggestion for a plan of action with this UTF-8 bytes thingie?
09:34 masak myself, I'm considering using the ord value and producing the bytes in Perl 6 for now.
09:35 masak doing it with Parrot's help would be ideal, but there seem to be several barriers related to that right now.
09:36 moritz_ masak: I broke the PIR barrier yesterday night, but I don't see any light in breaking the byte string barrier
09:36 ced-2 joined #perl6
09:39 masak moritz_: what do you think of my plan to do it all in Rakudo for now, then?
09:39 masak UTF-8 encoding/decoding, how hard can it be?
09:40 * Matt-W hides
09:40 masak http://en.wikipedia.org/wiki/UTF-8#Description
09:40 moritz_ afaict we have bit wise operations
09:40 clkao joined #perl6
09:40 moritz_ on integers
09:40 moritz_ that should be all you need
09:40 masak right.
09:41 masak I think I'll do it TDD, with at least one character from each row in the Wikipedia article's table.
09:41 masak oh, they even probide those for me :)
09:41 masak bot not now. maybe tonight. need to &WORK() a little.
09:42 moritz_ in theory you also need a Buf type
09:42 moritz_ but I think in practice you can get away without one for now
09:43 masak I'll leave a few RAKUDO comments.
09:43 * masak is thinking of a little script that can manage RAKUDO comments.
09:45 plu_ joined #perl6
10:02 kappa joined #perl6
10:04 kappa are there any estimates when www.parrot.org will be up again?
10:06 bacek kappa: с добрым утром :) Wrong channel. #parrot at irc.perl.org little bit better
10:07 moritz_ anyway, doesn't seem like they know it over there
10:07 kappa bacek: thanks :) i tried #parrot here but it's empty
10:08 * bacek personally thinks that using PHP for site was "good idea"
10:08 moritz_ kappa: #parrot on irc.perl.org, not on freenode
10:08 bacek kappa: EWRONGSERVER, not freenode, irc.perl.org
10:09 kappa yes, EWRONGSERVER
10:09 bacek moritz_: is it possible to get purl on #perl6?
10:10 moritz_ bacek: it might, but I'd kick it out as soon as I have op
10:10 bacek moritz_: why?
10:10 moritz_ it's sufficiently annoying in #parrot already, and we have lambdabot to annoy us here
10:11 bacek good point.
10:13 ArtVandalae joined #perl6
10:14 * masak fully agrees with moritz_
10:14 kappa joined #perl6
10:14 masak purl is in obvious breach of many of the robot laws.
10:15 ArtVandalae left #perl6
10:15 bacek Apart from examples "how to" we need few "how not to" :)
10:16 masak indeed.
10:19 ced-2_ joined #perl6
10:24 ejs joined #perl6
10:26 masak Matt-W++ # [perl #63958]
10:27 bacek rakudo: sub foo(Callable \$c) { \$c() }; foo(eval "die")
10:27 p6eval rakudo 1ca210: OUTPUT«invoke() not implemented in class 'Undef'␤current instr.: 'foo' pc 134 (EVAL_17:64)␤»
10:28 bacek rakudo: sub foo(Callable \$c) { \$c() }; foo eval 'sub quux (\$.x) { ... }';
10:28 p6eval rakudo 1ca210: OUTPUT«too few arguments passed (0) - 1 params expected␤current instr.: 'quux' pc 46 (EVAL_20:33)␤»
10:29 Matt-W masak: very irritating that. I just wish I could figure out why another bit of code seems to be going into an infinite loop
10:29 Matt-W masak: it doesn't even get as far as any loops I wrote
10:30 masak Matt-W: time to insert a few debug print statements, then.
10:30 Matt-W yes
10:30 Matt-W I did
10:30 Matt-W it calls a subroutine
10:30 Matt-W then chews up one core of my processor
10:30 Matt-W and never prints the 'say' which is on the first line of that sub
10:30 Matt-W I haven't been able to make it do it in a test case yet
10:31 masak sounds interesting.
10:31 jnthn morning
10:32 Matt-W morning jnthn
10:32 Matt-W masak: you could say that
10:32 masak jnthn: OH HAI
10:33 * jnthn is getting his sleep times more out of sync with daylight hours again... :-|
10:34 ced-2 joined #perl6
10:34 cizra joined #perl6
10:34 cizra Is it true that you can just slap a keyword onto a for-loop in Perl 6 and the loop will executed in parallel fashion, in multiple threads?
10:35 masak jnthn: did I meantion that when I started observing my own sleep (writing it down, more or less), it became much, much more regular and 'effective'?
10:36 masak cizra: well, usually we use other constructs than for loops for parallelism.
10:36 masak cizra: I'll see if I can find a Spec reference or two for you.
10:36 jnthn hyper map
10:36 cizra masak: don't bother
10:36 moritz_ cizra: there's 'hyper' for that
10:37 masak cizra: too late :) http://perlcabal.org/syn/S12.html#Parallel_dispatch
10:37 cizra I'm just interested whether Perl 6 has thought about the ease of parallel programming.
10:37 moritz_ it has.
10:37 masak cizra: it has.
10:37 moritz_ and the compiler is allowed to parallelize lots of constructs
10:37 moritz_ like junction autothreading and hyper operators
10:38 cizra nice. Thanks.
10:38 cizra left #perl6
10:41 aindilis` joined #perl6
10:41 moritz_ could anybody please verify that rakudo passes t/spec/S12-class/declaration-order.t now without throwing a backtrace?
10:45 masak moritz_: sure. just have to rebuild first.
10:45 disismt joined #perl6
10:46 pugs_svn r25885 | moritz++ | [t/spec]  fudged scoped-named-subs.t for Rakudo
10:49 kappa joined #perl6
10:50 s1n frooh: i'm here for a few minutes while i get ready for work
10:50 s1n frooh: what's up?
10:50 kappa left #perl6
10:50 kappa joined #perl6
10:50 kappa left #perl6
10:50 * jnthn wonders if we hit 7,250 tests yet.
10:52 moritz_ jnthn: not quite. But I'm adding three test files now (just running spectest to be sure...)
11:18 ujwalic joined #perl6
12:03 FurnaceBoy joined #perl6
12:05 FurnaceBoy joined #perl6
12:12 rodi joined #perl6
12:29 Kimtaro joined #perl6
12:36 asura_king joined #perl6
12:36 asura_king left #perl6
12:40 dalek rakudo: a197d2a | (Moritz Lenz)++ | t/spectest.data:
12:40 dalek rakudo: more passing test files for t/spectest.data
12:40 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a197d2a2335b1f1a5e5b07cd8b471285e32c35cc
12:42 moritz_ jnthn: now we have 7255 passing tests
12:44 jnthn moritz_++
12:44 jnthn Good number to reach for the release. :-)
13:05 garme joined #perl6
13:05 garme left #perl6
13:12 riffraff joined #perl6
13:21 skids joined #perl6
13:40 Matt-W moritz_++
13:41 Matt-W everyone++
14:13 Exodist joined #perl6
14:17 Diederich-HireMe joined #perl6
14:29 ced-2_ joined #perl6
14:38 ced-2__ joined #perl6
14:40 [particle]1 joined #perl6
14:41 estrabd joined #perl6
14:50 xinming joined #perl6
14:59 frioux rakudo: sign -5
14:59 p6eval rakudo a197d2: RESULT«-1»
15:00 jnthn rakudo: sign "of the beast"
15:00 p6eval rakudo a197d2: RESULT«0»
15:00 frioux joined #perl6
15:04 masak rakudo: sign 1\i
15:04 p6eval rakudo a197d2: OUTPUT«Statement not terminated properly at line 1, near "\\i"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
15:04 masak rakudo: sign 1.i
15:04 p6eval rakudo a197d2: OUTPUT«Method 'i' not found for invocant of class 'Int'␤current instr.: 'parrot;P6metaclass;dispatch' pc 637 (src/classes/ClassHOW.pir:161)␤»
15:04 masak rakudo: sign i
15:05 p6eval rakudo a197d2: OUTPUT«Could not find non-existent sub i␤current instr.: '_block14' pc 53 (EVAL_16:38)␤»
15:05 masak g'ah! :)
15:05 masak rakudo: sign 1i
15:05 p6eval rakudo a197d2: RESULT«1»
15:05 masak rakudo: sign -1i
15:05 p6eval rakudo a197d2: RESULT«1»
15:05 jnthn fail
15:05 masak I still think we ought to fix that one.
15:05 jnthn ....I think...
15:06 masak I submitted a rakudobug about it.
15:06 jnthn masak: Yeah, it's a bit complex though.
15:06 masak :P
15:06 masak jnthn: there are two approaches. either return nothing (i.e. fail), or return a normalized complex number.
15:06 masak one can argue either way; there are use cases for both approaches IMHO.
15:07 frodwith joined #perl6
15:09 masak and people have done so on p6l.
15:22 PerlJam joined #perl6
15:22 oskie joined #perl6
15:23 xinming joined #perl6
15:26 jan_ joined #perl6
15:37 PacoLinux_ joined #perl6
15:39 sri_kraih joined #perl6
15:43 moritz_ there is a different method for returning only the angular part (ie normalized complex number)
15:44 masak also, and perhaps more importantly, sign is supposed to return the _sign_ of a number.
15:44 masak that only makes sense for reals.
15:44 masak I tend to like generalising, but not in this case.
15:44 jnthn Making it only accept a Num or Int would probably do.
15:45 jnthn In that case
15:45 masak complex numbers aren't Num? :)
15:45 * masak hides
15:46 orafu joined #perl6
15:46 mberends masak: testing proto on a clean Debian Live, the new tarfile downloader exits with "Couldn't move Perl 6" because the projects directory has not yet been created :(
15:47 masak mberends: I spent yesterday evening getting a good bashing by viklund for the Perl 5 bootstrapper.
15:47 masak a well-deserved one, I might add.
15:48 mberends bash, bash
15:48 mberends and we moved from bash to perl5
15:48 masak mberends: if you change anything in there, don't do any ambitious changes, because it's all being replaced.
15:48 masak either by me or viklund.
15:48 masak whoever pushes first. :)
15:50 mberends I have other stuff to work on anyway, and was just preparing to test some Pod stuff under proto. I'll see when you push.
15:53 hercynium joined #perl6
15:53 masak I'll give it a shot too. thanks for the heads-up.
15:58 mberends your Mock::Parser is finding application in a non-testing scenario as well :)
16:08 masak waitwait, my what?
16:08 ruoso joined #perl6
16:09 * masak fears that the day has come when he has forgotten a Perl 6 module he wrote
16:09 mberends the role you added to the Pod::Parser test suite
16:09 masak oh! that one. :)
16:09 masak good, good.
16:09 mberends the day has indeed come.
16:09 masak carry on.
16:09 ruoso Hello!
16:09 lambdabot ruoso: You have 1 new message. '/msg lambdabot @messages' to read it.
16:10 masak mberends: I _did_ thing it sounded familiar somehow. :)
16:10 mberends heh
16:17 dalek joined #perl6
16:19 ejs1 joined #perl6
16:21 clintongormley joined #perl6
16:35 M_o_C joined #perl6
16:35 maerzhase joined #perl6
16:37 moritz_ @tell pmichaud if you want to do some rakudo publicity, you could answer http://www.perlmonks.org/?node_id=751341
16:37 lambdabot Consider it noted.
16:52 mikehh rakudo (a197d2a) builds on parrot r37546 - make test/make spectest PASS - Kubuntu Intrepid i386
16:54 masak neat.
16:55 Diederich-HireMe quick question: where can I look for a comprehensive list of all Perl6 modules?
16:55 Diederich-HireMe I'm thinking about implementing my Tie::DNS in Perl6
16:55 Diederich-HireMe and maybe Proc::Swarm
16:55 moritz_ Diederich-HireMe: I don't there's such a list...
16:56 Diederich-HireMe nod..didn't think so
16:56 Psyche^ joined #perl6
16:56 Diederich-HireMe specifically, I need to know if any work's been done on Net::DNS
16:56 moritz_ seems like not
16:56 moritz_ I've heard of none, at least
16:57 Diederich-HireMe nod
16:57 Diederich-HireMe I'll send the author a note
16:57 Diederich-HireMe I've been watching Perl6 since 2000,
16:57 Diederich-HireMe and I finally think 'this is the one'
16:59 moritz_ good ;-)
17:00 Diederich-HireMe what do you think? :)
17:00 masak Diederich-HireMe: yes, this is the one.
17:00 [particle]1 i think rakudo is the one, too.
17:00 masak these are the droids you're looking for.
17:00 Matt-W It is the most exciting programming language I've ever seen
17:00 moritz_ Diederich-HireMe: I spend half of my free time on the test suite, articles and on Rakudo development - is that answer enough? ;-)
17:01 Diederich-HireMe oh, it's a given that Perl6 is The Bomb as far as a programming language
17:01 Diederich-HireMe what most people say is that it's too much
17:01 Diederich-HireMe and maybe that's true...it's certainly taken long enough to get here
17:01 Diederich-HireMe but I do believe in it
17:01 Matt-W Do they?
17:02 Matt-W Most people I've spoken to think it'll never exist
17:02 Diederich-HireMe for some definition of 'they', yes :-)
17:02 Diederich-HireMe that's what I mean, Matt-W
17:02 ejs joined #perl6
17:02 Diederich-HireMe 'too much to get done'
17:02 Matt-W Or that by the time we do have a 'complete' compiler, something else will have superceded it
17:02 Diederich-HireMe yeah
17:02 Matt-W But usually they're just not paying attention
17:02 Diederich-HireMe definitely
17:03 Diederich-HireMe some of the stuff in Pugs was really exciting
17:03 moritz_ it was
17:03 moritz_ sadly audreyt became sick
17:03 Diederich-HireMe (even excluding the the test suite..)
17:03 Diederich-HireMe the multi-backend stuff was awesome
17:04 Matt-W fortunately we still have rakudo, which is awesome
17:04 masak it would be interesting to review the Pugs source.
17:04 Diederich-HireMe nod
17:07 Diederich-HireMe hm...is it not available?
17:07 Diederich-HireMe (pugs source)
17:07 Matt-W it should be!
17:07 ruoso it is
17:07 Diederich-HireMe ok...dang, that was an odd moment :)
17:07 moritz_ http://svn.pugscode.org/pugs
17:07 masak it's available, but it's large, so reviewing will be a big effort.
17:07 Diederich-HireMe nod
17:08 Diederich-HireMe yeah, I knew about the URL,
17:08 ruoso and requires haskell knowledge.. which seems like a bigger challenge then its size
17:08 Diederich-HireMe but I got the vague impression from you guys that it may not be available
17:08 Matt-W ruoso: not really, once you have the haskell knowledge it's still scary
17:08 ruoso heh
17:08 moritz_ maybe you need approximately the genius level as audreyt
17:09 Diederich-HireMe yeah, she seemed quite bright
17:09 Matt-W as long as it's not the kind of code I kept having to read doing my PhD
17:09 Matt-W where you have to read somebody else's thesis to understand what's going on
17:09 Diederich-HireMe damn
17:09 moritz_ but I don't understand the perl5 source doe either
17:09 Diederich-HireMe that sounds ugly
17:10 Diederich-HireMe I've heard that Perl5 source has gotten a lot cleaner in 5.10
17:10 Diederich-HireMe but I don't know for sure
17:11 moritz_ well, it's not dirty... it's just... no C code. 95% of all code is some macros which you'd have to look up
17:11 Matt-W well it certainly didn't stop them implementing given and state and some other cool stuff in 5.10
17:11 moritz_ aye
17:12 Matt-W I must admit I've never looked
17:12 ruoso p5 code is not that bad...
17:12 ruoso it's just that it retains backward compatibilty for a long time
17:12 ruoso which is a good idea
17:12 ruoso and one of the reasons why p5 is core in almost any *nux machine
17:13 ruoso *nix, that is
17:13 Diederich-HireMe yeah
17:13 Diederich-HireMe agreed, ruoso
17:13 Diederich-HireMe it's a 'good' and 'bad' thing
17:13 ruoso but the fact that when you retain mistakes for 25 years, it becomes  a burden
17:13 Matt-W hence Perl 6
17:13 Diederich-HireMe aye
17:15 ruoso otoh, CPAN wouldn't be so great if the modules became non-functional every 2 years
17:16 ruoso but if my plan goes well, perl 5.12 will run Perl 6 code ;)
17:17 Diederich-HireMe where I can I see your plan, ruoso?
17:17 Diederich-HireMe ruoso, do you have another name you can share I might know?
17:17 ruoso http://www.perlfoundation.org/perl6/index.cgi?smopp5
17:18 Diederich-HireMe thanks
17:20 Matt-W ruoso: wow, I didn't realise you were intending to do that. That could be extremely cool.
17:20 pugs_svn r25886 | ruoso++ | [re-smop] give a better description of what s0native is
17:20 masak ruoso: what Matt-W said.
17:21 Matt-W masak: hey, stop sharing my thought patterns!
17:21 ruoso masak, Matt-W, that plan was already seen by some p5p people... and it seems to be doable
17:21 masak Matt-W: I was going to say the same to you!
17:21 Matt-W masak: I guess I'm still faster :P
17:22 masak Matt-W: or at least that's what I allow you to think :P
17:22 Matt-W yeah yeah because my irc link has negative lag, so I can say things before I've actually typed them
17:23 masak convenient.
17:24 pmurias joined #perl6
17:24 pmurias joined #perl6
17:25 ruoso hi pmurias
17:25 pmurias ruoso: hi
17:25 lambdabot pmurias: You have 2 new messages. '/msg lambdabot @messages' to read them.
17:26 * moritz_ senses some problems with causality, but decides not to tell the universe, it might not notice ;-)
17:27 * masak debates with himself whether /msg-ing on #perl6 constitutes 'telling the universe' or not
17:29 ruoso pmurias, I think we can already move to smop-gc, can't we?
17:30 pmurias ruoso: yes
17:30 ruoso I realized smop-gc also requires an special capture
17:30 ruoso so it can call DESTROYALL
17:31 ruoso invocant-only-capture
17:31 ruoso but that is subject to gc
17:31 ruoso (or maybe not)
17:31 ruoso actually, it doesn't need to be
17:31 ruoso the gc knows when it is created
17:31 ruoso and when it ceases to exist
17:32 ruoso it can be manually managed
17:32 pmurias gc could be aware of the native capture...
17:32 ruoso I'd like to avoid doing circular dependencies at that level
17:36 ruoso the disadvantage would be requiring every object to be aware of this type
17:36 ruoso besides native capture
17:37 ruoso unless, of course, we define the binary structure of the native capture in s0native
17:37 pmurias so extracting of positionals will need to be polymorphic?
17:37 ruoso well... it already needs to be...
17:38 ruoso we aren't doing it yet (even in the original smop code)
17:38 ruoso but my point is about defining SMOP__NATIVE__capture at s0native
17:39 pmurias SMOP__NATIVE__capture is gc'ed
17:39 ruoso the s0native capture wouldn't be...
17:39 ruoso then it would be replaced by the one that is
17:39 kidd__ joined #perl6
17:40 ruoso hmmm
17:40 ruoso actually
17:40 ruoso s0native capture can have its own gc embedded into itself
17:40 ruoso that doesn't call DESTROYALL
17:40 ruoso that's actually a good idea
17:40 ruoso because we avoid requiring a DESTROYALL call to every capture...
17:41 ruoso when it reaches 0 refcnt, it simply calls RELEASE in all its members
17:41 ruoso pmurias, what do you think?
17:42 pmurias seems resonable
17:42 ruoso cool
17:43 ruoso pmurias, in fact
17:43 ruoso capture could have a module on its own
17:43 ruoso since it doesn't fit into the "not subject to gc" category that defines s0native
17:45 pugs_svn r25887 | ruoso++ | [re-smop] capture now goes into its own module, before gc
17:45 meppl joined #perl6
17:47 ruoso pmurias, are you planning to implement capture?
17:52 TimToady I've decided the term "result object" must die (probably in favor of "abstract object" or some such), and .rob changes to .ast
17:53 TimToady of all the uses of the term "result" in S05, very nearly none of them are talking about result objects
17:54 TimToady or maybe "abstract result"
17:54 [particle]1 .ast++
17:55 [particle]1 (result object)--
17:55 disismt joined #perl6
18:08 maerzhase1 joined #perl6
18:14 pugs_svn r25888 | ruoso++ | [re-smop] document the reference/release policy as part of 01_base.pod
18:21 * literal . o O (hm, is there a problem domain in which a C<some> junction would be useful?)
18:23 ujwalic joined #perl6
18:23 ruoso literal, how is that different from any?
18:24 diakopter more than 1?
18:24 diakopter er, "not all"
18:24 literal some would give a random amount of the items composing the junction
18:24 pugs_svn r25889 | lwall++ | Destroy the term "result object" in favor of "abstract object" and AST-Think.
18:24 literal like "give me some of those"
18:25 diakopter like .pick, but more than once without replacement
18:25 [particle]1 .any .some .many .most .all
18:26 [particle]1 and don't forget .none and .few
18:27 literal :)
18:28 ruoso TimToady, I think it'd be nice to have some examples of bad uses of junctions, explaining why, and what would be the correct way of expressing that
18:28 TimToady might be easier just to make .eigenstates a private method  :)
18:28 Ariens_Hyperion_ joined #perl6
18:30 ruoso TimToady, if junctions were treated as native types (in the sense that they are not regular objects)... it would probably make such uses less likely to happen
18:30 TimToady but it's easy to define the bad uses of junctions; any final use that isn't a boolean context is almost certainly wrong
18:30 [particle]1 maybe Junction should be called UnSet
18:30 literal AntiSet
18:31 Matt-W or just Junction
18:31 [particle]1 \$x!eigenstates;
18:31 TimToady so to play with eigenstates you'd have to use MONKEY_PATCHING and augment Junction to trust you
18:32 wolverian http://use.perl.org/comments.pl?sid=42574&amp;cid=67841 has a question about overriding role methods in classes. I'd like to know what the motivation is for allowing that to happen silently, too
18:32 * ruoso wonder if it makes sense for Junction to be Object at all...
18:33 TimToady providing .eigenstates to the casual user is like handing a bazooka to a five-year-old
18:33 wolverian explicitly marking the overriding seems preferable to me.
18:33 [particle]1 i just like it for the comics
18:35 * skids votes normalized complex, but demoted to Num or Int if it's on the real plane.
18:35 skids Oh dear, my buffer was all the way up
18:36 skids hehe
18:36 ruoso making the Junctions "native" types also makes it easier to detect the autothreading
18:36 jnthn ruoso: The auto-threading just falls nicely out of multiple dispatch.
18:36 TimToady and single, for that matter
18:37 jnthn And Object gives you then a way of saying "I don't care if it's a junction or not"
18:37 jnthn Yes, and single too. :-)
18:38 jnthn ruoso: In general, auto-threading just falls out of other things failing, rather than something to pro-actively detect, or so it's turned out in Rakudo anyway.
18:38 alester joined #perl6
18:38 ruoso rakudo: class Bla is Junction { method bar { say 1 } }; Bla.bar;
18:38 p6eval rakudo a197d2: OUTPUT«1␤»
18:39 ruoso is there a way to build a junction programatically?
18:40 jnthn all(), any() ...
18:40 [particle]1 tpf has been accepted into gsoc 2009!
18:40 jnthn Yay!
18:40 ruoso right... but how do I create a Bla from the example above? while still behaving like a junction...
18:41 ruoso rakudo: class Bla is Junction { method bar { say 1 } }; my \$a = Bla.new(:type<any>, :eigenstates(1,2,3)); \$a.say
18:41 p6eval rakudo a197d2: OUTPUT«Bla<0xb66804c0>␤»
18:41 [particle]1 TimToady: phone in 80m, correct, not 20m?
18:42 [particle]1 ta
18:42 jnthn ruoso: Not sure...guess something like that may make sense.
18:42 jnthn Don't think it's spec'd.
18:42 ruoso I mean... that's the only reason for it being Object
18:42 ruoso otherwise it could be a native type
18:43 TimToady there's much to be said for calling it "junction" instead of "Junction"
18:43 TimToady as in, you may not add to the representation of this
18:43 jnthn Would Object still accept it, though?
18:43 ruoso TimToady, that's precisely my point...
18:44 ruoso jnthn, yes... because Object accepts everything
18:44 jnthn OK, then fine.
18:44 jnthn Whether it's capitalized matters relatively little to me..
18:44 ruoso rakudo: sub foo(Object \$a) { say \$a }; my int \$a = 4; foo(\$a);
18:44 p6eval rakudo a197d2: OUTPUT«Malformed declaration at line 1, near "int \$a = 4"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
18:44 TimToady well, we try to be consistent about the native types being in lower case
18:45 ruoso doesn't rakudo support typed variables yet?
18:45 jnthn ruoso: Sure it does.
18:45 ruoso what's wrong with my code above?
18:45 jnthn We just don't have the native types in place yet.
18:45 ruoso ah
18:45 ruoso right
18:45 ruoso pugs: sub foo(Object \$a) { say \$a }; my int \$a = 4; foo(\$a);
18:45 p6eval pugs: OUTPUT«4␤»
18:45 jnthn So it doesn't recognized int. Int woulda been fine.
18:45 ruoso jnthn, but it misses my point ;)
18:45 TimToady rakudo: say int ~~ Object
18:45 p6eval rakudo a197d2: OUTPUT«0␤»
18:46 ruoso pugs: say int ~~ Object
18:46 jnthn ruoso: So does Pugs because IIRC it doesn't enforce type checks. ;-)
18:46 p6eval pugs: OUTPUT«*** ␤    Unexpected "~~"␤    at /tmp/ZnUIFPUdL9 line 1, column 9␤»
18:46 jnthn rakudo: say int.WHAT
18:46 p6eval rakudo a197d2: OUTPUT«No applicable methods.␤␤current instr.: '_block14' pc 59 (EVAL_16:38)␤»
18:46 ruoso pugs: say int.does(Object)
18:46 p6eval pugs: OUTPUT«1␤»
18:46 jnthn rakudo: say int(42.5)
18:46 TimToady couldn't we just replace most of those long rakudo messages with "Huh?"...
18:46 p6eval rakudo a197d2: OUTPUT«42␤»
18:47 ruoso pugs: say int.does(Any)
18:47 p6eval pugs: OUTPUT«1␤»
18:47 ruoso hmm...
18:47 jnthn Ah, some "int" built-in is getting in the way.
18:47 jnthn ruoso: I'd expect int to do Any too.
18:47 ruoso right...
18:47 ruoso it's junction that wouldn't do Any
18:47 jnthn Right.
18:48 TimToady we're going to have to outlaw "int \$x"
18:48 ruoso why?
18:48 TimToady if int is a type, it doesn't look for a following arg
18:48 TimToady so it's 2 terms in a row
18:48 TimToady int(\$x) would be okay
18:48 ruoso ah...
18:49 ruoso for one second I thought you were talking about "int \$x" in "my int \$x"
18:49 wolverian TimToady: do you have time to convince me allowing composing classes to override role methods implicitly is a good idea?
18:49 TimToady er, because I said so?  :P
18:50 wolverian well, have you convinced yourself? :)
18:50 ruoso what does you mean by "composing classes"/
18:50 jnthn wolverian: It's the way you resolve conflicts.
18:50 ruoso we usually use the term "composing roles" or "inheriting classes"
18:50 wolverian ruoso: the class composing the role(s) into itself
18:51 wolverian jnthn: right, but you can then accidentally override a method you didn't mean to override.
18:51 ruoso er...
18:51 ruoso how do you accidentally write a method?
18:51 TimToady the methods you find in a role should only be considered canonical interfaces, but the implementations are only suggestions
18:51 wolverian ruoso: role Foo { method bar { ... } } class Quux does Foo { method bar { ... } } # but I didn't remember Foo has a method bar
18:52 TimToady anyway, gotto go eat lunch...
18:52 ruoso wolverian, the point is that roles shouldn't include methods that are not crucial to its API
18:52 wolverian TimToady: okay, I'm fine with Perl 6 not requiring explicit overriding, it's just that many languages have moved to requiring the explicit marking, or at least finding it useful.
18:52 ruoso that's what private methods and lexical subs are for
18:52 wolverian yeah.
18:53 wolverian I still prefer e.g. scala's "override def bar = ..."
18:53 ruoso wolverian, but roles are also supposed to be the way to implement interfaces
18:53 ruoso so that would require too many "override" definitions
18:53 wolverian if there is no implementation you're not overriding anything
18:53 ruoso roles are interfaces with a default implementation
18:53 wolverian (no implementation in the role)
18:53 ruoso but the methods are there...
18:54 wolverian but they have no bodies...
18:54 ruoso and it can be considered a compile-time warning if that is not overridend
18:55 ruoso s/warning/error/
18:55 wolverian I'm talking about the other situation
18:55 wolverian where you have a default implementation and you accidentally override it
18:55 ruoso I see, but...
18:55 wolverian that's why scala requires you to mark the overriding method with "override", but _only_ if there is a default implementation in the trait
18:55 ruoso the cool thing about roles is that they don't need to be complete
18:56 ruoso so you only have the methods that define the API
18:56 ruoso if you don't know the API, that's another story
18:56 wolverian as in scala. so you think scala is uselessly verbose here?
18:56 wolverian I can understand that. :)
18:56 ruoso does scala support roles?
18:56 wolverian yes, but it calls them traits.
18:56 ruoso or does it only support classes?
18:56 wolverian (as in the original paper.)
18:57 wolverian trait Foo { def bar: Int = 3 / } class Quux extends Foo { def bar = 2 }
18:57 wolverian er.
18:57 wolverian trait Foo { def bar: Int = 3 /* notice the default impl */ } class Quux extends Foo { def bar = 2 } // This fails at compile time
18:57 wolverian because of the lack of 'override' on Quux.bar
18:58 wolverian trait Foo { def bar: Int /* no default */ } class Quux extends Foo { def bar = 2 } // This compiles and runs correctly
18:58 wolverian trait Foo { def bar: Int = 3 /* notice the default impl */ } class Quux extends Foo { override def bar = 2 } // This also works, notice the 'override'
18:59 wolverian I'm fine with not requiring the override in perl6, I'm just wondering if that decision should be explained, given that some languages do require it
18:59 ruoso is that required for overriding regular class methods ?
18:59 wolverian I also would personally like the override.
18:59 wolverian ruoso: yes.
19:00 ruoso ok, in that case, the explanation is simply " TimToady said so... "
19:00 ruoso because it's really a design issue ;)
19:00 wolverian fine. :)
19:00 wolverian I suppose it is. thanks.
19:00 ruoso you can't actually tell which one is better
19:00 ruoso it's just a choice
19:00 ruoso but...
19:00 wolverian well, the scala requirement gives some additional checks at the cost of more typing.
19:00 * wolverian shrugs
19:00 ruoso I must say that traits in scala are not really the same as roles
19:01 ruoso as the class simply inherits from it
19:01 ruoso "to compose" is a different process than "to inherit"
19:01 PZt joined #perl6
19:02 ruoso the methods and attributes from the role are actually installed as if they were declared in that class
19:02 wolverian what makes you think scala uses inheritance for them?
19:03 wolverian from Programming in Scala: "                             Scala programmers “mix in” traits rather than
19:03 wolverian inherit from them, because mixing in a trait has important differences from
19:03 wolverian the multiple inheritance found in many other languages.
19:03 wolverian ugh. sorry.
19:03 szabgab does anyone here know how to build a new version of Syntax::Highlight::Perl6 ?
19:04 wolverian composing two roles with the same methods will fail at compile time if both methods have default implementations
19:04 wolverian I think that matches the perl6 behaviour.
19:04 ruoso wolverian, sorry the term "extends" mislead me to think that
19:04 wolverian yeah, it is misleading.
19:04 pugs_svn r25890 | lwall++ | kill off int as a prefix operator to avoid confusion with the type name
19:05 wolverian to compose additional roles, you say "class Foo extends Bar with Baz with ...", which is kind of natural, but I have no idea why the syntax doesn't allow "class Foo with Bar ..." :)
19:05 wolverian the first trait *must* be given with 'extends'. scala is full of weird stuff like that, somewhat like non-modern perl5 ;)
19:11 ruoso TimToady, "int is a type name now"... er... wasn't it always that way?
19:14 Ariens_Hyperion joined #perl6
19:15 TimToady ruoso: not in Perl 5...
19:16 ruoso ah
19:16 ruoso o
19:16 ruoso k
19:19 FurnaceBoy joined #perl6
19:20 pmurias joined #perl6
19:26 ruoso TimToady, is it ok for me to assume "junction" instead of "Junction" for SMOP?
19:26 ruoso or are you still pondering about it
19:31 TimToady go ahead, I guess--can't think of any reason not to
19:32 * jnthn mumbles about another thing he has to now change
19:32 jnthn Thankfully a small one.
19:34 ruoso TimToady, cool... that means SMOP will support junctions sooner, since it can be implemented in C
19:39 aindilis` joined #perl6
19:44 ruoso TimToady, in the same issue of deciding if some types are native or not... we once talked about capture becoming a native type as well but that never made into the spec... I'd argue that native capture will improve dispatching speed a lot, and will simplify a lot of things...
19:46 pugs_svn r25891 | lwall++ | junctions are now considered a native type with private eigenstates
19:47 maerzhase joined #perl6
19:47 szabgab I have a speed questions
19:47 szabgab \$line.split(/\|/) is very slow
19:48 pugs_svn r25892 | ruoso++ | [re-smop] solve the last circular dependencies by defining two new modules... nagc: native-types garbage collector (doesnt call DESTROYALL as a method) and lost: LOwlevel-STate machine, which implements a simple way of writing C code that doesnt recurse in the C stack.
19:48 szabgab when the \$line has 20 pipe separated parts it is much slower than the IO, reading the line from a file
19:48 szabgab is that "normal" ?
19:51 szabgab on a file with 1000 lines it is 4 sec compared to 40 sec (both including start-up time)
19:51 DemoPhreak joined #perl6
19:54 ruoso pmurias, please take a look at r25892...
19:55 pmurias ruoso: do we need junction to be written in C?
19:56 ruoso pmurias, being written in C or not is not actually the most important... but they no longer need to be p6opaque
19:56 ruoso which means that the implementation in smop level already suffices for the high-level
19:57 ruoso it doesn't need to be replaced by a full-blown Perl 6 type
19:57 ruoso as Hash, Array and others
19:58 pmurias i'm not sure that having lost as an array of function pointers as opposed to a switch is a good idea
19:58 ruoso I don't actually have a strong opinion about it
19:59 ruoso I just want to mean that it is simplified to the C level
19:59 disismt Hi all. GSoC ideas page says "This year only Parrot internals will be sponsored (i.e. nothing in languages/*)." --  Nothing in languages, what does that mean?
19:59 ruoso disismt, that no other parrot languages will be sponsored... but notice that rakudo has a slot on its own
20:00 ruoso pmurias, you can modify the text there to mean how you plan to implement ;)
20:01 pmurias i should be starting to write my own GSoC application...
20:01 disismt ruoso: ok got it :)
20:01 ruoso that's a great idea
20:02 pmurias ruoso: i'm not sure what should i choose to work on during GSoC
20:02 ruoso pmurias, btw... I was thinking that maybe we should change "#include <smop_base.h>" to "#include <smop/base.h>"
20:03 ruoso pmurias, I think this refactoring should be over by GSoC time
20:03 ruoso pmurias, so you could have a mildew-specific grant
20:03 ruoso like getting some types bootstrapped...
20:04 ruoso or solving the memory leaks (if the weak references doesn't solve it)
20:08 ruoso pmurias, I'm planning to start nagc... unless you already started it...
20:09 pugs_svn r25893 | putter++ | [elfparse] rx updates to spec: alias op changed from ':=' to '='; word-based metachar-ness.  Also:
20:09 pugs_svn r25893 | putter++ | t/rx_capture: fixed tests - some mob @ from positions were wrong.
20:09 pugs_svn r25893 | putter++ | remains_of_Regexp_ModuleA.pm: fixed a quantifier-modifier parser bug, causing regressions (eg 'a*:').  Regressions accepted into baseline.
20:09 pugs_svn r25893 | putter++ | README: dusting.  emit5: dropped obsolete Regexp::Common dependency.
20:09 pugs_svn r25893 | putter++ | IRx1_FromAST2_create.pl: additional p6 metachars, and a fix.
20:09 pmurias ruoso: feel free to start nagc
20:10 ruoso pmurias, btw... I think I found a name to the other gc
20:10 ruoso p6gc
20:10 ruoso since it calls DESTROYALL
20:10 ruoso which is defined by the Perl 6 spec
20:10 pugs_svn r25894 | pmurias++ | [re-smop] changed smop_*.h to smop/*.h
20:10 pugs_svn r25895 | coke++ | Correct minor typo in metadata.
20:10 pugs_svn r25895 | coke++ | (... unless that's Welsh, in which case my bad.)
20:11 aindilis` joined #perl6
20:12 pugs_svn r25896 | ruoso++ | [re-smop] renames "gc" to "p6gc"
20:18 Diederich-HireMe joined #perl6
20:19 aindilis` joined #perl6
20:22 pugs_svn r25897 | putter++ | [elfparse] Parser3.pm: condition parse Match trees to look more like STD_blue's.  Enables binops.  'say 3+2' now works.
20:30 mncharity joined #perl6
20:30 Topic for #perl6is now http://perl6-projects.org/ | nopaste: http://sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: http://irc.pugscode.org/ | ~280 days 'til Xmas
20:34 TimToady ruoso: at a guess, the capture native type does the Capture role, and so does Match, but Match is not derived from capture
20:34 wolverian joined #perl6
20:34 ruoso TimToady, hmmm... that means we have both a native and a non-native capture then
20:34 ruoso and the invocation should support both
20:35 kidd joined #perl6
20:35 mncharity TimToady I note in passing that we don't have a 'sequence commit' rx op.  We can commit a group, and individual (quantified) atoms, but not a sequence of atoms (one has to go through the sequence and add : to anything that can backtrack).  The lack has always seemed to me odd, and encountering it again, I mention it.
20:35 * mncharity reverts to not getting involved in p6 language design issues.
20:38 jnthn (perl6-projects)++
20:39 mncharity hmm, err, no.  "one has to go through the sequence and add : to anything that can backtrack" is wrong.
20:40 mncharity no...  for example,
20:41 mncharity [ a+ b+ X c || a b ]    where X is a sequence commit op.  so,
20:42 TimToady what semantics do you want there
20:42 mncharity re [a+ b+]: ,  ah, ok.  :)    that will do it.
20:43 TimToady you want it to try the || a b after, right?
20:43 mncharity indeed.
20:43 mncharity yes.  thanks!
20:45 mberends joined #perl6
20:45 justatheory joined #perl6
20:59 moritz_ so how do I get the eigenstates of a Junction now?
21:00 ruoso you don't
21:00 ruoso ;)
21:00 ruoso a junctino is not a set
21:00 moritz_ is there a good reason to forbid it?
21:00 ruoso so people don't use junctions as sets
21:01 moritz_ anyway, in terms of testing this is a disaster
21:02 moritz_ because it means that junctions can only be tested in a meaningful way when monkey patching is also implemented
21:02 mncharity TimToady/anyone: looking at current STD.pm, I'm puzzled on how statementlist matches " 3".  if  role foo { a }  doesn't mean  regex foo { <.ws> a }, I'm missing where the <.ws> is coming from.    Context:  token block {...  '{' ~ '}' <statementlist>  }
21:03 ruoso moritz_, you can always test the individual values in bool operations
21:03 TimToady mncharity: statementlist is a rule, not a token
21:03 * ruoso later &
21:03 moritz_ ruoso: that's *much* more verbose than .eigenstates.sort.join('|')
21:04 TimToady maybe junction trusts Test :)
21:04 moritz_ remind me, how many implementations do trust relations?
21:04 mncharity s/role/rule/.   so  rule foo { a }  ==  regex foo { <.ws> a }   I gather.  ok, hmm...
21:05 TimToady well, the point is that we're designing the language for the users, not the testers, and the users were fast in the process of turning it into a faq
21:05 moritz_ ok, so now the FAQ will read "how do I get the eigenstates?"
21:05 TimToady I don't care if Test cheats all over the place
21:06 TimToady they do if you put them inside an any()
21:06 TimToady a set in list context just returns its elements
21:07 TimToady and any provides a list context
21:07 moritz_ ;-)
21:07 * frioux looks forward to being offended by Larry Wall
21:07 moritz_ (going meta)++
21:08 TimToady yes, well, going meta can also be used to escalate--, I've noticed...  :)
21:08 * moritz_ shouldn't comment further on the topic before having had a good deal of sleep first
21:09 TimToady I'm sure we can work something out, if only by saying here's a method, but you don't see it
21:09 TimToady I just wanted to make a point about the relationship of junctions to people who lead unexamined lives
21:09 moritz_ maybe I just need to write the universal "are these junctions identical" sub
21:10 TimToady or just dig through the reflectoin api to turn the private method into a sub ref :)
21:10 moritz_ anothing thing... can you query the type (any|all|none|one) of a junction somehow?
21:10 moritz_ *another
21:11 TimToady I don't mind providing low-level HERE_BE_DRAGONS primitives to access junction internals
21:12 TimToady we know we need low-level stringify for instance
21:12 moritz_ .eigen-HERE-BE-DRAGON-states ;-)
21:12 TimToady or print will get into an infinite regress calling Str(\$j)
21:13 TimToady there have to be some fundamental 'only' subs down at the bottom somewhere, I expect
21:13 [particle]1 what would any/all/none/one be named, direction?
21:14 TimToady something like quantitative assertions, only shorter
21:14 moritz_ "collapse type"
21:15 * moritz_ misses the smiley on TimToady's last suggestion ;-)
21:15 TimToady "I don't know what these particles' polarization is, but I do know they're out of phase..."
21:15 [particle]1 i like entanglements
21:16 TimToady I was thinking of you particularly
21:16 moritz_ but it's not good from the physical analogy
21:16 [particle]1 it's properly huffmanized, too :)
21:16 grwi joined #perl6
21:16 moritz_ better
21:16 [particle]1 then i'd expect the velocity to change
21:17 [particle]1 ...though i wouldn't know it.
21:17 moritz_ velocity? wrong abstraction layer, I think
21:17 [particle]1 well, if i observe position, i don't know velocity, or acceleration
21:18 [particle]1 wavefunction?
21:19 moritz_ speaking of testing... I slowly feel that I've lost overview over which spec changes need to be ported to the test suite
21:20 TimToady some of that I check with STD
21:20 [particle]1 eigenbasis doesn't quite fit, does it. sounds nice, though.
21:21 TimToady I think s/Junction/junction/ is the main outstanding issue at the moment, at least where we're not using Junction as a role name
21:21 TimToady but if it is a role, then there's no big rush, since Junction will stay syntactically legal at least
21:21 [particle]1 moritz: in the early days of pge, i put the version of S05 in the test file comments, so i knew how much needed to be reviewed.
21:21 moritz_ the ones that fit from a physics POV measurement, collapse and observation are the most accurate ones
21:21 TimToady there's probably some \$() to .ast damage in there somewhere
21:22 * moritz_ can't type straight anymore
21:22 moritz_ TimToady: don't think so, \$() and make() rarely occur in the test suite
21:22 [particle]1 that's a long-requested item for compiler-writers
21:23 TimToady [particle]: indeed, that's one of the reasons it's there
21:23 [particle]1 \$() occurs in parrot-based compilers much more than in p6spectests
21:23 TimToady some would argue that should be the default %() meaning, but I expect .tokens is good enough
21:23 TimToady if .tokens returns only the captured bits, what is the name of the method that includes the noise in between
21:24 [particle]1 ah. i wondered what the syntax would be. .tokens or .submatches or .rules i could get used to
21:24 TimToady .lexemes seems a bit harsh  :)
21:24 moritz_ that sounds like a disease ;-)
21:25 TimToady actually, Match.comb almost works for the tokens-only
21:26 ejs joined #perl6
21:26 TimToady Match.split would be the whitespace, and Match.split Z Match.comb would give you both  :)
21:26 pugs_svn r25898 | putter++ | [elfparse] Add a leading RxASpace to rules.  std.pm: unpod block.
21:28 TimToady actually, I could argue that Match.split returns everything, and match.comb just the good bits
21:28 [particle]1 Match.sticks
21:28 TimToady but I think .chunks and .tokens is probably better
21:29 TimToady since Match can be used in string context, so they might just want a resplit or recomb
21:29 TimToady not to be confused with a combover
21:29 [particle]1 or a weave
21:30 TimToady .bits and .goodbits  :)
21:30 [particle]1 .kibbles and .bits
21:31 [particle]1 .form and .anti-form
21:34 amoc joined #perl6
21:35 pugs_svn r25899 | moritz++ | [t/TASKS] lists of spec changes that need to be ported to the test suite
21:48 pasteling "yrlnry" at 158.130.70.56 pasted "intersecting two arrays" (18 lines, 336B) at http://sial.org/pbot/35607
21:49 dalek joined #perl6
21:50 szabgab rakudo: "anc;ed".split(";")
21:50 p6eval rakudo a197d2: RESULT«["anc", "ed"]»
21:50 szabgab rakudo: split("anc;ed", ";")
21:50 p6eval rakudo a197d2: RESULT«[";"]»
21:51 pasteling "yrlnry" at 158.130.70.56 pasted "intersecting two arrays" (25 lines, 465B) at http://sial.org/pbot/35608
21:51 szabgab is that a rakudo bug or a sign that I should go to sleep ?
21:51 jnthn moritz_: For test - don't worry, I can make eigenstates not go away too soon. ;-)
21:51 * [particle]1 schools yrlnry
21:52 jnthn moritz_: At lesat, not until we have trusts...though I as of yet have no idea how to implement trusts.
21:53 jnthn (Also, having just put in yesterday .eigenstates on Object and it now looks like i need to rip that out again, I'm not really motivated to chase the spec too closely on this stuff...)
21:53 jnthn (Of course, anyone who is more motivated than me can...)
21:53 moritz_ jnthn: yes, give it some slack...
21:54 jnthn I suspect at most I'll alias junction to Junction too.
21:54 jnthn To give people a migration path.
21:54 jnthn If they indeed need one.
21:54 jnthn (That is, if Junction will be wrong.)
21:54 moritz_ I don't know about "they", but I'd appreciate one
21:55 [particle]1 now it's .ast
21:55 jnthn [particle]1: See, the good thing is that you just thought about it. ;-)
21:55 moritz_ I've .ast in src/settings/Match.pm
21:56 jnthn Hmm. I hope Junction (uppercase) can perhaps stay as a role done by (lowercase) junction
21:56 jnthn (first-upper)
21:56 [particle]1 moritz_++ # now do nqp ;)
21:56 jnthn Otherwise I have the fun of explaining to people why to write Object / Any (or show what Any is, anyway) but then to write junction when explaining auto-threading.
21:58 jnthn moritz_: Bit troubled about the sub foo(0) { } syntax after your post...good catch.
22:00 dalek rakudo: f8b6aee | (Moritz Lenz)++ | src/setting/Match.pm:
22:00 dalek rakudo: implement Match.ast
22:00 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f8b6aeec564dfa79162b3f6b53302afdc2f33b19
22:04 jnthn moritz_: Ah, see follow-up I just sent to the list...we can improve it after all I think.
22:13 moritz_ jnthn++ nice idea
22:22 amoc rakudo: [split("ab;c;", ";"), "ab;c;".split(";")]
22:22 p6eval rakudo f8b6ae: RESULT«[";", "ab", "c", ""]»
22:23 jnthn Probably will have my catch-up Rakudo day (second this week, since I was away at start of month) on Friday.
22:23 amoc rakudo: split(";", "ab;c;")
22:23 p6eval rakudo f8b6ae: RESULT«["ab", "c", ""]»
22:52 sri_kraih is there a public repo for the Web.pm thingy?
22:52 ruoso joined #perl6
22:52 moritz_ sri_kraih: http://github.com/masak/web/tree/master
22:53 sri_kraih moritz++
22:54 * ruoso back
22:55 |jedai| joined #perl6
22:56 moritz_ rakudo: my \$c = { [+] @_ }; say \$c(2, 3, 4)
22:56 p6eval rakudo f8b6ae: OUTPUT«7␤»
22:58 amoc oh?
22:58 moritz_ oh! ;-)
22:58 DemoPhreak joined #perl6
22:59 amoc moritz_: could you please explain why \$c(2,3,4) prints 7 ?
22:59 moritz_ amoc: \$c is closure that expects any number of arguments, and the arguments are stored in @_
23:00 moritz_ amoc: and [+] @list is short for @list[0] + @list[1] + @list[2] + ...
23:00 moritz_ oh.
23:00 mncharity lol
23:00 amoc but 2+3+4 is 9 isn't it?
23:00 moritz_ and it should print 9, right?
23:00 moritz_ yes.
23:00 moritz_ oh!
23:00 jnthn std: multi sub fib (0|1) { return @_[0]
23:00 jnthn }
23:00 p6eval std 25900: OUTPUT«##### PARSE FAILED #####␤Malformed multi␤Malformed routine␤Malformed routine␤Unable to parse multisig; couldn't find final ')' at /tmp/mCkPsMagbX line 1:␤------> [32mmulti sub fib (0[31m|1) { return @_[0][0m␤    expecting any of:␤  param_sep␤      parameter␤
23:00 p6eval ..post_constraint␤   trait␤ ...
23:00 amoc rakudo: my \$c = { say @_ }; say \$c(2,3,4)
23:00 jnthn std: multi sub fib (0|1) { return @_[0] }
23:01 p6eval rakudo f8b6ae: OUTPUT«34␤1␤»
23:01 p6eval std 25900: OUTPUT«##### PARSE FAILED #####␤Malformed multi␤Malformed routine␤Malformed routine␤Unable to parse multisig; couldn't find final ')' at /tmp/Ewqdakx8jF line 1:␤------> [32mmulti sub fib (0[31m|1) { return @_[0] }[0m␤    expecting any of:␤        param_sep␤      parameter␤
23:01 p6eval ..post_constraint␤   trait...
23:01 moritz_ so it seems to get only the last two
23:01 moritz_ rakudo: my \$c = { say @_.perl }; \$c(2, 3, 4, 5)
23:01 p6eval rakudo f8b6ae: OUTPUT«[3, 4, 5]␤»
23:01 amoc '~'..?!
23:01 moritz_ rakudo: my \$c = { say \$_; say @_.perl }; \$c(2, 3, 4, 5)
23:01 p6eval rakudo f8b6ae: OUTPUT«2␤[3, 4, 5]␤»
23:02 amoc is that by design?
23:02 moritz_ so the first argument is used up for \$_ even if it's not used in the block
23:02 sri_kraih anyone know if there's a Web.pm channel too?
23:02 moritz_ amoc: don't think so... jnthn?
23:02 moritz_ sri_kraih: it's discussed on #november-wiki
23:02 jnthn moritz_: I can't think of an applicable bit of the design that makes that right...
23:03 pugs_svn r25901 | putter++ | [elfparse] std.pm: more unpodding.
23:03 sri_kraih moritz++
23:03 jnthn moritz_: I suspect we may be right in letting \$_ be 2, but I think @_ should probably still contain it also...
23:03 moritz_ jnthn: aye
23:04 jnthn Hmm...do we always have to build @_, even in signatured blocks?
23:04 moritz_ no
23:04 jnthn OK, good.
23:04 moritz_ at least for subs it's only build if there's no signature
23:04 * moritz_ has *very* evil idea
23:04 jnthn uh-oh.
23:05 moritz_ let's see if rakudo can handle closures in .ast's
23:05 moritz_ anyway, I should open a ticket for that...
23:06 jnthn yes
23:08 moritz_ it seems I still haven't grokked the way match objects are structured
23:13 moritz_ http://nopaste.snit.ch/15913
23:13 moritz_ wtf does it even enter the for @() { ... } loop?
23:14 moritz_ rule expr { <value> ( <op> <value> )* {*} }
23:14 moritz_ matches '8'
23:14 moritz_ ... through the first <value>, I hope
23:14 moritz_ but then the ( <op> <value> ) part should match zero times, no?
23:20 jnthn moritz_: Looking
23:20 jnthn moritz_: what if you say \$_.text rather than \$_.perl out of curiosity?
23:21 moritz_ jnthn: 8
23:23 jnthn moritz_: OK, I'm surprised. I think @() is maybe doing the Wrong Thing here.
23:23 s1n frooh: what's up?
23:23 jnthn moritz_: What does for \$/.list { ... } give you?
23:24 moritz_ jnthn: it still enters the loop, but then dies with "Null PMC access in get_bool()"
23:24 jnthn fail
23:25 jnthn moritz_: OK, I'll just share your surprise at the behavior, but not got much more insight to add, other than "ask pmichaud".
23:25 moritz_ jnthn: ok. I'll try to reduce it a bit more, and make it an RT ticket
23:25 jnthn Thanks.
23:27 moritz_ rakudo: token v { \d+ }; '123' ~~ /<v> (<v>)*/; say "FAIL" for @(); say "alive";
23:27 p6eval rakudo f8b6ae: OUTPUT«alive␤»
23:27 moritz_ ok, it's not *that* simple
23:35 moritz_ rakudo: grammar A { token TOP { ^ <a> \$ }; rule a { \d ( A )* {*} }}; A.parse('2'); for @(\$<a>) { say "FAIL" }; say "alive";
23:35 p6eval rakudo f8b6ae: OUTPUT«alive␤»
23:35 skids joined #perl6
23:37 moritz_ rakudo: grammar A { token TOP { ^ <a> \$ }; rule a { \d ( A )* {*} }}; A.parse('2'); my \$m = \$<a>; for @(\$m) { say "FAIL" }; say "alive";
23:37 p6eval rakudo f8b6ae: OUTPUT«FAIL␤alive␤»
23:38 moritz_ that's where the bug appears
23:45 hudnix joined #perl6
23:45 jnthn ah, nice concise example
23:46 moritz_ I think I've got an idea what's going on
23:46 moritz_ @(\$stuff) seems to call \$stuff.list
23:46 lambdabot Unknown command, try @list
23:46 moritz_ and there seems to be an instance where \$stuff is not a Match object, so it'll return itself
23:47 moritz_ something like one proxying step that should proxy the .list method, but doesn't
23:47 moritz_ rakudo: grammar A { token TOP { ^ <a> \$ }; rule a { \d ( A )* {*} }}; A.parse('2'); my \$m = \$<a>; say \$m.PARROT
23:47 p6eval rakudo f8b6ae: OUTPUT«Perl6Scalar->A␤»
23:48 moritz_ rakudo: grammar A { token TOP { ^ <a> \$ }; rule a { \d ( A )* {*} }}; A.parse('2'); say \$/.PARROT
23:48 p6eval rakudo f8b6ae: OUTPUT«A␤»
23:48 moritz_ ah, that's the difference
23:52 moritz_ another hour destroyed by a rakudobug... *sigh*