Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-02-09

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:06 pugs_svn r25250 | particle++ | [S19] correct wording about STDIN; TimToady++
00:31 shinobi_cl joined #perl6
00:31 shinobi_cl left #perl6
00:36 Tene joined #perl6
00:52 ayrnieu_ joined #perl6
00:54 shinobi_cl_ joined #perl6
00:57 vpace joined #perl6
00:58 aindilis joined #perl6
01:14 ayrnieu joined #perl6
01:25 gravity joined #perl6
01:33 jdv79 left #perl6
01:52 meppl good night
02:00 drbean joined #perl6
02:16 pugs_svn r25251 | hinrik++ | [util/perl6.vim] really fix the nesting of formatting codes
02:16 lambdabot joined #perl6
02:50 revdiablo joined #perl6
02:54 pugs_svn r25252 | hinrik++ | [util/perl6.vim] highlight the range operator in character classes
02:55 diakopter std: Fribble..8
02:56 p6eval std 25252: OUTPUT«Undeclared name:␤      Fribble used at 1 ␤00:02 32m␤»
02:56 diakopter std: 8..e()
02:56 p6eval std 25252: OUTPUT«Undeclared routine:␤   e used at 1 ␤00:02 32m␤»
02:56 diakopter std: 8..e
02:56 p6eval std 25252: OUTPUT«00:02 32m␤»
02:57 diakopter std: 8..7
02:57 p6eval std 25252: OUTPUT«00:02 32m␤»
02:58 karlw joined #perl6
03:01 karlw Has anyone gotten Pugs working on OS X 10.5.6?
03:01 revdiablo Does anyone still use pugs?
03:02 diakopter revdiablo: Pugs gets frequent releases to Hackage/cabal
03:02 karlw I get compile errors.
03:02 revdiablo Ah, I only hear about Rakudo anymore these days
03:03 diakopter karlw: with the latest ghc, it should work as described in http://svn.pugscode.org/pugs/INSTALL
03:03 diakopter latest ghc=6.10.1
03:49 ayrnieu joined #perl6
04:02 jamtech joined #perl6
04:31 alester joined #perl6
05:10 masak joined #perl6
05:33 masak rakudo: $*OUT := (class {}).new; say "OH HAI"
05:33 p6eval rakudo 6aaec3: OUTPUT«src/pmc_freeze.c:1390: failed assertion '!must_have_seen'␤Backtrace - Obtained 19 stack frames (max trace depth is 32).␤  (unknown)␤    Parrot_confess␤      (unknown)␤        (unknown)␤          (unknown)␤            (unknown)␤              Parrot_thaw␤
05:33 p6eval ..PackFile_Co...
05:34 masak huh. good thing I didn't rebuild Rakudo locally.
05:38 vpace joined #perl6
06:01 masak hm, Rakudo works over on #parrot.
06:01 masak rakudo: $*OUT := (class {}).new; say "OH HAI"
06:01 p6eval rakudo 6aaec3: OUTPUT«src/pmc_freeze.c:1390: failed assertion '!must_have_seen'␤Backtrace - Obtained 19 stack frames (max trace depth is 32).␤  (unknown)␤    Parrot_confess␤      (unknown)␤        (unknown)␤          (unknown)␤            (unknown)␤              Parrot_thaw␤
06:01 p6eval ..PackFile_Co...
06:10 masak rakudo: say "alive at all?"
06:10 p6eval rakudo 6aaec3: OUTPUT«src/pmc_freeze.c:1390: failed assertion '!must_have_seen'␤Backtrace - Obtained 19 stack frames (max trace depth is 32).␤  (unknown)␤    Parrot_confess␤      (unknown)␤        (unknown)␤          (unknown)␤            (unknown)␤              Parrot_thaw␤
06:10 p6eval ..PackFile_Co...
06:10 masak apparently not.
06:13 masak rakudo: 5
06:13 p6eval rakudo 6aaec3: OUTPUT«src/pmc_freeze.c:1390: failed assertion '!must_have_seen'␤Backtrace - Obtained 19 stack frames (max trace depth is 32).␤  (unknown)␤    Parrot_confess␤      (unknown)␤        (unknown)␤          (unknown)␤            (unknown)␤              Parrot_thaw␤
06:13 p6eval ..PackFile_Co...
06:16 moritz_ good morning
06:17 masak top of the morning to you, sir!
06:17 masak hm, still can't reproduce the above problem after a local rebuild of Parrot and Rakudo.
06:18 moritz_ I'll trigger a rebuild on the server
06:18 masak moritz_++
06:18 masak on a side note, if I rebind $*OUT, should 'say' still output to STDOUT?
06:19 moritz_ don't think so
06:19 * masak submits rakudobug
06:19 moritz_ but I don't remember the exact relatioinship between $*DEFOUT and $*OUT
06:20 masak well, it's the spirit of the bug that counts, not the letter. :)
06:23 * masak misses buubot
06:24 masak now I have to spack locally -- how primitive! :)
06:24 masak $*DEFOUT is mentioned in S16, and is aliased to $*OUT.
06:25 masak which I take to mean that if I rebind $*OUT, things should indeed stop working.
06:25 moritz_ /home/evalenv/parrot/parrot  -o perl6.pbc perl6.pir
06:25 moritz_ push_string() not implemented in class 'FixedStringArray'
06:26 moritz_ make: *** [perl6.pbc] Error 1
06:26 masak oh my.
06:26 masak I'm not getting that over here.
06:27 vpace joined #perl6
06:29 moritz_ could be a fallout of the string rename stuff
06:29 moritz_ but I made a realclean - what else could I do?
06:29 hercynium joined #perl6
06:30 moritz_ wait, don't know if that also cleans rakudo's tree...
06:31 masak might not.
06:32 moritz_ rakudo: say "back to life"
06:32 p6eval rakudo 577566: OUTPUT«back to life␤»
06:33 moritz_ that's it.
06:33 masak moritz_++
06:33 moritz_ ok, gotta run... bbl
06:33 masak :)
06:33 * masak is reminded of http://xkcd.com/208/
06:38 justatheory joined #perl6
06:47 ashizawa joined #perl6
06:52 DemoFreak joined #perl6
07:02 jan_ joined #perl6
07:10 kate21de joined #perl6
07:18 mberends joined #perl6
07:47 viklund joined #perl6
08:20 szabgab joined #perl6
08:22 maerzhase joined #perl6
08:28 dduncan joined #perl6
08:32 iblechbot joined #perl6
08:36 dduncan left #perl6
08:48 maerzhase joined #perl6
08:54 aindilis` joined #perl6
09:08 mberends joined #perl6
09:44 Tene_ joined #perl6
09:54 mberends eek. parrot r36488 does not build on linux amd64. After a realclean, is it recommended to use Configure.pl and Makefile.PL?
09:58 mberends s/and/or/
09:59 moritz_ Makefile.PL calls Configure.pl
09:59 moritz_ I use the latter
09:59 mberends thanks. r36486 builds ok, but r36488 not.
10:03 masak mberends: did you 'make clean' in the Rakudo dir?
10:03 masak mberends: oh, sorry, not a Rakudo problem. nvm.
10:07 mberends I think pmichaud's last pbc_to_exe optimization in parrot may currently work properly only on 32 bit systems. Pity it's flaky, because the speedup is immense.
10:10 masak aye.
10:11 masak hopefully it's salvageable.
10:11 ejs joined #perl6
10:15 pugs_svn r25253 | hinrik++ | [util/perl6.vim] only highlight R and X as operators when they actually are
10:20 pmurias joined #perl6
10:48 meppl joined #perl6
11:14 yves joined #perl6
11:26 szabgab is there already some Perl5 code out there that can tell me if a piece of code is perl 5 or perl 6?
11:27 szabgab given a .pm file, I'd like to be able to decide if it is perl 5 or perl 6 ?
11:27 mberends not afaik. but all Perl 6 code must start with 'use v6', 'class' or something else foreign to Perl 5
11:28 szabgab I know "some" of the requirements, and now I need to implement them so padre can at least guess if the file is perl 5 or perl 6
11:29 szabgab but I'd prefer to just use someone elses code :-)
11:31 mberends good idea, Don't Repeat Yourself. But this time you're probably on your own ;)
11:33 kbaud1 joined #perl6
11:38 literal "use v6" or "class" or "module" afaik
11:38 moritz_ aye
11:39 szabgab grammar ?
11:39 moritz_ don't think so
11:39 moritz_ but might be a worthy addition
11:43 szabgab HTML::Template::Grammar (again this one :-) has only that
11:46 moritz_ currently there's no implementation that forces this policy
11:46 moritz_ so people become sloppy
11:59 szabgab actually it will be a lot more complex soon
11:59 szabgab as you can change that lexically scoped, right ?
11:59 szabgab so any editor will have to understand that
12:01 moritz_ szabgab: I think we start worrying when somebody starts implementing it
12:14 masak moritz_: who are you calling sloppy? :P
12:15 * moritz_ whistles innocently
12:17 masak @ask TimToady can 'grammar' and 'role' start a p6 file, just like 'class' can?
12:17 lambdabot Consider it noted.
12:18 masak szabgab: I just pushed a version of HTML::Template::Grammar that has 'use v6' in it.
12:29 szabgab moritz_, implementing what ? the editor ?
12:29 moritz_ szabgab: no, a compiler that can switich between perl 5 and 6
12:30 szabgab ok :-)
12:31 elmex joined #perl6
12:37 kane_ joined #perl6
12:46 ruoso joined #perl6
12:54 meppl joined #perl6
13:06 ruoso HellO!
13:08 pmurias_ joined #perl6
13:08 pmurias_ ruoso: hi
13:08 ruoso hi pmurias_
13:14 PantheraUncia joined #perl6
13:29 * masak wants a compiler that can switch between Perl 5 and Perl 6
13:31 pmurias masak: you mean {use v5;print ${\"we are in perl5 land\n"}};say "in p6 land again";
13:31 mberends it's easy: 1) finish Rakudo 2) add a switchy thing 3) profit!
13:31 masak mberends: right. :)
13:32 masak pmurias: yes, something like that.
13:32 masak pmurias: but, more specifically, Perl 6+CPAN.
13:32 masak er, that was visually non-obvious. I meant "Perl 6  +  CPAN" :)
13:33 maerzhase joined #perl6
13:50 ruoso masak, smop+mildew is pretty much close to that ;)
13:51 masak ruoso: aye, so I gather. :)
13:52 masak it would be fun to be able to run, say, Druid on smop+mildew.
13:53 ruoso masak, druid?
13:53 masak ruoso: https://github.com/masak/druid/
13:54 ruoso masak, ah... smop still doesn't have a regex engine implemented
13:55 masak I don't use regexes much in Druid.
13:55 masak lots of other string handling, though.
13:55 masak and classes/roles.
13:59 pmurias ruoso: &?ROUTINE.back is a Code?
14:01 ruoso yes
14:01 ruoso or not
14:01 ruoso pmurias, I'm unsure
14:02 ruoso I think it's a mold frame
14:02 ruoso yes... it is a mold fram
14:02 riffraff joined #perl6
14:04 ruoso pmurias, but I guess a mold frame could be a code
14:04 ruoso pmurias, if it receive a postcircumfix:<( )>, it could resume itself
14:10 pmurias walk&
14:31 ludan joined #perl6
14:32 DemoFreak joined #perl6
14:35 Exodist joined #perl6
14:41 masak rakudo: my @a = "foo", "foot"; if @a[all(0,1)] ~~ /^ foo/ { say "OH MY!" }
14:41 p6eval rakudo 577566: No output (you need to produce output to STDOUT)
14:42 masak funny, I have that same version at home, and I get an error.
14:42 masak "get_integer() not implemented in class 'Junction'"
14:44 moritz_ masak: junctions don't yet autothread through array and hash indexes
14:44 masak ok. that explains the error.
14:44 masak what about the discrepancy?
14:45 moritz_ sh: line 1: 30775 Segmentation fault      ./parrot languages/rakudo/perl6.pbc /tmp/UVbwS23oTx >> /tmp/oDR0HoQgob 2>&1
14:45 moritz_ don't ask me.
14:45 masak :/
14:45 moritz_ I'll rebuild both parrot and rakudo
14:46 moritz_ and now I do a 'make clean' in rakudo as well
14:50 moritz_ rakudo: my @a = "foo", "foot"; if @a[all(0,1)] ~~ /^ foo/ { say "OH MY!" }
14:50 p6eval rakudo 577566: OUTPUT«get_integer() not implemented in class 'Junction'␤current instr.: 'parrot;Positional;postcircumfix:[ ]' pc 3275 (src/classes/Positional.pir:42)␤»
14:50 moritz_ better.
14:55 masak muchly so.
14:55 masak so does the fact that junctions are not handled in array and hash indices reside somewhere in the long list of new or open bug tickets on RT? :)
14:56 masak s/so/so,/
14:56 moritz_ I don't know, I just know it's on rakudo.org somewhere
14:57 masak oh, what the heck. we can clean up duplicates later.
14:57 * masak submits rakudobug
15:02 moritz_ rakudo: say 40000 / 2000
15:02 p6eval rakudo 577566: OUTPUT«sh: ./parrot: No such file or directory␤»
15:02 * moritz_ curses
15:03 masak p6eval is insistently non-cooperative today, it seems.
15:04 moritz_ somehow that fits to my current image of parrot and rakudo :(
15:05 [particle]1 that's your fault for not contributing more! :P
15:07 * moritz_ counts the moritz vs non-moritz commits in rakudo for the last few days
15:08 moritz_ 12 vs. 7, liberally counting :-)
15:08 masak moritz_++
15:08 masak even pitted against everybody else, moritz_ wins! :)
15:09 literal http://github.com/masak/druid/blob/d734723dc31f3751215b5453ec1bfc75eda0b0c4/lib/Druid/Player.pm
15:09 literal masak: why is there a _ after Druid::Game there?
15:09 literal just curious
15:09 masak literal: that's a Rakudobug.
15:10 masak I think I saw a patch for it yesterday.
15:10 masak but I don't think it has gone in yet.
15:10 literal what kind of bug?
15:10 moritz_ masak: I merged it
15:10 masak moritz_: oh! thanks!
15:10 masak literal: no longer a bug, then.
15:10 literal I mean, why would it require you to misspell the name? :P
15:10 moritz_ rakudo: BEGIN { class A::B }; class A {}; say "used to die at compile time";
15:10 p6eval rakudo 577566: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2579 (src/classes/Role.pir:42)␤»
15:11 masak literal: but it used to be that you couldn't declare A::B first and then B in another scope.
15:11 moritz_ oh well.
15:11 moritz_ rakudo: BEGIN { class A::B }; class B {}; say "used to die at compile time";
15:11 p6eval rakudo 577566: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2579 (src/classes/Role.pir:42)␤»
15:11 masak moritz_: using Rakudo to prove that things no longer fail is a bad idea :P
15:11 masak you're saying you merged the fix?
15:12 masak in that case, what's wrong now?
15:12 moritz_ rakudo: BEGIN { class A::B {}; }; class B {}; say "used to die at compile time";
15:12 p6eval rakudo 577566: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2579 (src/classes/Role.pir:42)␤»
15:12 moritz_ rakudo: BEGIN { class A::B  {}; }; class B {}; say "works locally here"
15:12 p6eval rakudo 577566: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2579 (src/classes/Role.pir:42)␤»
15:13 moritz_ masak: is 'make spectest' clean on your machine?
15:14 masak checking.
15:14 moritz_ especially S12-class/basic.t
15:14 masak I just ran that separately. it passes.
15:15 moritz_ now look at the end of that file
15:15 * masak looks
15:15 moritz_ it should test exactly the thing that fails with p6eval
15:15 masak heh.
15:16 alester joined #perl6
15:16 masak and wouldn't you know, what you ran through p6eval runs fine locally, too!
15:17 masak something is slightly askew in the state of Denmark.
15:17 moritz_ I'll kill that cat!
15:17 masak you talking to me, Willis?
15:18 Tene joined #perl6
15:18 moritz_ I was quoting "dinner for one", a very fine piece of comedy that Germans watch on New Year's Eve
15:18 masak moritz_: I know.
15:18 masak we have it too.
15:19 masak "Grevinnan och betjänten"
15:19 moritz_ that's very suprising - I thought it was nearly entirely unknown outside of Germany
15:20 masak I found out that Germany sends it regularly only a year or so ago -- before that I thought that it was specific for Sweden.
15:21 moritz_ heh
15:23 moritz_ (quantum physics)-- # making simulations painfully hard
15:24 DataPusher joined #perl6
15:24 moritz_ the hilbert space explodes exponentially with number of particles, and even in my reduced case the runtime is O(n**6.3) or so
15:24 moritz_ rakudo: 600**6.3
15:24 p6eval rakudo 577566: RESULT«3.1794564260066e+17»
15:25 moritz_ rakudo: 60**6.3
15:25 p6eval rakudo 577566: RESULT«159350297058.87»
15:27 maerzhase joined #perl6
15:51 pmurias ruoso: shouldn't multis gather variants from where they were defined rather than from where they were called?
15:52 ruoso pmurias, unfortunally no...
15:52 ruoso maybe not unfortunally
15:52 ruoso but well
15:53 ruoso but maybe it simply doesn't make a difference
15:53 ruoso because
15:53 ruoso it will find the variable containing the multi
15:53 ruoso (at least the outermost definition of it)
15:53 ruoso and it will look for the innermost variants
15:54 ruoso (so we can allow scoped variants)
15:54 ruoso but the question is
15:54 ruoso how that relates to binding?
15:54 ruoso should binding  a multi variant to this scope make the dispatching look for variants where that multi was defined? or where the multi is called
15:54 ruoso ?
15:56 pmurias perl6: multi foo($a) {say "a"};my $bar = &foo;{multi foo(Int $a) {say "b"};$bar(1)}
15:57 p6eval rakudo 577566: OUTPUT«invoke() not implemented in class 'ResizablePMCArray'␤current instr.: '_block29' pc 256 (EVAL_17:110)␤»
15:57 p6eval ..elf 25253: OUTPUT«/home/evalenv/pugs/misc/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤   from /home/evalenv/pugs/misc/STD_red/match.rb:140:in `each'␤      from /home/evalenv/pugs/misc/STD_red/match.rb:140:in `map'␤       from
15:57 p6eval ../home/evalenv/pugs/mi...
15:57 p6eval ..pugs: OUTPUT«a␤»
15:57 pmurias pugs: multi foo($a) {say "a"};my $bar = &foo;{multi foo(Int $a) {say "b"};$bar(1);foo(2)}
15:57 p6eval pugs: OUTPUT«a␤b␤»
15:57 pmurias ruoso: according to Multi.pm it should be "a\na\n"
15:58 ruoso pmurias, let me parse your code
16:00 ruoso pugs: multi foo(Str $a) { say "a" }; { my multi foo(Int $a){ say "b" }; foo(1);foo("a"); };  foo(1);foo("a");
16:00 p6eval pugs: OUTPUT«b␤b␤a␤a␤»
16:01 ruoso rakudo: multi foo(Str $a) { say "a" }; { my multi foo(Int $a){ say "b" }; foo(1);foo("a"); };  foo(1);foo("a");
16:01 p6eval rakudo 577566: OUTPUT«sh: ./parrot: No such file or directory␤»
16:01 moritz_ it's short after the full hour, parrot rebuilds... meh
16:01 ruoso pugs: multi foo($a,$b) { say "a" }; { my multi foo($a){ say "b" }; foo(1,2);foo("a"); };  foo(1,2);foo("a");
16:01 p6eval pugs: OUTPUT«a␤b␤a␤*** No compatible multi variant found: "&foo"␤    at /tmp/A7OIClTjCF line 1, column 94-102␤»
16:02 ruoso right... now we're talking ;)
16:02 ruoso ok... now... how do I bind a multi variant...
16:02 pmurias pugs: multi foo($a) {say "a"};my $bar = &foo;{my multi foo(Int $a) {say "b"};$bar(1);foo(2)}
16:02 p6eval pugs: OUTPUT«a␤b␤»
16:03 IllvilJa joined #perl6
16:03 ruoso pugs: my $c; multi foo($a,$b) { say "a" }; { my multi foo($a){ say "b" }; $c := &foo };  { &foo := $c; foo(1,2);foo("a"); };
16:03 p6eval pugs: OUTPUT«*** Cannot cast from VUndef to Pugs.AST.Types.VCode (VCode)␤    at /tmp/wTlns3T0Zc line 1, column 86-96␤       /tmp/wTlns3T0Zc line 1, column 86-96␤»
16:04 ruoso pmurias, but yes... the code you wrote suggests it gets the other variants from where it was defined
16:05 ruoso but there is a corner case ther
16:05 ruoso considering exporting symbols is simply a process of bind
16:05 ruoso if two different modules export variants for the same multi
16:05 ruoso how does the variants see each other?
16:07 ruoso pugs: module A { multi foo($a) is export(:DEFAULT) { say "a" } }; module B { multi foo($a,$b) is export(:DEFAULT) { say "b" } }; use A; use B; foo(1); foo(1,2);
16:07 p6eval pugs: OUTPUT«pugs: *** Unsafe function 'use' called under safe mode␤    at /tmp/Hf47TyHxOT line 1, column 1␤»
16:07 ruoso pugs: module A { multi foo($a) is export(:DEFAULT) { say "a" } }; module B { multi foo($a,$b) is export(:DEFAULT) { say "b" } }; A::EXPORTALL; use B::EXPORTALL; foo(1); foo(1,2);
16:07 p6eval pugs: OUTPUT«pugs: *** Unsafe function 'use' called under safe mode␤    at /tmp/J1eDZ6QUte line 1, column 1␤»
16:07 ruoso pugs: module A { multi foo($a) is export(:DEFAULT) { say "a" } }; module B { multi foo($a,$b) is export(:DEFAULT) { say "b" } }; A::EXPORTALL; B::EXPORTALL; foo(1); foo(1,2);
16:07 p6eval pugs: OUTPUT«*** No such subroutine: "&A::EXPORTALL"␤    at /tmp/VTsLTXpFpt line 1, column 124-136␤»
16:08 ruoso pugs: module A { multi foo($a) is export(:DEFAULT) { say "a" } }; module B { multi foo($a,$b) is export(:DEFAULT) { say "b" } }; A.EXPORTALL; B.EXPORTALL; foo(1); foo(1,2);
16:08 p6eval pugs: OUTPUT«*** No such method in class A: "&EXPORTALL"␤    at /tmp/GaoSd9wF0f line 1, column 124-135␤»
16:08 ruoso pft
16:08 ruoso pugs: module A { multi foo($a) is export(:DEFAULT) { say "a" } }; module B { multi foo($a,$b) is export(:DEFAULT) { say "b" } }; foo(1); foo(1,2);
16:08 p6eval pugs: OUTPUT«*** No such subroutine: "&foo"␤    at /tmp/uJzVrGDfjF line 1, column 124-130␤»
16:08 ruoso meh
16:15 icwiener joined #perl6
16:15 stephenlb joined #perl6
16:22 p6paste "ruoso" at 127.0.0.1 pasted "the context of a multi" (28 lines) at http://paste.nix.is/6
16:22 ruoso pmurias, ok... that's what I was trying to show
16:22 ruoso pugs is wrong in the sense that export should put in our, not in my... but... consider the code in test.pl has "use B :MY"
16:23 ruoso I'd expect it to work as pugs is doing now
16:23 ruoso and that means that the lookup happens from the perspective of the caller
16:23 aindilis joined #perl6
16:23 icwiener_ joined #perl6
16:27 nihiliad joined #perl6
16:31 mberends left #perl6
16:32 pmurias ruoso: putting stuff in our doesn't affect the multis
16:33 ruoso affect in the sense that it would be adding a variant
16:33 ruoso instead of declaring a new symbol
16:33 ruoso which would happen in terms of use B :MY
16:34 pmurias &
17:00 rhr_ joined #perl6
17:03 lisppaste3 joined #perl6
17:13 hercynium joined #perl6
17:27 mikehh joined #perl6
17:27 justatheory joined #perl6
17:38 TimToady exports are supposed to go into my, not our, by default
17:38 lambdabot TimToady: You have 1 new message. '/msg lambdabot @messages' to read it.
17:41 ruoso TimToady, hmm
17:41 ruoso ok...
17:41 ruoso maybe I mis-read S11, but still, while you're there...
17:41 TimToady @tell masak yes, grammar and role can start p6 code; all package_declarators (except package!) are p6 starters
17:41 lambdabot Consider it noted.
17:42 ruoso TimToady, I'm considering a multi installed in my scope is going to look for other variants in the lexical scope of the caller of that multi
17:42 TimToady and if &foo represents multiple variants they all have to be included in the candidate list
17:42 ruoso TimToady, of the outer &foo?
17:42 justatheory joined #perl6
17:43 ruoso I mean... when you have a lexically-scoped variant, should it copy all the other variants into itself?
17:43 ruoso s/other/outer/
17:44 TimToady a call only ever considers its own lexical scope
17:44 TimToady but binding &foo into a new scope pulls in all the longnames it represents
17:44 ruoso right... so changes in the outer scope of that scope after the bind of &foo are invisible
17:45 TimToady how can you have a change in a lexical scope that's already been compiled?
17:45 ruoso CALLER::<&foo> := &some_other_variant
17:46 ruoso or any other binding, in fact
17:46 ruoso a simple &foo := &other inside an inner block
17:48 TimToady we have to let the optimizer have enough information to optimize
17:48 ruoso that means?
17:48 TimToady I think it's allowed to assume that the candidate list generated at compile time is immutable, unless a package is involved
17:49 TimToady which is why we're trying to tip it toward lexical defs
17:49 finanalyst joined #perl6
17:49 ruoso what do you mean by "unless a package is involved"?
17:49 TimToady packages are mutable at run-time
17:50 TimToady our multi can change; my multi can't
17:50 ruoso so, binding to a lexical multi is forbidden
17:50 ruoso hmm...
17:50 TimToady COMPILING:<&foo> := is okay
17:51 ruoso "our multi" means two things...
17:51 ruoso 1) declare this syimbol in $?PACKAGE
17:51 ruoso 2) make a local alias to it
17:51 ruoso so I can change the symbol in the package,
17:51 ruoso but it's lexical meaning won't change
17:52 TimToady right
17:52 ruoso unless you use the fully-qualified name
17:52 ruoso ok... that makes things much easier
17:52 TimToady possibly multi defaults to "my" anyway...
17:53 ruoso that sounds sane
17:53 ruoso does that apply to regular subs as well?
17:53 ruoso meaning...
17:53 TimToady don't think so
17:53 ruoso ok... that makes it a bit harder
17:53 ruoso so, at runtime, a bind should check if this is a multi or not?
17:53 TimToady trying to make those a bit more p5ish, is all
17:54 ruoso worse, actually...
17:54 ruoso a bind should check if the name could hide a multi or replace a multi
17:54 TimToady we could just call it undefined for now
17:56 TimToady "erroneous", to use the Ada terminology...
17:56 ruoso so, just to make clear...
17:56 ruoso "binding a new value to a code object that might hide a multi is erroneous"
17:57 ruoso "because the list of multi variants is immutable"
17:57 ruoso "therefore you can't add a multi variant at run-time"
17:58 ruoso TimToady, is that it?
17:58 moritz_ "... unless the lexical pragma C<< use less <speed>; >> is in effect" ;-)
17:59 TimToady use multi :mutable
17:59 TimToady or some such...
18:01 TimToady the compiler knows if there are multis/protos declared already, and by definition that's exclusive to only subs, and (I suspect) only the call to a known only sub looks in the current package
18:01 TimToady and nothing looks in the GLOBAL package these days
18:01 TimToady so you have to say &*foo() to call GLOBAL::foo
18:02 TimToady (well, or GLOBAL::foo())
18:03 TimToady is everything clear as mud now? :)
18:03 TimToady hopefully the sort of mud you make porcelain out of...
18:05 TimToady $work &
18:08 pugs_svn r25254 | lwall++ | plagiarized typo :)
18:13 [particle]1 hee
18:18 literal rakudo: my $foo = 'bar'; $foo ~~ tr/bar/ba\nz/; say $foo
18:18 p6eval rakudo 577566: OUTPUT«Statement not terminated properly at line 1, near "\\nz/; say "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
18:18 literal rakudo: my $foo = 'bar'; $foo ~~ tr/bar/baz/; say $foo
18:18 p6eval rakudo 577566: OUTPUT«Statement not terminated properly at line 1, near "/; say $fo"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
18:18 literal rakudo: my $foo = 'bar'; $foo ~~ tr/bar/baz/; say $foo;
18:18 p6eval rakudo 577566: OUTPUT«Statement not terminated properly at line 1, near "/; say $fo"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
18:18 moritz_ literal: when I set ft=perl6 tw=70 in vim, it doesn't line-break text blocks in Pod
18:18 M_o_C joined #perl6
18:18 moritz_ literal: any idea of how to achieve that?
18:19 literal it does here
18:19 literal wait
18:19 * moritz_ tries again
18:20 literal does your 'formatoptions' contain t?
18:20 literal :set formatoptions?
18:20 moritz_ yes
18:20 moritz_ it does line-break
18:20 moritz_ it just didn't do it in the first three lines
18:20 moritz_ weird.
18:21 literal rakudo: my $_ = 'bar'; tr/bar/baz/; say $_;
18:21 p6eval rakudo 577566: OUTPUT«Statement not terminated properly at line 1, near "/; say $_;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
18:22 literal what's wrong?
18:22 moritz_ not yet implemented
18:22 literal oh
18:22 moritz_ it implements .trans though
18:22 literal anyway, I was wondering if the second part of tr/// is a double-quoted string, as with s///
18:23 literal S05 doesn't say
18:23 moritz_ in p5 it's not
18:23 moritz_ literal: but maybe you need to ask STD.pm
18:23 literal yeah, but in the tests it is assumed
18:23 moritz_ that doesn't mean much :/
18:25 pugs_svn r25255 | moritz++ | [u4x] add a glossary that explains "autothread"
18:30 pugs_svn r25256 | moritz++ | [u4x] more glossary
18:37 Psyche^ joined #perl6
18:37 pugs_svn r25257 | hinrik++ | [util/perl6.vim] fix a few subtle bugs, highlight substitutions and transliterations
18:42 * ruoso later &]
18:43 Helios joined #perl6
18:48 pugs_svn r25258 | hinrik++ | [util/perl6.vim] update TODO
18:51 pugs_svn r25259 | hinrik++ | [S26] add vim modeline
18:58 icwiener joined #perl6
19:03 PZt joined #perl6
19:05 justatheory joined #perl6
19:05 lambdabot joined #perl6
19:06 pmurias joined #perl6
19:11 lambdabot joined #perl6
19:35 literal rakudo: my @foo = <a b <c> d>;  say @foo.perl
19:35 p6eval rakudo 577566: OUTPUT«Statement not terminated properly at line 1, near "d>;  say @"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
19:35 literal rakudo: my @foo = <a b c d>;  say @foo.perl
19:35 p6eval rakudo 577566: OUTPUT«["a", "b", "c", "d"]␤»
19:37 * diakopter stares at 444k lines of STD.json
19:39 TimToady std: my @foo = <a b <c> d>;  say @foo.perl
19:39 p6eval std 25259: OUTPUT«00:02 34m␤»
19:51 icwiener joined #perl6
20:17 PZt joined #perl6
20:17 ascent_ joined #perl6
20:17 ilogger2 joined #perl6
20:17 JarJarBinks joined #perl6
20:17 Aisling joined #perl6
20:17 p6paste joined #perl6
20:17 perlbot joined #perl6
20:29 pugs_svn r25260 | pmichaud++ | Clarify glossary entry for "autothreading" a bit.
20:43 meppl joined #perl6
20:43 hudnix joined #perl6
20:43 gfldex_ joined #perl6
20:56 dominiko joined #perl6
21:10 hudnix_ joined #perl6
21:11 meppl joined #perl6
21:11 gfldex_ joined #perl6
21:15 gfldex joined #perl6
21:20 IllvilJa joined #perl6
21:27 stephenlb joined #perl6
21:32 schmalbe joined #perl6
21:33 justatheory joined #perl6
21:43 REPLeffect joined #perl6
21:47 DemoFreak joined #perl6
21:50 Tene_ joined #perl6
21:59 Whiteknight joined #perl6
22:16 DemoFreak joined #perl6
22:25 ludan joined #perl6
22:42 DemoFreak joined #perl6
22:50 DemoFreak joined #perl6
23:38 Tene joined #perl6
23:44 justatheory joined #perl6
23:47 scrottie joined #perl6
23:58 cognominal joined #perl6

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

Perl 6 | Reference Documentation | Rakudo