»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by masak on 12 May 2015. |
|||
cognominal | class A { method a is export { say 'a'}}; # so I suppose it means I can call it A::a as well as A.a | 00:02 | |
makes more sense | |||
psch | m: class A { has $.b; method a is export { say $.b }}; import A; a A.new(:b(5)) | ||
camelia | rakudo-moar fd8c98: OUTPUT«5» | ||
00:02
adu left
|
|||
psch | m: class A { has $.b; method a is export { say $.b }}; import A; say &a.signature | 00:03 | |
camelia | rakudo-moar fd8c98: OUTPUT«(A $: *%_)» | ||
00:03
RabidGravy left
00:07
colomon left
00:08
colomon joined
|
|||
cognominal | what is the dollar in the signature? | 00:08 | |
psch | cognominal: a scalar invocant | ||
m: class A { has $.b; method a is export(A $self: ) { say $self!b }}; import A; say &a.signature | 00:09 | ||
camelia | rakudo-moar fd8c98: OUTPUT«5===SORRY!5=== Error while compiling /tmp/btTGXDIdP6Two terms in a rowat /tmp/btTGXDIdP6:1------> 3class A { has $.b; method a is export(A7⏏5 $self: ) { say $self!b }}; import A; sa expecting any of: infix infix…» | ||
psch | oh | ||
that's not where the signature goes... | |||
m: class A { has $.b; method a (A $self: ) is export { say $self!b }}; import A; say &a.signature | |||
camelia | rakudo-moar fd8c98: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yE4twEl1GlNo such private method 'b' for invocant of type 'A'at /tmp/yE4twEl1Gl:1------> 3hod a (A $self: ) is export { say $self!7⏏5b }}; import A; say &a.signature» | ||
psch | oh, the param is outside..? | 00:10 | |
m: class A { has $.b; method a (A $self: ) is export { say $self.b }}; import A; say &a.signature | |||
camelia | rakudo-moar fd8c98: OUTPUT«(A $self: *%_)» | ||
psch | anyway, there | ||
cognominal | psch++ | 00:12 | |
00:16
tokuhirom joined
|
|||
psch | ah, no, if it's not literal self it always goes through method dispatch... | 00:16 | |
m: class A { has $!b; method a (A $self: ) is export { say self!b; say $self =:= self }}; import A; a A.new(:b(1)) | 00:17 | ||
camelia | rakudo-moar fd8c98: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ci7T9lM3z2No such private method 'b' for invocant of type 'A'at /tmp/ci7T9lM3z2:1------> 3thod a (A $self: ) is export { say self!7⏏5b; say $self =:= self }}; import A; a A.» | ||
cognominal | m: class A { my &a = method a { say 'a' }; method b { a A }}; A.b # wicked | ||
camelia | rakudo-moar fd8c98: OUTPUT«a» | ||
psch | well, okay, that has me a tad confused... | ||
oh duh | |||
$.a is the same as self.a, but self!a isn't the same as $!a | 00:18 | ||
konobi | is there a version of the 'nix' language in nqp land? | 00:19 | |
00:20
tokuhirom left
|
|||
[Coke] | not to my knowledge. | 00:34 | |
cognominal | m: class A { my &a = method { say 'a' }; my &b = method { say 'b' }; our @a = ( &a, &b ) }; A.@A::a | 00:43 | |
camelia | rakudo-moar 1051fc: OUTPUT«Invocant requires a type object of type Array, but an object instance was passed. Did you forget a 'multi'? in block <unit> at /tmp/Vr4mqfhqbE:1» | ||
cognominal | m: class A { my &a = method { say 'a' }; my &b = method { say 'b' }; our @a = ( &a, &b ) }; say @A::a | ||
camelia | rakudo-moar 1051fc: OUTPUT«[<anon> <anon>]» | ||
01:00
tokuhirom_h joined
01:04
tokuhirom_h left
|
|||
cognominal | m: 1.infix:['+'](2) | 01:06 | |
camelia | rakudo-moar 1051fc: OUTPUT«Method 'infix:<+>' not found for invocant of class 'Int' in block <unit> at /tmp/oXpkTheTnw:1» | ||
cognominal | m: say infix:['+'](1, 2) | 01:08 | |
camelia | rakudo-moar 1051fc: OUTPUT«5===SORRY!5=== Error while compiling /tmp/F4e_z7kUwWUndeclared routine: infix:['+'] used at line 1. Did you mean 'infix:<+|>', 'infix:<+>', 'infix:«+>»', 'infix:«+<»', 'infix:<+^>'?» | ||
01:08
yqt left
|
|||
AlexDaniel | .u ⚠ | 01:10 | |
yoleaux | U+26A0 WARNING SIGN [So] (⚠) | ||
sprocket | is there something akin to a PERL5LIB environment var for rakudo that i can use to specify alternate library paths? | 01:11 | |
cognominal | sprocket, I think this is in flux right now. | 01:12 | |
sprocket | cognominal: what’s the current method? i just need a way to test a module i’m working on, before i package it up | ||
cognominal | I think you can use -I when invoking rakudo | 01:13 | |
sprocket | ah ok | ||
cognominal | I see PERL6LIB in the sources | 01:14 | |
github.com/rakudo/rakudo/blob/nom/...ore/Inc.pm | 01:15 | ||
sprocket | cognominal: I’ll check it out - thank you! | ||
cognominal | m: say 1.:<+>(2) | 01:16 | |
camelia | rakudo-moar 1051fc: OUTPUT«Cannot find method 'CALL-ME' in block <unit> at /tmp/bCGdBoTIi0:1» | ||
cognominal | at least they all parse :) | 01:17 | |
raiph | .ask itz_stmuk re: pl6anet stats... Any idea what happened on Oct 21 (flat visits/pages etc but a crazy hit spike)? ... Why are so many hits 404s (70% in Oct!)? | 01:23 | |
yoleaux | raiph: I'll pass your message to itz_stmuk. | ||
zengargoyle | is there a particular reason FIRST { … } can't be used in a while loop? | 01:26 | |
but LAST { … } can. | 01:27 | ||
m: my $x = True; while $x { FIRST { say "first" }; LAST { say "last" }; $x = False; } | 01:29 | ||
camelia | rakudo-moar 1051fc: OUTPUT«last» | ||
zengargoyle | m: my $x = True; while $x { once { say "first" }; LAST { say "last" }; $x = False; } | ||
camelia | rakudo-moar 1051fc: OUTPUT«firstlast» | ||
01:29
finanalyst left
|
|||
psch | m: say &infix:['+'](1,2) | 01:31 | |
camelia | rakudo-moar 1051fc: OUTPUT«3» | ||
psch | hm, not sure if that's autogen or the other bit... | ||
gfldex | m: my $i = 10; while $i-- { FIRST { say 'first' } }; | 01:32 | |
camelia | ( no output ) | ||
gfldex | m: my $i = 10; while $i-- { FIRST { say 'first' } say 'alive' }; | ||
camelia | rakudo-moar 1051fc: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_ychOoa7LcStrange text after block (missing semicolon or comma?)at /tmp/_ychOoa7Lc:1------> 3= 10; while $i-- { FIRST { say 'first' }7⏏5 say 'alive' }; expecting any of: infix …» | ||
gfldex | m: my $i = 10; while $i-- { FIRST { say 'first' }; say 'alive' }; | ||
camelia | rakudo-moar 1051fc: OUTPUT«alivealivealivealivealivealivealivealivealivealive» | ||
gfldex | zengargoyle: please rakudobug | ||
zengargoyle | heh, seems like i'm rakudobuging something every day :P | 01:33 | |
01:35
TEttinger joined
01:36
cognominal left
|
|||
mst | design.perl6.org/Differences.html | 01:36 | |
is there any chance we can replace 'perl6 has a "real" object system' with something saying it's built into the language rather than provided by libraries or whatever | |||
or if that doc's considered 'out of date, meh' can we put some sort of thing at the top saying that | 01:37 | ||
01:38
MadcapJake joined
|
|||
zengargoyle | rakudobug'd: [perl #126535] AutoReply: [BUG] - FIRST phaser not firing in while | 01:39 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=126535 | ||
AlexDaniel | .u 🛂 | 01:47 | |
yoleaux | U+1F6C2 PASSPORT CONTROL [So] (🛂) | ||
01:48
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
[Coke] | m: say "\c[PASSPORT CONTROL]" ~ "\c[COMBINING DIAERESIS]" | 01:51 | |
camelia | rakudo-moar 1051fc: OUTPUT«🛂̈» | ||
01:53
xpen joined
01:55
laouji joined
|
|||
AlexDaniel | .u 💬 | 01:55 | |
yoleaux | U+1F4AC SPEECH BALLOON [So] (💬) | ||
01:55
laouji left
|
|||
psch | m: say "\c[PASSPORT CONTROL]\c[COMBINING SPEECHBALOON]" # i wonder... | 01:56 | |
camelia | rakudo-moar 1051fc: OUTPUT«5===SORRY!5=== Error while compiling /tmp/5beV6hPyp4Unrecognized character name COMBINING SPEECHBALOONat /tmp/5beV6hPyp4:1------> 3SSPORT CONTROL]\c[COMBINING SPEECHBALOON7⏏5]" # i wonder...» | ||
psch | aww unicode, why not | ||
:P | |||
TEttinger | m: say "\c[PASSPORT CONTROL]\c[COMBINING SPEECHBALLOON]" | 01:57 | |
camelia | rakudo-moar 1051fc: OUTPUT«5===SORRY!5=== Error while compiling /tmp/E_CVaKrj52Unrecognized character name COMBINING SPEECHBALLOONat /tmp/E_CVaKrj52:1------> 3SPORT CONTROL]\c[COMBINING SPEECHBALLOON7⏏5]"» | ||
TEttinger | m: say "\c[PASSPORT CONTROL]\c[COMBINING SPEECH BALLOON]" | ||
camelia | rakudo-moar 1051fc: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_z1WSSNTDmUnrecognized character name COMBINING SPEECH BALLOONat /tmp/_z1WSSNTDm:1------> 3PORT CONTROL]\c[COMBINING SPEECH BALLOON7⏏5]"» | ||
TEttinger | aw | ||
is there a way to search the unicode DB for all matches? | 01:58 | ||
[Coke] | .u SPEECH | ||
yoleaux | U+2EC8 CJK RADICAL C-SIMPLIFIED SPEECH [So] (⻈) | ||
U+2F94 KANGXI RADICAL SPEECH [So] (⾔) | |||
U+1F4AC SPEECH BALLOON [So] (💬) | |||
[Coke] | .u SPEECHB | ||
yoleaux | No characters found | ||
AlexDaniel | .u BALOON | 01:59 | |
yoleaux | No characters found | ||
AlexDaniel | oops | ||
.u BALLOON | |||
yoleaux | U+2723 FOUR BALLOON-SPOKED ASTERISK [So] (✣) | ||
U+2724 HEAVY FOUR BALLOON-SPOKED ASTERISK [So] (✤) | |||
U+2749 BALLOON-SPOKED ASTERISK [So] (❉) | |||
AlexDaniel | so it is limited to just 3 | ||
TEttinger | .u COMBINING SPEECH | 02:01 | |
yoleaux | No characters found | ||
TEttinger | .u COMBINING BALLOON | ||
yoleaux | No characters found | ||
TEttinger | .u COMBINING BUBBLE | ||
yoleaux | No characters found | ||
TEttinger | .u SPEECH BALLOON | ||
yoleaux | U+1F4AC SPEECH BALLOON [So] (💬) | ||
TEttinger | hm | ||
AlexDaniel | there is no combining bubbles, stop it! :D | 02:02 | |
psch | "\x0".."\xffff" .grep({.uniprop eq 'Mn'}) # get all the marks! | ||
AlexDaniel | here's the list of all combining stuff: en.wikipedia.org/wiki/Combining_character | 02:03 | |
02:03
adu joined
|
|||
AlexDaniel | 🛂⃠ | 02:04 | |
psch | ooh, COMBINING HALF-WIDTH LEFT ALIGNED BLOCK | 02:05 | |
02:06
sprocket left
|
|||
psch better goes to bed :S | 02:06 | ||
02:08
goofyFuzzball joined
|
|||
diakopter | haha | 02:15 | |
02:22
risou left
|
|||
Sgeo | Does/will Perl6 have a reasonable FFI? | 02:22 | |
02:25
yeahnoob joined
|
|||
AlexDaniel | Sgeo: like Inline::Python? | 02:27 | |
zengargoyle | TEttinger: are you on a linux box? | ||
TEttinger | nope | ||
Sgeo | I don't know anything about Inline::Python | ||
Sgeo wants to use an opaque C library | |||
adu | opaque? | ||
TEttinger | why, zengargoyle? | ||
gfldex | Sgeo: see NativeCall | 02:28 | |
adu | and Inline::C | ||
gfldex | design.perl6.org/S21.html | ||
adu | and C::Parser | ||
zengargoyle | ah, don't know about Win/Mac... i usually zcat /usr/shar/i18n/charmaps/UTF-8.gx | fgrep <whatever> | ||
TEttinger | ah ok | ||
zengargoyle | other OS might have a file somewhere of characters... | ||
adu | zengargoyle: Mac is pretty close to most other unixen | 02:29 | |
zengargoyle | yeah, i almost count Mac, but don't know file locations. | ||
not sure, think that file is part of iconv | 02:30 | ||
02:30
bpmedley left
|
|||
adu | zengargoyle: usually if you substitute historical monikers with TitleCaseWords, the directory structure is pretty close | 02:30 | |
zengargoyle | uh, no locales package it seems. | 02:31 | |
adu | zengargoyle: like /home is /Users, /usr is /Library and lib/ is Frameworks/ and include/ is Headers/ | 02:32 | |
zengargoyle | lol | ||
adu | zengargoyle: it's exactly the same :P | 02:33 | |
zengargoyle: but I think most developer I know install homebrew or macports to smooth out the differences | 02:34 | ||
zengargoyle | yeah, scripting and unix-y app wise i mostly consider them equivalent... it's now 'will probably work on Linux/Mac, don't know about Windows' as long as you can find the package in your package manager. | 02:36 | |
and is more likely to work on Mac than Solaris. :P | |||
adu | most unix-y people I know who use windows install Cygwin | ||
02:37
BenGoldberg left
|
|||
adu | I've tried Solaris, it's /dev tree is like an alien world | 02:37 | |
zengargoyle | quite a bit of Solaris at $WORK, but i leave those details to others. it's sorta very slowly being phased out ever since the Oracle took over. | 02:41 | |
02:41
goofyFuzzball left
|
|||
gtodd | adu: and if you want, you can even make symlinks to TitleCaseWords and olde fashioned unix to feel more part of the NeXT-generation | 02:44 | |
02:47
cognominal joined
02:59
cognominal left
03:05
kaare_ joined
03:10
aborazmeh left
03:12
MadcapJake left,
atweiden left
03:18
risou_awy joined,
risou_awy is now known as risou
|
|||
raiph | m: sink 1 | 03:20 | |
camelia | ( no output ) | ||
03:20
cognominal joined
03:22
tokuhirom joined
03:28
finanalyst joined
03:31
cognominal left
03:32
aborazmeh joined,
aborazmeh left,
aborazmeh joined
03:37
Actualeyes joined
03:38
xinming left
|
|||
zengargoyle | back in college days i kept my laundry in a NeXT box. too cool. | 03:40 | |
03:44
xinming joined
03:54
Oatmeal left
04:00
Oatmeal joined
04:04
khw joined
04:06
kaare_ left,
aborazmeh left
|
|||
dalek | kudo-star-daily: 5ec59e7 | coke++ | log/ (9 files): today (automated commit) |
04:29 | |
04:39
Actualeyes left
04:43
adu left
04:44
skids left
04:45
llfourn joined
04:58
Actualeyes joined
05:04
khw left
05:05
sprocket joined
|
|||
Hotkeys | does perl 6 have an equivalent to the $INPUT_RECORD_SEPARATOR or $RS or $/ variables from perl 5? | 05:07 | |
moritz | Hotkeys: you can specify the separator during open with nl => "separator" | 05:08 | |
TimToady | I thought there was a problem with autochomp if you do that | 05:09 | |
yoleaux | 1 Nov 2015 21:39Z <lizmat> TimToady: I'm having a hard time describing your work on autogen the past week. Could you summarize that in a line of 1,2,3 (or more) for the Perl6 Weekly? | ||
TimToady | anyway, at the moment I think slurp.split is faster | ||
05:09
atweiden joined
|
|||
TimToady | hopefully will change in the next week or two | 05:09 | |
moritz | there's also open(...).split iirc | 05:13 | |
which might be less memory hungry | |||
TimToady | .tell lizmat There's a sense in which none of the metaoperators are really there, but are abstractions; up till now they've autovivified themselves as needed only when used in a normal operator slot, but now they autovivify when mentioned as nouns or function names too, in any of &foofix:<op>, foofix:<op>, or &[op] now also honor the abstraction | 05:15 | |
yoleaux | TimToady: I'll pass your message to lizmat. | ||
raiph | .tell atweiden It's something like Rats are Rat[64]s -- they overflow to Nums when the denominator of a result overflows 64 bits so consider using Rat[128+]s or FatRats instead | 05:23 | |
yoleaux | raiph: I'll pass your message to atweiden. | ||
05:23
AlexDaniel left
05:31
sprocket left
|
|||
atweiden | raiph: thanks, didn't know about Rat64 | 05:32 | |
yoleaux | 05:23Z <raiph> atweiden: It's something like Rats are Rat[64]s -- they overflow to Nums when the denominator of a result overflows 64 bits so consider using Rat[128+]s or FatRats instead | ||
atweiden | any thoughts on Rat64 vs rat64 native types? | ||
moritz | rats are composite types; there's not much point having a native one | 05:33 | |
TimToady | we had specced a native form that has a numerator twice as big as the denominator, since there's not much use in limiting numbers to be close to 1 when when the denom is huge | 05:34 | |
so a rat64 would actually have an int128 for its numerator | 05:35 | ||
05:42
[Sno] left
|
|||
zengargoyle | m: say "ア つ.ぐ".match(/<:Kana :Hira [.\h]>+/); | 05:45 | |
camelia | rakudo-moar 1051fc: OUTPUT«「ア つ.ぐ」» | ||
zengargoyle | m: say "ア つ.ぐ".match(/<:Kana :Hira [.]>+/); | ||
camelia | rakudo-moar 1051fc: OUTPUT«「ア」» | ||
arnsholt | zengargoyle: [...] doesn't introduce a character class in Perl 6, FYI =) | ||
It's a non-capturing group like (?:) in Perl 5 | 05:46 | ||
TimToady | it's inside <> | ||
zengargoyle | insise < > | ||
TimToady | but you need + | ||
m: say "ア つ.ぐ".match(/<:Kana+:Hira+[.]>+/); | |||
camelia | rakudo-moar 1051fc: OUTPUT«「ア」» | ||
TimToady | m: say "ア つ.ぐ".match(/<:Kana+:Hira+[.\h]>+/); | ||
camelia | rakudo-moar 1051fc: OUTPUT«「ア つ.ぐ」» | ||
zengargoyle | m: say "ア つ.ぐ".match(/<:Kana :Hira [.\h]>+/); | 05:47 | |
camelia | rakudo-moar 1051fc: OUTPUT«「ア つ.ぐ」» | ||
arnsholt | Oh, derp. It would appear that reading comprehension deteriorates as thesis writing intensifies >.< | ||
zengargoyle | m: say "ア つ.ぐ".match(/<:Kana+:Hira+[.]>+ % ' '/); | ||
camelia | rakudo-moar 1051fc: OUTPUT«「ア つ」» | ||
zengargoyle | why is [.] not matching the '.' | 05:48 | |
TimToady | that...shouldn't work work without + | ||
05:48
finanalyst left
|
|||
zengargoyle tried both ways and decided + didn't make a difference and thought maybe it was the default... | 05:49 | ||
TimToady | m: say "ア つ.ぐ".match(/<[\w] [.\h]>+/); | 05:50 | |
camelia | rakudo-moar 1051fc: OUTPUT«「ア つ.ぐ」» | ||
zengargoyle | m: say "つ.ぐ".match/<:Hira+[.]>+/ | 05:51 | |
camelia | rakudo-moar 1051fc: OUTPUT«5===SORRY!5===Regex not terminated.at /tmp/J8YuEQDvI1:1------> 3say "つ.ぐ".match/<:Hira+[.]>+/7⏏5<EOL>Regex not terminated.at /tmp/J8YuEQDvI1:1------> 3say "つ.ぐ".match/<:Hira+[.]>+/7⏏5<EOL>Unable to parse regex; …» | ||
TimToady | eep, + isn't supposed to be default | ||
zengargoyle | m: say "つ.ぐ".match/<:Hira+[.]>+/); | ||
camelia | rakudo-moar 1051fc: OUTPUT«5===SORRY!5===Null regex not allowedat /tmp/xag7STumLQ:1------> 3say "つ.ぐ".match/<:Hira+[.]>+/7⏏5);Unable to parse regex; couldn't find final '/'at /tmp/xag7STumLQ:1------> 3say "つ.ぐ".match/<:Hira+[.]>+/7⏏5); …» | ||
zengargoyle | m: say "つ.ぐ".match(/<:Hira+[.]>+/); | ||
camelia | rakudo-moar 1051fc: OUTPUT«「つ.ぐ」» | ||
zengargoyle | m: say "つ.ぐ つ.ぐ".match(/<:Hira+[.]>+ % ' '/); | 05:52 | |
camelia | rakudo-moar 1051fc: OUTPUT«「つ」» | ||
05:53
raiph left
|
|||
zengargoyle | m: "つ.ぐ つ.ぐ" ~~ m :g /<:Hira+[.]>+ % ' '/; say @(); | 05:56 | |
camelia | rakudo-moar 1051fc: OUTPUT«(「つ」 「.」 「ぐ つ」 「.」 「ぐ」)» | ||
zengargoyle wishes linenoise handled wide characters. | 05:59 | ||
atweiden | is it Rat128? getting invalid typename. | 06:08 | |
maybe i'll try rat64 first, but is it implemented? | 06:09 | ||
m: my rat64 $r = 0.0 | 06:16 | ||
camelia | rakudo-moar 1051fc: OUTPUT«5===SORRY!5===Type 'rat64' is not declaredat /tmp/4JyC2ay_s2:1------> 3my rat647⏏5 $r = 0.0Malformed myat /tmp/4JyC2ay_s2:1------> 3my7⏏5 rat64 $r = 0.0» | ||
atweiden | m: my rat32 $r = 0.0 | ||
camelia | rakudo-moar 1051fc: OUTPUT«5===SORRY!5===Type 'rat32' is not declaredat /tmp/nL33VHIKZU:1------> 3my rat327⏏5 $r = 0.0Malformed myat /tmp/nL33VHIKZU:1------> 3my7⏏5 rat32 $r = 0.0» | ||
atweiden | m: my Rat64 $r = 0.0 | 06:17 | |
camelia | rakudo-moar 1051fc: OUTPUT«5===SORRY!5===Type 'Rat64' is not declaredat /tmp/8ajKDsPbz7:1------> 3my Rat647⏏5 $r = 0.0Malformed myat /tmp/8ajKDsPbz7:1------> 3my7⏏5 Rat64 $r = 0.0» | ||
atweiden | how do you declare one of these larger Rats? | ||
TimToady | no, all we have is Rat and FatRat so far | 06:31 | |
06:37
jevin_ joined
06:42
quester joined
|
|||
quester | p6: my $i = 65536; say $i; $i *=2; say $i | 06:42 | |
camelia | rakudo-moar 1051fc: OUTPUT«65536131072» | ||
quester | p6: my int $i = 65536; say $i; $i *=2; say $i | 06:58 | |
camelia | rakudo-moar 1051fc: OUTPUT«65536131072» | ||
06:58
quester left
07:06
diana_olhovik_ joined
07:12
baest_ is now known as baest
07:27
firstdayonthejob joined
07:32
[Sno] joined
07:38
stux|RC-only joined
07:41
abraxxa joined
07:42
RabidGravy joined
07:45
darutoko joined
|
|||
RabidGravy | marnin | 07:46 | |
07:46
abraxxa left
07:55
colomon left
07:56
colomon joined
08:00
abraxxa joined
08:09
kjs_ joined
08:17
_mg_ joined
08:20
atweiden left,
ely-se joined
08:28
firstdayonthejob left,
Humbedooh left
08:30
Humbedooh joined
|
|||
lizmat | good *, #perl6! | 08:33 | |
yoleaux | 05:15Z <TimToady> lizmat: There's a sense in which none of the metaoperators are really there, but are abstractions; up till now they've autovivified themselves as needed only when used in a normal operator slot, but now they autovivify when mentioned as nouns or function names too, in any of &foofix:<op>, foofix:<op>, or &[op] now also honor the abstraction | ||
lizmat | .tell TimToady Thanks for the quote! | ||
yoleaux | lizmat: I'll pass your message to TimToady. | ||
nine | lizmat: do you actually understand this? | 08:34 | |
dalek | kudo/nom: ee87d79 | lizmat++ | t/01-sanity/53-transpose.t: Fixup TRANSPOSE tests after changes |
||
08:35
zakharyas joined
|
|||
lizmat | I think so :-) | 08:35 | |
nine | lizmat: then I look forward to your explanation in the weekly :) | ||
moritz does | 08:36 | ||
llfourn | is there any fun that can be had with CompUnit interface that is worth documenting yet? | ||
lizmat | well, my interpretation is that if you say [+] @array, it is actually auto-vivified because they are needed | ||
moritz | there are infinitely many operators that you can create from basic operators and meta operators | ||
lizmat | whereas if you say my $a = &[+], they weren't yet | ||
nine | llfourn: there's much fun in completely refactoring CompUnit and friends ;) | 08:37 | |
llfourn takes that as a no | |||
moritz | for example from infix:<+>, you can create X[ZR+] or so | ||
so we don't create them up-front, but on demand | |||
llfourn | nine: good luck with that :) | ||
moritz | that used to work for calls, but not for references to those operators | ||
now it works for references too | |||
m: say &infix:<Z+>.signature.perl | 08:38 | ||
camelia | rakudo-moar 1051fc: OUTPUT«:(+ is raw)» | ||
moritz | star-m: say &infix:<Z+>.signature.perl | ||
camelia | star-m 2015.09: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Tpk56BPwpuUndeclared routine: &infix:<Z+> used at line 1. Did you mean '&infix:<∖>', '&infix:<lt>', '&infix:<eq>', '&infix:<>=>', '&infix:<=>>'?» | ||
nine | moritz: thanks! Crystal clear now | 08:39 | |
lizmat | nine: what moritz said | ||
moritz: can I use your exegesis in the P6W ? | |||
TimToady notes that infix:<+>(1,2) is technically a call too, but didn't work before | 08:40 | ||
yoleaux | 08:33Z <lizmat> TimToady: Thanks for the quote! | ||
TimToady | also, &[+] is an existing operator | ||
lizmat | TimToady: ah. duh :-) | 08:41 | |
moritz | lizmat: sure | 08:42 | |
star-m: say infix:<+>(1,2) | |||
camelia | star-m 2015.09: OUTPUT«3» | ||
moritz | star-m: say infix:<Z+>(1,2) | ||
camelia | star-m 2015.09: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6rTbHU4LNgUndeclared routine: infix:<Z+> used at line 1. Did you mean 'infix:<∖>', 'infix:<lt>', 'infix:<eq>', 'infix:<>=>', 'infix:<=>>'?» | ||
mrf | * #perl6 | 08:44 | |
RabidGravy | rtp | ||
er | |||
TimToady | ah, yeah, infix:<Z+> didn't work before, duh | 08:46 | |
TimToady should go to bed soon... | |||
08:46
pdcawley joined
|
|||
TimToady | btw, I'm okay with /x ** ^10/ but not okay with /x ** $x/, 'cuz I wanna keep the {}-less form static, and because people will get confused by whether a subscript is allowed there | 08:47 | |
as for /x ** ^*/, that's pretty darn useless, and confusing to look at, given that both ^ and * are normal regex metachars | 08:48 | ||
mrf | TimToady: That that seems fair. | 08:49 | |
TimToady | mrf++ for the ^10 form though | ||
mrf | I only added ^* as it seems to keep consistent with the use of ^ as a range | ||
TimToady | (though calling '^' min seems a bit weird) | ||
TimToady does wonder if people will think ^10 means 0..10 though, when it should mean 0..9 | 08:50 | ||
ShimmerFairy | I would expect 0..9, as it is everywhere else :) | 08:51 | |
RabidGravy | depends on what you think "up to 10" means ;=) | 08:52 | |
mrf | hmm I actually expected ^10 to be the same as 0..10. I had clearly missed that it was 0..9 | ||
llfourn | I exptected 0..10 tbh but 0..10 makes more sense when you think about it. If for ^10 iterated 11 times that would be confusing. | ||
lizmat | most people should think of it as 10 times | ||
RabidGravy | yes | ||
lizmat | m: .say "foo" for ^10 | ||
camelia | rakudo-moar 1051fc: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CccAJuZGHcTwo terms in a rowat /tmp/CccAJuZGHc:1------> 3.say7⏏5 "foo" for ^10 expecting any of: infix infix stopper statement end statement modifier…» | ||
lizmat | m: say "foo" for ^10 | 08:53 | |
camelia | rakudo-moar 1051fc: OUTPUT«foofoofoofoofoofoofoofoofoofoo» | ||
ShimmerFairy | m: say ^10 | ||
camelia | rakudo-moar 1051fc: OUTPUT«0..^10» | ||
ShimmerFairy | m: say (^10).list | 08:54 | |
camelia | rakudo-moar 1051fc: OUTPUT«(0 1 2 3 4 5 6 7 8 9)» | ||
ShimmerFairy | ^ that's what I think of when I think of the upto syntax. So I'd expect ** ^10 to mean ** 0..9 | ||
mrf | I might update the Range type docs to make it clearer that ^ is exclusive of the endpoint | ||
lizmat | m: say + ^10 | ||
camelia | rakudo-moar 1051fc: OUTPUT«10» | ||
mrf | Also I suspect that might mean there is a bug in my NQP patch | 08:55 | |
m: say "foo" ~~ /o ** 0..2/ | 08:57 | ||
camelia | rakudo-moar ee87d7: OUTPUT«「」» | ||
ShimmerFairy | The discovery of /a ** ^10/ not working was because ^10 is another way to write a Range which was accidentally not covered. Deviating from that (by suddenly pretending it's 0..10 instead of 0..^10) would be a bug in my eyes. | ||
mrf | m: say "foo" ~~ /o ** 0..^2/ | ||
camelia | rakudo-moar ee87d7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sI2dB5PMRFMalformed Rangeat /tmp/sI2dB5PMRF:1------> 3say "foo" ~~ /o ** 0..7⏏5^2/» | ||
mrf | ShimmerFairy: Agreed. I believe my patch would treat it as 0..10 not 0..^10 which would be erroneous. | 08:58 | |
ShimmerFairy | m: say "AAAA" ~~ /A ** {0..^4}/ # this is also a bug in how regexes handle Ranges, though IIRC I came across it a while back :) | 08:59 | |
camelia | rakudo-moar ee87d7: OUTPUT«「AAAA」» | ||
Hotkeys | <lizmat> m: say + ^10 | ||
did you mean | |||
m: say [+] ^10 | |||
camelia | rakudo-moar ee87d7: OUTPUT«45» | ||
lizmat | no, just showing the number of elems in ^10 | 09:00 | |
Hotkeys | oh | ||
TimToady | m: say "AAAAAAAA" ~~ /A ** {0..^4}/ | ||
camelia | rakudo-moar ee87d7: OUTPUT«「AAAA」» | ||
TimToady | okay, it's just an off-by-one there due to not considering the exclusion | ||
but definitely a bug | |||
dalek | kudo/nom: 63f6fc9 | lizmat++ | src/core/Str.pm: Also use TRANSPOSE for tr/x// case |
09:01 | |
ShimmerFairy | TimToady: if it's using .bounds on the returned Range there, could that possibly be a more general issue with .bounds not considering exclusion? | ||
m: say (1..^4).bounds | |||
camelia | rakudo-moar ee87d7: OUTPUT«(1 4)» | ||
09:01
espadrine joined
|
|||
TimToady | we need an intbounds methods or so | 09:01 | |
mrf | I will take a look at it and see if I am able to fix it to allow exclusionary ranges | ||
RabidGravy | I actually that that the { ... } bits in regexes got handed off to perl proper to determine the value | 09:02 | |
timotimo | mrf: sorry for not spotting that off-by-one :S | ||
lizmat | TimToady: I've been wanting that for a while, will add that now | ||
ShimmerFairy | RabidGravy: yeah, so my first guess is that Range.bounds is being passed to the regex engine without correction :) | ||
mrf | timotimo: no worries. You have been super helpful and given me mre than enough support | 09:03 | |
timotimo++ | |||
TimToady | lizmat: note the code for .elems already has the logic | ||
mrf | psch++ # also helping | ||
timotimo | yay | ||
lizmat | TimToady: I'm going one step further and making $!excludes-min/max native ints internally | 09:04 | |
mrf | timotimo: Considering I thought I would be incabable of doing anything. You got me to the point where I could submit a patch. That is an awesome thing. | ||
Is ^10 a synonym for "10 iterations" then? | |||
Timbus | 'upto 10' | ||
creates a list from 0..9 | 09:05 | ||
TimToady | ^10 is just short for 0 ..^ 10 | ||
mrf | Timbus: Sadly upto ten is subjective. Some people would be inclusive and some wouldn't | ||
Timbus | luckily, it looks a lot like the long form | ||
mrf | TimToady: That is probably a better answer. | ||
TimToady | but understanding that, "upto" is how it's pronounced :) | 09:06 | |
mrf | Timbus: It does but I caught me out. I was expecting it to be equivelant of 0..10. | ||
TimToady: ok | |||
I suppose that is consistent with its use in a full range.. | 09:07 | ||
TimToady | it's our answer to python's [:10] tomfoolery | 09:08 | |
mrf | TimToady: I will remove the ^* option if your would prefer. Though I am now curious as to what "upto infinity" actually means :D | 09:10 | |
ShimmerFairy | mrf: probably the * quantifier :P | 09:11 | |
Timbus | lucky it stops before you get there eh | ||
mrf | ShimmerFairy: likely yes | ||
TimToady | it's the opposite of "to infinity and beyond" | ||
mrf | :D | ||
ShimmerFairy | .oO( / a ** ^* / --> "ERROR: You used three asterisks, along with a caret, where just one is enough. Please unjam your shift and 8 keys as needed and try again" :P ) |
09:12 | |
mrf | ShimmerFairy: Thats not actually a terrible unhelpful error. | 09:13 | |
timotimo | ShimmerFairy: that error message should introspect the currently active keyboard layout | ||
shift-8 on my system is „, for example | |||
ShimmerFairy | timotimo: of course, but just think of the ungodly mess of dependencies in that :P | 09:14 | |
timotimo: it also doesn't account for the * key on my numpad, fwiw :) | |||
timotimo | very problematic! | ||
ShimmerFairy | mrf: aside from the casual tone of my fake message, I wonder if ** ^* and/or ** ^Inf would be worth noticing. | 09:17 | |
RabidGravy | m: module Foo { sub foo() is export { } }; import Foo; say &foo::BLURB # what is BLURB refering to here? | 09:26 | |
camelia | rakudo-moar 63f6fc: OUTPUT«(Any)» | ||
mrf | ShimmerFairy: If we want to say that ^* and ^Inf are likely a sign that the user is doing something unnecessary then it seems fair to warn them about it. | 09:28 | |
RabidGravy | "Perl 6: a million characters of helpful error message with some useful code attached" | 09:30 | |
09:36
azawawi joined
|
|||
azawawi | hi | 09:36 | |
moritz | RabidGravy: uhm, nothing? | 09:37 | |
RabidGravy | eh? | ||
moritz | RabidGravy: do you think it should? | ||
m: say &sin::NOTACOSINE | |||
camelia | rakudo-moar 63f6fc: OUTPUT«(Any)» | ||
RabidGravy | no I stumbled on it by accident and just wondered if it was something, like something defined in the code or something | 09:38 | |
timotimo | azawawi: when you wrote "i'm on it" on the .bat launcher issue, it sounded like "i'm going to fix this", now you're asking "any updates on this one?", i'm confused | 09:41 | |
nine | timotimo: I don't get it. I changed the line in the optimizer to "if $optype eq 'p6for' && $op.ann('context') eq 'sink' {" yet it still changes both parts of the QAST::Want or none. | 09:43 | |
timotimo | ah, hehe. | 09:44 | |
nine | timotimo: aah... I guess that's because of $past.annotate('statement_level', -> { $sinkee.annotate('context', 'sink') }); | ||
timotimo | as an optimization, we often share QAST objects | ||
azawawi | timotimo: i fixed it and nobody merged it... So i was asking when it will be committed... sorry if i was not clear. I will update it :) | ||
nine | So if the loop is in sink context, both parts are annotated with sink? | 09:45 |
|