Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-10-23

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 pjcj joined #perl6
00:22 whiteknight joined #perl6
00:23 cognominal joined #perl6
00:23 benabik joined #perl6
00:40 diakopter r: my Positional[Int] of Str $x;
00:40 p6eval rakudo 978492: OUTPUT«===SORRY!===␤Method 'parameterize' not found for invocant of class 'Perl6::Metamodel::CurriedRoleHOW'␤»
00:41 diakopter phenny: ask masak maybe append to other ticket?  r: my Positional[Int] of Str $x;
00:41 phenny diakopter: I'll pass that on when masak is around.
00:43 fgomez joined #perl6
00:54 havenn joined #perl6
00:55 anuby joined #perl6
01:07 diakopter rn: say (^-1)[0]
01:07 p6eval rakudo 978492: OUTPUT«Nil␤»
01:07 p6eval ..niecza v22-14-g136ddcf: OUTPUT«Any()␤»
01:07 diakopter hmm... no elements?
01:19 hypolin joined #perl6
01:23 diakopter double buglet
01:23 diakopter rn: say "a" ~~ / <new> /
01:23 p6eval rakudo 978492: OUTPUT«「」␤ new => 「」␤␤»
01:23 p6eval ..niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: System.InvalidCastException: Cannot cast from source type to destination type.␤  at Niecza.Kernel.DefaultNew (Niecza.Frame th, Niecza.P6any proto, Niecza.VarHash args) [0x00000] in <filename unknown>:0 ␤  at Run.CORE.C189Mu.new (Niecza…
01:24 diakopter phenny: tell masak dunno; is this right?  r: say "a" ~~ / <new> /
01:24 phenny diakopter: I'll pass that on when masak is around.
01:26 TimToady well, Cursor.new is returning a valid cursor, so maybe not a bug in rakudo
01:26 TimToady it's a new way to match the null string
01:27 diakopter rn: grammar A { rule TOP { <BUILD> }; rule BUILD { a } }; say A.parse("a")
01:27 p6eval niecza v22-14-g136ddcf: OUTPUT«#<match from(0) to(1) text(a) pos([].list) named({"BUILD" => #<match from(0) to(1) text(a) pos([].list) named({}.hash)>}.hash)>␤»
01:27 p6eval ..rakudo 978492: OUTPUT«===SORRY!===␤Method 'match' not found for invocant of class 'String'␤»
01:27 diakopter phenny: tell masak pretty sure bug here rn: grammar A { rule TOP { <BUILD> }; rule BUILD { a } }; say A.parse("a")
01:27 phenny diakopter: I'll pass that on when masak is around.
01:30 diakopter rn: grammar A { rule TOP { <new> }; rule new { a } }; say A.parse("a")
01:30 p6eval rakudo 978492: OUTPUT«Default constructor only takes named arguments␤  in method new at src/gen/CORE.setting:669␤  in any !reduce at src/stage2/QRegex.nqp:615␤  in any !cursor_pass at src/stage2/QRegex.nqp:582␤  in regex new at /tmp/2PiHbQULvs:1␤  in regex TOP at /tmp/2PiHbQULvs:1␤  in …
01:30 p6eval ..niecza v22-14-g136ddcf: OUTPUT«#<match from(0) to(1) text(a) pos([].list) named({"new" => #<match from(0) to(1) text(a) pos([].list) named({}.hash)>}.hash)>␤»
01:30 diakopter phenny: tell masak also, different error?  rn: grammar A { rule TOP { <new> }; rule new { a } }; say A.parse("a")
01:30 phenny diakopter: I'll pass that on when masak is around.
01:34 diakopter rn: grammar A { rule TOP { <foo> }; method foo { Cursor } }; say A.parse("a")
01:34 p6eval niecza v22-14-g136ddcf: OUTPUT«Match()␤»
01:34 p6eval ..rakudo 978492: OUTPUT«Cannot look up attributes in a type object␤  in regex TOP at /tmp/L1tMzD68aT:1␤  in method parse at src/gen/CORE.setting:10166␤  in block  at /tmp/L1tMzD68aT:1␤␤»
01:34 diakopter that error's not LTA methinks
01:35 diakopter TimToady: oh
01:36 diakopter uhm.
01:36 diakopter what did I do to p6eval
01:42 diakopter r: grammar A { rule TOP { <.pos> } }; say A.parse("a")
01:42 p6eval rakudo 978492: OUTPUT«Can only use repr_get_attr_int on a SixModelObject␤  in regex TOP at /tmp/5pTcQZ4Iyy:1␤  in method parse at src/gen/CORE.setting:10166␤  in block  at /tmp/5pTcQZ4Iyy:1␤␤»
01:43 diakopter phenny: tell masak cool error  r: grammar A { rule TOP { <.pos> } }; say A.parse("a")
01:43 phenny diakopter: I'll pass that on when masak is around.
01:45 diakopter r: grammar A { rule TOP { <foo> }; rule foo { <TOP> } }; say A.parse("a")
01:45 p6eval rakudo 978492: OUTPUT«(timeout)»
01:46 diakopter really should detect directly and indirectly left-recursive rules and evade them
01:48 diakopter for complex grammars where the user doesn't know where the recursion lies
01:48 diakopter or grammars where it's intentionally left-recursive
01:50 diakopter r: grammar A { rule TOP { <.parse("")> } }; say A.parse("a")
01:50 p6eval rakudo 978492: OUTPUT«maximum recursion depth exceeded␤current instr.: 'print_exception' pc 86654 (src/gen/CORE.setting.pir:41740) (src/gen/CORE.setting:9055)␤called from Sub 'defined' pc 3791 (src/stage2/gen/NQPCORE.setting.pir:1843) (src/stage2/NQPCORE.setting:218)␤called from Sub '!c…
01:54 diakopter r: say grammar say { }; say &say.WHAT
01:54 p6eval rakudo 978492: OUTPUT«say()␤»
01:54 * diakopter giggles
01:54 diakopter oh wait
01:54 diakopter wait, wait.
01:54 diakopter the heck?
01:57 diakopter r: grammar say { }; print 0; say &say.new; print 1; say.WHAT; print 2; say(&say);
01:57 p6eval rakudo 978492: OUTPUT«012sub say() { ... }␤»
01:58 diakopter r: grammar say { }; print 0; print((say &say.new).WHAT); print 1; say.WHAT; print 2; say(&say);
01:58 p6eval rakudo 978492: OUTPUT«use of uninitialized variable $v of type Junction in string context  in block  at /tmp/0jbTeZO6Yz:1␤␤012sub say() { ... }␤»
01:58 diakopter oh!
01:59 diakopter but.. why did it output the final say(&say)
02:02 diakopter rn: grammar Int { }; say Int.parse("foo")
02:02 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Unable to resolve method TOP in type Int␤  at /home/p6eval/niecza/lib/CORE.setting line 2927 (Grammar.parse @ 5) ␤  at /tmp/R3IQe1voOD line 1 (mainline @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤  at /home/p6…
02:02 p6eval ..rakudo 978492: OUTPUT«No such method 'TOP' for invocant of type 'Int'␤  in method parse at src/gen/CORE.setting:10166␤  in block  at /tmp/LUq4pcTRqH:1␤␤»
02:02 diakopter oh
02:05 firelord joined #perl6
02:05 diakopter rn: grammar Int { }; say 3.0.Int ~~ Numeric
02:05 p6eval niecza v22-14-g136ddcf: OUTPUT«True␤»
02:05 p6eval ..rakudo 978492: OUTPUT«===SORRY!===␤get_boxed_ref could not unbox for the given representation␤»
02:05 diakopter boom.
02:06 diakopter phenny: tell masak 'nother weird one  rn: grammar Int { }; say 3.0.Int ~~ Numeric
02:06 phenny ...
02:06 diakopter phenny: tell masak another weird one  rn: grammar Int { }; say 3.0.Int ~~ Numeric
02:06 phenny ...
02:06 diakopter oh
02:06 diakopter phenny is hating on me
02:07 diakopter phenny: tell jnthn tell masak another weird one  rn: grammar Int { }; say 3.0.Int ~~ Numeric
02:07 phenny diakopter: I'll pass that on when jnthn is around.
02:09 diakopter phenny: ...
02:16 diakopter rn: class Int { }; say 3.4.Int
02:16 p6eval niecza v22-14-g136ddcf: OUTPUT«3␤»
02:16 p6eval ..rakudo 978492: OUTPUT«===SORRY!===␤get_boxed_ref could not unbox for the given representation␤»
02:17 sorear diakopter: lag spiked for me too
02:18 havenn joined #perl6
02:18 diakopter sorear: any ideas what rakudo is doing above? making a class named Int clobbered the Int method too?
02:19 sorear diakopter: making a class named Int caused the compiler to break
02:19 sorear it never called the .Int method
02:19 diakopter oh hee
02:20 diakopter rn: class Int { }; say Int.WHAT
02:20 p6eval rakudo 978492, niecza v22-14-g136ddcf: OUTPUT«Int()␤»
02:20 diakopter sorear: well, it okay'd that
02:21 sorear rn: calss Int { }; 3.0
02:21 p6eval niecza v22-14-g136ddcf: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/Ad3evMjLkd line 1:â�¤------> [32mcalss Int [33mâ��[31m{ }; 3.0[0mâ�¤â�¤Undeclared routine:â�¤        'calss' used at line 1â�¤â�¤Parse …
02:21 p6eval ..rakudo 978492: OUTPUT«===SORRY!===␤Confused␤at /tmp/jLDBkx5dRc:1␤»
02:21 sorear rn: class Int { }; 3.0
02:21 p6eval niecza v22-14-g136ddcf:  ( no output )
02:21 p6eval ..rakudo 978492: OUTPUT«===SORRY!===␤get_boxed_ref could not unbox for the given representation␤»
02:21 cognominal nc: native {}
02:21 sorear diakopter: rakudo can't parse 3.0 after the redefinition
02:21 cognominal rc: native {}
02:21 cognominal arf
02:22 diakopter sorear: oh!
02:22 cognominal rn: native {}
02:22 diakopter interesting
02:22 p6eval niecza v22-14-g136ddcf: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤     'native' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) â�¤  at /h…
02:22 p6eval ..rakudo 978492:  ( no output )
02:23 cognominal reading Grammar.pm. I know that should compile but I have no idea to what that means.
02:23 diakopter r: say (native { }).HOW
02:23 p6eval rakudo 978492: OUTPUT«Perl6::Metamodel::NativeHOW.new()␤»
02:24 cognominal probably used by zavolag
02:24 cognominal s/g/j/
02:26 cognominal my native int is repr('P6int') { }  # in NativeTypes.pm
02:30 cognominal If I had no tools like wc, I would swear that jnthn code is an infinite fractal repository of unkonwn dimension full of sweet code.
02:31 cognominal you just don't know which form it will have when you go further.
02:31 sorear cognominal: rakudo special behavior for defining new native types
02:31 sorear not something users can use, really
02:32 cognominal I suppose Larry would say I designed Perl 6 for that to happen
02:35 cognominal sorear, except if he is smart enough to add his stuff to 6model/reprs
02:36 cognominal ??
02:36 cognominal or is there something magic about int num and str now they are decoupled from parrot?
02:39 sorear cognominal: *shrug* I recommend against touching native unless you know what you're doing
02:39 cognominal I sure don't know yet.
02:40 bapa joined #perl6
02:43 tokuhir__ joined #perl6
02:52 Targen_ joined #perl6
02:53 dayangkun joined #perl6
02:53 fgomez joined #perl6
03:01 Vlavv` joined #perl6
03:06 bapa joined #perl6
03:06 fgomez joined #perl6
03:08 fgomez joined #perl6
03:10 firelord left #perl6
03:16 bapa joined #perl6
03:20 havenn joined #perl6
03:27 gdey joined #perl6
03:28 gdey Hello everyone, I'm trying to go through the Perl6 book, and can not for the life of me figure out what the problem with this sorce code is. (https://gist.github.com/3936461)  The error I keep getting is: Nominal type check failed for parameter '@dependencies'; expected Positional but got Array instead
03:29 gdey Any help would be appriciated.
03:29 gdey I'm using rakudo, but the way.
03:29 gdey The latest stable version I could download.
03:29 unixms joined #perl6
03:30 [Coke] r: https://gist.github.com/3936461
03:30 p6eval rakudo 978492: OUTPUT«Nominal type check failed for parameter '@dependencies'; expected Positional but got Array instead␤  in method new at /tmp/IQqtKBQmcn:8␤  in block  at /tmp/IQqtKBQmcn:25␤␤»
03:31 TimToady :&callack is a typo
03:31 gdey Thanks!
03:31 gdey I must have been staring at this for hours, and did not see that.
03:31 sorear o hai gdey
03:31 TimToady I don't know why it would cause this error though
03:33 gdey Hey Sorear!
03:33 gdey It's still erroring out.
03:33 gdey r: https://gist.github.com/3936461
03:33 p6eval rakudo 978492: OUTPUT«Nominal type check failed for parameter '@dependencies'; expected Positional but got Array instead␤  in method new at /tmp/I_dP2A9v45:8␤  in block  at /tmp/I_dP2A9v45:25␤␤»
03:34 gdey I fixed the typo in the gist.
03:35 _jaldhar_ joined #perl6
03:35 [Coke] has Bool $.done;
03:35 [Coke] ?
03:35 [Coke] should that be $!done?
03:36 gdey According to the book, the $. twigile creats an accessor as well as creates the $!done variable.
03:37 TimToady what happens if you take the Task type off of the *@dependencies parameter on line 8?
03:37 gdey r: https://gist.github.com/3936461
03:37 p6eval rakudo 978492: OUTPUT«No such method 'Any' for invocant of type 'Parcel'␤  in  at src/gen/BOOTSTRAP.pm:845␤  in  at src/gen/BOOTSTRAP.pm:839␤  in any  at src/gen/BOOTSTRAP.pm:836␤  in method perform at /tmp/J4SoGfw3tW:19␤  in block  at /tmp/J4SoGfw3tW:36␤␤»
03:37 TimToady you might also try adding a comma after the closure in the call to .new
03:38 TimToady it does look like it might be  buglet that you are triggering somehow
03:38 TimToady n: https://gist.github.com/3936461
03:38 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Any␤  at /tmp/NRWZKXnHhO line 19 (Task.perform @ 13) ␤  at /tmp/NRWZKXnHhO line 36 (mainline @ 8) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤  at /home/p6eval/n…
03:40 gdey Cool, did not know you could run it under niecza as well. I'll revert the changes I just made (Removed Task type, and added ',' after block; and try it as well.)
03:40 TimToady it looks like niecza likes it, but you've commented out the callback so it blew up
03:41 gdey n: https://gist.github.com/3936461
03:41 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Any␤  at /tmp/UlerJuNFW9 line 19 (Task.perform @ 13) ␤  at /tmp/UlerJuNFW9 line 36 (mainline @ 8) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤  at /home/p6eval/n…
03:42 gdey Don't see where I've commented out the callback.
03:42 TimToady something's screwy with indirection somewhere, I think
03:43 TimToady it shouldn't fail if @!dependencies is empty
03:43 sorear gdey: so jnthn finally got to you, eh?
03:43 TimToady so maybe @!dependincies is containing something empty instead, that makes it have 1 element
03:44 gdey sorear: Yup.
03:44 sorear ^_^
03:45 sorear gdey: what if you make @!dependencies public?
03:46 sorear we fairly recently changed the rule so that .bless doesn't initialize private attrs
03:46 gdey How do I do that? I've been cargo-culting out of the perl6 book. And this example got me stuck.
03:47 sorear change the ! to an .
03:47 TimToady in the has
03:47 gdey k
03:47 sorear same for &.callback
03:48 * TimToady suspects it won't fix the rakudo issue, since the binding seems to be earlier than that, and is taking issue with the remaining arglist being empty
03:49 gdey same. :(
03:49 sorear Slurpy arrays with type constraints have never really worked, so I'm a little bit concerned about that
03:49 gdey n: https://gist.github.com/3936461
03:49 p6eval niecza v22-14-g136ddcf: OUTPUT«eating dinner1.␤»
03:49 gdey r: https://gist.github.com/3936461
03:49 p6eval rakudo 978492: OUTPUT«Nominal type check failed for parameter '@dependencies'; expected Positional but got Array instead␤  in method new at /tmp/qGeWoTMZk2:8␤  in block  at /tmp/qGeWoTMZk2:25␤␤»
03:50 gdey Niecza worked!
03:50 * sorear would try removing the 'Task' from line 8
03:51 gdey Yes, removing Task and making everything public now works on rakudo.
03:51 gdey r: https://gist.github.com/3936461
03:51 p6eval rakudo 978492: OUTPUT«eating dinner1.␤»
03:51 sorear rpn: https://gist.github.com/3936461
03:51 p6eval rakudo 978492, niecza v22-14-g136ddcf: OUTPUT«eating dinner1.␤»
03:51 p6eval ..pugs: OUTPUT«*** No such method in class Task: "&bless"␤    at /tmp/BhoaEV1QGl line 9, column 7-50␤»
03:56 gdey So, is there a reason why everything had to be public?
03:56 gdey Also, I add a call to the add-dependency method, and that seesm to work with the Type declared.
03:57 gdey rpn: https://gist.github.com/3936461
03:57 p6eval rakudo 978492, niecza v22-14-g136ddcf: OUTPUT«making dinner␤eating dinner1.␤»
03:57 p6eval ..pugs: OUTPUT«*** No such method in class Task: "&bless"␤    at /tmp/BGo4YkqonQ line 9, column 7-50␤»
03:57 sorear gdey: perl6-language had a freakout a few months ago over the fact that constructors allow you to set private attributes
03:57 sorear I didn't resist hard enough
03:57 sorear s/allow/allowed/
03:58 colomon_ joined #perl6
03:58 gdey So, how are you suppose to set them?
03:58 sorear r: class A { has $.x; has $!y; method setup() { $.x = $!y = 3; self; } }; say A.new.setup.perl
03:58 p6eval rakudo 978492: OUTPUT«Cannot assign to a readonly variable or a value␤  in method setup at /tmp/aS2TU2RzwG:1␤  in block  at /tmp/aS2TU2RzwG:1␤␤»
03:58 sorear r: class A { has $.x; has $!y; method setup() { $!x = $!y = 3; self; } }; say A.new.setup.perl
03:58 p6eval rakudo 978492: OUTPUT«A.new(x => 3)␤»
03:58 sorear they're also hidden from .perl now :(
03:59 sorear gdey: with an explicit assignment or assigning parameter in BUILD
04:00 Pleiades` joined #perl6
04:00 gdey Okay, the book should fixed to indicated this. I'll make a note of it. and after I've read  the chapters on Classes, and roles. I'll see if I can submit a patch.
04:01 gdey Thanks for helping get pasted this!
04:02 * TimToady frequently feels pasted...
04:02 sorear gdey: anytime ^_^
04:03 unixms left #perl6
04:03 rtxing joined #perl6
04:06 gdey ack: s/pasted/past/
04:06 sorear gdey: github/perl6/book ?
04:07 gdey sorear: yes
04:13 rking joined #perl6
04:16 sorear well, you don't need to bother with patches now ^_^
04:39 Entonian joined #perl6
04:40 kaleem joined #perl6
04:59 timbunce_ joined #perl6
05:02 moritz why not?
05:02 sorear moritz: I added gdey to perl6/book
05:03 moritz ah
05:03 moritz sorear++
05:03 moritz I misread that as "don't bother to fix it"
05:03 sorear he's been to most of the last 12 sandiego.pm meetings, consider him pre-vetted
05:06 wamba joined #perl6
05:15 CharellKing joined #perl6
05:17 sorear hello CharellKing.
05:17 bapa joined #perl6
05:42 azawawi joined #perl6
05:44 Targen joined #perl6
05:52 birdwindupbird joined #perl6
05:53 PacoAir joined #perl6
05:55 wamba joined #perl6
05:57 diakopter r: say "a" ~~ / <!!!before a> /
05:57 p6eval rakudo 978492: OUTPUT«「」␤␤»
05:57 sorear working as designed
05:58 diakopter what does !!! mean
05:58 sorear same as one !
05:59 diakopter how does !before a succeed
05:59 diakopter oh, the end :)
06:00 colomon \o
06:00 sorear colomon \o/
06:01 diakopter r: say "a" ~~ / <!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!before a> a /
06:01 p6eval rakudo 978492: OUTPUT«「a」␤␤»
06:02 sorear n: say "ab" ~~ eval q:c'/ <{"!" x 128}before b> . /'
06:02 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Action method assertion:sym<!!!> not yet implemented␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (die @ 5) ␤  at /home/p6eval/niecza/src/STD.pm6 line 5633 (STD.sorry @ 7) ␤  at /home/p6eval/niecza/src/NieczaActions.pm6 lin…
06:03 sorear hahaha
06:03 sorear std: /<!!!!!before x>/
06:03 p6eval std 64edd1c: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse metachar at /tmp/F1BkBF82PF line 1:�------> [32m/[33m�[31m<!!!!!before x>/[0m�Couldn't find final '>'; gave up at /tmp/F1BkBF82PF line 1:�------> [32m/<!!![33m�[31m!!before x>/[0m�Parse failed�FAILED 00:00 42m�»…
06:04 diakopter o.)
06:04 sorear TimToady: does this count as LTM fail?
06:05 TimToady std: /<!!!>/
06:05 p6eval std 64edd1c: OUTPUT«ok 00:00 42m␤»
06:07 TimToady std: /<...>/
06:07 p6eval std 64edd1c: OUTPUT«ok 00:00 42m␤»
06:07 TimToady std: /<....>/
06:07 p6eval std 64edd1c: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse metachar at /tmp/PPRX3kFG16 line 1:�------> [32m/[33m�[31m<....>/[0m�Couldn't find final '>'; gave up at /tmp/PPRX3kFG16 line 1:�------> [32m/<...[33m�[31m.>/[0m�Parse failed�FAILED 00:00 42m�»
06:08 azawawi hi
06:08 TimToady o/
06:08 diakopter std: / <a :=
06:08 p6eval std 64edd1c: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/gRdV2AD6CY line 1:�------> [32m/ <a :[33m�[31m=[0m�Can't call method "from" on unblessed reference at STD.pm line 53914.�FAILED 00:00 42m�»
06:08 diakopter unblessed reference buglet
06:09 TimToady you're mistaking STD for a real parser :)
06:10 diakopter n: / <a :=
06:10 p6eval niecza v22-14-g136ddcf: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/9TcueMCfTd line 1:â�¤------> [32m/ <a :[33mâ��[31m=[0mâ�¤â�¤Unhandled exception: Unable to resolve method ast in type Anyâ�¤  at /home/p6eval/niecza/sr…
06:10 diakopter heh
06:10 am0c joined #perl6
06:11 azawawi TimToady: viv -6 can be used as a Perl 6 tidy, right?
06:12 diakopter n: say "a" / <a :::+> / $_
06:12 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Cannot parse number: a␤  at /home/p6eval/niecza/lib/CORE.setting line 1443 (die @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3546 (ANON @ 11) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3548 (NumSyntax.str2num @ 5) ␤  at /h…
06:12 TimToady not really
06:12 diakopter sorear: :S
06:12 TimToady it is supposed to reproduce the exact whitespace it started with
06:12 kurahaupo joined #perl6
06:14 diakopter n: say "a" ~~ / :::+ /
06:15 p6eval niecza v22-14-g136ddcf: OUTPUT«(timeout)»
06:15 * diakopter laughs maniacally
06:16 diakopter std: / :+ /
06:16 p6eval std 64edd1c: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/pDoCZ3S_k3 line 1:�------> [32m/ :[33m�[31m+ /[0m�Can't call method "from" on unblessed reference at STD.pm line 53914.�FAILED 00:00 42m�»
06:16 * colomon thinks he may officially be on jnthn and moritz's schedule for the rest of the week.  ;)
06:20 bapa joined #perl6
06:22 diakopter lag..
06:22 colomon joined #perl6
06:24 diakopter rn: say "a" ~~ / a++ /
06:24 p6eval rakudo 978492: OUTPUT«===SORRY!===␤Quantifier quantifies nothing at line 2, near " /"␤»
06:24 p6eval ..niecza v22-14-g136ddcf: OUTPUT«#<match from(0) to(1) text(a) pos([].list) named({}.hash)>␤»
06:25 clkao joined #perl6
06:25 diakopter what does a++ mean
06:25 diakopter to niecza
06:25 obra joined #perl6
06:29 TimToady same as a+! does
06:29 TimToady or maybe it's same as a+:
06:30 TimToady yes, it's the ratchet form
06:30 TimToady n: say "aa" ~~ / a++a /
06:30 p6eval niecza v22-14-g136ddcf: OUTPUT«Match()␤»
06:31 TimToady p5 borrowed it from <mumble> some time ago, so we will maybe support it as an option
06:33 sorear n: m/[]+/ # diakopter
06:33 p6eval niecza v22-14-g136ddcf: OUTPUT«[31m===[0mSORRY![31m===[0m��Null pattern not allowed at /tmp/eh857RZc2U line 1:�------> [32mm/[[33m�[31m]+/ # diakopter[0m��Parse failed��»
06:33 sorear n: m/''+/ # diakopter
06:33 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Unable to resolve method match in type Any␤  at /tmp/5lVq4x1P98 line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4216 (module-CORE @ 579) ␤  at /home/…
06:33 diakopter o_O
06:33 sorear n: 1~~/''+/ # diakopter
06:34 p6eval niecza v22-14-g136ddcf: OUTPUT«(timeout)»
06:34 diakopter O_O
06:55 diakopter methinks quantified zero-width assertions should be detected
06:55 diakopter + and * anyways
06:57 SamuraiJack joined #perl6
06:57 diakopter phenny: tell jnthn to tell masak rn: 1~~/''+/ # + and * on zero-width assertions should be detected and warned upon or ignored for + or == ? for *
06:57 phenny diakopter: I'll pass that on when jnthn is around.
06:58 diakopter phenny: tell jnthn to tell masak indirectly and directly left recursive rules should be detected and either warned upon at compile time and/or detected and evaded at runtime
06:58 phenny diakopter: I'll pass that on when jnthn is around.
06:59 sorear phenny: tell masak diakopter has been leaving messages for you in a funny way
06:59 phenny sorear: I'll pass that on when masak is around.
07:00 brrt joined #perl6
07:00 diakopter sorear: :P phenny stopped taking my messages for masak it seems
07:01 sorear diakopter: I have a suspicion that was a one-time network glitch
07:01 diakopter phenny replied "..."
07:01 diakopter phenny: tell masak test
07:01 phenny diakopter: I'll pass that on when masak is around.
07:01 diakopter oh ha
07:02 diakopter weird
07:02 brrt \o p6
07:03 sorear phenny: tell masak another weird one  rn: grammar Int { };  say 3.0.Int ~~ Numeric
07:03 phenny sorear: I'll pass that on when masak is around.
07:04 azawawi http://feather.perl6.nl:3030/  # Sync POD toggle button
07:06 flightrecorder joined #perl6
07:17 ChoHag joined #perl6
07:26 moritz if you declare your own Int class, and you don't take care to have it do everything the compiler needs, you're in trouble
07:26 sizz joined #perl6
07:28 simcop2387 joined #perl6
07:30 domidumont joined #perl6
07:35 colomon joined #perl6
07:42 diakopter rn: say "a"~~/#␤/
07:42 p6eval rakudo 978492: OUTPUT«「」␤␤»
07:42 p6eval ..niecza v22-14-g136ddcf: OUTPUT«#<match from(0) to(0) text() pos([].list) named({}.hash)>␤»
07:42 sizz joined #perl6
07:42 diakopter moritz: yeah, but it's still a leaky LTA error
07:42 moritz diakopter: hm, what?
07:43 diakopter the Int class thing
07:43 domidumont joined #perl6
07:44 moritz diakopter: that is to be expected if you shadow classes the are used inside the compiler
07:44 sorear diakopter: would you be happy if it generated the same error, but required an explicit use MONKEY ?
07:45 sorear I mean I can see where diakopter is coming from, I wasted a day with niecza trying to figure out why STD.pm6 wouldn't compile (answer: STD contains a class named Regex)
07:46 moritz r: class Int is CORE::Int { }; say 42.0.Int
07:46 p6eval rakudo 978492: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol CORE::Int␤»
07:46 sorear nowadays almost all of niecza's compile time symbol lookups on names that do not appear directly in the source are done using the equivalent of CORE::Foo
07:46 diakopter it just seems to me that if there's an Int already in your scope, and you define another Int, the new Int would apply just for your scope, not for the compiler running in some totally different scope
07:46 sorear which is arguably also broken, but it was the most expedient way to get STD working
07:47 sorear diakopter: the compiler is treating 42.0 as Int.new(420) / Int.new(10)
07:47 sorear diakopter: the compiler's own Ints aren't affected, but the Ints that it injects into your scope are
07:48 sorear the error you get is actually from infix:</> or something equivalent, I think
07:48 sorear a constant-folding error of sorts
07:48 diakopter that could make sense
07:49 diakopter but it still seems to me the compiler shouldn't let the user code affect the way basic things like compile-time constants are parsed and folded
07:50 diakopter unless it really is the intent to allow/enable that
07:50 moritz I'd say that shadowing a base class such as Int is declaration of that intent
07:51 sorear rn: class Int { }; say 42; say Int.new
07:51 p6eval niecza v22-14-g136ddcf: OUTPUT«42␤Int.new(...)␤»
07:51 p6eval ..rakudo 978492: OUTPUT«===SORRY!===␤get_boxed_ref could not unbox for the given representation␤»
07:52 diakopter oh, and, while I'm dreaming, niecza's and rakudo's behaviors should match :)
07:53 sorear moritz: I'm starting to come around to diakopter's POV.  The user should not be forced to memorize a list of classes which have magical behavior when shadowed
07:53 sorear r: class Regex { }; /foo/
07:53 p6eval rakudo 978492: OUTPUT«===SORRY!===␤Method 'SET_CAPS' not found for invocant of class 'Regex'␤»
07:54 sorear r: say List.HOW.WHAT
07:54 p6eval rakudo 978492: OUTPUT«Perl6::Metamodel::ClassHOW()␤»
07:54 diakopter r: class NQPClassHOW { }; fail fail fail; say 'alive'
07:54 p6eval rakudo 978492:  ( no output )
07:54 sorear n: my $_Whatever = 42; say *
07:54 p6eval niecza v22-14-g136ddcf: OUTPUT«Whatever.new(...)␤»
07:55 hypolin joined #perl6
07:55 sorear n: my $__Whatever = 42; say *
07:55 diakopter oh, I guess fail is a thing
07:55 p6eval niecza v22-14-g136ddcf: OUTPUT«Whatever.new(...)␤»
07:56 sorear n: my \True = 42; say :foo
07:56 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Excess arguments to gistcat, unused named foo␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (gistcat @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1305 (say @ 7) ␤  at /tmp/R3seETPgRj line 1 (mainline @ 4) ␤  at /home/p6eval/…
07:56 sorear n: my \True = 42; say (:foo)
07:56 p6eval niecza v22-14-g136ddcf: OUTPUT«"foo" => 42␤»
07:56 moritz :-)
07:57 sorear rn: my \True = 42; say (:foo)
07:57 p6eval niecza v22-14-g136ddcf: OUTPUT«"foo" => 42␤»
07:57 p6eval ..rakudo 978492: OUTPUT«"foo" => Bool::True␤»
08:06 diakopter r: class Str; say 'alive'
08:06 p6eval rakudo 978492: OUTPUT«===SORRY!===␤This type cannot box a native string␤»
08:14 sorear r: class A is Str { }; class Str is A { }; say "foo".^parents
08:14 p6eval rakudo 978492: OUTPUT«A() Str()␤»
08:14 sorear r: class A is Str { }; class Str is A { }; say "foo".^mro
08:14 p6eval rakudo 978492: OUTPUT«Str() A() Str() Cool() Any() Mu()␤»
08:14 sorear diakopter^
08:15 diakopter heh
08:15 diakopter r: role Foo; say 'alive'
08:15 p6eval rakudo 978492:  ( no output )
08:15 diakopter o.O
08:16 sorear role blocks are deferred
08:16 diakopter oh
08:16 sorear r: role Foo { say 'alive'; say $?CLASS.^name }; class A does Foo { }; class B does Foo { }
08:16 p6eval rakudo 978492: OUTPUT«alive␤===SORRY!===␤None of the parametric role variants for 'Foo' matched the arguments supplied.␤Method 'dispatch:<.^>' not found for invocant of class 'A'␤»
08:16 domidumont joined #perl6
08:16 sorear ok, now *that* is a weird leaky bug
08:17 sorear r: role Foo { say 'alive'; say $?CLASS.HOW.name }; class A does Foo { }; class B does Foo { }
08:17 p6eval rakudo 978492: OUTPUT«alive␤===SORRY!===␤None of the parametric role variants for 'Foo' matched the arguments supplied.␤too few positional arguments: 1 passed, 2 (or more) expected␤»
08:17 sorear r: role Foo { say 'alive'; say $?CLASS.HOW.name($?CLASS) }; class A does Foo { }; class B does Foo { }
08:17 p6eval rakudo 978492: OUTPUT«alive␤A␤alive␤B␤»
08:20 daniel-s_ joined #perl6
08:21 daniel-s joined #perl6
08:26 colomon (off topic) anyone out there ever used git-tf?
08:26 diakopter team foundation?
08:27 sorear .oO( Git T F is that? )
08:27 diakopter (team foundation is Microsoft's source control thingie)
08:29 diakopter apparently yes
08:29 diakopter colomon: no, sorry :)
08:30 colomon yes, that's it.
08:30 colomon sorry you don't know, or sorry that I need to work with team foundation?  ;)
08:30 diakopter sorry I haven't used it
08:30 diakopter (not that it would help anyway; my knowledge of git is not even rudimentary)
08:31 colomon I was asking more in the "Does it work?" sense -- just trying to figure out if it is a sane approach.
08:34 diakopter wow; Microsoft released a product that runs on HP-UX, IBM AIX, Linux, Mac OS X, Solaris, Unix, Windows (git-tf)
08:35 diakopter oh, in Java
08:35 diakopter nm
08:44 sorear sleep&
08:46 dakkar joined #perl6
08:52 diakopter youtube fail
08:54 cognominal joined #perl6
08:57 cognominal_ joined #perl6
08:58 sqirrel joined #perl6
09:02 domidumont joined #perl6
09:13 cognominal__ joined #perl6
09:15 prammer joined #perl6
09:23 cognominal_ joined #perl6
09:42 flightrecorder joined #perl6
09:43 kaleem joined #perl6
09:57 flightrecorder joined #perl6
10:00 daxim joined #perl6
10:09 timbunce_ I found this interesting http://worrydream.com/LearnableProgramming/
10:10 brrt funny, yes, useful, hardly
10:10 brrt although data visualisation of variables could be a nice trick
10:11 brrt thats something for parrot 5 :-p
10:11 fgomez joined #perl6
10:18 daxim processing's api is horrible, no wonder they feel compelled to juice it up with inline hints
10:19 daxim (I learnt the language/env in may 2010)
10:20 daxim perlier it with read f.ex.  ellipse({x_pos: 65, y_pos: 50, x_radius: 60, y_radius: 60})
10:20 FROGGS joined #perl6
10:21 daxim verbose, certainly, but if they complain about cryptic numbers only, that's how you fix it.
10:22 daxim ↑ ping Su-Shee ↑
10:26 brrt there are many simpler methods;  named arguments are a very powerful hint
10:27 diakopter if only they weren't so slow
10:28 brrt named arguments do not need to be slow at all
10:29 brrt in the case where the caller knows the callee, they can obviously be 'collapsed' into positional arguments
10:29 daxim processing is already slow as molasses
10:29 tadzik well, do you have benchmarks in handy? :)
10:35 jaffa4 joined #perl6
10:37 dalek roast: db068a9 | moritz++ | S05-modifier/ignorecase.t:
10:37 dalek roast: fix test plan
10:37 dalek roast: review: https://github.com/perl6/roast/commit/db068a9d79
10:40 brrt named booleans (a la p6's :r :w etc) kan even be compiled into a bitmap
10:40 brrt again, as long as the caller knows the calllee
10:43 jaffa4 r: exception endc; try {my $b= 1; }
10:43 p6eval rakudo 978492: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&endc' called (line 1)␤Undefined routine '&exception' called (line 1)␤»
10:50 gdey_ joined #perl6
10:50 CloseScreen joined #perl6
10:55 rindolf joined #perl6
10:55 CloseScreen left #perl6
10:57 cognominal joined #perl6
10:58 Su-Shee dalek: yes?
10:58 Su-Shee err daxim
10:59 daxim discussion about processing, but it already petered out
10:59 Su-Shee processing as in "I'm processing this data" or "the visualization toolkit processing" :)
10:59 daxim the latter, of course
11:00 Su-Shee ah :)
11:05 Su-Shee_ joined #perl6
11:11 erkan joined #perl6
11:11 erkan joined #perl6
11:15 brrt joined #perl6
11:47 Pompel joined #perl6
12:02 sivoais joined #perl6
12:35 birdwindupbird joined #perl6
12:37 tokuhir__ joined #perl6
12:39 PacoAir joined #perl6
12:59 mikemol joined #perl6
13:00 hash_table joined #perl6
13:04 Psyche^ joined #perl6
13:24 PerlJam good morning #perl6!
13:25 tadzik hello PerlJam
13:25 GlitchMr joined #perl6
13:30 bluescreen10 joined #perl6
13:33 bbkr__ r: Failure.new("foo").() # should Failure have strict Exception type check in constructor to avoid such LTA errors?
13:33 p6eval rakudo 978492: OUTPUT«No such method 'throw' for invocant of type 'Str'␤  in method <anon> at src/gen/CORE.setting:9955␤  in  at src/gen/Metamodel.pm:2401␤  in any find_method_fallback at src/gen/Metamodel.pm:2389␤  in any find_method at src/gen/Metamodel.pm:925␤  in  at src/gen/BOOTSTR…
13:34 moritz wouldn't hurt, I think
13:42 * bbkr__ reports
13:51 flussence r: my @a; @a[0] = 1; @a[1_000_000_000_000] = 2;
13:52 tadzik can you hear that? That's OOM killer whimpering ;)
13:52 * FROGGS .oO( wait for it ... )
13:52 tadzik DARY!
13:52 FROGGS ;o)
13:52 FROGGS #1
13:52 moritz nah, p6eval runs under memory limit
13:52 pmurias joined #perl6
13:53 flussence er... shouldn't the ulimit catch that by now?
13:53 moritz it should :-)
13:53 moritz r: say 'alive';
13:53 flussence whoops, sorry 'bout that.
13:53 p6eval rakudo 978492: OUTPUT«ResizablePMCArray: index out of bounds!␤  in block  at src/gen/CORE.setting:5996␤  in block  at /tmp/P9AE9r29I3:1␤␤»
13:53 p6eval rakudo 978492: OUTPUT«alive␤»
13:54 FROGGS cool
13:54 flussence ...?!
13:54 * brrt had actually expected a sigsegv
13:54 mtk joined #perl6
13:56 * flussence was looking for a sparse array package on cpan and didn't find one, was wondering if p6 had it built in
13:56 flussence I guess I'll just write one :)
13:57 arnsholt For sparse arrays in Perl 5, I think you're looking for PDL
13:59 flussence yeah I know there's that, but I'm not sure if that's overkill or not... all I need to do is access a bunch of DB rows sequentially and by their (spread-out) row IDs. Making a separate hash works but seems a bit wasteful.
14:00 * [Coke] finally watched bunce's presentation on the p5' devel::sizemegraph. quite nifty.
14:00 * timbunce_ blush
14:03 kaare_ joined #perl6
14:06 azawawi joined #perl6
14:08 gdey joined #perl6
14:08 flightrecorder joined #perl6
14:10 skids joined #perl6
14:14 stopbit joined #perl6
14:20 FROGGS joined #perl6
14:20 [Coke] bah, you do great work. no blushing!
14:23 fgomez joined #perl6
14:26 azawawi hi #perl6
14:26 brrt timbunce_ can you repost the link
14:26 brrt hi azawai
14:27 timbunce_ brrt: try http://a20.video4.blip.tv/3990001922812/Timbunce-PerlMemoryUseAndDevelSizeMeAtYAPCAsia2012311.mov
14:27 timbunce_ See also http://blog.timbunce.org/2012/10/05/introducing-develsizeme-visualizing-perl-memory-use/
14:28 mj41 joined #perl6
14:31 azawawi brrt: http://feather.perl6.nl:3030/
14:34 benabik joined #perl6
14:35 brrt timbunce_: thanks
14:36 benabik_ joined #perl6
14:36 [Coke] timbunce_: I wish I had a tool like that for my day to day work language.
14:37 timbunce_ I can recommend a language that has a tool like that ;)
14:37 azawawi so https and perl6 is a no-no atm right?
14:38 azawawi im trying to open github urls inside farabi6... github browser :0
14:38 azawawi :)
14:39 azawawi imagine you have all of modules.perl6.org on github and you could browse it via farabi via autocomplete... that's one goal
14:39 * azawawi dreams
14:40 * azawawi is fixing perl6 syntax highlighting inside farabi6 by borrowing from perl6.vim.
14:46 hash_table joined #perl6
14:55 brrt gotta love p5 internals
14:55 Pleiades` joined #perl6
14:56 flussence I was just reading about ~~ in p5... it does things in the opposite order to 6's $obj.ACCEPTS($lhs). Eww.
14:56 arnsholt flussence: For your sparse array thing, I'd just try the hash and see how it works
14:57 arnsholt Just factor it so that you can drop in a sparse array later if you need to
14:57 flussence yeah, I just went with that in the end. The code/data are both small enough to not care about, it was mostly a curiosity :)
14:58 colomon joined #perl6
15:01 GlitchMr ~~ in Perl 5? Wasn't it made long time ago.
15:02 tadzik not so long ago. And they already regret it :)
15:03 GlitchMr I still don't see why Perl 5 needs switch statement...
15:03 tadzik it's useful
15:03 tadzik no one likes to type too much
15:03 GlitchMr In many cases hash of subroutine references or if else is better
15:04 tadzik whatever floats your goat :)
15:05 GlitchMr But well, I rarely had need to use switch () {} statement
15:05 GlitchMr But switch (true) { } is probably the worst thing I've seen
15:06 brrt i have used switch in p6, to make something of a grammar
15:06 brrt eh, p5 that is
15:10 bapa joined #perl6
15:11 bapa joined #perl6
15:13 havenn joined #perl6
15:18 bapa joined #perl6
15:26 skids useful switch idiom: given (complex_expression) { when Something { return $_ }; default return { fail() } } # avoids rerunning complex_expression or declaring a temp variable.
15:29 daxim most of the time, you'll jiggle it so that complex_expression is true or false and then it becomes simply  return complex_expression;
15:31 skids Well, that assumes returning a Bool is useful to the caller, and they don't need complex_expression's result.
15:32 skids And you are satisfied with using False as a failure status.
15:32 skids Anyway, switches have their uses.
15:33 Pleiades` joined #perl6
15:37 bapa joined #perl6
15:50 thou joined #perl6
15:55 jnthn evening o/
15:55 phenny jnthn: 02:07Z <diakopter> tell jnthn tell masak another weird one  rn: grammar Int { }; say 3.0.Int ~~ Numeric
15:55 phenny jnthn: 06:57Z <diakopter> tell jnthn to tell masak rn: 1~~/''+/ # + and * on zero-width assertions should be detected and warned upon or ignored for + or == ? for *
15:55 phenny jnthn: 06:58Z <diakopter> tell jnthn to tell masak indirectly and directly left recursive rules should be detected and either warned upon at compile time and/or detected and evaded at runtime
15:55 diakopter sry
15:55 diakopter phenny was misbehaving temporarily
15:56 diakopter jnthn: still, you might be interested in that error
15:56 jnthn r: grammar Int { }; say 3.0.Int ~~ Numeric
15:56 p6eval rakudo 978492: OUTPUT«===SORRY!===␤get_boxed_ref could not unbox for the given representation␤»
15:57 jnthn You redefined Int, and broke the API for what Int needs. You got what you deserved.
15:57 diakopter moritz and sorear and I discussed it for a while
15:58 jnthn It *may* be that we tie constants to CORE::Int.
15:58 Pleiades` joined #perl6
15:58 diakopter I still maintain the user shouldn't be able to redefine important things that are used at compilation time
15:58 jnthn That'd deal with it, at the expense of other things.
15:59 jnthn Perl ain't too much into making hard things impossible though. :)
16:00 diakopter right but in this case a hard to know thing is too easy; sorear mentioned the user shouldn't have to memorize a long list of names not to use
16:01 diakopter (why would the user know there is an Int)
16:01 diakopter (or Regex)
16:01 diakopter r: class Regex { }; / a /
16:01 p6eval rakudo 978492: OUTPUT«===SORRY!===␤Method 'SET_CAPS' not found for invocant of class 'Regex'␤»
16:02 cognominal_ joined #perl6
16:02 pmurias being apple to redefine what the literals create seems imporant
16:02 diakopter r: class Str { }; 'alive'
16:02 p6eval rakudo 978492: OUTPUT«===SORRY!===␤This type cannot box a native string␤»
16:03 diakopter right, and niecza does it without a problem
16:03 jnthn I think our users care much more about me making Rakudo faster, filling out missing features, fixing bugs they're *likely* to run in to than they do having me tied up discussing things like this.
16:04 * pmurias agrees
16:04 diakopter (with whom else would I discuss it?)
16:04 * TimToady perhaps
16:04 TimToady if it's really a language design issue
16:05 jnthn We currently have two implementations who've called things two different ways, both with good reasons. It feels like a langauge design one to me. :)
16:06 diakopter oh
16:07 TimToady I would like to understand at what level the difference is.  Is it a namespace issue where niecza makes a namespace distinction that rakudo doesn't?  Or is it niecza locking something down that maybe should remain flexible, like adding multis to built-in operators?
16:08 MayDaniel joined #perl6
16:08 jnthn TimToady: When Rakudo sees an Int literal, like 42, it looks up Int using the normal rules.
16:08 jnthn TimToady: That means it fines the nearest lexical definition first.
16:08 diakopter sorear said http://irclog.perlgeek.de/perl6/2012-10-23#i_6089735 and http://irclog.perlgeek.de/perl6/2012-10-23#i_6089737
16:09 jnthn TimToady: The problem we're getting is people defining an Int of their own, which doesn't look like other things expect it to (for example, it doesn't know how to box an int).
16:09 jnthn And then complaining that things don't work. :)
16:09 diakopter "I mean I can see where diakopter is coming from, I wasted a day with niecza trying to figure out why STD.pm6 wouldn't compile (answer: STD contains a class named Regex)"
16:09 jnthn By normal lexical lookup rules, it's not surprising.
16:09 diakopter I totally didn't expect lexical references to be injected
16:10 jnthn diakopter: "injected"?
16:10 diakopter that's what was surprising
16:10 TimToady what do you mean by "injected"?
16:10 jnthn The only reasons your program sees the setting is because it's lexically outside the compiling program.
16:10 diakopter oh; that's how sorear explained it to me; maybe we got it wrong
16:11 geekosaur hm, do you mean something like in GHC it uses Prelude definitions unless specifically told otherwise when translating things, such that if p6 did the same thing, in the regex example earlier it would have used the setting's Regex instead of the lexical one?
16:11 diakopter he said the compiler was emitting an Int.new and then constant folding was evaluating it in that constext
16:11 diakopter context
16:11 jnthn Thing is that, all you're doing by saying "these types are not looked up by the compiler to construct literals" is creating a different list of things to remember. :)
16:12 jnthn diakopter: "that context"?
16:12 diakopter the lexical context of the 3
16:12 jnthn diakopter: Constant folding should evaluate stuff in the lexical context where the constant appears.
16:12 diakopter r: class Int { }; 3
16:12 p6eval rakudo 978492: OUTPUT«===SORRY!===␤get_boxed_ref could not unbox for the given representation␤»
16:13 diakopter okay; I never said it shouldn't
16:13 jnthn OK, then the upshot is what you just observed.
16:14 TimToady what we've got here is a basic philosophical difference over which language desugaring happens into
16:14 TimToady into the "current" language as defined by the lexical scope (rakudo), into some primitive underlying language in which all user-visible languages are defined (niecza)
16:14 fgomez joined #perl6
16:16 rtr_ joined #perl6
16:16 diakopter personally, I think rakudo's should win, but it should at least warn of an override of important things, unless MONKEY_TYPING is on
16:16 TimToady that might be useful, sure
16:16 jnthn TimToady: Well, we know that if constant folding 1 + 2, you'd best use the current lexical definition of + :)
16:16 TimToady but as jnthn++ says, it's not the top of his priority queue just now :)
16:17 diakopter moritz suggested the monkey thing
16:17 TimToady jnthn: I think we're actually agreed that Perl 6 wants to keep from privileging a lot of primitives
16:17 TimToady so the drive is toward the rakudo unification
16:18 TimToady but I can see the LTA-ness of the results too
16:18 jnthn To me having constants have different semantics feels very odd. But I can see diakopter++'s "be nice to the unsuspecting user" argument too.
16:18 jnthn I'm struggling a bit on a concrete way to do the being nice bit.
16:18 TimToady well, let's all let it sit in our backbranes for a while; maybe something will become more obvious later
16:18 jnthn *nod*
16:19 diakopter well, you'll see a bunch of other LTA errors I submitted to masak earlier that have to do with naming conflicts/overrides
16:19 TimToady sure, that's all grist for the backbrane to process :)
16:21 cognominal_ joined #perl6
16:21 TimToady but rather than just fixing individual cases, we want to look for some simple principle; for instance, maybe we want a general rule against shadowing outer type definitions without an explicit trait of some sort
16:21 spider-mario joined #perl6
16:22 pmurias we could warn when the user is shadowing them with something incompatible
16:22 TimToady (or a derivation from the outer type would be okay too, I suppose)
16:23 TimToady compatibility is usually expressed by derivation in standard OO, so maybe the parenthetical remark answers that
16:23 [Coke] OT: can someone transliterate פשט for me?
16:24 cosimo joined #perl6
16:25 [Coke] (pronounce probably being a better word than transliterate).
16:25 geekosaur errr, did that fail on RTL?
16:26 TimToady is the Pe supposed to be first or the Tet?
16:26 geekosaur ^^ that
16:26 [Coke] is it vaguely "pashot" ?
16:27 geekosaur if the pe is first, it's http://en.wikipedia.org/wiki/Peshat
16:27 [Coke] geekosaur: quite possibly, pulled it from a source I wouldn't trust to get RTL right.
16:28 geekosaur my Hebrew is not quite up to knowing if the other way around forms a valid word, and my dictionaries are in storage
16:28 [Coke] huh. then "probably source of english "upshot"" is possibly correct. Nifty. geekosaur++ TimToady++
16:28 diakopter downside
16:29 jnthn Good news: categorically-better does (as I hoped) also unbust pre-compilation of modules that declare operators.
16:29 TimToady \o/
16:30 colomon ]o/
16:30 colomon errr, \o/
16:30 domidumont joined #perl6
16:30 jnthn Got it merged locally, just giving spectest a last run through.
16:30 TimToady that looks like "Teacher, I have a question!"
16:30 diakopter 」o「
16:31 TimToady as opposed to ]o which is just wanting to answer the question :)
16:32 dalek rakudo/nom: 6e5ae1f | jnthn++ | src/Perl6/Grammar.pm:
16:32 dalek rakudo/nom: Start cleaning up custom operators.
16:32 dalek rakudo/nom:
16:32 dalek rakudo/nom: Move the check for if the operator is already parsed into gen_op, and
16:32 dalek rakudo/nom: rename it to add_categorical, to move towards STD.
16:32 jnthn bah
16:32 jnthn Anyway, it's merged.
16:33 dalek joined #perl6
16:34 jnthn TimToady: My statement ended up with a rebless thingy like STD. Difference: I update $*ACTIONS there too, since that is mixed in to when adding circumfixes.
16:34 jnthn The added operators are done with mixing in, like STD. :)
16:35 * TimToady reblesses rakudo :)
16:35 jnthn Another little notch of convergence...
16:35 TimToady jnthn++ mixes in mixing in :D
16:36 mtk joined #perl6
16:36 jnthn TimToady: How attached are you to mixing in when it comes to the qoute language stuff?
16:37 TimToady it still seems like the right way to do it to me
16:38 TimToady otherwise you hide un-nameable and hence un-overrideabla semantics in your quote parsing procedures
16:38 jnthn OK. I know pmichaud++ is fond of the contextual approach.
16:38 TimToady it is perhaps the case that we don't need to re-derive the language on every quote
16:38 TimToady (STD relies on caching here to avoid regenerating the quote language on every quote)
16:39 TimToady but it does recalculate the identity of the language each time
16:39 jnthn Does STD throw away the entire set of NFAs/DFAs/whatever it computed for LTM each time it derives a new language?
16:39 TimToady that bit could perhaps be optimized into variables if we're careful not to break lexical language definitions
16:39 jnthn Or does it manage to track dependencies?
16:40 TimToady it tries to recalculate only the categories that changed, and tries to re-use bits of the previous language where they are immutable and re-useable
16:41 jnthn Is how it does that written up somewhere? :)
16:41 havenn joined #perl6
16:41 TimToady fates were done as linked lists just so that the tails could be reused, for instance
16:41 TimToady um, er...
16:41 jnthn :)
16:41 diakopter "the way you'd expect :D"
16:41 [Coke] ]o/ . o O (ring ring ring ring ring ring ring ring bananaphone)
16:42 jnthn It's not something I'm planning to do right now, I'm just aware that if we start doing much more language deriving stuff in parsing, it may need to happen for performance reasons.
16:42 TimToady I'm sure I coulda written a lot of papers on the design of Perl 6 by now, and most of them would have been retracted by now :)
16:43 moritz retract papers? just because you found a better way to do something? :-)
16:43 TimToady well, redact papers anway
16:44 TimToady if I were academic, I could make a career out of never finishing Perl 6
16:44 TimToady thankfully, I'm not, so I have other failure modes :)
16:44 TimToady like not writing enough about the innards of STD :)
16:45 [Coke] ... terredactyls.
16:45 TimToady .oO("It's a self-documenting language!")
16:45 * TimToady imagines terredactylic poetry...
16:46 moritz .oO( it parses itself, surely it documents itself too! )
16:47 diakopter n: sub &say { }; say
16:47 p6eval niecza v22-14-g136ddcf: OUTPUT«[31m===[0mSORRY![31m===[0m��Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/p3p0AXsZ7n line 1 (EOF):�------> [32msub &say { }; say[33m�[31m<EOL>[0m��Unhandled exception: Chec…
16:47 * diakopter imagines a "grr..."
16:47 jnthn Clothe that say!
16:47 sjohnson joined #perl6
16:48 diakopter r: sub &say { }; say
16:48 p6eval rakudo 978492: OUTPUT«===SORRY!===␤Missing block␤at /tmp/wMt78TiL71:1␤»
16:48 TimToady walk &
16:50 diakopter moritz: hopefully it ends up writing itself too
16:56 diakopter commute, ish &
17:03 * azawawi thinks, 'I need a workaround to workaround around this workaround... :)'
17:03 moritz azawawi: or maybe you need a fix :-)
17:05 jnthn shop, to get dinner stuffs &
17:05 mtk joined #perl6
17:05 cognominal joined #perl6
17:05 azawawi moritz: :)
17:09 masak why does Italian feel so easy to read?
17:09 phenny masak: 00:41Z <diakopter> ask masak maybe append to other ticket?  r: my Positional[Int] of Str $x;
17:09 phenny masak: 01:24Z <diakopter> tell masak dunno; is this right?  r: say "a" ~~ / <new> /
17:09 phenny masak: 01:27Z <diakopter> tell masak pretty sure bug here rn: grammar A { rule TOP { <BUILD> }; rule BUILD { a } }; say A.parse("a")
17:09 phenny masak: 01:30Z <diakopter> tell masak also, different error?  rn: grammar A { rule TOP { <new> }; rule new { a } }; say A.parse("a")
17:09 phenny Further messages sent privately
17:09 masak as indeed they are.
17:09 masak phenny: it en "e via, verso nuove avventure"?
17:09 phenny masak: "and off to new adventures" (it to en, translate.google.com)
17:09 masak my point exactly.
17:10 masak that "verso" is especially cute.
17:10 masak std: my Positional[Int] of Str $x;
17:10 p6eval std 64edd1c: OUTPUT«ok 00:00 43m␤»
17:10 moritz masak: because you know esperanto, maybe maybe other latin-based languages?
17:10 masak moritz: yes, I think so.
17:11 masak moritz: but that's only one factor; Italian does look very easy to read even besides that.
17:11 masak r: say "a" ~~ / <new> /
17:11 p6eval rakudo 978492: OUTPUT«「」␤ new => 「」␤␤»
17:11 moritz I know somebody who speaks French and Spanish, and learned Italian by learning the diffs/patches :-)
17:12 masak diakopter: doesn't look outright wrong to me.
17:12 masak rn: grammar A { rule TOP { <BUILD> }; rule BUILD { a } }; say A.parse("a")
17:12 p6eval niecza v22-14-g136ddcf: OUTPUT«#<match from(0) to(1) text(a) pos([].list) named({"BUILD" => #<match from(0) to(1) text(a) pos([].list) named({}.hash)>}.hash)>␤»
17:12 p6eval ..rakudo 978492: OUTPUT«===SORRY!===␤Method 'match' not found for invocant of class 'String'␤»
17:13 changedNicks joined #perl6
17:14 masak diakopter: it's hard to say who is wrong, compiler or programmer, when the programmer is deliberately trying to cause mischief.
17:14 masak r: grammar A { rule TOP { <.pos> } }; say A.parse("a")
17:14 p6eval rakudo 978492: OUTPUT«Can only use repr_get_attr_int on a SixModelObject␤  in regex TOP at /tmp/vX72vREr43:1␤  in method parse at src/gen/CORE.setting:10166␤  in block  at /tmp/vX72vREr43:1␤␤»
17:14 masak yeah, well.
17:14 masak rn: grammar Int { }; say 3.0.Int ~~ Numeric
17:14 p6eval niecza v22-14-g136ddcf: OUTPUT«True␤»
17:14 p6eval ..rakudo 978492: OUTPUT«===SORRY!===␤get_boxed_ref could not unbox for the given representation␤»
17:15 moritz we've discussed that one earlier today
17:15 imarcusthis joined #perl6
17:15 masak ok, I won't submit anything until I've caught up on the backlog.
17:15 moritz rakudo constructs the 3.0 as 30/10, which is made of two Ints
17:15 moritz and since a dysfunctional Int was provided, it's no surprise it blows up
17:16 azawawi so when is the *next-generation* rakudo star?
17:18 colomon rn: grammar Int { }; say 3.0;
17:18 p6eval niecza v22-14-g136ddcf: OUTPUT«3␤»
17:18 p6eval ..rakudo c487a5: OUTPUT«===SORRY!===␤get_boxed_ref could not unbox for the given representation␤»
17:19 mtk joined #perl6
17:20 azawawi http://paste.debian.net/203038/  # farabi6 now works when installed from panda... :)
17:23 fgomez joined #perl6
17:24 azawawi hmm any way to get https url under perl6?
17:29 [Coke] azawawi: I don't understand what you mean by next gen.
17:34 azawawi [Coke]: next version
17:36 masak azawawi: a Star release is usually cut about a week after the monthly Rakudo compiler release.
17:37 azawawi masak: thanks
17:40 havenn joined #perl6
17:40 moritz azawawi: re https, shell out to curl or wget
17:46 [Coke] or perhaps nativecall libcurl
17:47 azawawi moritz: that would work :)
17:47 spider-mario joined #perl6
17:47 azawawi [Coke]: thanks
17:48 azawawi im a win32 programmer so shelling out and things like that is not a thing we think of on win32 land :)
17:48 spider-mario_ joined #perl6
17:51 rindolf azawawi: hi.
17:51 rindolf azawawi: Farabi6 still crashes.
17:51 changedNicks joined #perl6
17:52 rindolf azawawi: http://paste.debian.net/203056/
17:55 azawawi rindolf: could you try a quick HTTP::Easy sample (if it works or not)?
17:56 rindolf azawawi: yes, I can - which one?
17:56 azawawi rindolf: https://github.com/supernovus/perl6-http-easy/
17:56 azawawi rindolf: https://github.com/supernovus/perl6-http-easy/test # to be exact
17:56 masak more like https://github.com/supernovus/perl6-http-easy/tree/master/test
17:56 azawawi rindolf: bad link... https://github.com/supernovus/perl6-http-easy/blob/master/test/test.p6 :)
17:56 azawawi masak: thanks
17:57 rindolf azawawi: [2012-10-23T17:57:15Z] Started HTTP server.
17:58 mtk joined #perl6
17:58 azawawi rindolf: quick question, what browser are you using?
17:59 rindolf azawawi: Firefox.
17:59 rindolf firefox-16.0.1-2.mga3
18:01 arlinius joined #perl6
18:01 arlinius ias joins
18:02 arlinius oops hi
18:02 rindolf arlinius: hi.
18:02 masak hello, arlinius.
18:02 imarcusthis- joined #perl6
18:04 azawawi_ joined #perl6
18:04 azawawi_ rindolf: i pushed a possible fix... please { git pull }
18:07 rindolf azawawi_: to which repository?
18:07 azawawi_ rindolf: panda install it :)
18:07 rindolf azawawi_: OK.
18:07 rindolf azawawi_: panda install what?
18:08 azawawi_ rindolf: panda install Farabi6
18:08 rindolf azawawi_: OK.
18:09 rindolf azawawi_: http://paste.debian.net/203063/
18:10 mtk joined #perl6
18:10 havenn joined #perl6
18:12 azawawi_ rindolf: at least we fixed that :)
18:12 preflex joined #perl6
18:13 diakopter masak: I'm willing to concede that not all leaky errors are LTA
18:14 rindolf azawawi_: fixed what?
18:15 azawawi_ rindolf: the previous bug
18:16 rindolf azawawi_: well, not it doesn't serve a port.
18:16 rindolf azawawi_: so it made matters worse.
18:17 azawawi_ rindolf: what puzzled me is the version you're using
18:17 marloshouse_ joined #perl6
18:17 azawawi_ rindolf: im using rakudo star 2012.09 (from the downloads)
18:17 rindolf azawawi_: OK.
18:18 cognominal joined #perl6
18:19 azawawi_ rindolf: cd ~; farabi6  # maybe the http-easy lib/
18:19 cognominal joined #perl6
18:19 rindolf azawawi_: OK, now it's better.
18:19 diakopter masak: but only when it's still immediately obvious where in the source the problem occurred
18:20 rindolf azawawi_: http://paste.debian.net/203079/ - I'm still getting a crash.
18:20 diakopter masak: because at least then the user has a place to start
18:21 diakopter masak: also, the error shouldn't be so far removed from the code that the naive user has no clue what he did wrong
18:22 masak diakopter: in a stricter language it would be easy to just outlaw combinations of distant features that the designer can't think of a use for.
18:22 masak in Perl 6, not so easy.
18:22 diakopter personally, I'm in favor of adding compile-time checks but not run-time checks
18:23 diakopter (when needed)
18:23 havenn joined #perl6
18:24 diakopter I mean, an uncaught null reference shouldn't crash the VM, but the user should also know the stack trace for the thread that failed and which thread it was
18:24 azawawi_ rindolf: http://irclog.perlgeek.de/perl6/2012-09-29#i_6026245
18:25 azawawi_ rindolf: http://feather.perl6.nl:3030/  # to use it
18:25 diakopter azawawi_: that's neat
18:26 diakopter one bug report: pressing F5 doesn't cancel the previous F5 event
18:26 diakopter (found because there was a few seconds delay after pressing F5 so I pressed it again)
18:26 fgomez joined #perl6
18:26 azawawi_ diakopter: yeah... i optimized perlito to be loaded on demand
18:27 diakopter what does Farabi mean
18:28 azawawi_ http://en.wikipedia.org/wiki/Al-Farabi
18:28 rindolf azawawi_: Firefox can't establish a connection to the server at feather.perl6.nl:3030.
18:29 rindolf http://feather.perl6.nl/ - this page is out-of-date.
18:29 snearch joined #perl6
18:30 azawawi_ rindolf: restarted it
18:31 rindolf azawawi_: OK.
18:31 rindolf azawawi_: nice, working now.
18:32 masak diakopter: compile-time checks for things that are obviously wrong, yes.
18:32 masak diakopter: which part of adding a rule 'new' to a grammar and then calling it is obviously wrong?
18:33 diakopter masak: iirc that one was more for niecza and I wasn't sure whether rakudo was right either
18:33 diakopter n: say "a" ~~ / <new> /
18:33 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: System.InvalidCastException: Cannot cast from source type to destination type.␤  at Niecza.Kernel.DefaultNew (Niecza.Frame th, Niecza.P6any proto, Niecza.VarHash args) [0x00000] in <filename unknown>:0 ␤  at Run.CORE.C189Mu.new (Niecza…
18:34 diakopter at the time someone (TimToady?) said it probably wasn't wrong I think
18:34 jnthn You're calling new on a Cursor. That gives back a Cursor. The regex engine sorta kinda knows-ish what to do
18:35 masak that's my point.
18:36 azawawi_ rindolf: something is not 100% right here. Did you install rakudo via aptitude? any chance that you can install rakudo star 2012.09 and try it?
18:36 azawawi_ rindolf: im intrigued why this is happening
18:36 diakopter masak: did you see the rn: grammar A { rule TOP { <new> }; rule new { a } }; say A.parse("a")
18:36 diakopter that one I think is more interesting
18:37 masak I saw it.
18:37 masak I agree that they are *interesting*, in that they express a combination of features I think no-one has combined before.
18:37 jnthn r: grammar A { rule TOP { <new> }; rule new { a } }; say A.parse("a")
18:37 p6eval rakudo c487a5: OUTPUT«Default constructor only takes named arguments␤  in method new at src/gen/CORE.setting:703␤  in any !reduce at src/stage2/QRegex.nqp:671␤  in any !cursor_pass at src/stage2/QRegex.nqp:638␤  in regex new at /tmp/c5O_mmOcNr:1␤  in regex TOP at /tmp/c5O_mmOcNr:1␤  in …
18:38 masak as such, they at least invite us to think about whether to allow those combinations, or insert checks against them.
18:38 masak but the above doesn't look like Rakudo failing to me.
18:38 jnthn Yeah, it's clear what's going on there.
18:38 masak it looks like Rakudo playing by very predictable rules.
18:38 masak and succeeding at it.
18:38 jnthn It found Mu in $*ACTIONS
18:38 jnthn And then called .new($/) as it always does
18:38 diakopter not at all. if a person is constructing a grammar and learning Perl 6, how are they to know that they could be clobbering an important method by naming it that
18:38 jnthn And that led to the unsurprising error you get.
18:39 diakopter of course it makes sense to someone who's an expert at the language
18:39 diakopter of course it's unsurprising to an expert in the language
18:39 jnthn diakopter: I think anybody learning Perl 6 will encounter new, of all methods, pretty early on.
18:40 diakopter one can still consider new methods and not realize that they can clobber a built in constructor simply by wanting a rule named 'new'
18:40 diakopter if they don't know grammar rules are methods
18:41 diakopter I was making the same argument for clobbering Int with brokenness. The user may not even know what Int is
18:41 diakopter (or Regex)
18:41 diakopter or that things can be clobbered
18:43 diakopter if a seasoned programmer was learning Perl 6, and saw that error if they created a rule named new, how are they to know that *naming* a rule 'new' caused the problem (if they've added 10 rules without running it) (even though the error says the error occurred in regex new)
18:43 diakopter .. imho they would say 'wtf; this language is stupid'
18:44 diakopter .. or at least "well, that's a totally unhelpful error"
18:44 rindolf azawawi_: I build rakudo git master from source.
18:46 diakopter my point is that such clobberings should be warned upon at compile-time unless the user has declared sorcerer level with SIMIAN_TYPING
18:46 diakopter or whatever
18:46 diakopter IAMP6SORCERORDONTWARNME
18:46 azawawi_ rindolf: i'll install the latest and see
18:47 brrt joined #perl6
18:49 masak diakopter: you make a good point.
18:50 diakopter cryptic error messages are devastating, imho, because they can create so much uncertainty. "what don't I understand?" "is my understanding correct but I made a mistake?" "is this a corner case of the language implementation that hasn't been handled?" (this is this most probable imho)
18:51 diakopter many many times I have wracked my brain among those 3 possibilities on errors in various languages, because I routinely see instances of all 3
18:51 diakopter (once I figure them out)
18:52 diakopter but they can waste so much time and effort and anxiety trying to figure out which of those 3 it is that it ruins the experience of the language forever, or at least adds 10m straws to the camel's back
18:52 diakopter <pun intended>
18:53 flussence I think a nice fix would be to steal chrome/v8's idea of parallel universes that can't tread on each other's namespace.
18:53 diakopter s/this is this most probable/this is this most probable for someone to imagine/
18:53 azawawi_ so where do i find info about this --gen-nqp option :)
18:54 diakopter s/this is this/this is the/
18:54 rindolf azawawi_: thanks.
18:55 diakopter definitely the unhandled corner cases or implementation bug occurs much less often than the others, but it does occur so I do consider it if I can't figure out anything else
18:55 diakopter lunch&
18:56 REPLeffect joined #perl6
18:59 flightrecorder joined #perl6
19:13 diakopter still, regardless of the outcome, the time spent diagnosing is not always beneficial towards learning more about the language or implementation
19:13 moritz diakopter: fwiw I'm not opposed to reports about weird bugs, as long as they clearly state what the expected beahvior is, and why
19:14 moritz otherwise every so often the behavior changes, and nobody knows whether to close the ticket or not
19:14 moritz and that just sucks up resources
19:14 moritz even better, when you know what should happen, write them as tests in the first place
19:15 diakopter is it possible to test for exception class that doesnt exist?
19:15 diakopter (I honestly dont know)
19:15 moritz you can spec the exception class, and fudge the test
19:16 diakopter ah
19:17 diakopter I dont know, I can see 'new' used as a rulename without a prohlem
19:18 diakopter BUILDALL, not so mu h
19:18 diakopter much
19:21 diakopter let me put it this way - I think it much superior to be a compiletime warning than a faq
19:22 diakopter ("what does this error message mean?" "builtin clobbering"
19:22 diakopter )
19:23 sorear diakopter:
19:23 sorear 04:55 <sbp> if it's about masak's messages, he was probably sent two identical  messages in a row
19:23 sorear 04:55 <sbp> "..." is what phenny says when she detects repetition in her output
19:23 sorear 04:55 <sbp> it's to prevent bot loops
19:24 diakopter ah
19:25 diakopter I didnt think I did that, at first
19:29 masak I agree that compile-time errors are more effective than FAQ entries.
19:31 flussence just so long as you don't end up with a FAQ for compile errors :)
19:33 cognominal joined #perl6
19:33 dalek nqp: cb13fd5 | jnthn++ | src/QRegex/Cursor.nqp:
19:33 dalek nqp: Sketch a method for pre-computing protoregex NFAs.
19:33 dalek nqp: review: https://github.com/perl6/nqp/commit/cb13fd558a
19:33 dalek nqp: 0fdb57e | jnthn++ | src/ (3 files):
19:33 dalek nqp: Refactor handling of alternation NFAs.
19:33 dalek nqp:
19:33 dalek nqp: Don't stash the label offsets in the fates list. This is just as
19:33 dalek nqp: efficient, but should enable us to compute the NFA at compile time.
19:33 dalek nqp: review: https://github.com/perl6/nqp/commit/0fdb57e8ed
19:34 dalek nqp: 161fa44 | jnthn++ | src/stage0/ (9 files):
19:34 dalek nqp: Update bootstrap.
19:34 dalek nqp: review: https://github.com/perl6/nqp/commit/161fa44562
19:34 dalek nqp: 995a21b | jnthn++ | src/ops/nqp.ops:
19:34 dalek nqp: Eliminate now-unused op variant.
19:34 dalek nqp: review: https://github.com/perl6/nqp/commit/995a21bf9c
19:37 masak (op GCing)++
19:38 brrt left #perl6
19:40 sftp joined #perl6
19:45 * jnthn now has a Rakudo that spectests in 229s instead of 262s on his box o/
19:47 rindolf jnthn: awesome.
19:47 rindolf jnthn++
19:47 masak yay.
19:48 masak rn: say (229 - 262)/262
19:48 p6eval niecza v22-14-g136ddcf: OUTPUT«-0.12595419847328243␤»
19:48 p6eval ..rakudo c487a5: OUTPUT«-0.125954␤»
19:48 masak that's one of those mythical 10% speedups. jnthn++
19:48 sorear jnthn++
19:48 sorear masak \o/
19:48 masak even though it's on the test suite, which is parse-heavy. still impressive.
19:48 masak sorear! \o/
19:49 sorear hmm, I forgot to do this
19:49 sorear good * #perl6
19:49 jnthn o/ sorear
19:50 rindolf sorear: top of the *!
19:51 gfldex i wonder if i should get me a seat belt for my office chair with all those rakudo speedups
19:51 jnthn It's not *that* fast yet :P
19:53 dalek nqp: f221da4 | jnthn++ | src/ (4 files):
19:53 dalek nqp: Finish up NFA pre-computation logic.
19:53 dalek nqp:
19:53 dalek nqp: Has to take special care to include alternation NFAs from nested code
19:53 dalek nqp: objects (like nibbler for before, or positional captures). Otherwise,
19:53 dalek nqp: nothing surprising. Note that catching them all is important if we're
19:53 dalek nqp: to cache them, or we risk getting things spanning bootstrap phases.
19:53 dalek nqp: review: https://github.com/perl6/nqp/commit/f221da4a4f
19:53 dalek nqp: 234daad | jnthn++ | src/ops/nqp.ops:
19:53 dalek nqp: Fix nqp::ishash for deserialized hashes.
19:53 dalek nqp: review: https://github.com/perl6/nqp/commit/234daad5d8
19:53 dalek nqp: b6c88ff | jnthn++ | src/how/NQPClassHOW.pm:
19:53 dalek nqp: Make NFA cache an attribute rather than lexical.
19:53 dalek nqp:
19:53 dalek nqp: This means that the compile time computation will be serialized, so
19:53 dalek nqp: the NFAs for protoregexes and alternations need not be re-calculated
19:53 dalek nqp: each run, at least for use of the standard grammar.
19:53 dalek nqp: review: https://github.com/perl6/nqp/commit/b6c88ffae3
19:53 dalek nqp: 444537f | jnthn++ | src/stage0/ (9 files):
19:53 dalek nqp: Update bootstrap.
19:53 dalek nqp: review: https://github.com/perl6/nqp/commit/444537fc26
19:53 sjohnson jnthn: hi
19:53 jnthn o/ sjohnson
19:54 jnthn masak: Having spectest faster does help speed up Rakudo development.
19:54 masak absolutely.
19:54 jnthn masak: So it's a win in that regard too.
19:54 masak it's an impressive speedup.
19:54 jnthn But yes, it's a user-facing win.
19:54 tadzik classic jnthn++. Pushes faster than I can compile
19:55 masak maybe he writes several commits and pushes them all at once...? :P
19:56 Targen joined #perl6
19:57 dalek rakudo/nom: 8fa4c58 | jnthn++ | tools/build/NQP_REVISION:
19:57 dalek rakudo/nom: Bump NQP_REVISION to get compile-time NFA calc.
19:57 dalek rakudo/nom:
19:57 dalek rakudo/nom: This means that we don't need to compute a bunch of them on-demand as
19:57 dalek rakudo/nom: we parse. This saves some work on each invocation. The spectests get a
19:57 dalek rakudo/nom: ~10% win from this.
19:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8fa4c58cd1
19:57 thou joined #perl6
19:57 jnthn fwiw, the kill-nqpattr work made this possible, as well as the categorically-better branch.
20:00 diakopter jnthn: that's awesome
20:00 jnthn :)
20:04 moritz that's categorically awesome :-)
20:05 dalek rakudo/nom: 027f8c1 | jnthn++ | docs/ChangeLog:
20:05 dalek rakudo/nom: Start ChangeLog for 2012.11.
20:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/027f8c1017
20:14 jnthn Oh, fail. My looser/tighter doesn't actually work :/
20:15 leont joined #perl6
20:17 diakopter maybe loosen or tighten something?
20:19 tadzik duct tape and/or wd-40
20:19 jnthn You can fix anything with those two.
20:19 jnthn If it moves and it shouldn't, duct tape. It it doesn't move and it should, wd-40.
20:19 tadzik sometimes you also need spare parts
20:19 tadzik and for my phone I also needed skotch
20:20 tadzik scotch?
20:20 tadzik scotch.
20:20 jnthn Scotch whisky? Nice.
20:20 tadzik it was a bit of a waste to clean metal with it :(
20:21 birdwindupbird joined #perl6
20:21 jnthn :(
20:21 dalek rakudo/nom: 226b3bd | jnthn++ | src/core/traits.pm:
20:21 dalek rakudo/nom: Make looser/tighter actually work.
20:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/226b3bdea2
20:25 colomon :(
20:29 cognominal joined #perl6
20:30 havenn joined #perl6
20:31 jnthn Bah, precedence.t does sub prefix:<!> (Int $x) is tighter(&infix:<**>) {
20:31 jnthn And for some reason, setting the precedence of a prefix based on an infix fails...
20:33 masak guten n∞, #perl6.
20:33 leont joined #perl6
20:33 diakopter o/
20:36 [Coke] are all the precedences mixed together
20:36 [Coke] ?
20:36 [Coke] or is there a separate table for each type?
20:37 PerlJam Why precedence strings like "@====" instead of ">===" exactly?
20:37 havenn joined #perl6
20:37 jnthn oooh
20:37 jnthn PerlJam: Because O expects a string like :prec<...> and it turns out if you put other < and > in there... :)
20:38 PerlJam ah, of course :)
20:38 jnthn PerlJam: STD does these things as constant hashes.
20:38 jnthn Rakudo probably should in the end too but that's a bit of a yak shave for the moment.
20:39 PerlJam presumably we could end up with precedences like "@:@:@="
20:39 jnthn oooh
20:39 jnthn Yeah, I see what's going on.
20:40 jnthn It's copying the associativity of the infix op over.
20:40 jnthn It...probably had better not do that :)
20:45 skids results of using NativeCall of libmhash to speed up Sum module calculations: any speed gain is dwarfed (Pretty sure, need to verify) by the need to endian/signedness convert into the CArray[int] bounce buffer.  (i.e. Zavolaj really needs buf8 support.)
20:46 jnthn skids: Rakudo needs buf8 support even before that ;)
20:46 skids :-)
20:46 skids I assume size_t is as difficult as uint and that's why it isn't there as well?
20:48 jnthn skids: Isn't size_t platform specific also?
20:49 skids Well, as platform specific as "int".
20:49 jnthn True :)
20:50 cognominal joined #perl6
20:51 Chillance joined #perl6
20:51 dalek rakudo/nom: 8293d69 | jnthn++ | src/core/traits.pm:
20:51 dalek rakudo/nom: Fix is assoc(...).
20:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8293d69812
20:51 dalek rakudo/nom: 714593d | jnthn++ | src/core/operators.pm:
20:51 dalek rakudo/nom: Don't override assoc when doing equiv etc.
20:51 dalek rakudo/nom:
20:51 dalek rakudo/nom: Turns out that you should be able to use the precedence of an infix
20:51 dalek rakudo/nom: when declaring a prefix and the like.
20:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/714593d8f1
20:51 arnsholt skids: Would proper CArray[int8] help you think?
20:52 skids int8 would be less helpful than uint8.
20:52 arnsholt True
20:52 arnsholt Hmm. Not sure how hard it would be to get uint working properly
20:53 arnsholt Not terribly I think
20:53 skids It really depends on how much of the delay is the swabbing, and how much is the punching through layers to get to the actual accessor when filling the data structure.
20:53 arnsholt /hope
20:54 skids IIRC uint absence had something to do with Parrot's signedness handling.
20:54 arnsholt Well yeah. Parrot's INTVAL (which is what we use for native ints internally) is signed
20:54 hash_table joined #perl6
20:55 arnsholt But 8 and 16 bit unsigneds will fit
20:56 skids Well, 8 would probably be useful, and wouldn't run into any endian issues :-)
20:59 arnsholt There's that as well
20:59 leont left #perl6
21:03 * skids decommute
21:04 sorear size_t sounds easier than int
21:04 sorear because on modern platforms size_t, intptr_t, and INTVAL are all the same size
21:04 sorear while int may be smaller
21:10 bbkr how to compare type of two variables (with ignoring their values)?
21:11 [Coke] $a.WHAT == $b.WHAT ?
21:11 jnthn === if you want exact type match
21:11 jnthn == is numeric comp
21:11 bbkr r: say 1 === 2
21:11 p6eval rakudo 714593: OUTPUT«False␤»
21:12 jnthn With the .WHAT that coke suggested :)
21:12 [Coke] r: say so 1.WHAT == 2.WHAT
21:12 p6eval rakudo 714593: OUTPUT«Parameter '' requires an instance, but a type object was passed␤  in method Bridge at src/gen/CORE.setting:2881␤  in sub infix:<==> at src/gen/CORE.setting:2804␤  in block  at /tmp/6iWTpnGeai:1␤␤»
21:12 [Coke] r: say 1.WHAT == 2.WHAT
21:12 spider-mario_ what is eqv exactly, btw?
21:12 p6eval rakudo 714593: OUTPUT«Parameter '' requires an instance, but a type object was passed␤  in method Bridge at src/gen/CORE.setting:2881␤  in sub infix:<==> at src/gen/CORE.setting:2804␤  in block  at /tmp/rdop48mkRC:1␤␤»
21:12 [Coke] I'll let jnthn field that one. :)
21:13 jnthn [Coke]: Yes, I said use ===
21:13 [Coke] r: say 1.WHAT === 2.WHAT
21:13 p6eval rakudo 714593: OUTPUT«True␤»
21:13 [Coke] ah. Didn't read your modification right.
21:13 jnthn np :)
21:14 [Coke] r: say 1.WHAT === (2 but 3).WHAT
21:14 p6eval rakudo 714593: OUTPUT«False␤»
21:14 bbkr thanks. i've spotted "=:=" also in spec, which is described as test for "Container identity", is that a shortcut for those explicit .WHAT calls?
21:14 [Coke] r: say (1 but 3).WHAT === (2 but 3).WHAT
21:14 p6eval rakudo 714593: OUTPUT«True␤»
21:14 [Coke] r: say (1 but 3).WHAT === (2 but 4).WHAT
21:14 p6eval rakudo 714593: OUTPUT«True␤»
21:21 benabik joined #perl6
21:30 fgomez joined #perl6
21:40 tokuhiro_ joined #perl6
21:45 Chillance joined #perl6
21:52 diakopter rn: say 3 but so 4
21:52 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Role(s) being mixed in do not define precisely one, public attribute␤  at /home/p6eval/niecza/lib/CORE.setting line 1393 (infix:<does> @ 23) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1397 (infix:<but> @ 4) ␤  at /tmp/gmhQ6Q8f5A l…
21:52 p6eval ..rakudo 714593: OUTPUT«3␤»
21:53 diakopter hm
21:53 diakopter now I don't know whether to nieczaissue it
21:53 diakopter because I don't understand the error message
21:53 diakopter but is it just because I'm slow and terrible at remembering what 'but' does?
21:56 sorear no, it's because what "but" does actually _is_ horrifically weird
21:57 sorear if the right side of but is syntactically a function call, it is deconstructed, the function is interpreted as a role and the argument(s) as initial attribute values
21:57 sorear n: role Moo { has $.x }; say (5 but Moo(12)).x
21:57 p6eval niecza v22-14-g136ddcf: OUTPUT«12␤»
21:58 diakopter oh.
21:58 diakopter good to know
21:58 diakopter now if I can remember it for longer for a couple weeks...
21:59 sorear maybe I/we should restrict this to the case where Moo is actually a type name
21:59 sorear it's kind of useless to do it with &so ...
22:00 diakopter well, it could be a variable storing a type
22:11 Targen joined #perl6
22:11 flussence it feels like PHP's becoming the software equivalent of a sci-fi horror movie... https://bugs.php.net/63316
22:11 sorear diakopter: true but it might be less confusing at that point if we force explicitness
22:12 flussence .oO( On today's episode: They went in search of a long-lost charset. *Something else* came back with them... )
22:29 skids joined #perl6
22:35 armitage81 joined #perl6
22:35 armitage81 joined #perl6
22:36 havenn joined #perl6
22:37 kurahaupo joined #perl6
22:44 whiteknight joined #perl6
22:49 rjbs r: sub x ($x) { say $x } x(123)
22:49 p6eval rakudo 714593:  ( no output )
22:49 rjbs What am I missing?
22:50 diakopter semicolon
22:50 skids a semicolon?
22:50 rjbs r: sub x ($x) { say $x } ; x(123)
22:50 p6eval rakudo 714593: OUTPUT«123␤»
22:50 rjbs Thanks — not the first time I've made htat mistake, too. :/
22:50 diakopter ␤ would've worked too, to p6eval
22:51 rjbs cute :)
22:51 rjbs p6eval++ # super useful
22:51 rjbs even to occasionally dabbler rjbs
22:51 diakopter it can eval gists too..
22:51 waldo17 joined #perl6
22:51 sorear n: say sub x ($x) { say $x } x(123)
22:51 * rjbs was looking into what came up on p5p today-ish, that one can say "sub foo ($x, $y, @) { ... }"
22:51 p6eval niecza v22-14-g136ddcf: OUTPUT«Potential difficulties:â�¤  &x is declared but not used at /tmp/ndz3_iQJiI line 1:â�¤------> [32msay sub x [33mâ��[31m($x) { say $x } x(123)[0mâ�¤â�¤Sub()<instance>Sub()<instance>Sub()<instance>Sub()<instance>Sub()<instance>Sub()<instance>Sub()<instance>Sub()<in…
22:52 rjbs We're looking at some work by Peter Martini to add subroutine signatures to p5.
22:52 rjbs So please be careful, as Hell may be freezing over.
22:52 diakopter O_O
22:53 bluescreen10 joined #perl6
22:53 rjbs flussence: nice php bug
22:54 * skids thinks it is pretty scary when rjbs asked that he actually pictured a list of 123 closures.
22:54 rjbs I keep forgetting about the increased significance of whitespace.
22:54 sorear skids: you're thinking of xx
22:55 rjbs Anyway, there's been talk of bare sigils in p5 signatures as well, as one way to say "extra arguments are not fatal, but ignored."
22:59 Celelibi joined #perl6
23:01 Su-Shee joined #perl6
23:01 doy rn: sub x ($x, $) { say $x }; x(3, 4); x(5)
23:01 p6eval rakudo 714593: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'x' will never work with argument types (int) (line 1)␤    Expected: :($x, )␤»
23:01 p6eval ..niecza v22-14-g136ddcf: OUTPUT«3␤Unhandled exception: No value for parameter '' in 'x'␤  at /tmp/bTLeZ8gk7p line 0 (x @ 1) ␤  at /tmp/bTLeZ8gk7p line 1 (mainline @ 6) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4216 (mo…
23:01 doy rn: sub x ($x, $) { say $x }; x(3, 4)
23:01 p6eval rakudo 714593, niecza v22-14-g136ddcf: OUTPUT«3␤»
23:02 rjbs doy: yeah, I was playing with that in /query :)
23:03 rjbs r: sub x ($x, *) { say $x }; x(3, 4); x(5, [])
23:03 p6eval rakudo 714593: OUTPUT«===SORRY!===␤Malformed parameter␤at /tmp/U7lEuVhrLQ:1␤»
23:03 * rjbs wasn't sure if he could whatever there.
23:03 pmurias joined #perl6
23:03 * rjbs will update his local Rakudo* when he gets off the bus and onto a hard line.
23:03 rjbs Well, actually I'll probably go to the library and then play with my new Kindle.  But I'll get around to it.
23:04 pmurias diakopter: re clobbering new, it seems like something better error messages would solve
23:04 pmurias diakopter: which would point where the conflicting new method is defined
23:04 pmurias diakopter: or integration with the editor or something similiar
23:07 diakopter pmurias: I agree. but it should be a warning that can be disabled by declaring guru mode
23:08 diakopter actually.
23:08 diakopter here's an idea-
23:09 diakopter what if the clobbering were detected at compile time, which sets a flag in the resulting thing that, if a failure occurs, the flag is checked, and if the flag was set, a much better error message at runtime is given. no runtime checks.
23:11 diakopter eh; kinda complex
23:11 pmurias yes
23:12 pmurias a lot of the clobbering things look like they could be solved with class/method defined *here* was incorrectly used *here* style error messages
23:14 fgomez joined #perl6
23:14 Su-Shee joined #perl6
23:15 pmurias diakopter: making things harder (special modes) to avoid doing them by accident seems annoying
23:22 cognominal joined #perl6
23:26 diakopter pmurias: hm, ok
23:47 cognominal joined #perl6
23:50 dayangkun joined #perl6
23:55 _jaldhar_ joined #perl6
23:56 wooden joined #perl6

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

Perl 6 | Reference Documentation | Rakudo