»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
00:00
pjcj joined
00:10
arlinius left
00:17
cognominal left
00:21
MikeFair_ left
00:22
whiteknight joined
00:23
cognominal joined,
benabik joined
00:35
rindolf left
|
|||
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'» | ||
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
00:54
havenn joined
00:55
anuby joined
|
|||
diakopter | rn: say (^-1)[0] | 01:07 | |
p6eval | rakudo 978492: OUTPUT«Nil» | ||
..niecza v22-14-g136ddcf: OUTPUT«Any()» | |||
diakopter | hmm... no elements? | ||
01:19
hypolin joined
01:20
whiteknight left
|
|||
diakopter | double buglet | 01:23 | |
rn: say "a" ~~ / <new> / | |||
p6eval | rakudo 978492: OUTPUT«「」 new => 「」» | ||
..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… | |||
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. | ||
TimToady | well, Cursor.new is returning a valid cursor, so maybe not a bug in rakudo | 01:26 | |
it's a new way to match the null string | |||
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)>» | ||
..rakudo 978492: OUTPUT«===SORRY!===Method 'match' not found for invocant of class 'String'» | |||
diakopter | phenny: tell masak pretty sure bug here rn: grammar A { rule TOP { <BUILD> }; rule BUILD { a } }; say A.parse("a") | ||
phenny | diakopter: I'll pass that on when masak is around. | ||
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 … | ||
..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)>» | |||
diakopter | phenny: tell masak also, different error? rn: grammar A { rule TOP { <new> }; rule new { a } }; say A.parse("a") | ||
phenny | diakopter: I'll pass that on when masak is around. | ||
diakopter | rn: grammar A { rule TOP { <foo> }; method foo { Cursor } }; say A.parse("a") | 01:34 | |
p6eval | niecza v22-14-g136ddcf: OUTPUT«Match()» | ||
..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» | |||
diakopter | that error's not LTA methinks | ||
TimToady: oh | 01:35 | ||
uhm. | 01:36 | ||
what did I do to p6eval | |||
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» | ||
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:43
sudokode is now known as gen2
01:45
gen2 is now known as sudokode
|
|||
diakopter | r: grammar A { rule TOP { <foo> }; rule foo { <TOP> } }; say A.parse("a") | 01:45 | |
p6eval | rakudo 978492: OUTPUT«(timeout)» | ||
diakopter | really should detect directly and indirectly left-recursive rules and evade them | 01:46 | |
for complex grammars where the user doesn't know where the recursion lies | 01:48 | ||
or grammars where it's intentionally left-recursive | |||
r: grammar A { rule TOP { <.parse("")> } }; say A.parse("a") | 01:50 | ||
p6eval | rakudo 978492: OUTPUT«maximum recursion depth exceededcurrent 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… | ||
diakopter | r: say grammar say { }; say &say.WHAT | 01:54 | |
p6eval | rakudo 978492: OUTPUT«say()» | ||
diakopter giggles | |||
oh wait | |||
wait, wait. | |||
the heck? | |||
r: grammar say { }; print 0; say &say.new; print 1; say.WHAT; print 2; say(&say); | 01:57 | ||
p6eval | rakudo 978492: OUTPUT«012sub say() { ... }» | ||
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:1012sub say() { ... }» | ||
diakopter | oh! | ||
but.. why did it output the final say(&say) | 01:59 | ||
01:59
japhb_ left
|
|||
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… | ||
..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» | |||
diakopter | oh | ||
02:05
firelord joined
|
|||
diakopter | rn: grammar Int { }; say 3.0.Int ~~ Numeric | 02:05 | |
p6eval | niecza v22-14-g136ddcf: OUTPUT«True» | ||
..rakudo 978492: OUTPUT«===SORRY!===get_boxed_ref could not unbox for the given representation» | |||
diakopter | boom. | ||
phenny: tell masak 'nother weird one rn: grammar Int { }; say 3.0.Int ~~ Numeric | 02:06 | ||
phenny | ... | ||
diakopter | phenny: tell masak another weird one rn: grammar Int { }; say 3.0.Int ~~ Numeric | ||
phenny | ... | ||
diakopter | oh | ||
phenny is hating on me | |||
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. | ||
diakopter | phenny: ... | 02:09 | |
rn: class Int { }; say 3.4.Int | 02:16 | ||
p6eval | niecza v22-14-g136ddcf: OUTPUT«3» | ||
..rakudo 978492: OUTPUT«===SORRY!===get_boxed_ref could not unbox for the given representation» | |||
sorear | diakopter: lag spiked for me too | 02:17 | |
02:17
havenn left
02:18
havenn joined
|
|||
diakopter | sorear: any ideas what rakudo is doing above? making a class named Int clobbered the Int method too? | 02:18 | |
sorear | diakopter: making a class named Int caused the compiler to break | 02:19 | |
it never called the .Int method | |||
diakopter | oh hee | ||
rn: class Int { }; say Int.WHAT | 02:20 | ||
p6eval | rakudo 978492, niecza v22-14-g136ddcf: OUTPUT«Int()» | ||
diakopter | sorear: well, it okay'd that | ||
sorear | rn: calss Int { }; 3.0 | 02:21 | |
p6eval | niecza v22-14-g136ddcf: OUTPUT«===SORRY!===Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/Ad3evMjLkd line 1:------> calss Int ⏏{ }; 3.0Undeclared routine: 'calss' used at line 1Parse … | ||
..rakudo 978492: OUTPUT«===SORRY!===Confusedat /tmp/jLDBkx5dRc:1» | |||
sorear | rn: class Int { }; 3.0 | ||
p6eval | niecza v22-14-g136ddcf: ( no output ) | ||
..rakudo 978492: OUTPUT«===SORRY!===get_boxed_ref could not unbox for the given representation» | |||
cognominal | nc: native {} | ||
sorear | diakopter: rakudo can't parse 3.0 after the redefinition | ||
cognominal | rc: native {} | ||
arf | |||
diakopter | sorear: oh! | 02:22 | |
cognominal | rn: native {} | ||
diakopter | interesting | ||
p6eval | niecza v22-14-g136ddcf: OUTPUT«===SORRY!===Undeclared routine: 'native' used at line 1Unhandled 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… | ||
..rakudo 978492: ( no output ) | |||
02:22
havenn left
|
|||
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 | ||
p6eval | rakudo 978492: OUTPUT«Perl6::Metamodel::NativeHOW.new()» | ||
cognominal | probably used by zavolag | 02:24 | |
s/g/j/ | |||
my native int is repr('P6int') { } # in NativeTypes.pm | 02:26 | ||
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:30 | ||
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 | ||
not something users can use, really | |||
cognominal | I suppose Larry would say I designed Perl 6 for that to happen | 02:32 | |
sorear, except if he is smart enough to add his stuff to 6model/reprs | 02:35 | ||
?? | 02:36 | ||
or is there something magic about int num and str now they are decoupled from parrot? | |||
02:37
fgomez left,
bapa left
02:38
rking left
|
|||
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
02:43
tokuhir__ joined
02:52
Targen_ joined,
Targen left
02:53
dayangkun joined,
fgomez joined
03:01
Vlavv` joined
03:02
Vlavv_ left
03:06
bapa left,
fgomez left,
bapa joined,
fgomez joined
03:07
fgomez left
03:08
fgomez joined
03:10
Pleiades` left,
firelord left
03:14
bapa left
03:16
bapa joined
03:20
havenn joined
03:21
havenn left
03:27
gdey joined
|
|||
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. (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 | |
Any help would be appriciated. | |||
I'm using rakudo, but the way. | |||
The latest stable version I could download. | |||
03:29
unixms joined
|
|||
[Coke] | r: 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» | ||
TimToady | :&callack is a typo | 03:31 | |
gdey | Thanks! | ||
I must have been staring at this for hours, and did not see that. | |||
sorear | o hai gdey | ||
TimToady | I don't know why it would cause this error though | ||
gdey | Hey Sorear! | 03:33 | |
It's still erroring out. | |||
r: gist.github.com/3936461 | |||
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» | ||
gdey | I fixed the typo in the gist. | 03:34 | |
03:35
_jaldhar_ joined,
jaldhar_ left
|
|||
[Coke] | has Bool $.done; | 03:35 | |
? | |||
should that be $!done? | |||
gdey | According to the book, the $. twigile creats an accessor as well as creates the $!done variable. | 03:36 | |
TimToady | what happens if you take the Task type off of the *@dependencies parameter on line 8? | 03:37 | |
gdey | r: gist.github.com/3936461 | ||
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» | ||
TimToady | you might also try adding a comma after the closure in the call to .new | ||
it does look like it might be buglet that you are triggering somehow | 03:38 | ||
n: gist.github.com/3936461 | |||
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… | ||
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 | ||
gdey | n: 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… | ||
gdey | Don't see where I've commented out the callback. | 03:42 | |
TimToady | something's screwy with indirection somewhere, I think | ||
it shouldn't fail if @!dependencies is empty | 03:43 | ||
sorear | gdey: so jnthn finally got to you, eh? | ||
TimToady | so maybe @!dependincies is containing something empty instead, that makes it have 1 element | ||
gdey | sorear: Yup. | 03:44 | |
sorear | ^_^ | ||
03:44
mikemol left
|
|||
sorear | gdey: what if you make @!dependencies public? | 03:45 | |
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. | ||
sorear | change the ! to an . | 03:47 | |
TimToady | in the has | ||
gdey | k | ||
sorear | same for &.callback | ||
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:48 | ||
gdey | same. :( | 03:49 | |
sorear | Slurpy arrays with type constraints have never really worked, so I'm a little bit concerned about that | ||
gdey | n: gist.github.com/3936461 | ||
p6eval | niecza v22-14-g136ddcf: OUTPUT«eating dinner1.» | ||
gdey | r: gist.github.com/3936461 | ||
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» | ||
gdey | Niecza worked! | 03:50 | |
sorear would try removing the 'Task' from line 8 | |||
gdey | Yes, removing Task and making everything public now works on rakudo. | 03:51 | |
r: gist.github.com/3936461 | |||
p6eval | rakudo 978492: OUTPUT«eating dinner1.» | ||
sorear | rpn: gist.github.com/3936461 | ||
p6eval | rakudo 978492, niecza v22-14-g136ddcf: OUTPUT«eating dinner1.» | ||
..pugs: OUTPUT«*** No such method in class Task: "&bless" at /tmp/BhoaEV1QGl line 9, column 7-50» | |||
gdey | So, is there a reason why everything had to be public? | 03:56 | |
Also, I add a call to the add-dependency method, and that seesm to work with the Type declared. | |||
rpn: gist.github.com/3936461 | 03:57 | ||
p6eval | rakudo 978492, niecza v22-14-g136ddcf: OUTPUT«making dinnereating dinner1.» | ||
..pugs: OUTPUT«*** No such method in class Task: "&bless" at /tmp/BGo4YkqonQ line 9, column 7-50» | |||
sorear | gdey: perl6-language had a freakout a few months ago over the fact that constructors allow you to set private attributes | ||
I didn't resist hard enough | |||
s/allow/allowed/ | |||
03:58
colomon_ joined,
colomon left,
colomon_ is now known as colomon
|
|||
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 | ||
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» | ||
sorear | r: class A { has $.x; has $!y; method setup() { $!x = $!y = 3; self; } }; say A.new.setup.perl | ||
p6eval | rakudo 978492: OUTPUT«A.new(x => 3)» | ||
sorear | they're also hidden from .perl now :( | ||
03:59
skids left
|
|||
sorear | gdey: with an explicit assignment or assigning parameter in BUILD | 03:59 | |
04:00
Pleiades` joined,
dayangkun left
|
|||
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:00 | |
Thanks for helping get pasted this! | 04:01 | ||
TimToady frequently feels pasted... | 04:02 | ||
sorear | gdey: anytime ^_^ | ||
04:03
unixms left,
rtxing joined
04:04
tokuhir__ left
|
|||
gdey | ack: s/pasted/past/ | 04:06 | |
sorear | gdey: github/perl6/book ? | ||
gdey | sorear: yes | 04:07 | |
04:13
rking joined
|
|||
sorear | well, you don't need to bother with patches now ^_^ | 04:16 | |
04:30
rtxing left
04:36
cognominal left
04:39
Entonian joined
04:40
kaleem joined
04:42
Entonian left
04:51
Targen_ left
04:59
timbunce_ joined
|
|||
moritz | why not? | 05:02 | |
sorear | moritz: I added gdey to perl6/book | ||
moritz | ah | 05:03 | |
sorear++ | |||
I misread that as "don't bother to fix it" | |||
sorear | he's been to most of the last 12 sandiego.pm meetings, consider him pre-vetted | ||
05:06
wamba joined
05:15
CharellKing joined
05:17
bapa left
|
|||
sorear | hello CharellKing. | 05:17 | |
05:17
bapa joined
05:21
CharellKing left
05:36
wamba left
05:42
azawawi joined
05:44
Targen joined
05:52
birdwindupbird joined
05:53
PacoAir joined
05:55
PacoAir left,
wamba joined
|
|||
diakopter | r: say "a" ~~ / <!!!before a> / | 05:57 | |
p6eval | rakudo 978492: OUTPUT«「」» | ||
sorear | working as designed | ||
diakopter | what does !!! mean | 05:58 | |
sorear | same as one ! | ||
diakopter | how does !before a succeed | 05:59 | |
oh, the end :) | |||
05:59
kurahaupo left
|
|||
colomon | \o | 06:00 | |
sorear | colomon \o/ | ||
diakopter | r: say "a" ~~ / <!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!before a> a / | 06:01 | |
p6eval | rakudo 978492: OUTPUT«「a」» | ||
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… | ||
sorear | hahaha | 06:03 | |
std: /<!!!!!before x>/ | |||
p6eval | std 64edd1c: OUTPUT«===SORRY!===Unable to parse metachar at /tmp/F1BkBF82PF line 1:------> /⏏<!!!!!before x>/Couldn't find final '>'; gave up at /tmp/F1BkBF82PF line 1:------> /<!!!⏏!!before x>/Parse failedFAILED 00:00 42m»… | ||
diakopter | o.) | 06:04 | |
sorear | TimToady: does this count as LTM fail? | ||
TimToady | std: /<!!!>/ | 06:05 | |
p6eval | std 64edd1c: OUTPUT«ok 00:00 42m» | ||
06:05
wamba left
|
|||
TimToady | std: /<...>/ | 06:07 | |
p6eval | std 64edd1c: OUTPUT«ok 00:00 42m» | ||
TimToady | std: /<....>/ | ||
p6eval | std 64edd1c: OUTPUT«===SORRY!===Unable to parse metachar at /tmp/PPRX3kFG16 line 1:------> /⏏<....>/Couldn't find final '>'; gave up at /tmp/PPRX3kFG16 line 1:------> /<...⏏.>/Parse failedFAILED 00:00 42m» | ||
azawawi | hi | 06:08 | |
TimToady | o/ | ||
diakopter | std: / <a := | ||
p6eval | std 64edd1c: OUTPUT«===SORRY!===Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/gRdV2AD6CY line 1:------> / <a :⏏=Can't call method "from" on unblessed reference at STD.pm line 53914.FAILED 00:00 42m» | ||
diakopter | unblessed reference buglet | ||
TimToady | you're mistaking STD for a real parser :) | 06:09 | |
diakopter | n: / <a := | 06:10 | |
p6eval | niecza v22-14-g136ddcf: OUTPUT«===SORRY!===Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/9TcueMCfTd line 1:------> / <a :⏏=Unhandled exception: Unable to resolve method ast in type Any at /home/p6eval/niecza/sr… | ||
diakopter | heh | ||
06:10
am0c joined
|
|||
azawawi | TimToady: viv -6 can be used as a Perl 6 tidy, right? | 06:11 | |
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… | ||
TimToady | not really | ||
diakopter | sorear: :S | ||
06:12
bapa left
|
|||
TimToady | it is supposed to reproduce the exact whitespace it started with | 06:12 | |
06:12
kurahaupo joined
|
|||
diakopter | n: say "a" ~~ / :::+ / | 06:14 | |
p6eval | niecza v22-14-g136ddcf: OUTPUT«(timeout)» | 06:15 | |
diakopter laughs maniacally | |||
std: / :+ / | 06:16 | ||
p6eval | std 64edd1c: OUTPUT«===SORRY!===Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/pDoCZ3S_k3 line 1:------> / :⏏+ /Can't call method "from" on unblessed reference at STD.pm line 53914.FAILED 00:00 42m» | ||
colomon thinks he may officially be on jnthn and moritz's schedule for the rest of the week. ;) | |||
06:17
hash_table left
06:20
sivoais left,
bapa joined
06:21
colomon left
|
|||
diakopter | lag.. | 06:22 | |
06:22
colomon joined
|
|||
diakopter | rn: say "a" ~~ / a++ / | 06:24 | |
p6eval | rakudo 978492: OUTPUT«===SORRY!===Quantifier quantifies nothing at line 2, near " /"» | ||
..niecza v22-14-g136ddcf: OUTPUT«#<match from(0) to(1) text(a) pos([].list) named({}.hash)>» | |||
06:25
clkao left,
clkao joined
|
|||
diakopter | what does a++ mean | 06:25 | |
to niecza | |||
06:25
obra left,
obra joined
|
|||
TimToady | same as a+! does | 06:29 | |
or maybe it's same as a+: | |||
yes, it's the ratchet form | 06:30 | ||
n: say "aa" ~~ / a++a / | |||
p6eval | niecza v22-14-g136ddcf: OUTPUT«Match()» | ||
TimToady | p5 borrowed it from <mumble> some time ago, so we will maybe support it as an option | 06:31 | |
06:32
kaleem left
|
|||
sorear | n: m/[]+/ # diakopter | 06:33 | |
p6eval | niecza v22-14-g136ddcf: OUTPUT«===SORRY!===Null pattern not allowed at /tmp/eh857RZc2U line 1:------> m/[⏏]+/ # diakopterParse failed» | ||
sorear | n: m/''+/ # diakopter | ||
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/… | ||
diakopter | o_O | ||
sorear | n: 1~~/''+/ # diakopter | ||
p6eval | niecza v22-14-g136ddcf: OUTPUT«(timeout)» | 06:34 | |
diakopter | O_O | ||
06:35
colomon left
|
|||
diakopter | methinks quantified zero-width assertions should be detected | 06:55 | |
+ and * anyways | |||
06:57
SamuraiJack joined
|
|||
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. | ||
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. | ||
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
|
|||
diakopter | sorear: :P phenny stopped taking my messages for masak it seems | 07:00 | |
sorear | diakopter: I have a suspicion that was a one-time network glitch | 07:01 | |
diakopter | phenny replied "..." | ||
phenny: tell masak test | |||
phenny | diakopter: I'll pass that on when masak is around. | ||
diakopter | oh ha | ||
weird | 07:02 | ||
brrt | \o p6 | ||
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. | ||
azawawi | feather.perl6.nl:3030/ # Sync POD toggle button | 07:04 | |
07:04
hoelzro|away is now known as hoelzro
07:06
flightrecorder joined
07:10
sizz left
07:13
cibs left
07:16
ChoHag left
07:17
ChoHag joined
|
|||
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 | |
07:26
sizz joined
07:27
SIMCOP2387 left
07:28
simcop2387 joined
07:30
domidumont joined
07:35
colomon joined
|
|||
diakopter | rn: say "a"~~/#/ | 07:42 | |
p6eval | rakudo 978492: OUTPUT«「」» | ||
..niecza v22-14-g136ddcf: OUTPUT«#<match from(0) to(0) text() pos([].list) named({}.hash)>» | |||
07:42
sizz left,
sizz joined
|
|||
diakopter | moritz: yeah, but it's still a leaky LTA error | 07:42 | |
moritz | diakopter: hm, what? | ||
diakopter | the Int class thing | 07:43 | |
07:43
domidumont left,
domidumont joined
|
|||
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 ? | ||
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:45 | ||
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» | ||
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 | ||
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 | ||
sorear | which is arguably also broken, but it was the most expedient way to get STD working | ||
diakopter: the compiler is treating 42.0 as Int.new(420) / Int.new(10) | 07:47 | ||
diakopter: the compiler's own Ints aren't affected, but the Ints that it injects into your scope are | |||
the error you get is actually from infix:</> or something equivalent, I think | 07:48 | ||
a constant-folding error of sorts | |||
diakopter | that could make sense | ||
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 | ||
unless it really is the intent to allow/enable that | |||
moritz | I'd say that shadowing a base class such as Int is declaration of that intent | ||
sorear | rn: class Int { }; say 42; say Int.new | 07:51 | |
p6eval | niecza v22-14-g136ddcf: OUTPUT«42Int.new(...)» | ||
..rakudo 978492: OUTPUT«===SORRY!===get_boxed_ref could not unbox for the given representation» | |||
diakopter | oh, and, while I'm dreaming, niecza's and rakudo's behaviors should match :) | 07:52 | |
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 | |
r: class Regex { }; /foo/ | |||
p6eval | rakudo 978492: OUTPUT«===SORRY!===Method 'SET_CAPS' not found for invocant of class 'Regex'» | ||
sorear | r: say List.HOW.WHAT | 07:54 | |
p6eval | rakudo 978492: OUTPUT«Perl6::Metamodel::ClassHOW()» | ||
diakopter | r: class NQPClassHOW { }; fail fail fail; say 'alive' | ||
p6eval | rakudo 978492: ( no output ) | ||
07:54
hypolin left
|
|||
sorear | n: my $_Whatever = 42; say * | 07:54 | |
p6eval | niecza v22-14-g136ddcf: OUTPUT«Whatever.new(...)» | ||
07:55
hypolin joined
|
|||
sorear | n: my $__Whatever = 42; say * | 07:55 | |
diakopter | oh, I guess fail is a thing | ||
p6eval | niecza v22-14-g136ddcf: OUTPUT«Whatever.new(...)» | ||
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/… | ||
sorear | n: my \True = 42; say (:foo) | ||
p6eval | niecza v22-14-g136ddcf: OUTPUT«"foo" => 42» | ||
moritz | :-) | ||
sorear | rn: my \True = 42; say (:foo) | 07:57 | |
p6eval | niecza v22-14-g136ddcf: OUTPUT«"foo" => 42» | ||
..rakudo 978492: OUTPUT«"foo" => Bool::True» | |||
08:02
SamuraiJack left
08:04
azawawi left
|
|||
diakopter | r: class Str; say 'alive' | 08:06 | |
p6eval | rakudo 978492: OUTPUT«===SORRY!===This type cannot box a native string» | ||
08:07
flightrecorder left
|
|||
sorear | r: class A is Str { }; class Str is A { }; say "foo".^parents | 08:14 | |
p6eval | rakudo 978492: OUTPUT«A() Str()» | ||
sorear | r: class A is Str { }; class Str is A { }; say "foo".^mro | ||
p6eval | rakudo 978492: OUTPUT«Str() A() Str() Cool() Any() Mu()» | ||
sorear | diakopter^ | ||
08:14
domidumont left
|
|||
diakopter | heh | 08:15 | |
r: role Foo; say 'alive' | |||
p6eval | rakudo 978492: ( no output ) | ||
diakopter | o.O | ||
sorear | role blocks are deferred | 08:16 | |
diakopter | oh | ||
sorear | r: role Foo { say 'alive'; say $?CLASS.^name }; class A does Foo { }; class B does Foo { } | ||
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
|
|||
sorear | ok, now *that* is a weird leaky bug | 08:16 | |
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» | ||
sorear | r: role Foo { say 'alive'; say $?CLASS.HOW.name($?CLASS) }; class A does Foo { }; class B does Foo { } | ||
p6eval | rakudo 978492: OUTPUT«aliveAaliveB» | ||
08:20
daniel-s_ joined
08:21
daniel-s_ left,
daniel-s joined
|
|||
colomon | (off topic) anyone out there ever used git-tf? | 08:26 | |
diakopter | team foundation? | ||
sorear | .oO( Git T F is that? ) |
08:27 | |
diakopter | (team foundation is Microsoft's source control thingie) | ||
08:28
thou left
|
|||
diakopter | apparently yes | 08:29 | |
colomon: no, sorry :) | |||
colomon | yes, that's it. | 08:30 | |
sorry you don't know, or sorry that I need to work with team foundation? ;) | |||
diakopter | sorry I haven't used it | ||
(not that it would help anyway; my knowledge of git is not even rudimentary) | |||
colomon | I was asking more in the "Does it work?" sense -- just trying to figure out if it is a sane approach. | 08:31 | |
diakopter | wow; Microsoft released a product that runs on HP-UX, IBM AIX, Linux, Mac OS X, Solaris, Unix, Windows (git-tf) | 08:34 | |
oh, in Java | 08:35 | ||
nm | |||
sorear | sleep& | 08:44 | |
08:46
dakkar joined
|
|||
diakopter | youtube fail | 08:52 | |
08:54
cognominal joined
08:55
kurahaupo left
08:57
cognominal_ joined
08:58
sqirrel joined
09:00
cognominal left
09:01
domidumont left
09:02
domidumont joined
09:13
cognominal__ joined
09:14
cognominal_ left,
prammer left
09:15
prammer joined
09:23
cognominal_ joined
09:25
cognominal__ left
09:42
flightrecorder joined
09:43
kaleem joined
09:45
rafl left
09:51
flightrecorder left,
fgomez left
09:57
flightrecorder joined
10:00
daxim joined,
erkan left
10:02
cognominal_ left
10:09
hypolin left
|
|||
timbunce_ | I found this interesting worrydream.com/LearnableProgramming/ | 10:09 | |
brrt | funny, yes, useful, hardly | 10:10 | |
although data visualisation of variables could be a nice trick | |||
thats something for parrot 5 :-p | 10:11 | ||
10:11
fgomez joined
|
|||
daxim | processing's api is horrible, no wonder they feel compelled to juice it up with inline hints | 10:18 | |
(I learnt the language/env in may 2010) | 10:19 | ||
10:19
anuby left
|
|||
daxim | perlier it with read f.ex. ellipse({x_pos: 65, y_pos: 50, x_radius: 60, y_radius: 60}) | 10:20 | |
10:20
FROGGS joined
|
|||
daxim | verbose, certainly, but if they complain about cryptic numbers only, that's how you fix it. | 10:21 | |
↑ ping Su-Shee ↑ | 10:22 | ||
brrt | there are many simpler methods; named arguments are a very powerful hint | 10:26 | |
diakopter | if only they weren't so slow | 10:27 | |
brrt | named arguments do not need to be slow at all | 10:28 | |
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 | ||
tadzik | well, do you have benchmarks in handy? :) | ||
10:35
jaffa4 joined
|
|||
dalek | ast: db068a9 | moritz++ | S05-modifier/ignorecase.t: fix test plan |
10:37 | |
brrt | named booleans (a la p6's :r :w etc) kan even be compiled into a bitmap | 10:40 | |
again, as long as the caller knows the calllee | |||
10:41
brrt left
|
|||
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,
CloseScreen joined
10:51
gdey left
10:55
rindolf joined,
CloseScreen left
10:57
cognominal joined
|
|||
Su-Shee | dalek: yes? | 10:58 | |
err daxim | |||
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" :) | ||
daxim | the latter, of course | ||
Su-Shee | ah :) | 11:00 | |
11:05
Su-Shee_ joined
11:06
Su-Shee left,
Su-Shee_ is now known as Su-Shee
11:11
erkan joined,
erkan left,
erkan joined
11:15
brrt joined
11:47
frettled left,
Pompel joined
12:02
sivoais joined
12:09
birdwindupbird left
12:11
_jaldhar_ left
12:12
gdey_ left
12:35
birdwindupbird joined
12:37
tokuhir__ joined
12:39
PacoAir joined
12:59
mikemol joined
13:00
hash_table joined
13:04
benabik left,
Psyche^ joined
13:08
Patterner left
|
|||
PerlJam | good morning #perl6! | 13:24 | |
tadzik | hello PerlJam | 13:25 | |
13:25
GlitchMr joined
13:30
bluescreen10 joined
13:32
hash_table left
|
|||
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… | ||
moritz | wouldn't hurt, I think | 13:34 | |
bbkr__ reports | 13:42 | ||
flussence | r: my @a; @a[0] = 1; @a[1_000_000_000_000] = 2; | 13:51 | |
tadzik | can you hear that? That's OOM killer whimpering ;) | 13:52 | |
FROGGS .oO( wait for it ... ) | |||
tadzik | DARY! | ||
FROGGS | ;o) | ||
#1 | |||
moritz | nah, p6eval runs under memory limit | ||
13:52
pmurias joined,
mtk left
|
|||
flussence | er... shouldn't the ulimit catch that by now? | 13:53 | |
moritz | it should :-) | ||
r: say 'alive'; | |||
flussence | whoops, sorry 'bout that. | ||
p6eval | rakudo 978492: OUTPUT«ResizablePMCArray: index out of bounds! in block at src/gen/CORE.setting:5996 in block at /tmp/P9AE9r29I3:1» | ||
rakudo 978492: OUTPUT«alive» | 13:54 | ||
FROGGS | cool | ||
flussence | ...?! | ||
brrt had actually expected a sigsegv | |||
13:54
mtk joined
|
|||
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 | ||
I guess I'll just write one :) | |||
arnsholt | For sparse arrays in Perl 5, I think you're looking for PDL | 13:57 | |
13:57
tokuhir__ left
|
|||
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. | 13:59 | |
[Coke] finally watched bunce's presentation on the p5' devel::sizemegraph. quite nifty. | 14:00 | ||
timbunce_ blush | |||
14:03
fgomez left,
kaare_ joined
14:06
azawawi joined
14:07
flightrecorder left,
FROGGS left
14:08
gdey joined,
flightrecorder joined
14:10
skids joined
14:14
stopbit joined
14:20
FROGGS joined
|
|||
[Coke] | bah, you do great work. no blushing! | 14:20 | |
14:23
fgomez joined
|
|||
azawawi | hi #perl6 | 14:26 | |
brrt | timbunce_ can you repost the link | ||
hi azawai | |||
timbunce_ | brrt: try a20.video4.blip.tv/3990001922812/Ti...012311.mov | 14:27 | |
See also blog.timbunce.org/2012/10/05/introd...emory-use/ | |||
14:28
mj41_ left,
mj41 joined
|
|||
azawawi | brrt: feather.perl6.nl:3030/ | 14:31 | |
14:31
colomon left
14:34
benabik joined
|
|||
brrt | timbunce_: thanks | 14:35 | |
14:36
benabik_ joined,
benabik left,
benabik_ is now known as benabik
|
|||
[Coke] | timbunce_: I wish I had a tool like that for my day to day work language. | 14:36 | |
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? | ||
im trying to open github urls inside farabi6... github browser :0 | 14:38 | ||
:) | |||
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:39
am0c left
|
|||
azawawi is fixing perl6 syntax highlighting inside farabi6 by borrowing from perl6.vim. | 14:40 | ||
14:46
hash_table joined
14:51
Pleiades` left
|
|||
brrt | gotta love p5 internals | 14:55 | |
14:55
Pleiades` joined
|
|||
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 | ||
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
|
|||
GlitchMr | ~~ in Perl 5? Wasn't it made long time ago. | 15:01 | |
tadzik | not so long ago. And they already regret it :) | 15:02 | |
GlitchMr | I still don't see why Perl 5 needs switch statement... | 15:03 | |
tadzik | it's useful | ||
no one likes to type too much | |||
GlitchMr | In many cases hash of subroutine references or if else is better | ||
tadzik | whatever floats your goat :) | 15:04 | |
GlitchMr | But well, I rarely had need to use switch () {} statement | 15:05 | |
But switch (true) { } is probably the worst thing I've seen | |||
brrt | i have used switch in p6, to make something of a grammar | 15:06 | |
eh, p5 that is | |||
15:07
bapa left
15:08
FROGGS left
15:10
bapa joined,
bapa left,
flightrecorder left
15:11
bapa joined
15:13
havenn joined
15:17
bapa left
15:18
bapa joined
15:20
mtk left
|
|||
skids | useful switch idiom: given (complex_expression) { when Something { return $_ }; default return { fail() } } # avoids rerunning complex_expression or declaring a temp variable. | 15:26 | |
15:26
Pleiades` left,
hoelzro is now known as hoelzro|away
|
|||
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:29 | |
15:29
bapa left
|
|||
skids | Well, that assumes returning a Bool is useful to the caller, and they don't need complex_expression's result. | 15:31 | |
15:31
brrt left
|
|||
skids | And you are satisfied with using False as a failure status. | 15:32 | |
Anyway, switches have their uses. | |||
15:33
Pleiades` joined
15:37
bapa joined
15:41
Psyche^ is now known as Patterner,
kaleem left
15:47
cosimo left
15:50
thou joined,
domidumont left
15:55
Pleiades` left
|
|||
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 | ||
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 * | |||
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 | |||
diakopter | sry | ||
phenny was misbehaving temporarily | |||
jnthn: still, you might be interested in that error | 15:56 | ||
jnthn | r: grammar Int { }; say 3.0.Int ~~ Numeric | ||
p6eval | rakudo 978492: OUTPUT«===SORRY!===get_boxed_ref could not unbox for the given representation» | ||
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 | ||
jnthn | It *may* be that we tie constants to CORE::Int. | 15:58 | |
15:58
Pleiades` joined
|
|||
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. | ||
Perl ain't too much into making hard things impossible though. :) | 15:59 | ||
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:00 | |
(why would the user know there is an Int) | 16:01 | ||
(or Regex) | |||
r: class Regex { }; / a / | |||
p6eval | rakudo 978492: OUTPUT«===SORRY!===Method 'SET_CAPS' not found for invocant of class 'Regex'» | ||
16:02
cognominal_ joined
|
|||
pmurias | being apple to redefine what the literals create seems imporant | 16:02 | |
diakopter | r: class Str { }; 'alive' | ||
p6eval | rakudo 978492: OUTPUT«===SORRY!===This type cannot box a native string» | ||
16:03
fgomez left
|
|||
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. | ||
pmurias agrees | 16:04 | ||
diakopter | (with whom else would I discuss it?) | ||
TimToady perhaps | |||
if it's really a language design issue | |||
16:04
cognominal left
|
|||
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:05 | |
diakopter | oh | 16:06 | |
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:07 | |
16:08
MayDaniel joined
|
|||
jnthn | TimToady: When Rakudo sees an Int literal, like 42, it looks up Int using the normal rules. | 16:08 | |
TimToady: That means it fines the nearest lexical definition first. | |||
diakopter | sorear said irclog.perlgeek.de/perl6/2012-10-23#i_6089735 and irclog.perlgeek.de/perl6/2012-10-23#i_6089737 | ||
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 | |
And then complaining that things don't work. :) | |||
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)" | ||
jnthn | By normal lexical lookup rules, it's not surprising. | ||
diakopter | I totally didn't expect lexical references to be injected | ||
jnthn | diakopter: "injected"? | 16:10 | |
diakopter | that's what was surprising | ||
TimToady | what do you mean by "injected"? | ||
jnthn | The only reasons your program sees the setting is because it's lexically outside the compiling program. | ||
diakopter | oh; that's how sorear explained it to me; maybe we got it wrong | ||
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 | ||
context | |||
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. :) | ||
diakopter: "that context"? | 16:12 | ||
diakopter | the lexical context of the 3 | ||
jnthn | diakopter: Constant folding should evaluate stuff in the lexical context where the constant appears. | ||
diakopter | r: class Int { }; 3 | ||
p6eval | rakudo 978492: OUTPUT«===SORRY!===get_boxed_ref could not unbox for the given representation» | ||
diakopter | okay; I never said it shouldn't | 16:13 | |
jnthn | OK, then the upshot is what you just observed. | ||
TimToady | what we've got here is a basic philosophical difference over which language desugaring happens into | 16:14 | |
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
16:15
cognominal_ left
16:16
rtr_ joined
|
|||
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 | ||
jnthn | TimToady: Well, we know that if constant folding 1 + 2, you'd best use the current lexical definition of + :) | ||
TimToady | but as jnthn++ says, it's not the top of his priority queue just now :) | ||
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 | ||
so the drive is toward the rakudo unification | |||
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. | ||
I'm struggling a bit on a concrete way to do the being nice bit. | |||
TimToady | well, let's all let it sit in our backbranes for a while; maybe something will become more obvious later | ||
jnthn | *nod* | ||
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
|
|||
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 | |
16:21
spider-mario joined
|
|||
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) | ||
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
|
|||
[Coke] | (pronounce probably being a better word than transliterate). | 16:25 | |
geekosaur | errr, did that fail on RTL? | ||
16:26
havenn left
|
|||
TimToady | is the Pe supposed to be first or the Tet? | 16:26 | |
16:26
pmurias left
|
|||
geekosaur | ^^ that | 16:26 | |
[Coke] | is it vaguely "pashot" ? | ||
geekosaur | if the pe is first, it's 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:27
cognominal_ left
|
|||
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++ | ||
diakopter | downside | ||
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/ | ||
errr, \o/ | |||
16:30
domidumont joined
|
|||
jnthn | Got it merged locally, just giving spectest a last run through. | 16:30 | |
TimToady | that looks like "Teacher, I have a question!" | ||
diakopter | 」o「 | ||
TimToady | as opposed to ]o which is just wanting to answer the question :) | 16:31 | |
dalek | rakudo/nom: 6e5ae1f | jnthn++ | src/Perl6/Grammar.pm: | 16:32 | |
rakudo/nom: Start cleaning up custom operators. | |||
rakudo/nom: | |||
rakudo/nom: Move the check for if the operator is already parsed into gen_op, and | |||
rakudo/nom: rename it to add_categorical, to move towards STD. | |||
16:32
dalek left
|
|||
jnthn | bah | 16:32 | |
Anyway, it's merged. | |||
16:33
dalek joined,
ChanServ sets mode: +v dalek
|
|||
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 | |
The added operators are done with mixing in, like STD. :) | |||
TimToady reblesses rakudo :) | 16:35 | ||
jnthn | Another little notch of convergence... | ||
TimToady | jnthn++ mixes in mixing in :D | ||
16:36
mtk joined
|
|||
jnthn | TimToady: How attached are you to mixing in when it comes to the qoute language stuff? | 16:36 | |
TimToady | it still seems like the right way to do it to me | 16:37 | |
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. | ||
TimToady | it is perhaps the case that we don't need to re-derive the language on every quote | ||
(STD relies on caching here to avoid regenerating the quote language on every quote) | |||
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? | ||
TimToady | that bit could perhaps be optimized into variables if we're careful not to break lexical language definitions | ||
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 | ||
jnthn | Is how it does that written up somewhere? :) | 16:41 | |
16:41
havenn joined
|
|||
TimToady | fates were done as linked lists just so that the tails could be reused, for instance | 16:41 | |
um, er... | |||
jnthn | :) | ||
diakopter | "the way you'd expect :D" | ||
[Coke] | ]o/ . o O (ring ring ring ring ring ring ring ring bananaphone) | ||
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 :) | ||
moritz | retract papers? just because you found a better way to do something? :-) | 16:43 | |
TimToady | well, redact papers anway | ||
if I were academic, I could make a career out of never finishing Perl 6 | 16:44 | ||
thankfully, I'm not, so I have other failure modes :) | |||
like not writing enough about the innards of STD :) | |||
[Coke] | ... terredactyls. | 16:45 | |
TimToady | .oO("It's a self-documenting language!") |
||
TimToady imagines terredactylic poetry... | |||
moritz | .oO( it parses itself, surely it documents itself too! ) |
16:46 | |
diakopter | n: sub &say { }; say | 16:47 | |
p6eval | niecza v22-14-g136ddcf: OUTPUT«===SORRY!===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):------> sub &say { }; say⏏<EOL>Unhandled exception: Chec… | ||
diakopter imagines a "grr..." | |||
jnthn | Clothe that say! | ||
16:48
sjohnson left,
sjohnson joined
|
|||
diakopter | r: sub &say { }; say | 16:48 | |
p6eval | rakudo 978492: OUTPUT«===SORRY!===Missing blockat /tmp/wMt78TiL71:1» | ||
TimToady | walk & | ||
diakopter | moritz: hopefully it ends up writing itself too | 16:50 | |
16:55
fgomez left
|
|||
diakopter | commute, ish & | 16:56 | |
17:02
birdwindupbird left
|
|||
azawawi thinks, 'I need a workaround to workaround around this workaround... :)' | 17:03 | ||
moritz | azawawi: or maybe you need a fix :-) | ||
17:04
mtk left
|
|||
jnthn | shop, to get dinner stuffs & | 17:05 | |
17:05
mtk joined,
cognominal joined
|
|||
azawawi | moritz: :) | 17:05 | |
17:07
dakkar left
|
|||
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; | ||
masak: 01:24Z <diakopter> tell masak dunno; is this right? r: say "a" ~~ / <new> / | |||
masak: 01:27Z <diakopter> tell masak pretty sure bug here rn: grammar A { rule TOP { <BUILD> }; rule BUILD { a } }; say A.parse("a") | |||
masak: 01:30Z <diakopter> tell masak also, different error? rn: grammar A { rule TOP { <new> }; rule new { a } }; say A.parse("a") | |||
Further messages sent privately | |||
masak | as indeed they are. | ||
phenny: it en "e via, verso nuove avventure"? | |||
phenny | masak: "and off to new adventures" (it to en, translate.google.com) | ||
masak | my point exactly. | ||
that "verso" is especially cute. | 17:10 | ||
std: my Positional[Int] of Str $x; | |||
17:10
sweet_kid left
|
|||
p6eval | std 64edd1c: OUTPUT«ok 00:00 43m» | 17:10 | |
moritz | masak: because you know esperanto, maybe maybe other latin-based languages? | ||
masak | moritz: yes, I think so. | ||
moritz: but that's only one factor; Italian does look very easy to read even besides that. | 17:11 | ||
r: say "a" ~~ / <new> / | |||
p6eval | rakudo 978492: OUTPUT«「」 new => 「」» | ||
moritz | I know somebody who speaks French and Spanish, and learned Italian by learning the diffs/patches :-) | ||
masak | diakopter: doesn't look outright wrong to me. | 17:12 | |
rn: grammar A { rule TOP { <BUILD> }; rule BUILD { a } }; say A.parse("a") | |||
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)>» | ||
..rakudo 978492: OUTPUT«===SORRY!===Method 'match' not found for invocant of class 'String'» | |||
17:12
mtk left
17:13
changedNicks joined
|
|||
masak | diakopter: it's hard to say who is wrong, compiler or programmer, when the programmer is deliberately trying to cause mischief. | 17:14 | |
r: grammar A { rule TOP { <.pos> } }; say A.parse("a") | |||
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» | ||
masak | yeah, well. | ||
17:14
imarcusthis left
|
|||
masak | rn: grammar Int { }; say 3.0.Int ~~ Numeric | 17:14 | |
p6eval | niecza v22-14-g136ddcf: OUTPUT«True» | ||
..rakudo 978492: OUTPUT«===SORRY!===get_boxed_ref could not unbox for the given representation» | |||
moritz | we've discussed that one earlier today | 17:15 | |
17:15
imarcusthis joined
|
|||
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 | ||
and since a dysfunctional Int was provided, it's no surprise it blows up | |||
azawawi | so when is the *next-generation* rakudo star? | 17:16 | |
colomon | rn: grammar Int { }; say 3.0; | 17:18 | |
p6eval | niecza v22-14-g136ddcf: OUTPUT«3» | ||
..rakudo c487a5: OUTPUT«===SORRY!===get_boxed_ref could not unbox for the given representation» | |||
17:19
mtk joined
|
|||
azawawi | paste.debian.net/203038/ # farabi6 now works when installed from panda... :) | 17:20 | |
17:23
fgomez joined
|
|||
azawawi | hmm any way to get https url under perl6? | 17:24 | |
17:26
Targen left
|
|||
[Coke] | azawawi: I don't understand what you mean by next gen. | 17:29 | |
17:33
havenn left
|
|||
azawawi | [Coke]: next version | 17:34 | |
masak | azawawi: a Star release is usually cut about a week after the monthly Rakudo compiler release. | 17:36 | |
azawawi | masak: thanks | 17:37 | |
17:40
havenn joined
|
|||
moritz | azawawi: re https, shell out to curl or wget | 17:40 | |
17:44
spider-mario left
|
|||
[Coke] | or perhaps nativecall libcurl | 17:46 | |
azawawi | moritz: that would work :) | 17:47 | |
17:47
spider-mario joined
|
|||
azawawi | [Coke]: thanks | 17:47 | |
17:48
spider-mario left
|
|||
azawawi | im a win32 programmer so shelling out and things like that is not a thing we think of on win32 land :) | 17:48 | |
17:48
spider-mario_ joined
|
|||
rindolf | azawawi: hi. | 17:51 | |
azawawi: Farabi6 still crashes. | |||
17:51
changedNicks left,
changedNicks joined,
changedNicks is now known as sweet_kid
|
|||
rindolf | azawawi: paste.debian.net/203056/ | 17:52 | |
17:54
cognominal left
|
|||
azawawi | rindolf: could you try a quick HTTP::Easy sample (if it works or not)? | 17:55 | |
rindolf | azawawi: yes, I can - which one? | 17:56 | |
azawawi | rindolf: github.com/supernovus/perl6-http-easy/ | ||
rindolf: github.com/supernovus/perl6-http-easy/test # to be exact | |||
masak | more like github.com/supernovus/perl6-http-e...aster/test | ||
azawawi | rindolf: bad link... github.com/supernovus/perl6-http-e...st/test.p6 :) | ||
masak: thanks | |||
17:57
mtk left
|
|||
rindolf | azawawi: [2012-10-23T17:57:15Z] Started HTTP server. | 17:57 | |
17:58
mtk joined
|
|||
azawawi | rindolf: quick question, what browser are you using? | 17:58 | |
rindolf | azawawi: Firefox. | 17:59 | |
firefox-16.0.1-2.mga3 | |||
18:00
mtk left
18:01
arlinius joined
|
|||
arlinius | ias joins | 18:01 | |
oops hi | 18:02 | ||
rindolf | arlinius: hi. | ||
masak | hello, arlinius. | ||
18:02
imarcusthis- joined,
imarcusthis left
18:04
azawawi_ joined
|
|||
azawawi_ | rindolf: i pushed a possible fix... please { git pull } | 18:04 | |
18:05
azawawi left
|
|||
rindolf | azawawi_: to which repository? | 18:07 | |
azawawi_ | rindolf: panda install it :) | ||
rindolf | azawawi_: OK. | ||
azawawi_: panda install what? | |||
azawawi_ | rindolf: panda install Farabi6 | 18:08 | |
rindolf | azawawi_: OK. | ||
azawawi_: paste.debian.net/203063/ | 18:09 | ||
18:09
havenn left,
preflex left
18:10
mtk joined,
havenn joined
|
|||
azawawi_ | rindolf: at least we fixed that :) | 18:12 | |
18:12
preflex joined,
havenn left
|
|||
diakopter | masak: I'm willing to concede that not all leaky errors are LTA | 18:13 | |
rindolf | azawawi_: fixed what? | 18:14 | |
azawawi_ | rindolf: the previous bug | 18:15 | |
rindolf | azawawi_: well, not it doesn't serve a port. | 18:16 | |
azawawi_: so it made matters worse. | |||
azawawi_ | rindolf: what puzzled me is the version you're using | 18:17 | |
18:17
marloshouse_ joined,
daxim left
|
|||
azawawi_ | rindolf: im using rakudo star 2012.09 (from the downloads) | 18:17 | |
rindolf | azawawi_: OK. | ||
18:18
cognominal joined,
marloshouse left,
marloshouse_ is now known as marloshouse,
sqirrel left
18:19
cognominal left
|
|||
azawawi_ | rindolf: cd ~; farabi6 # maybe the http-easy lib/ | 18:19 | |
18:19
cognominal joined
|
|||
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 | ||
rindolf | azawawi_: 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 | ||
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:21 | ||
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 | |
in Perl 6, not so easy. | |||
diakopter | personally, I'm in favor of adding compile-time checks but not run-time checks | ||
(when needed) | 18:23 | ||
18:23
havenn joined
|
|||
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: irclog.perlgeek.de/perl6/2012-09-29#i_6026245 | ||
18:24
fgomez left
|
|||
azawawi_ | rindolf: feather.perl6.nl:3030/ # to use it | 18:25 | |
diakopter | azawawi_: that's neat | ||
one bug report: pressing F5 doesn't cancel the previous F5 event | 18:26 | ||
(found because there was a few seconds delay after pressing F5 so I pressed it again) | |||
18:26
fgomez joined
|
|||
azawawi_ | diakopter: yeah... i optimized perlito to be loaded on demand | 18:26 | |
diakopter | what does Farabi mean | 18:27 | |
azawawi_ | en.wikipedia.org/wiki/Al-Farabi | 18:28 | |
rindolf | azawawi_: Firefox can't establish a connection to the server at feather.perl6.nl:3030. | ||
feather.perl6.nl/ - this page is out-of-date. | 18:29 | ||
18:29
snearch joined
|
|||
azawawi_ | rindolf: restarted it | 18:30 | |
rindolf | azawawi_: OK. | 18:31 | |
azawawi_: nice, working now. | |||
masak | diakopter: compile-time checks for things that are obviously wrong, yes. | 18:32 | |
diakopter: which part of adding a rule 'new' to a grammar and then calling it is obviously wrong? | |||
diakopter | masak: iirc that one was more for niecza and I wasn't sure whether rakudo was right either | 18:33 | |
n: say "a" ~~ / <new> / | |||
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:33
preflex left
|
|||
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 | ||
masak | that's my point. | 18:35 | |
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 | |
rindolf: im intrigued why this is happening | |||
diakopter | masak: did you see the rn: grammar A { rule TOP { <new> }; rule new { a } }; say A.parse("a") | ||
that one I think is more interesting | |||
masak | I saw it. | 18:37 | |
I agree that they are *interesting*, in that they express a combination of features I think no-one has combined before. | |||
jnthn | r: grammar A { rule TOP { <new> }; rule new { a } }; say A.parse("a") | ||
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 … | ||
masak | as such, they at least invite us to think about whether to allow those combinations, or insert checks against them. | 18:38 | |
but the above doesn't look like Rakudo failing to me. | |||
jnthn | Yeah, it's clear what's going on there. | ||
masak | it looks like Rakudo playing by very predictable rules. | ||
and succeeding at it. | |||
jnthn | It found Mu in $*ACTIONS | ||
And then called .new($/) as it always does | |||
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 | ||
jnthn | And that led to the unsurprising error you get. | ||
diakopter | of course it makes sense to someone who's an expert at the language | 18:39 | |
of course it's unsurprising to an expert in the language | |||
jnthn | diakopter: I think anybody learning Perl 6 will encounter new, of all methods, pretty early on. | ||
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 | |
if they don't know grammar rules are methods | |||
I was making the same argument for clobbering Int with brokenness. The user may not even know what Int is | 18:41 | ||
(or Regex) | |||
or that things can be clobbered | |||
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 | ||
.. imho they would say 'wtf; this language is stupid' | |||
.. or at least "well, that's a totally unhelpful error" | 18:44 | ||
rindolf | azawawi_: I build rakudo git master from source. | ||
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 | |
or whatever | |||
IAMP6SORCERORDONTWARNME | |||
azawawi_ | rindolf: i'll install the latest and see | ||
18:47
brrt joined
|
|||
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) | ||
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 | ||
(once I figure them out) | |||
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 | ||
<pun intended> | |||
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/ | ||
azawawi_ | so where do i find info about this --gen-nqp option :) | 18:54 | |
diakopter | s/this is this/this is the/ | ||
rindolf | azawawi_: thanks. | ||
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 | |
lunch& | |||
18:55
REPLeffect left
18:56
REPLeffect joined
18:59
flightrecorder joined
19:05
rtr_ left
|
|||
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 | ||
otherwise every so often the behavior changes, and nobody knows whether to close the ticket or not | 19:14 | ||
and that just sucks up resources | |||
even better, when you know what should happen, write them as tests in the first place | |||
diakopter | is it possible to test for exception class that doesnt exist? | 19:15 | |
(I honestly dont know) | |||
moritz | you can spec the exception class, and fudge the test | ||
diakopter | ah | 19:16 | |
I dont know, I can see 'new' used as a rulename without a prohlem | 19:17 | ||
BUILDALL, not so mu h | 19:18 | ||
much | |||
19:18
domidumont left,
thou left
|
|||
diakopter | let me put it this way - I think it much superior to be a compiletime warning than a faq | 19:21 | |
("what does this error message mean?" "builtin clobbering" | 19:22 | ||
) | |||
19:23
flightrecorder left
|
|||
sorear | diakopter: | 19:23 | |
04:55 <sbp> if it's about masak's messages, he was probably sent two identical messages in a row | |||
04:55 <sbp> "..." is what phenny says when she detects repetition in her output | |||
04:55 <sbp> it's to prevent bot loops | |||
diakopter | ah | 19:24 | |
19:24
cognominal left
|
|||
diakopter | I didnt think I did that, at first | 19:25 | |
masak | I agree that compile-time errors are more effective than FAQ entries. | 19:29 | |
flussence | just so long as you don't end up with a FAQ for compile errors :) | 19:31 | |
19:33
cognominal joined
|
|||
dalek | p: cb13fd5 | jnthn++ | src/QRegex/Cursor.nqp: Sketch a method for pre-computing protoregex NFAs. |
19:33 | |
p: 0fdb57e | jnthn++ | src/ (3 files): Refactor handling of alternation NFAs. Don't stash the label offsets in the fates list. This is just as efficient, but should enable us to compute the NFA at compile time. |
|||
p: 161fa44 | jnthn++ | src/stage0/ (9 files): Update bootstrap. |
19:34 | ||
p: 995a21b | jnthn++ | src/ops/nqp.ops: Eliminate now-unused op variant. |
|||
masak | (op GCing)++ | 19:37 | |
19:38
brrt left,
sftp left
19:40
sftp joined
|
|||
jnthn now has a Rakudo that spectests in 229s instead of 262s on his box o/ | 19:45 | ||
19:46
bluescreen10 left
|
|||
rindolf | jnthn: awesome. | 19:47 | |
jnthn++ | |||
masak | yay. | ||
rn: say (229 - 262)/262 | 19:48 | ||
p6eval | niecza v22-14-g136ddcf: OUTPUT«-0.12595419847328243» | ||
..rakudo c487a5: OUTPUT«-0.125954» | |||
masak | that's one of those mythical 10% speedups. jnthn++ | ||
sorear | jnthn++ | ||
masak \o/ | |||
masak | even though it's on the test suite, which is parse-heavy. still impressive. | ||
sorear! \o/ | |||
sorear | hmm, I forgot to do this | 19:49 | |
good * #perl6 | |||
jnthn | o/ sorear | ||
rindolf | sorear: top of the *! | 19:50 | |
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:52
GlitchMr left
|
|||
dalek | p: f221da4 | jnthn++ | src/ (4 files): Finish up NFA pre-computation logic. Has to take special care to include alternation NFAs from nested code objects (like nibbler for before, or positional captures). Otherwise, nothing surprising. Note that catching them all is important if we're to cache them, or we risk getting things spanning bootstrap phases. |
19:53 | |
p: 234daad | jnthn++ | src/ops/nqp.ops: Fix nqp::ishash for deserialized hashes. |
|||
p: b6c88ff | jnthn++ | src/how/NQPClassHOW.pm: Make NFA cache an attribute rather than lexical. This means that the compile time computation will be serialized, so the NFAs for protoregexes and alternations need not be re-calculated each run, at least for use of the standard grammar. |
|||
p: 444537f | jnthn++ | src/stage0/ (9 files): Update bootstrap. |
|||
sjohnson | jnthn: hi | ||
jnthn | o/ sjohnson | ||
masak: Having spectest faster does help speed up Rakudo development. | 19:54 | ||
masak | absolutely. | ||
jnthn | masak: So it's a win in that regard too. | ||
masak | it's an impressive speedup. | ||
jnthn | But yes, it's a user-facing win. | ||
tadzik | classic jnthn++. Pushes faster than I can compile | ||
masak | maybe he writes several commits and pushes them all at once...? :P | 19:55 | |
19:56
Targen joined
|
|||
dalek | kudo/nom: 8fa4c58 | jnthn++ | tools/build/NQP_REVISION: Bump NQP_REVISION to get compile-time NFA calc. This means that we don't need to compute a bunch of them on-demand as we parse. This saves some work on each invocation. The spectests get a ~10% win from this. |
19:57 | |
19:57
thou joined
|
|||
jnthn | fwiw, the kill-nqpattr work made this possible, as well as the categorically-better branch. | 19:57 | |
19:58
jaffa4 left
|
|||
diakopter | jnthn: that's awesome | 20:00 | |
jnthn | :) | ||
20:02
hash_table left
20:04
fgomez left
|
|||
moritz | that's categorically awesome :-) | 20:04 | |
dalek | kudo/nom: 027f8c1 | jnthn++ | docs/ChangeLog: Start ChangeLog for 2012.11. |
20:05 | |
20:06
Targen left
|
|||
jnthn | Oh, fail. My looser/tighter doesn't actually work :/ | 20:14 | |
20:15
leont joined
|
|||
diakopter | maybe loosen or tighten something? | 20:17 | |
tadzik | duct tape and/or wd-40 | 20:19 | |
jnthn | You can fix anything with those two. | ||
If it moves and it shouldn't, duct tape. It it doesn't move and it should, wd-40. | |||
tadzik | sometimes you also need spare parts | ||
and for my phone I also needed skotch | 20:20 | ||
scotch? | |||
scotch. | |||
jnthn | Scotch whisky? Nice. | ||
tadzik | it was a bit of a waste to clean metal with it :( | ||
20:21
cognominal left,
birdwindupbird joined
|
|||
jnthn | :( | 20:21 | |
dalek | kudo/nom: 226b3bd | jnthn++ | src/core/traits.pm: Make looser/tighter actually work. |
||
colomon | :( | 20:25 | |
20:26
azawawi_ left
20:27
havenn left
20:28
leont left
20:29
cognominal joined
20:30
havenn joined
|
|||
jnthn | Bah, precedence.t does sub prefix:<!> (Int $x) is tighter(&infix:<**>) { | 20:31 | |
And for some reason, setting the precedence of a prefix based on an infix fails... | |||
masak | guten n∞, #perl6. | 20:33 | |
20:33
leont joined
|
|||
diakopter | o/ | 20:33 | |
20:34
havenn left
|
|||
[Coke] | are all the precedences mixed together | 20:36 | |
? | |||
or is there a separate table for each type? | |||
PerlJam | Why precedence strings like "@====" instead of ">===" exactly? | 20:37 | |
20:37
havenn joined
|
|||
jnthn | oooh | 20:37 | |
PerlJam: Because O expects a string like :prec<...> and it turns out if you put other < and > in there... :) | |||
PerlJam | ah, of course :) | 20:38 | |
jnthn | PerlJam: STD does these things as constant hashes. | ||
Rakudo probably should in the end too but that's a bit of a yak shave for the moment. | |||
PerlJam | presumably we could end up with precedences like "@:@:@=" | 20:39 | |
jnthn | oooh | ||
20:39
havenn left
|
|||
jnthn | Yeah, I see what's going on. | 20:39 | |
It's copying the associativity of the infix op over. | 20:40 | ||
It...probably had better not do that :) | |||
20:43
cognominal left
|
|||
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:45 | |
jnthn | skids: Rakudo needs buf8 support even before that ;) | 20:46 | |
skids | :-) | ||
I assume size_t is as difficult as uint and that's why it isn't there as well? | |||
20:47
kaare_ left
|
|||
jnthn | skids: Isn't size_t platform specific also? | 20:48 | |
skids | Well, as platform specific as "int". | 20:49 | |
jnthn | True :) | ||
20:50
cognominal joined
20:51
Chillance joined
|
|||
dalek | kudo/nom: 8293d69 | jnthn++ | src/core/traits.pm: Fix is assoc(...). |
20:51 | |
kudo/nom: 714593d | jnthn++ | src/core/operators.pm: Don't override assoc when doing equiv etc. Turns out that you should be able to use the precedence of an infix when declaring a prefix and the like. |
|||
arnsholt | skids: Would proper CArray[int8] help you think? | ||
skids | int8 would be less helpful than uint8. | 20:52 | |
arnsholt | True | ||
Hmm. Not sure how hard it would be to get uint working properly | |||
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. | ||
arnsholt | /hope | ||
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
|
|||
arnsholt | But 8 and 16 bit unsigneds will fit | 20:55 | |
20:56
birdwindupbird left
|
|||
skids | Well, 8 would probably be useful, and wouldn't run into any endian issues :-) | 20:56 | |
arnsholt | There's that as well | 20:59 | |
20:59
leont left
|
|||
skids decommute | 21:02 | ||
sorear | size_t sounds easier than int | 21:04 | |
because on modern platforms size_t, intptr_t, and INTVAL are all the same size | |||
while int may be smaller | |||
21:07
skids left
|
|||
bbkr | how to compare type of two variables (with ignoring their values)? | 21:10 | |
[Coke] | $a.WHAT == $b.WHAT ? | 21:11 | |
jnthn | === if you want exact type match | ||
== is numeric comp | |||
bbkr | r: say 1 === 2 | ||
p6eval | rakudo 714593: OUTPUT«False» | ||
jnthn | With the .WHAT that coke suggested :) | 21:12 | |
[Coke] | r: say so 1.WHAT == 2.WHAT | ||
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» | ||
[Coke] | r: say 1.WHAT == 2.WHAT | ||
spider-mario_ | what is eqv exactly, btw? | ||
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» | ||
[Coke] | I'll let jnthn field that one. :) | ||
jnthn | [Coke]: Yes, I said use === | 21:13 | |
[Coke] | r: say 1.WHAT === 2.WHAT | ||
p6eval | rakudo 714593: OUTPUT«True» | ||
[Coke] | ah. Didn't read your modification right. | ||
jnthn | np :) | ||
[Coke] | r: say 1.WHAT === (2 but 3).WHAT | 21:14 | |
p6eval | rakudo 714593: OUTPUT«False» | ||
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? | ||
[Coke] | r: say (1 but 3).WHAT === (2 but 3).WHAT | ||
p6eval | rakudo 714593: OUTPUT«True» | ||
[Coke] | r: say (1 but 3).WHAT === (2 but 4).WHAT | ||
p6eval | rakudo 714593: OUTPUT«True» | ||
21:14
MayDaniel left
21:20
PacoAir left,
benabik left
21:21
benabik joined
21:26
benabik left
21:30
fgomez joined
21:36
timbunce_ left
21:40
tokuhiro_ joined
21:44
Chillance left
21:45
Chillance joined
|
|||
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… | ||
..rakudo 714593: OUTPUT«3» | |||
diakopter | hm | 21:53 | |
now I don't know whether to nieczaissue it | |||
because I don't understand the error message | |||
but is it just because I'm slow and terrible at remembering what 'but' does? | |||
21:56
spider-mario_ left,
snearch left
|
|||
sorear | no, it's because what "but" does actually _is_ horrifically weird | 21:56 | |
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 | ||
n: role Moo { has $.x }; say (5 but Moo(12)).x | |||
p6eval | niecza v22-14-g136ddcf: OUTPUT«12» | ||
diakopter | oh. | 21:58 | |
good to know | |||
now if I can remember it for longer for a couple weeks... | |||
sorear | maybe I/we should restrict this to the case where Moo is actually a type name | 21:59 | |
it's kind of useless to do it with &so ... | |||
diakopter | well, it could be a variable storing a type | 22:00 | |
22:00
stopbit left
22:08
rindolf left
22:11
Targen joined
|
|||
flussence | it feels like PHP's becoming the software equivalent of a sci-fi horror movie... bugs.php.net/63316 | 22:11 | |
sorear | diakopter: true but it might be less confusing at that point if we force explicitness | ||
flussence | .oO( On today's episode: They went in search of a long-lost charset. *Something else* came back with them... ) |
22:12 | |
22:29
skids joined
22:34
cognominal left
22:35
armitage81 joined,
armitage81 left,
armitage81 joined
22:36
havenn joined
22:37
kurahaupo joined
22:41
gdey left
22:44
whiteknight joined
|
|||
rjbs | r: sub x ($x) { say $x } x(123) | 22:49 | |
p6eval | rakudo 714593: ( no output ) | ||
rjbs | What am I missing? | ||
diakopter | semicolon | 22:50 | |
skids | a semicolon? | ||
rjbs | r: sub x ($x) { say $x } ; x(123) | ||
p6eval | rakudo 714593: OUTPUT«123» | ||
rjbs | Thanks — not the first time I've made htat mistake, too. :/ | ||
diakopter |  would've worked too, to p6eval | ||
rjbs | cute :) | 22:51 | |
p6eval++ # super useful | |||
even to occasionally dabbler rjbs | |||
diakopter | it can eval gists too.. | ||
22:51
waldo17 joined
|
|||
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, @) { ... }" | |||
p6eval | niecza v22-14-g136ddcf: OUTPUT«Potential difficulties: &x is declared but not used at /tmp/ndz3_iQJiI line 1:------> say sub x ⏏($x) { say $x } x(123)Sub()<instance>Sub()<instance>Sub()<instance>Sub()<instance>Sub()<instance>Sub()<instance>Sub()<instance>Sub()<in… | ||
22:52
Celelibi left,
sivoais is now known as cooljj_21
|
|||
rjbs | We're looking at some work by Peter Martini to add subroutine signatures to p5. | 22:52 | |
So please be careful, as Hell may be freezing over. | |||
22:52
cooljj_21 is now known as sivoais
|
|||
diakopter | O_O | 22:52 | |
22:53
bluescreen10 joined
|
|||
rjbs | flussence: nice php bug | 22:53 | |
skids thinks it is pretty scary when rjbs asked that he actually pictured a list of 123 closures. | 22:54 | ||
22:54
waldo17 left
|
|||
rjbs | I keep forgetting about the increased significance of whitespace. | 22:54 | |
sorear | skids: you're thinking of xx | ||
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:55 | |
22:59
Su-Shee left,
Celelibi joined
23:01
Su-Shee joined
|
|||
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, )» | ||
..niecza v22-14-g136ddcf: OUTPUT«3Unhandled 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… | |||
doy | rn: sub x ($x, $) { say $x }; x(3, 4) | ||
p6eval | rakudo 714593, niecza v22-14-g136ddcf: OUTPUT«3» | ||
rjbs | doy: yeah, I was playing with that in /query :) | 23:02 | |
r: sub x ($x, *) { say $x }; x(3, 4); x(5, []) | 23:03 | ||
p6eval | rakudo 714593: OUTPUT«===SORRY!===Malformed parameterat /tmp/U7lEuVhrLQ:1» | ||
rjbs wasn't sure if he could whatever there. | |||
23:03
pmurias joined
|
|||
rjbs will update his local Rakudo* when he gets off the bus and onto a hard line. | 23:03 | ||
Well, actually I'll probably go to the library and then play with my new Kindle. But I'll get around to it. | |||
pmurias | diakopter: re clobbering new, it seems like something better error messages would solve | 23:04 | |
diakopter: which would point where the conflicting new method is defined | |||
diakopter: or integration with the editor or something similiar | |||
23:05
fgomez left
|
|||
diakopter | pmurias: I agree. but it should be a warning that can be disabled by declaring guru mode | 23:07 | |
actually. | 23:08 | ||
here's an idea- | |||
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:09 | ||
eh; kinda complex | 23:11 | ||
pmurias | yes | ||
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:12 | ||
23:14
Su-Shee left,
fgomez joined,
Su-Shee joined
|
|||
pmurias | diakopter: making things harder (special modes) to avoid doing them by accident seems annoying | 23:15 | |
23:20
lue left
23:22
cognominal joined
|
|||
diakopter | pmurias: hm, ok | 23:26 | |
23:29
thou left
23:39
cognominal left
23:47
cognominal joined
23:48
pmurias left
23:50
dayangkun joined
23:51
wooden left
23:55
_jaldhar_ joined,
bluescreen10 left
23:56
wooden joined
23:57
cognominal left
|