»ö« 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. |
|||
00:07
jercos joined,
hahainternet joined,
garu joined,
Guest72901 joined,
aindilis joined,
mantovani joined,
gugod joined,
xxx joined,
moritz joined,
pink_mist joined,
oka_ joined,
sjn joined,
tm joined,
sitaram joined,
maddingue joined,
bakedb joined,
shmibs joined,
tinita joined,
huf joined,
cibs joined,
MilkmanDan joined,
stmuk joined,
Sgeo__ joined,
Timbus joined,
rhr joined,
labster joined,
pRiVi_ joined,
btyler joined,
mrf joined,
freeze joined,
Grrrr joined,
ggoebel joined,
[particle]1 joined,
advwp joined,
cognominal joined,
TimToady joined,
grondilu joined,
ilbelkyr joined,
agentzh joined,
|Tux| joined,
burnersk joined,
Jonis joined,
kfo joined,
SHODAN joined,
ofzyh__ joined,
kid51 joined,
Juerd joined,
dustinm` joined,
avar joined,
ribasushi joined,
jordman_ joined,
dpk joined,
yoleaux joined,
Hor|zon joined,
softmoth joined,
crux joined,
literal joined,
confuseAcat joined,
wtw joined,
Humbedooh joined,
sjohnson joined,
verne.freenode.net sets mode: +v yoleaux,
apotheon joined,
mprelude joined,
Zoffix joined,
gonz_ joined,
sQuEE` joined,
AW3i joined,
felher joined,
bitmap joined,
simcop2387 joined,
salva joined,
lestrrat joined,
dg joined
00:08
dwarring joined,
xvcds joined,
avar left,
solarbunny joined,
pnu joined
00:09
hohoho joined,
ssflying joined,
Util joined,
noganex joined,
[Sno] joined,
Exodist joined,
avar joined
00:11
Kogurr joined
00:13
Psyche^ joined,
xinming joined,
PerlJam joined,
lea joined,
ambs joined,
obra joined,
xnrand joined,
lizmat joined,
rjbs joined,
flussence joined,
[ptc] joined,
jsimonet joined,
frew joined,
mtj_ joined,
jdv79 joined,
dalek joined,
boegel|quassel joined,
diakopter joined,
ilbot3 joined,
oha joined,
synbot6 joined,
DarthGandalf joined,
preyalone joined,
erxeto_ joined,
cosimo joined,
isacloud joined,
skarn joined,
hoelzro joined,
mullagainn joined,
timbunce joined,
verne.freenode.net sets mode: +v dalek
00:14
leedo joined,
zoosha joined,
tony-o joined,
jevin joined,
murre joined,
pyrimidi_ joined,
Celelibi joined,
colomon joined,
jantore joined,
f3ew joined,
intrigue joined,
tadzik joined,
oahong joined,
avalenn joined,
geekosaur joined,
rudi_s_ joined,
BinGOs joined,
cxreg2 joined,
chenryn joined,
jonadab joined,
bhm joined,
roguelazer joined,
mattp__ joined,
stux|RC-only joined,
broquaint joined,
[Coke] joined,
ab5tract_ joined,
renormalist joined,
esh joined,
ggherdov joined,
daxim joined,
Gothmog_ joined,
danstone1 joined,
retupmoca joined,
gtodd joined,
DrForr joined,
domm joined,
go|dfish joined,
doublec joined,
sivoais joined,
nowan joined,
KotH joined,
b2gills joined,
samb1 joined,
robinsmidsrod joined,
slobo joined,
yuppie joined,
sunnavy joined,
_sri joined,
n_i_c_k_ joined,
arnsholt joined,
apejens joined,
smash joined,
rvchangue joined,
bartolin joined,
eiro joined,
pierrot joined,
raiph joined,
sufrostico joined,
lucs joined,
bpmedley joined,
iv joined,
olinkl joined,
jferrero joined,
takadonet joined,
jrm joined,
moznion joined,
gfldex joined,
ponbiki joined,
charsbar joined,
diego_k joined,
chansen_ joined,
mephinet joined,
timotimo joined,
silug joined,
BooK joined,
xdbr joined,
Ulti joined,
cfloare joined,
nine joined
00:16
WizJin joined,
Fleurety joined
00:17
telex joined,
woodruffw joined,
sergot_ joined,
CurtisOvidPoe joined,
spacebat joined,
krakan joined,
sftp joined,
Upasaka_ joined,
ShimmerFairy joined,
vytas joined,
pochi_ joined,
mrsolo joined,
japhb joined,
quuxman joined,
ben joined,
clkao joined,
Bucciarati joined,
Khisanth joined,
mathw joined,
zostay joined,
integral joined,
jnthn joined,
JimmyZ joined,
El_Che joined,
ilmari joined,
skaji joined,
mls joined,
raydiak joined,
burnersk left
00:18
PsuzeannePsy joined,
mst joined,
awwaiid joined,
inokenty joined,
emdashcomma joined,
Praise joined,
carlin joined,
Possum joined,
petercommand joined,
nebuchadnezzar joined,
xiaomiao joined,
avar left,
avar joined
00:19
ingy joined,
revdiablo joined,
breinbaa1 joined,
baest_ joined,
khw joined,
FireFly joined,
FROGGS joined,
TEttinger joined,
atta joined,
Hotkeys joined,
jojotus joined,
captain-adequate joined,
lsm-desktop joined,
zemmihates joined,
kipd joined,
SmokeMachine_ joined,
erdic joined,
Fluor joined,
xenu joined,
avuserow1 joined,
Debolaz joined,
[Tux] joined,
ugexe joined,
riatre joined,
PotatoGim joined,
nightfrog joined,
Spot__ joined,
dylanwh_ joined,
camelia joined,
ashleyde1 joined,
psch joined,
Gardner joined,
masak joined,
hobbs joined,
kst joined,
verne.freenode.net sets mode: +v camelia
00:21
WizJin left,
WizJin joined
00:22
jkva joined
00:23
sivoais_ joined
|
|||
dalek | kudo/nom: 039069e | hoelzro++ | src/Perl6/Compiler.nqp: Eagerly evaluate CORE::.keys for REPL completions |
00:23 | |
kudo/nom: d1c42ea | hoelzro++ | src/Perl6/Compiler.nqp: Treat failure to set up completions differently from failure to load Linenoise For the former, we should deliver a little bit of information to help developers fix the issue. For the latter, it's usually just that Linenoise isn't installed, so it's not a big deal |
|||
kudo/nom: a32c30f | hoelzro++ | src/Perl6/Compiler.nqp: Refactor generating completion list into helper method |
|||
00:23
burnersk joined
00:24
mrsolo left
00:25
dpk left,
avar left
00:26
jkva left,
avar joined,
dpk joined
00:27
sivoais left
00:28
Util left,
Util joined
00:29
confuseAcat left,
confuseAcat joined,
aborazmeh joined
00:30
jonadab left
00:31
aborazmeh left,
aborazmeh joined,
pierrot is now known as Guest89352
00:35
jonadab joined
00:36
avar left,
avar joined,
avar left,
avar joined
00:42
avar left,
uruwi joined,
avar joined,
avar left,
avar joined
00:45
n0tjack joined
00:49
n0tjack left
|
|||
uruwi | I noticed that holding a key down gives a delay before it fires repeatedly. Is the method to remove that delay specific to the terminal emulator being used, or can I change it with a command line setting? | 00:50 | |
TimToady | do you really want random letters repeating while you type normally? | 00:51 | |
uruwi | Normally I'd say no | ||
But here I'll have to say yes | |||
pink_mist | pretty sure that depends on either your OS or your terminal | 00:54 | |
00:56
llfourn joined,
cognominal left
|
|||
uruwi | Probably should be using a graphical interface instead by now, considering terminals can't properly handle simultaneous keypresses | 00:57 | |
I like the feel of playing stuff on a terminal I guess. | 00:59 | ||
01:01
rabato joined,
SuzieQueue joined,
llfourn left
|
|||
rabato | hi, rakudo. Is this ordered? .say for 'abcd'.comb>>.succ; | 01:02 | |
uruwi | m: .say for 'abcd'.comb>>.succ | 01:03 | |
camelia | rakudo-moar 271e84: OUTPUT«bcde» | ||
uruwi | Seems so | ||
rabato | 'abcd'.comb>>.succ.say | 01:04 | |
but it not ordered | |||
01:05
PsuzeannePsy left,
preyalone left
|
|||
ugexe | because say is a side effect | 01:08 | |
uruwi | m: 'abcd'.comb>>.succ.say | 01:09 | |
camelia | rakudo-moar 271e84: OUTPUT«(b c d e)» | ||
rabato | ugexe: so! .say for 'abcd'.comb>>.succ; is ordered? | ||
01:10
softmoth left
|
|||
rabato | uruwi: I think the output is ordered, but ">>" behaver is not ordered | 01:13 | |
ugexe | m: my @x = 'abcd'.comb>>.succ; say @x | ||
camelia | rakudo-moar 271e84: OUTPUT«[b c d e]» | ||
ugexe | in your example, .say gets called out-of-order, but the result from *that* (True) will come back ordered | ||
timotimo | yeah, the order of the results is preserved, but things get executed not-in-order | ||
to be fair, the say in >>.succ.say will get executed "in-order", as the say isn't hypered | 01:14 | ||
rabato | timotimo: maybe something changed, i read before. thay say it is not ordered. | 01:16 | |
timotimo | there's hyper sequences that'd do that, but i don't think those get created with >>. | ||
rabato | timotimo: why say is not hypered? | 01:17 | |
ugexe | m: 'abcd'.comb>>.succ>>.say | 01:18 | |
camelia | rakudo-moar 271e84: OUTPUT«bcde» | ||
ugexe | i would think that would be out of order | ||
timotimo | m: "1234567".comb>>.say | 01:20 | |
camelia | rakudo-moar 271e84: OUTPUT«1234567» | ||
rabato | ugexe: i think i will be ordered. | ||
timotimo | huh, we don't do that any more? | ||
01:20
Guest89352 is now known as pierrot
01:21
pierrot is now known as Guest90228
|
|||
rabato | timotimo: give me an answer? please? ".say for 'abcd'.comb>>.succ;" | 01:22 | |
ugexe | star: 'abcd'.comb>>.succ>>.say # looks like it disappeared a little while ago | ||
camelia | star-m 2015.09: OUTPUT«bcde» | ||
01:23
Guest90228 is now known as pierrot
|
|||
timotimo | i did not know that! | 01:23 | |
i know nothing! | |||
01:23
pierrot left,
pierrot joined
|
|||
rabato | timotimo: anyway, thanks. | 01:23 | |
ugexe | rabato: that will say them in order, even if >> was unordering them | ||
rabato | ugexe: thanks! | 01:24 | |
01:26
sufrostico left
01:29
sivoais_ is now known as sivoais,
sivoais left,
sivoais joined
|
|||
timotimo | sorry rabato | 01:32 | |
rabato | timotimo: it's ok. | 01:33 | |
01:34
PsuzeannePsy joined
01:37
SuzieQueue left
01:39
sufrostico joined
01:44
adu joined
01:46
Suzeanne joined
01:49
PsuzeannePsy left
01:50
pyrimidi_ left
01:51
pyrimidine joined
01:53
tokuhiro_ joined,
sufrostico left
01:54
preyalone joined
01:56
rabato left
01:57
tokuhiro_ left
02:00
rurban joined
02:12
PotatoGim left
02:13
kid51 left
02:17
noganex_ joined
02:19
noganex left
02:22
jkva joined
02:26
jkva left
02:33
SuzieQueue joined
02:35
chenryn_ joined
02:37
Suzeanne left
02:40
chenryn_ left,
chenryn_ joined
|
|||
hohoho | m: require ::($_) for <NativeCall> | 02:44 | |
camelia | rakudo-moar 271e84: OUTPUT«===SORRY!===Cannot invoke this object» | ||
hohoho | hmm | ||
m: for <NativeCall> { require ::($_) } | |||
camelia | ( no output ) | ||
hohoho | what's difference? | ||
i seem normal 'for' stmt and postfix 'for' have same meanings | 02:45 | ||
timotimo | m: { require ::($_) for <NativeCall> } | ||
camelia | rakudo-moar 271e84: OUTPUT«===SORRY!===Cannot invoke this object» | ||
timotimo | it's not a bug about being inside { } or not at least | 02:46 | |
i don't think you'd need to runtime-require NativeCall, as it comes with rakudo nowadays | |||
geekosaur | m: { require ::($_) } for <NativeCall> | ||
camelia | ( no output ) | ||
timotimo | geekosaur: are you sure that gets executed? | ||
geekosaur | no, actually | ||
timotimo | m: { say "hello" } for <NativeCall> | ||
camelia | rakudo-moar 271e84: OUTPUT«hello» | ||
timotimo | ah | ||
geekosaur | well. | 02:47 | |
hohoho | NativeCall is just a example. | 02:49 | |
geekosaur | m: $_.^name.say for <NativeCall> | 02:54 | |
camelia | rakudo-moar 271e84: OUTPUT«Str» | ||
geekosaur | m: { $_.^name.say } for <NativeCall> | ||
camelia | rakudo-moar 271e84: OUTPUT«Str» | ||
02:56
n0tjack joined
02:58
llfourn joined
03:00
skids joined
03:01
n0tjack left
03:03
llfourn left
03:05
PotatoGim joined
03:11
PsuzeannePsy joined
03:15
SuzieQueue left
03:17
somoto joined
|
|||
somoto | could you me tell how | 03:17 | |
a) create an emtpy hash | |||
b) check if a hash is emtpy | |||
c) check if an argument is a method is null (or rather, passed to it at all)? | |||
c) check if an argument passed in a method is null (or rather, passed to it at all)? | 03:18 | ||
03:18
BenGoldberg joined
|
|||
timotimo | m: my %foo; say %foo.perl | 03:18 | |
camelia | rakudo-moar 271e84: OUTPUT«{}» | ||
timotimo | is that acceptable for a) ? | ||
TimToady | or {} as a literal | ||
timotimo | m: say {}.WHAT | ||
camelia | rakudo-moar 271e84: OUTPUT«(Hash)» | 03:19 | |
timotimo | m: say {}.elems | ||
camelia | rakudo-moar 271e84: OUTPUT«0» | ||
timotimo | m: say {food => "good"}.elems | ||
camelia | rakudo-moar 271e84: OUTPUT«1» | ||
TimToady | m: say so {} | ||
camelia | rakudo-moar 271e84: OUTPUT«False» | ||
TimToady | m: say so { :any<thing> } | ||
camelia | rakudo-moar 271e84: OUTPUT«True» | ||
03:20
rurban left
|
|||
somoto | and "c" please? | 03:20 | |
timotimo | i'd go with $that_argument.defined, but it's also possible to pass an undefined value for that argument and it'll trigger that check, too | 03:21 | |
m: sub test($foo?) { say $foo.defined }; test(123); test(); test(Int); | |||
camelia | rakudo-moar 271e84: OUTPUT«TrueFalseFalse» | ||
TimToady | m: sub foo ($a = "No value passed") { say $a }; foo("value"); foo() | 03:22 | |
camelia | rakudo-moar 271e84: OUTPUT«valueNo value passed» | ||
03:22
Ben_Goldberg joined
|
|||
somoto | > say $fdsfd.defined; | 03:22 | |
===SORRY!=== Error while compiling <unknown file> | |||
Variable '$fdsfd' is not declared | |||
> say $fdsfd.defined; | |||
===SORRY!=== Error while compiling <unknown file> | |||
Variable '$fdsfd' is not declared | |||
> say $fdsfd.defined; | |||
===SORRY!=== Error while compiling <unknown file> | |||
Variable '$fdsfd' is not declared | |||
> say $fdsfd.defined; | |||
===SORRY!=== Error while compiling <unknown file> | |||
Variable '$fdsfd' is not declared | |||
> say $fdsfd.defined; | |||
===SORRY!=== Error while compiling <unknown file> | |||
is there any way to safely check if it's defined or not? | |||
TimToady | there's no way to check that it's *declared*, which is different from defined | 03:23 | |
skids | Well, other than to use EVAL. | ||
TimToady | if it's not declared, it's a compile error | ||
somoto | Ok. I just want to check if an optional argument is passed to my method inside the method, what's the best way to do that? | 03:24 | |
skids | Use a default like TimToady showed above. | ||
03:24
BenGoldberg left
|
|||
somoto | thanks | 03:25 | |
03:26
AlexDaniel joined
|
|||
AlexDaniel | “I think using \r\n is non-sense in 2015. We can use \n instead of \r\n.” – I wish there was a way to go for it without making everyone suffer | 03:27 | |
on the other hand, lots of software on windows actually understand \n quite nicely | |||
.oO( another potentially good idea is throw away support for some operating systems altogether, bhaha ) |
03:28 | ||
skids | There will always be the task of processing archived data created with old saoftware, that'll probably never go away. | 03:29 | |
03:29
somoto left
|
|||
uruwi | Yep | 03:38 | |
Screw \r\n | |||
Screw notepad | |||
03:50
Gardner left
03:51
Gardner joined,
captain-adequate left,
captain-adequate joined
03:54
tokuhiro_ joined
03:59
tokuhiro_ left,
n0tjack joined
04:00
llfourn joined
04:03
n0tjack left
04:05
SuzieQueue joined
04:07
uruwi left
04:08
PsuzeannePsy left
04:13
tomoko44 joined
|
|||
tomoko44 | I'm trying to check if arguments are emtpy (or passed at all) or not: | 04:13 | |
method method1($var1?, $var2?) { | |||
my %my-hash; | |||
if $var1 { | |||
say "if var1 is True"; | |||
%my-hash{'var1'} = $var1; | |||
} | |||
if $var2 { | |||
say "if var2 is True"; | |||
%my-hash{'var2'} = $var2; | |||
} | |||
} | |||
method1(var1 = "fdsomfdsfds"); | |||
But the code in the blocks "if $var1 { ... }" and "if $var2 { ... }" never executes. Why? | |||
formatted: | |||
I'm trying to check if arguments are emtpy (or passed at all) or not: | |||
method method1($var1?, $var2?) { | 04:14 | ||
my %my-hash; | |||
if $var1 { | |||
say "if var1 is True"; | |||
%my-hash{'var1'} = $var1; | |||
} | |||
if $var2 { | |||
say "if var2 is True"; | |||
%my-hash{'var2'} = $var2; | |||
} | |||
} | |||
method1(var1 = "fdsomfdsfds"); | |||
But the code in the blocks "if $var1 { ... }" and "if $var2 { ... }" never executes. Why? | |||
is there any better way to accomplish the same thing? | |||
skids | tomoko44: for future reference, you can make a github gist and feed it to the evalbot. | 04:15 | |
tomoko44 | ok | ||
04:16
AlexDaniel left
|
|||
TimToady | first, change 'method' to 'sub', if you're going to call it as a subroutine, not as a method | 04:17 | |
seocond, you don't need var1 = there, just pass the string, since you declared a positional argument | |||
skids | m: class A { method foo ($v1?, $v2) { if $v1 { say "if var1 is true" }; if $v2 { say "if var2 is true" } }; A.new.foo(1,2); | ||
camelia | rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4qKoNP5WnFCannot put required parameter $v2 after optional parametersat /tmp/4qKoNP5WnF:1------> 3class A { method foo ($v1?, $v27⏏5) { if $v1 { say "if var1 is true" }; if expecting any of…» | ||
TimToady | if you wanted named parameters, then declare them :$var1, :$var2 | ||
skids | m: class A { method foo ($v1?, $v2?) { if $v1 { say "if var1 is true" }; if $v2 { say "if var2 is true" } }; A.new.foo(1,2); | 04:18 | |
camelia | rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VCiXLi8k24Missing blockat /tmp/VCiXLi8k24:1------> 3y "if var2 is true" } }; A.new.foo(1,2);7⏏5<EOL>» | ||
TimToady | and pass var1 => 'string' | ||
(not = char, this isn't python) | |||
tomoko44 | yeah, I meant named parameters, that is :$var1, :$var2 | 04:19 | |
ok, thx. | 04:20 | ||
04:20
tomoko44 left
|
|||
skids | m: class A { method foo ($v1?, $v2?) { if $v1 { say "if var1 is true" }; if $v2 { say "if var2 is true" } } }; A.new.foo(1,2); | 04:20 | |
camelia | rakudo-moar 271e84: OUTPUT«if var1 is trueif var2 is true» | ||
skids | m: class A { method foo (:$v1, :$v2) { if $v1 { say "if var1 is true" }; if $v2 { say "if var2 is true" } } }; A.new.foo(:v1,:v2(3)); | 04:22 | |
camelia | rakudo-moar 271e84: OUTPUT«if var1 is trueif var2 is true» | ||
04:28
mayuresh joined
|
|||
mayuresh | hello :) | 04:29 | |
is anyone awake? | 04:30 | ||
04:30
PsuzeannePsy joined
|
|||
mayuresh | i guess not! :) | 04:31 | |
04:31
Ben_Goldberg left
|
|||
mayuresh | see you all after 12 hours, that's when i'd be headed off to bed though. :) | 04:31 | |
04:32
mayuresh left
|
|||
skids | o/ | 04:32 | |
oh. | |||
04:33
SuzieQueue left
04:36
WizJin left
04:42
chenryn_ left,
WizJin joined,
konobi joined
|
|||
konobi | howdy! are there any examples of folks using grammars to do DSL style stuff? | 04:43 | |
04:46
hohoho left
04:47
khw left
|
|||
llfourn | konobi: this is an example of DSL as a slang: github.com/tony-o/perl6-slang-sql | 04:52 | |
04:55
Suzeanne joined
04:56
ShimmerFairy left
04:58
PsuzeannePsy left
05:05
chenryn_ joined
05:09
ShimmerFairy joined
05:14
timotimo left
05:15
adu left
05:16
n0tjack joined
05:18
skids left
05:21
n0tjack left
05:24
jkva joined
|
|||
konobi | llfourn: "slang" ? | 05:28 | |
05:28
jkva left
|
|||
raiph | konobi: S99:slang | 05:32 | |
synbot6 | Link: design.perl6.org/S99.html#slang | ||
05:33
raiph left
|
|||
konobi | ta | 05:35 | |
llfourn | konobi: A slang is like a grammar but the difference is that you are modifying the existing Perl 6 grammar to incoroporate your DSL into the Perl 6 language itself | 05:36 | |
konobi: In terms of straight Grammar DSLs the only things I can think of are various templating languages | |||
konobi: github.com/softmoth/p6-Template-Mustache/ | 05:37 | ||
konobi | ah, kk... i was thinking more in terms of something like Ansible... but with sensible parsing, not just YAML loading | 05:39 | |
llfourn | I actually happen to be doing something like that in Perl 6 as well but have not yet put it on GH | 05:40 | |
but yes -- you could do that with a normal grammar -- and use the "actions" to translate it to whatever structure you need | 05:41 | ||
05:45
SuzieQueue joined
05:46
hohoho joined
05:48
Suzeanne left
05:50
PsuzeannePsy joined
05:51
hohoho left
05:54
SuzieQueue left
05:56
tokuhiro_ joined
06:00
tokuhiro_ left
|
|||
konobi | llfourn: yeah, getting my head around it now =0) | 06:04 | |
06:08
diana_olhovik joined
06:10
hohoho joined,
hohoho left,
hohoho joined
06:13
Woodi joined
|
|||
[Tux] | test 50000 39.166 39.048 | 06:16 | |
test-t 50000 39.600 39.483 | |||
06:20
baest_ is now known as baest
06:21
bjz joined
06:24
FROGGS left
06:26
Alina-malina joined,
bjz_ joined,
bjz left,
SuzieQueue joined
06:27
firstdayonthejob joined
06:29
hartenfels joined,
hartenfels is now known as askmeaboutloom,
askmeaboutloom left
06:30
PsuzeannePsy left,
|Tux| left,
bjz_ left
06:31
|Tux| joined
06:32
Ven joined
06:33
hartenfels joined
06:38
|Tux| left
06:41
|Tux| joined
06:44
jkva joined
06:45
|Tux| left
06:46
vike joined,
bjz joined,
|Tux| joined
06:51
bjz_ joined
06:52
bjz left,
FROGGS joined
06:53
|Tux| left
06:56
|Tux| joined
06:59
RabidGravy joined
07:04
bjz_ left,
lea left
07:05
bjz joined
07:06
Alina-malina left
07:10
abraxxa joined
07:13
dwarring left
07:15
Ven left,
boegel|quassel is now known as boegel,
Alina-malina joined
07:16
jkva_ joined,
jkva left,
lea joined
07:18
ilbelkyr is now known as u,
boegel left
07:19
boegel joined
07:21
firstdayonthejob left
|
|||
RabidGravy | morning! | 07:24 | |
07:24
ely-se joined
07:28
lea left
|
|||
dalek | kudo/nom: 2324810 | TimToady++ | src/core/metaops.pm: allow ».[1;1] to pass single array arg Fixes RT #126370 |
07:36 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=126370 | ||
dalek | ast: f8c0844 | TimToady++ | S03-metaops/hyper.t: hyper multidim now works (RT #126370) |
07:37 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=126370 | ||
07:37
KDr2 joined
07:38
aborazmeh left
07:39
Kogurr left,
Ven joined
07:42
lea joined
|
|||
konobi | RabidGravy: yo | 07:43 | |
RabidGravy | hey! | ||
you good? | |||
konobi | aye, not too shabby | ||
RabidGravy | fabulous! | 07:44 | |
07:44
Ven left
|
|||
konobi | getting back into the swing of job-hunting/contract-seeking | 07:44 | |
07:44
n0tjack joined
|
|||
RabidGravy | :) | 07:44 | |
konobi | and attempting to re-learn patience in awaiting clients | 07:45 | |
^_^ | |||
07:46
tokuhiro_ joined
|
|||
konobi | RabidGravy: how bout you mate? | 07:47 | |
RabidGravy | All fabulous, having a big slack/personal hack time at the moment - may have to start looking for a new gig at some point ;-) | 07:48 | |
07:49
n0tjack left
|
|||
RabidGravy | tokuhiro_, are you the tokuhirom who submitted github.com/sergot/http-useragent/issues/92 ? | 07:49 | |
07:50
tokuhiro_ left
|
|||
RabidGravy | oh, I'll just carry on writing the reply then | 07:50 | |
07:50
mrsolo joined,
zakharyas joined
08:00
u is now known as ilbelkyr
|
|||
RabidGravy | anyone here with an IPV6 connection to the internet care to chime in on github.com/sergot/http-useragent/issues/92 ? | 08:00 | |
08:07
Ven joined
08:15
Coldkeys joined,
Coldkeys left,
darutoko joined,
Ven left
08:18
Ven joined
08:22
Ven left
08:24
Ven joined
08:26
bjz left,
bjz joined
08:29
chenryn_ left
08:31
espadrine joined,
Ven_ joined,
Ven left
|
|||
moritz | m: say Int:D ~~ Int:D | 08:35 | |
camelia | rakudo-moar 271e84: OUTPUT«False» | ||
08:40
chenryn_ joined,
n0tjack joined
08:45
n0tjack left
08:46
Alina-malina left
08:48
xfix joined
08:51
][Sno][ joined,
tokuhiro_ joined
08:52
[Sno] left,
][Sno][ is now known as [Sno],
espadrine left
08:54
margeas joined
08:56
tokuhiro_ left,
mprelude_ joined
08:59
mprelude left
09:00
FireFly left
09:01
FireFly joined
|
|||
Ven_ | are "is nodal" and "is raw" formally documented somewhere? | 09:01 | |
[ptc] | is it possible to submit smoke/test reports to testers.p6c.org? | ||
RabidGravy | right, off out - play nicely. | ||
FROGGS | [ptc]: sure | 09:05 | |
[ptc] | FROGGS: tried to find how on the website, but couldn't find it. How do I submit reports? | ||
FROGGS | [ptc]: PANDA_SUBMIT_TESTREPORTS=1 panda smoke - or - PANDA_SUBMIT_TESTREPORTS=1 panda install Foo | ||
[ptc] | ah, ok | 09:06 | |
09:06
RabidGravy left
|
|||
[ptc] | FROGGS: is that mentioned on the testers site? | 09:06 | |
FROGGS: ... and I just happened to miss it? | |||
Ven_ | .tell TimToady irclog.perlgeek.de/perl6/2015-10-15#i_11381191 putting "Foo_" or "Foo-" would mean I'm reinventing namespacing for no reason. I want `::` to be about packages. the name is inside the package, the value is dynamically scoped | 09:07 | |
yoleaux | Ven_: I'll pass your message to TimToady. | ||
09:07
KDr2 left
|
|||
[ptc] | FROGGS: is it possible to submit a test report for a module without installing it as well? | 09:08 | |
FROGGS | [ptc]: I fear it is not mentioned :S | ||
[ptc]: not atm | |||
[ptc] | FROGGS: that's ok, that gives me the opportunity to submit a PR for testers.p6c.org :-) | ||
FROGGS | \o/ | 09:10 | |
[ptc]++ | |||
[ptc]: a welcome page that explains things would be awesome | |||
[ptc] | FROGGS: maybe it's best for me to open a ticket; then at least it's written down somewhere... | 09:12 | |
09:12
mprelude_ left,
andreoss joined
|
|||
FROGGS | aye | 09:13 | |
09:16
jkva_ left,
duncan_dmg joined
09:18
telex left
09:19
c0rt042 joined
09:20
Ven_ left,
telex joined,
ofzyh__ left
09:21
duncan_dmg left,
g4 joined
09:22
Ven joined
|
|||
jnthn | morning, #perl6 | 09:24 | |
09:24
duncan_dmg joined
|
|||
Ven | o/, jnthn | 09:24 | |
vytas | how is nqp interactive shell different from perl6's ? they both use HLL/Compiler.nqp, don't they ? | ||
Ven | jnthn: "Looking further into call vs. coercion and coercion API as part of RT #114026; post a proposal for discussion" you didn't add a link to that :P | 09:26 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=114026 | ||
09:26
brrt joined
|
|||
vytas | I am looking at commit 74875ba93cde72aed295a071ab1ec6a392154f6f, and I don't think it is working as per commit message - my guess is due to \n\n | 09:26 | |
konobi | what ever happened to the idea of nqp on llvm? | 09:27 | |
jnthn | Ven: gist.github.com/anonymous/8efdab238ead35b1d4fa | 09:29 | |
Ven | konobi: nobody did it? :P | ||
brrt | konobi: well volunteered :-P | ||
09:29
Psyche^_ joined
|
|||
jnthn | Ven: Linked it from the post now too :) | 09:30 | |
Ven | jnthn++ | ||
09:31
azawawi joined
|
|||
azawawi | morning | 09:31 | |
brrt | morning azawawi | 09:32 | |
azawawi | github.com/azawawi/perl6-selenium-...es/ex01.p6 # more automated website ui testing is now working :) | ||
09:32
espadrine joined
09:33
Psyche^ left
|
|||
azawawi | any update on panda supporting module versions? | 09:35 | |
e.g. panda install Selenium::WebDriver@0.15 | 09:36 | ||
konobi | Ven: there was talk of it quite a few years back... just wondering if someone took a look again, now that llvm is a bit better organized | ||
Ven | konobi: do you still have it? | 09:37 | |
konobi | and vmkit working for jvm and clr | ||
some of the llvm tooling could make for some interesting ways to analyse the code | 09:39 | ||
brrt | konobi: i'm going speculate here, and suggest that the things lLVM is good at is only in a small respect overlapping with the things that are difficult in perl6 | 09:42 | |
09:42
jkva joined
|
|||
brrt | i'm all for more backends, more power to whoever wants to do it | 09:42 | |
but i honestly would expect better results from pmurias++'s efforts of nqp-js than on llvm | 09:43 | ||
vytas | is it ok to log bugs for perl6 repl in nqp github issues page? | 09:44 | |
09:44
Ven left
|
|||
brrt | vytas: i think we use RT here, not sure exactly how it works | 09:44 | |
nobody will mind you putting bugs into the github issues page, it's just not the primary tracker :-) | 09:45 | ||
ShimmerFairy | if it's a rakudobug, you really shouldn't use the issues page, since rakudo uses RT. (Maybe the perl6 organization should disable it, if that's an option) | 09:46 | |
oh, it is already :P | 09:47 | ||
vytas | ShimmerFairy, it's enabled | 09:48 | |
according to github.com/rakudo/rakudo/ bugs related to nqp or moarvm should go through github issue tracker, rakudo/perl6 via [email@hidden.address] | |||
09:48
ely-se left
|
|||
ShimmerFairy | vytas: not for rakudo/rakudo I mean | 09:48 | |
09:49
edehont joined
09:53
virtualsue joined
09:54
ely-se joined
09:55
bjz left
09:58
azawawi left
|
|||
vytas | If I go to rakudo.org/rt/open-all ( linked from rakudo.org/tickets/ ) I get possible cross-site request forgery | 09:58 | |
09:59
bjz joined
10:02
rindolf joined
|
|||
vytas | e-mailed to perlbug-admin at perl.org | 10:02 | |
10:02
rurban joined,
ely-se left
|
|||
brrt | that may not come to the right place | 10:03 | |
seems like that may be for perl5 mostly? | |||
vytas | rt.perl.org is used for both | ||
jnthn | Indeed | ||
vytas | would bugs like RT #112634 be welcomed to fix in core? I mean my personal opinion is that Linenoise should be implemented in core too.. | 10:06 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=112634 | ||
10:07
breinbaa1 left
10:08
breinbaas joined,
edehont left
|
|||
jnthn | vytas: I'm pretty sure some folks did spend a good bit of time on RT #112634; I'm not sure what came of it. | 10:09 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=112634 | ||
10:09
rindolf left
|
|||
jnthn | vytas: We actually used to have linenoise integrated at the VM level, and had to maintain a separate thing for JVM too, and then it didn't provide good access to most of the functionality for doing anything non-trivial, so it was better pushed out to a Perl 6 module. | 10:10 | |
10:12
Ven joined
|
|||
Ven | brrt: clearly, we should use llvm to then compile it to js! :P | 10:12 | |
brrt | lol | ||
why not | |||
that's what emscriptem does isn't it? | |||
ShimmerFairy | jnthn: I'm personally of the opinion that rakudo requiring externally-hosted modules for some of its features is a poor idea. I'd like if a Linenoise-ish module, and a basic module for perl6-debug, would be provided like Pod::To::Text | 10:13 | |
vytas | I am with ShimmerFairy, having advanced REPL in nqp makes little sense, but it must be installed with perl6 | 10:14 | |
FROGGS | ShimmerFairy: then use Rakudo Star | 10:15 | |
brrt | i'm not. perl5 doesn't have a functional repl and we deal with that just fine | ||
FROGGS | that what distributions are for | ||
or is Linenoise not included in Star? | |||
10:15
Alina-malina joined
|
|||
brrt | (shockingly, my fedora installation apparantly doens't have Test::More :-O) | 10:16 | |
jnthn | FROGGS: Not sure, but that's where it should go if it ain't already. | ||
brrt | Test::More is a p5 standard module, isn't it? | ||
ShimmerFairy | FROGGS: disagree. If the rakudo source code has a dependency on a module it doesn't provide, then that's a mistake. When you go to get the rakudo compiler, you should not be getting an incomplete compiler. | ||
jnthn | ShimmerFairy: You seem to have a strangely broad definition of compiler. | 10:17 | |
ShimmerFairy | (besides, I always use the latest from the repositories, so 'just use R*' is not an acceptable solution) | ||
jnthn: well, if the compiler needs it (e.g. the default UI for perl6-debug), that sounds to me like a case of something that should be a part of the compiler :) | |||
brrt | hmm | 10:18 | |
that's a reasonable point i guess | |||
10:19
margeas left
|
|||
FROGGS | ShimmerFairy: rakudobrew build moar && rakudobrew build panda (or how it is called exactly) is no solution? really? | 10:19 | |
err, install Task::Star* | |||
(one can see that I'm not using it) | |||
10:20
brrt left
|
|||
ShimmerFairy | FROGGS: I don't use rakudobrew. I install straight from the repos (not even using the --gen options), and I've been a bit pissed about the fact that this doesn't give me a complete compiler, when wanting to use `perl6-debug` or the most basic of REPL line-editing functions. | 10:20 | |
vytas | Task::Star fails to build at the moment, last time i tried it - it was not there. and no i don't like that ( even if my vote does not count ) | ||
ShimmerFairy | And I will not change where I get my rakudo from simply because the repository refuses to be complete :) | 10:21 | |
FROGGS | still, a compiler is a compiler is a compiler | 10:22 | |
fancy repl stuff really belongs to module space | |||
also to allow alternatives | |||
vytas | in my opinion - python got interactive shell very right | 10:23 | |
and they got iPython | |||
FROGGS | yes, though Pythons vision is that there shall only be one (obvious) way to do things | 10:24 | |
which is not quite perlish | |||
jnthn | ShimmerFairy: Well, once we get the slang stuff solidified for 6.d, there'll be a stable API to do what perl6-debug does with the AST and it too can be booted back out to the ecosystem, the way I originally wanted things anyway. :) | 10:25 | |
konobi | node's repl works pretty decently | ||
10:25
bjz left,
apotheon left
|
|||
ShimmerFairy | FROGGS: if you insist that a default Linenoise and such shouldn't be in the repo, then what are NativeCall, Pod::To::Text, Test, or lib doing in there? Why is a Linenoise-ish module different from those? | 10:25 | |
FROGGS | so we already had linenoise included in the compiler and we recognized this as a failure... just dont let us do it again | ||
10:26
margeas joined
|
|||
FROGGS | ShimmerFairy: that's quite simple... lib and Test are used to run the spectests, and NativeCall is tied to the VM version | 10:26 | |
10:26
bjz joined
|
|||
ShimmerFairy | Could there really not even be a basic REPL::Basics , which just makes sure you can press the left and right arrows keys and have them do the right thing? | 10:27 | |
10:27
xfix left
|
|||
FROGGS | if we can do this ultra portably, sure | 10:27 | |
which is what the problem was | |||
vytas | ShimmerFairy++ and fix bugs like #121117 | ||
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=121117 | ||
jnthn | On Windows, without anything extra installed, the arrow keys (and up/down) already work perfectly well without needing modules, fwiw. :) | ||
vytas | so as i understand issue is with Linenoise not that it would not be welcomed? | 10:28 | |
10:28
Ven left
|
|||
FROGGS | vytas: this is not about fancy REPL stuff, this is about how the REPL (shipped with "the compiler") works | 10:28 | |
vytas: so even with Linenoise, you get this repl bug | 10:29 | ||
ShimmerFairy | FROGGS: I suppose my problem is that rakudo's REPL is laughably ridiculous unless you magically know that your compiler needs a couple more batteries it didn't come with (honestly, you might as well not have it and leave that to something like perl6 repl.p6 , the way it is) | ||
vytas | I am talking about basic REPL, fancy would be fancy :) | ||
10:30
andreoss left
|
|||
FROGGS | ShimmerFairy: why do you think a fancy REPL belongs to the very core compiler package? | 10:30 | |
10:30
apotheon joined
|
|||
FROGGS | vytas: we ship a very basic repl | 10:30 | |
(with rakudo) | |||
10:31
dalecooper joined
|
|||
vytas | Ok i only started playing with perl6 yesterday, so maybe i am missing something. but the one that comes up after i type in "perl6" is not functioning. | 10:31 | |
prompt comes as "> " i click enter it changes to "* " | |||
FROGGS | vytas: not functioning in what way? | ||
vytas | sounds like there is more than one prompt. - sorry for a bad joke | 10:32 | |
ShimmerFairy | FROGGS: not overly-fancy, but the fact that perl6 -e 'loop { say EVAL(prompt("> ")) }' almost perfectly replicates the basic REPL is ridiculous. | ||
FROGGS | I dunno what the star is about but when you enter a statement it interprets and runs it... | 10:33 | |
jnthn | FROGGS: I think the * was what the multi-line input was using? | ||
vytas | i see commits like "allow \ for multiple lines" - I try it - and it doesn't work | ||
lizmat | .botasnack | ||
.botsnack # not awake yet | |||
yoleaux | :D | ||
synbot6 | om nom nom | ||
FROGGS | jnthn: yes, though when I do: "<enter> say 42" it does nothing | 10:34 | |
jnthn | FROGGS: Yeah. :/ | ||
FROGGS | ShimmerFairy: so what do you want to have extra which would be portable? | 10:35 | |
konobi | tried with a semi-colon at the end? | ||
FROGGS | no luck there | ||
vytas: the backslash does not seem to be handled... it will already evaluate the current line | 10:36 | ||
ShimmerFairy | FROGGS: I can see why you wouldn't want a REPL that gives you every bell and whistle, but I don't think you can avoid the fact that other compilers with a REPL are far more user friendly. | ||
konobi | huh... libuv in moarvm... interesting | 10:37 | |
vytas | FROGGS, list is simple for me: "my @a = 1..3;" - should not print as i didn't ask it to. "{" should allow me to enter on next line. arrow back should work etc. :) | ||
ShimmerFairy | FROGGS: I think the REPL could use an introductory message, perhaps a nicer/more informative prompt than '>' (dunno what info it might provide), and as for features, at the very least the left and right keys should let me in-place edit, instead of print ^[[D and ^[[C | ||
vytas | python prints version, and that keyword "help" is available for more help | 10:38 | |
FROGGS | ShimmerFairy: is see it this way: users will install either a package (rakudo+linenoise+other basic stuff) or use rakudobrew... installing the compiler only from the repo is like building gcc on your own... you know what you are doing and you know that you will have extra work | 10:39 | |
10:39
TEttinger left,
dalecooper left
|
|||
FROGGS | ShimmerFairy: about the left/right cursor movements... is that portable to cmd.exe and powershell without needing to depend on external libraries? | 10:40 | |
jnthn | FROGGS: YOu get it *for free* in cmd.exe! | ||
FROGGS | \o/ | ||
jnthn: so everybody should use it :P | |||
jnthn wonders what the OSX situation is | |||
konobi | well, the debugger is just another repl really | ||
jnthn | Well yes, it's a bit surprising to me that the much maligned cmd.exe manages to provide a much better experience out of the box :P | 10:41 | |
FROGGS | ShimmerFairy: please open an RT ticket about the core features the rakudo repl should provide... including a help mechanism and a greeting msg or so | ||
ShimmerFairy | FROGGS: ok, I'll ponder what useful basic features there should be and open a ticket. :) | 10:42 | |
konobi | tput should work in most places | 10:43 | |
10:43
ely-se joined
|
|||
ShimmerFairy | FROGGS: btw, another concern of mine is that "image" thing: it just doesn't look good that rakudo's REPL isn't much better than a looping EVAL'd prompt. And despite how many people will use rakudobrew and such, there will be people who go more along my method and find themselves with a crappy REPL :) | 10:44 | |
FROGGS | ShimmerFairy: aye, and then well will talk about what of these features will be implementable without loading a dll/so/dylib | ||
ShimmerFairy | FROGGS: agreed, my mind is gearing towards things that wouldn't be too stressful for nqp to implement itself. | 10:45 | |
konobi | there's an npm library called "blessed" that does native terminal stuff directly using the "tput" methodology... no external dependencies needed. | 10:46 | |
vytas | *from user point of view* i don't care where it comes from - i want "apt-get install perl6" to include working repl. :) | ||
FROGGS | konobi: that's unixish thinking though | ||
vytas: exactly | |||
konobi | iirc it works on windows too | 10:47 | |
FROGGS | konobi: there is no tput on my windows box :o) | ||
konobi | it's a method | 10:50 | |
10:50
margeas left
|
|||
vytas | FROGGS, at the moment packages.debian.org/source/sid/rakudo does not depend on Task::Star, should it ? | 10:51 | |
10:52
chenryn_ left
10:53
tokuhiro_ joined
|
|||
moritz | uhm, no | 10:53 | |
konobi | yup... on windows you can do the same thing, just need to have a copy of the windows-ansi terminfo available. | ||
moritz | the other way 'round, maybe | ||
vytas | moritz, silly question, but same logic - one button to have repl not more :) | 10:54 | |
moritz | vytas: well, Task::Star needs rakudo, so rakudo can't need Task::Star | 10:55 | |
vytas: the typical solution is to recommend the installation of a meta package, like 'perl6-all' or so that depends on all of them | |||
10:57
tokuhiro_ left
10:58
jkva left
11:05
karol_ joined
|
|||
jdv79 will probably never understand why a REPL is an important feature | 11:14 | ||
moritz: can we up the max files limit on hack? | |||
elasticsearch gets very hungry it seems | 11:15 | ||
moritz | jdv79: I already did | 11:24 | |
11:24
WizJin left
|
|||
jdv79 | oh, thanks | 11:24 | |
hmm, /proc says 100k but ulimit still says 2k and denies up'ing. is that right? | 11:28 | ||
ilmari | check /etc/security/limits.conf? | 11:30 | |
11:30
Ven joined
11:31
duncan_dmg left
11:32
kid51 joined
|
|||
jdv79 | moritz: gist.github.com/anonymous/950bf286dcc617e4d616 | 11:33 | |
11:33
duncan_dmg joined
|
|||
moritz | jdv79: did you log in anew? | 11:33 | |
jdv79 | yes, fresh shell | ||
moritz | jdv79: there's no line with 'nofile' in /etc/security/limits.conf | 11:34 | |
jdv79 | does that one liner work for you? | ||
moritz | jdv79: nope | 11:35 | |
11:36
WizJin joined
|
|||
moritz | jdv79: now it does | 11:36 | |
seems the absence of a limit doesn't mean it's unlimited :( | |||
jdv79 | took me a bit to fix it on my box here | 11:37 | |
11:39
jkva joined
|
|||
vytas | perl6 --doc=NonExisting shows shell rather than warning/error | 11:42 | |
11:44
Ven left
11:45
Ven joined
11:47
Ven left,
Ven joined
11:49
Ven left,
Ven joined
11:55
hohoho left,
Ven left,
kid51 left
11:56
chenryn_ joined
11:58
virtualsue left
12:01
Ven joined
12:04
mayuresh joined
12:08
mayuresh left
12:09
Ven left,
ely-se left
12:12
ely-se joined
12:14
rindolf joined
|
|||
moritz | vytas: please report bugs at github.com/perl6/doc/issues/ | 12:15 | |
dalek | kudo-star-daily: a66e8d9 | coke++ | log/ (8 files): today (automated commit) |
12:16 | |
c: 99228f0 | (Lloyd Fournier)++ | doc/Type/Routine.pod: typo in routine signature |
12:20 | ||
12:22
apotheon left
12:23
bjz left
|
|||
grondilu | Error while compiling, type X::Syntax::ConditionalOperator::PrecedenceTooLoose | 12:24 | |
operator: => | |||
at line 29755, near "?? $contro" | |||
at gen/moar/stage2/NQPHLL.nqp:519 | |||
12:27
chenryn_ left
12:28
apotheon joined,
bjz joined
12:29
Ven joined,
sufrostico joined
|
|||
vytas | moritz, ok thanks | 12:31 | |
12:32
pb_ joined
12:33
pb_ left
12:34
cognominal joined
12:37
FROGGS left
12:38
Ven left,
chenryn left,
ely-se left
12:39
hohoho joined
12:44
Ven joined
12:45
Ven left
12:47
abraxxa left,
ely-se joined
12:49
apotheon left
12:54
tokuhiro_ joined
12:56
apotheon joined
12:59
tokuhiro_ left
13:00
ely-se left
13:02
Ven joined
13:04
adu joined
13:05
ely-se joined
13:09
mullagainn left,
adu left
13:10
PsuzeannePsy joined,
Alina-malina left,
lichtkind joined
13:11
Ven left
13:12
rarara_ joined
|
|||
rarara_ | m: constant \c :=12; c=11; say c; | 13:12 | |
camelia | rakudo-moar 271e84: OUTPUT«Cannot modify an immutable Int in block <unit> at /tmp/QAlx9VUVhJ:1» | ||
rarara_ | m: my \c :=12; c=11; say c; | ||
camelia | rakudo-moar 271e84: OUTPUT«Cannot modify an immutable Int in block <unit> at /tmp/_j0HXk8FSx:1» | ||
rarara_ | are those exactly the same? | ||
jnthn | No | ||
constant evaluates the RHS at compile time | 13:13 | ||
vytas | got randomly segfault pastebin.com/raw.php?i=hvCqJqx6 | ||
jnthn | m: for ^5 { constant \c = do { say 'here'; 5 }; say c; } | ||
camelia | rakudo-moar 271e84: OUTPUT«here55555» | ||
jnthn | m: for ^5 { my \c = do { say 'here'; 5 }; say c; } | ||
camelia | rakudo-moar 271e84: OUTPUT«here5here5here5here5here5» | ||
13:13
SuzieQueue left
|
|||
jnthn | rarara_: ^^ there's the difference | 13:14 | |
13:15
SuzieQueue joined
|
|||
jnthn | vytas: Reproducable? | 13:15 | |
rarara_ | OK :) | ||
vytas | jnthn, trying now, it was very random because i clicked enter on yesterday's opened perl6 repl with empty prompt | 13:16 | |
jnthn | vytas: Did you rebuild your Perl 6 since then? | ||
vytas | agh yes | 13:17 | |
jnthn | Ah | ||
vytas | stupid me sorry | ||
jnthn | np...interesting failure mode | ||
13:17
apotheon left
13:19
PsuzeannePsy left
13:22
apotheon joined
13:25
cognominal left
13:26
cognominal joined
13:29
FROGGS joined
|
|||
FROGGS | m: my $foo = "foo foo"; say $foo ~~ s:2x{fo+}=q{bar}; say $foo | 13:33 | |
camelia | rakudo-moar 271e84: OUTPUT«「foo」bar bar» | ||
13:37
bjz_ joined
|
|||
FROGGS | $_ = "foo foo"; say s:2x{fo+} = q{bar}; | 13:38 | |
m: $_ = "foo foo"; say s:2x{fo+} = q{bar}; | |||
13:38
bjz left
|
|||
camelia | rakudo-moar 271e84: OUTPUT«「foo」» | 13:38 | |
13:39
ely-se left
|
|||
Woodi | hallo today :) | 13:39 | |
FROGGS | hi Woodi | 13:40 | |
Woodi | m: say say "11" ~| "00" | ||
camelia | rakudo-moar 271e84: OUTPUT«11True» | ||
Woodi | also: perldoc.perl.org/perlop.html#Bitwis...-Operators && Scheme/C#/PHP/... have such thing | 13:41 | |
FROGGS | m: say "11" +| "00" | 13:44 | |
camelia | rakudo-moar 271e84: OUTPUT«11» | ||
FROGGS | Woodi: why would we need an ~| op here? | 13:45 | |
ShimmerFairy | Woodi: however, Perl 5 (and the other languages) operate on what we call a buffer (e.g. Blob, Buf, the utf8 type, etc.), and not so much on what we call a string | ||
FROGGS | aye | 13:46 | |
ShimmerFairy | "The behavior of these operators is problematic (and subject to change) if either or both of the strings are encoded in UTF-8" gives it away in the linked perldoc :) | ||
FROGGS | m: say "foo foo".match(m:2x/fo+/) | 13:49 | |
camelia | rakudo-moar 271e84: OUTPUT«Method 'match' not found for invocant of class 'Any' in block <unit> at /tmp/grVoL_tlzf:1» | ||
FROGGS | eww | ||
m: say "foo foo".match(/fo+/, :2x) | 13:50 | ||
camelia | rakudo-moar 271e84: OUTPUT«(「foo」 「foo」)» | ||
jnthn | FROGGS: That'd need to be rx: I think | ||
FROGGS | ahh | ||
m: say "foo foo".match(rx:2x/fo+/) | |||
camelia | rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gVZj_oiDXlAdverb x not allowed on rxat /tmp/gVZj_oiDXl:1------> 3say "foo foo".match(rx:2x/fo+/7⏏5)» | ||
jnthn | Heh :) | ||
FROGGS | :o) | ||
jnthn | OK, it hsas to be what you wrote | ||
But m is "do it right now" | |||
FROGGS | *nod* | ||
13:51
retupmoca left
13:52
Ven joined,
retupmoca joined
13:55
tokuhiro_ joined
|
|||
vytas | m: say [1,[2]].flat | 13:56 | |
camelia | rakudo-moar 271e84: OUTPUT«(1 [2])» | ||
vytas | m: say ~[1,[2]] | 13:57 | |
camelia | rakudo-moar 271e84: OUTPUT«1 2» | ||
vytas | does flat work only on top level ? | ||
jnthn | It works until it encounters a Scalar container, and an Array is a collection of Scalar containers. | 13:58 | |
But another way, and array is already flat by definition. | |||
*an | |||
*Put | |||
gah, Friday typing | |||
13:59
rindolf left,
pmurias joined
14:00
Ven left,
tokuhiro_ left
|
|||
[Coke] | I think you mean typoing. | 14:00 | |
14:01
c0rt042 left
14:03
Ven joined
14:04
margeas joined
|
|||
Ulti | "/usr/share/dict/words".IO.words.classify(*.lc.comb.sort.join).sort({$^b.value.elems <=> $^a.value.elems})[0].say is a fun one liner and a little simpler than the equivalent from 2010 on RosettaCode rosettacode.org/wiki/Anagrams#Perl_6 :3 | 14:05 | |
14:06
Upasaka_ is now known as Upasaka,
jkva left
|
|||
Ven | Ulti: also, we can remove the \ from there! | 14:07 | |
Ven never understood the diff. between classify and categorize | 14:08 | ||
14:09
softmoth joined
|
|||
Ven | "+@($_)" <- is the @() really useful here? | 14:10 | |
m: my $a = $[1, 2, 3]; say +$a | |||
camelia | rakudo-moar 271e84: OUTPUT«3» | ||
[Coke] | Ulti: if you're calling the same function on each sort item, you only need to specify it once. (I just tripped over this last week) | 14:11 | |
CurtisOvidPoe | Where can I find documentation for things like Str:D (I don’t know what the :D is and I’d rather read all about that than just have someone tell me) :) | ||
Though if you tell me, I promise not to be too upset. | 14:12 | ||
14:12
FROGGS_ joined
|
|||
Ven | CurtisOvidPoe: it's a smiley. :D | 14:13 | |
CurtisOvidPoe | Happy args are happy. But they’re also strange to me :) | ||
Ven | CurtisOvidPoe: perl6advent.wordpress.com/2013/12/...pe-object/ | ||
CurtisOvidPoe | Cheers! | ||
14:13
RabidGravy joined
|
|||
vytas | how do i flatten something like @a = 1..9, a..z; ? | 14:15 | |
TimToady | CurtisOvidPoe: S12:Abstract_vs_Concrete_types | ||
yoleaux | 09:07Z <Ven_> TimToady: irclog.perlgeek.de/perl6/2015-10-15#i_11381191 putting "Foo_" or "Foo-" would mean I'm reinventing namespacing for no reason. I want `::` to be about packages. the name is inside the package, the value is dynamically scoped | ||
synbot6 | Link: design.perl6.org/S12.html#Abstract_...rete_types | ||
Woodi | my $t = "This is "; my $s = " SPARTA!"; my $p = " Perl6"; say $t ~| $p; | ||
Ven | vytas: flat | ||
Woodi | m: my $t = "This is "; my $s = " SPARTA!"; my $p = " Perl6"; say $t ~| $p; | ||
camelia | rakudo-moar 271e84: OUTPUT«this is Perl6» | ||
Ven | m: my @a = flat 1..9, 'a'..'z'; say @a.perl; | 14:16 | |
camelia | rakudo-moar 271e84: OUTPUT«[1, 2, 3, 4, 5, 6, 7, 8, 9, "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]» | ||
14:16
FROGGS left,
karol_ left
|
|||
vytas | thanks | 14:17 | |
my @a = 1..9, 'a'..'z'; my @b = flat @a; say @b.perl; | 14:19 | ||
m: my @a = 1..9, 'a'..'z'; my @b = flat @a; say @b.perl; | |||
camelia | rakudo-moar 271e84: OUTPUT«[1..9, "a".."z"]» | ||
grondilu | am I the only one who thinks there are two many quotes in 'a'..'z'? Couldn't we have somthing like say <a..z>? | 14:21 | |
Ven | please no | ||
grondilu | m: say <a..z>.perl # not sure what it is right now | 14:22 | |
camelia | rakudo-moar 271e84: OUTPUT«"a..z"» | ||
grondilu | oh, just a string. ok. | ||
14:22
[Sno] left
|
|||
ilmari | <...> is just '...'.split(/\s+/) | 14:23 | |
14:23
[Sno] joined
|
|||
Ulti | [Coke]: would that get me the list sorted from highest to lowest though? | 14:23 | |
pink_mist | <a .. z>? | ||
Ulti | or is there a :reverse adverb or something | ||
grondilu | m: say <a .. z>.perl | 14:24 | |
camelia | rakudo-moar 271e84: OUTPUT«("a", "..", "z")» | ||
pink_mist | d'oh | ||
jnthn | m: say <a>..<z> | ||
camelia | rakudo-moar 271e84: OUTPUT«"a".."z"» | ||
jnthn | No quotes! ;) | ||
ilmari | m: say <a b>..<c d> | 14:25 | |
camelia | rakudo-moar 271e84: OUTPUT«2..2» | ||
FROGGS_ | m: say <a b>...<c d> | ||
camelia | rakudo-moar 271e84: OUTPUT«(a b c d)» | ||
FROGGS_ | m: say <a c>...<x z> | ||
camelia | rakudo-moar 271e84: OUTPUT«(a c d e f g h i j k l m n o p q r s t u v w x z)» | ||
FROGGS_ | m: say <a c>...'z' | ||
camelia | rakudo-moar 271e84: OUTPUT«(a c d e f g h i j k l m n o p q r s t u v w x y z)» | ||
TimToady | Ulti: just use .sort({-*.value.elems) | 14:26 | |
er, s/\{// | |||
m: say <1>..<9> | 14:28 | ||
camelia | rakudo-moar 271e84: OUTPUT«IntStr.new(1, "1")..IntStr.new(9, "9")» | ||
TimToady | hmm... | ||
m: say list <1>..<9> | |||
camelia | rakudo-moar 271e84: OUTPUT«(1 2 3 4 5 6 7 8 9)» | ||
Ulti | TimToady aha thanks | ||
also -*.value might be enough since it will default to the length in numeric context right? | |||
TimToady | probably | 14:29 | |
14:29
khw joined
|
|||
Ven | m: say [...] <a b>; # grondilu? :P | 14:30 | |
camelia | rakudo-moar 271e84: OUTPUT«(a b)» | ||
Ven | aw. | ||
m: say [...] <a z>; # errr >.> | |||
camelia | rakudo-moar 271e84: OUTPUT«(a b c d e f g h i j k l m n o p q r s t u v w x y z)» | ||
grondilu | m: say [..] |<a z> | ||
camelia | rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wVy7nAJEfBCannot reduce with .. because structural infix operators are diffy and not chainingat /tmp/wVy7nAJEfB:1------> 3say [7⏏5..] |<a z> expecting any of: argument list …» | ||
grondilu | oh yeah | 14:31 | |
14:32
ely-se joined
|
|||
grondilu | m: say &[..](|<a z>) | 14:32 | |
camelia | rakudo-moar 271e84: OUTPUT«"a".."z"» | ||
Ven | m: say [..]<a z> | ||
camelia | rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8iSbjP2BsbCannot reduce with .. because structural infix operators are diffy and not chainingat /tmp/8iSbjP2Bsb:1------> 3say [7⏏5..]<a z> expecting any of: argument list …» | ||
Ven | m: say [..](<a z>) | ||
camelia | rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/J47p9Ms0f2Cannot reduce with .. because structural infix operators are diffy and not chainingat /tmp/J47p9Ms0f2:1------> 3say [7⏏5..](<a z>) expecting any of: argument list …» | ||
grondilu | m: say <a z>.&[..] | ||
camelia | rakudo-moar 271e84: OUTPUT«Too few positionals passed; expected 2 arguments but got 1 in block <unit> at /tmp/H2tEa3a4YK:1» | ||
nine | .tell psch I don't know what reposession is exactly, but what you describe sounds very much like it could be the cause for my strange bug in the bool_enum branch. Attribute and Bool both have strange objectids and both have a BEGIN .^compose | 14:33 | |
yoleaux | nine: I'll pass your message to psch. | ||
grondilu | m: say &[..] |<a z> | ||
camelia | rakudo-moar 271e84: OUTPUT«any(sub infix:<..> ($min, $max) { #`(Sub+{<anon|80798352>}+{Precedence}|44790688) ... }, (a z))» | ||
Ulti | probably yes :) "/usr/share/dict/words".IO.words.classify(*.lc.comb.sort.join).sort(-*.value)[0].say perhaps a bit too terse but kind of logical if you follow left to right | ||
nine | jnthn: do you think we're onto something here regarding my message to psch++? | ||
14:34
s_kilk joined
|
|||
jnthn | nine: Maybe, though type objects aren't really meant to be subject to being repossessed 'cus they have no state | 14:35 | |
14:35
jkva joined
|
|||
nine | What exactly does reposession mean anyway? | 14:35 | |
moritz | an object is defined in the setting | 14:38 | |
so it's in the setting's serialization context | |||
now a precompiled module changes that object | |||
so it must be in the precompiled module's serialization context | |||
so it must somehow declare that it is now responsible for that object, and the setting should yield control over it | 14:39 | ||
that's called repossession | |||
jnthn | Right. Also I wrote some stuff up on it in the nqp internals course, but moritz++'s example nails it pretty well | ||
[Coke] | Ulti's one liner is wicked slow here. :| | 14:40 | |
Ulti | yup | ||
jnthn | The more interesting case for Bool is that it's created in BOOTSTRAP, but it's meta-object and STable are changed while compiling CORE.setting, so I'd expect those two to be repossessed. | ||
[Coke] | Ulti: not that it matters much given that our dictionary is mostly ascii, but probably want .fc instead of .lc | 14:41 | |
Ulti | well since a few days ago I do :P | ||
jnthn++ | |||
TimToady | Ven: what purpose is served by putting a name into a package if the value cannot be accessed through the package? and it cannot, unless by dynamic scoping you mean "temporizing" rather than what Perl 6 means by dynamic scoping | 14:42 | |
14:42
Alina-malina joined
|
|||
Ven | TimToady: the value can (and has to) be accessed through the value | 14:43 | |
14:43
zakharyas1 joined
|
|||
psch | jnthn: so scwb{dis,en}able around Attribute.^compose would be the appropriate solution? | 14:43 | |
yoleaux | 14:33Z <nine> psch: I don't know what reposession is exactly, but what you describe sounds very much like it could be the cause for my strange bug in the bool_enum branch. Attribute and Bool both have strange objectids and both have a BEGIN .^compose | ||
Ven | "the value is dynamic, the container isn't" – or something in sp6k | ||
TimToady: I'm not sure what temporizing means, maybe that's what I mean. | |||
psch | jnthn: in that context still can't help but wonder why moar doesn't exhibit the jvm SC problem... | ||
ely-se | Ven: you mean "through the name" | ||
jnthn | psch: Surely that'd mean we lose the changes? | ||
Ven | ely-se: yes, I do. thanks | ||
jnthn | psch: And Attribute comes out busted still? | ||
TimToady | temporizing means you're actually using global containers, which is not thread-safe | 14:44 | |
Ven | ely-se: maybe you can describe it to TimToady++ better than I do ;-) | ||
psch | jnthn: i don't know if we lose the changes on moar, but the SC stays BOOTSTRAP | ||
*on jvm | |||
ely-se | dynamic variables that require declarations and those declarations must be either qualified or lexically in scope | ||
jnthn | psch: The SC of what exactly? | ||
ely-se | but yeah, in P6 I think you can just use regular lexically-scope variables, and use temp | 14:45 | |
Ven | TimToady: scheme/racket/clojure-style `(parameterize ([param value]) (call...))` doesn't seem to require a global container to me? | ||
jnthn | psch: If you're seeing type objects themselves getting repossessed, that may well be a bug | ||
psch | jnthn: Attribute. the problem on jvm is that the classHandle for Attribute gets repossessed to CORE.setting | ||
ely-se | although preferably thread-local | ||
jnthn | OK. I don't think type objects should ever get repossessed. Because...they don't have any state.. | ||
ely-se | is the modification done by temp thread-local? | ||
psch | jnthn: so the problem is that composition somehow repossesses even though it shouldn't..? | 14:46 | |
TimToady | ely-se: only if the lexical is declared inside the thread | ||
jnthn | psch: Sounds like. I can try to find out if we ever repossess a type object on Moar I guess | 14:47 | |
ely-se | :( | ||
psch | jnthn: that could be a hint, thanks | 14:48 | |
TimToady | temp is not our preferred dynamic scoping mechanism | ||
Ven | my is :P | ||
ugexe | curious, what does `trace` do that turns the $x from a Hash into a Block? | 14:49 | |
TimToady | indeed, but my has nothing to do with packages | ||
ely-se | It's trivial to implement Clojure-like dynamic variables though | ||
ugexe | m: my $x = { :ok(1) }; say $x.WHAT | ||
camelia | rakudo-moar 271e84: OUTPUT«(Hash)» | ||
jnthn | psch: You may want to try and work out what causes that to happen on JVM too | ||
ugexe | m: use trace; my $x = { :ok(1) }; say $x.WHAT | ||
camelia | rakudo-moar 271e84: OUTPUT«2 (/tmp/BJv0oLmAfY:1)my $x = { :ok(1) }7 (/tmp/BJv0oLmAfY:1)say $x.WHAT(Block)» | ||
14:49
rindolf joined
|
|||
ely-se | all you need is thread-local variables and try/finally | 14:49 | |
Ven | TimToady: indeed, it'd be around `our` and `temp` | 14:50 | |
TimToady | and those are globals | ||
Ven | m: module A { our $*a = 5; }; say $A::*a; | ||
camelia | rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BUbKwFPbN5Variable '$A' is not declaredat /tmp/BUbKwFPbN5:1------> 3module A { our $*a = 5; }; say 7⏏5$A::*a;» | ||
psch | jnthn: yeah, i think i have an idea or two for what i could look for | ||
Ulti | [Coke]: mattoates.co.uk/files/perl6/anagram_profile.html looke liks classify-list is taking up about the same time as the function its calling, assuming I read the call graph right | 14:52 | |
also the profiler output is way nicer than the last time I looked at it! | 14:53 | ||
TimToady | Ven: we are not going to let people confuse temp variable notation with dynamic variable notation in Perl 6 | 14:55 | |
if you want temp vars, you don't need the * | |||
and I believe that our lexically-based dynamic variables address the need for thread-local storage adequately without multiplying entities that will lead to user confusion | 14:59 | ||
We're feebly trying to keep Perl 6 a language that mere mortals can use... | 15:00 | ||
15:03
n0tjack joined
|
|||
n0tjack | is there a Twitter module for p6? | 15:04 | |
ely-se | How about immortals like me? | 15:06 | |
TimToady | you can write modules :) | ||
ely-se | mortules | 15:07 | |
n0tjack | TimToady: I "could" yodel, too. Just don't feel like learning how ;) | ||
15:07
g4 left
|
|||
n0tjack | I figure my next little self-assignment to learn p6 would be a OEIS twitter bot. You @tweet it a series of integers, and it uses the OEIS API to suggest potential functions to generate that series. | 15:08 | |
15:09
weihan joined
|
|||
n0tjack | To date, all my projects have been functional, which is where I'm comfortable. I figured I'd try something stateful, with more moving parts. | 15:09 | |
15:10
diana_olhovik left
|
|||
TimToady | I don't see where state comes into this problem | 15:10 | |
n0tjack | connection to twitter | ||
TimToady | I guess | ||
15:10
zakharyas1 left
|
|||
n0tjack | and I'd figured I'd put in a little memoization/caching | 15:10 | |
I don't want to hammer the OEIS if I can help it | 15:11 | ||
TimToady | I'd just load OEIS into a trie or some such | 15:12 | |
mrf | Is there a characted class for 'Is a Control char'. Or better is a 'Non Whitespace Control char'? | ||
TimToady | m: say uniprop(3) | 15:13 | |
camelia | rakudo-moar 271e84: OUTPUT«Cc» | ||
mrf is learning grammers by generating the RFC-2822 spec | |||
jnthn | I think the <control> rule in a regex will doit | ||
geekosaur | m: say uniprop(160) | ||
camelia | rakudo-moar 271e84: OUTPUT«Zs» | ||
mrf | TimToady: is that not the physicall CTRL key? | 15:14 | |
TimToady | wha? | 15:15 | |
TimToady is not even sure that rises to the level of category error... | |||
pink_mist | keyboard scancodes don't have unicode properties 0_o | ||
Ven | TimToady: I don't think mortals will use many dynamic variables. And maybe they'd be grateful they're not getting their dynamic values overriden by some other module | ||
mrf is clearly being misleading here. | 15:16 | ||
ugexe | token obs-NO-WS-CTL { <[\c[1]..\c[8]\c[11,12]\c[14]..\c[31]\c[127]]> } | ||
mrf | I am looking for something that will match all ASCII control characters excluding \s matchs | ||
ugexe | you can use this as a reference mrf: github.com/ugexe/Perl6-Grammar--HT...FC5322.pm6 | ||
mrf | ugexe: That looks good | ||
hoelzro | o/ #perl6 | 15:18 | |
mrf | ugexe++ Thank you that looks perfect | 15:19 | |
jnthn missed why <control> doesn't cut it... :) | |||
mrf | ugexe: Also indicates that serveral of the shared rules/tokens between MIME headers and HTTP could form some sort of parent class. | ||
jnthn: Can I do <-[\s]> & <control>? | 15:20 | ||
ugexe | mrf: yep. they share tokens | ||
mrf | s/class/grammer | ||
jnthn | mrf: yes | ||
Well | |||
<control-[\s]> | |||
tony-o | m: use trace; my $x = { :ok(1); }; $x<ok>.say; | ||
camelia | rakudo-moar 271e84: OUTPUT«2 (/tmp/cvO2oQ62_u:1)my $x = { :ok(1); }7 (/tmp/cvO2oQ62_u:1)$x<ok>.sayType Block does not support associative indexing. in block <unit> at /tmp/cvO2oQ62_u:1Actually thrown at: in block <unit> at /tmp/cvO2oQ62_u:1» | ||
tony-o | m: my $x = { :ok(1); }; $x<ok>.say; | ||
camelia | rakudo-moar 271e84: OUTPUT«1» | ||
15:20
muraiki joined
|
|||
ugexe | mrf: if you break your tokens into 'roles' then you can share them between each other | 15:21 | |
mrf | jnthn: is that literally 'The Control names group without \s'? Its not a syntax I have seen (All the perl6 regex is very new) | 15:22 | |
ugexe | grammar HTTP::Grammar does (RFC1, RFC2) { } | ||
jnthn | mrf: Yes | ||
ugexe | im not sure how well the perl6 tokens for things like \n, \s, etc map up with the RFC definitions though | 15:23 | |
mrf | jnthn: thats cool. | ||
15:24
ely-se left
|
|||
konobi | well, there's the rfc standard for "Message" which is the same for http, email, nntp, etc. | 15:24 | |
mrf | ugexe: for most of the 2822 spec it uses Folded whitespace which seems to be \s* | ||
ugexe: OOI why do all the named groups have a preceeding period. e.g <.FWS> ? | 15:26 | ||
ugexe: ^ In Grammer::HTTP::RFC5322 | |||
ugexe | because capturing those slow it down immensely, and those captures are not used | ||
mrf | ugexe: so <> is a named version of ()? | 15:27 | |
ugexe | m: say "\n" ~~ /\s/ | ||
camelia | rakudo-moar 271e84: OUTPUT«「」» | ||
mrf | and <.> is like [] | ||
ugexe | thats why you cant just use the default perl tokens for everything | 15:28 | |
for the most part | 15:29 | ||
i dont understand the comparison to [] though | |||
mrf | [] is a non capturing group no? | 15:30 | |
ugexe: IIRC WSP is \h and \t only and FWS includes \v, \n and \r so becomes \s | 15:31 | ||
konobi | that'd be (?:) | ||
15:32
hohoho left
|
|||
ugexe | [] is a group yes. <.token-name> is the same as <token-name>, except there will be no token-name => SomeValue in the match object | 15:32 | |
mrf | ugexe: I am not sure how that is different from 'non-capturing named group' but I may be missing things | 15:33 | |
konobi: I was under the impression that (?:) had been replaced by [] | |||
ugexe | if you wanted to repaste your entire grouping in between [ and ], it would be no different | ||
jnthn | Well, not quite | 15:34 | |
[...] is just a group | |||
psch | jnthn: i didn't see any repossession of SMOs with isconcrete == 0 (fwiu, that's equivalent to "is a TypeObject") | ||
jnthn | If you capture inside of the group it's still a capture | ||
psch: Yes, isconcrete == 0 is exactly equivalent | |||
psch | jnthn: but considering type objects never get repossessed, isn't a comparison that checks the SC when looking for an attribute on an object bound to eventually fail? | 15:35 | |
jnthn: i mean, that's the bandaid, right. "ignore SC when looking for the hintMap" | |||
jnthn | I'm not sure why we'd look at SC there; on Moar we just look at the type object to match, I *think* | 15:36 | |
psch | github.com/perl6/nqp/blob/master/s...e.java#L17 # this line used to not have the ".st" on both sides of == | 15:37 | |
15:37
timo joined
|
|||
psch | i'm just not sure that's a sufficient fix, which is why i keep revisiting it... :) | 15:37 | |
15:37
timo is now known as Guest16417
15:38
llfourn left
|
|||
jnthn | It's odd that it'd need that | 15:38 | |
15:38
Guest16417 is now known as timotimo
|
|||
jnthn | Comparing the two type objects should just work out | 15:38 | |
So yeah, I agree something deeper is going wrong | |||
psch | maybe we need an .equals..? | ||
jnthn | No, they really should be exactly the same objects | 15:39 | |
Reference equality should be enough | |||
psch | well, the LHS is an Attribute object from CORE, the RHS is the Attribute type object from BOOTSTRAP | ||
and the classHandle is both cases references the SC | |||
*in | |||
jnthn | Yeah, that's what shouldn't be happening. Hmm. | 15:40 | |
psch | the classHandle shouldn't know the SC? | ||
jnthn | No | 15:41 | |
The Attribute type ocject from cORE should be the one from BOOTSTRAP | 15:42 | ||
There shouldn't be two of them | |||
I don't see how that's happening | |||
nine | That's exactly what I see with Bool | ||
jnthn | But curiously not with Attribute on Moar, it seems. | 15:43 | |
nine | As far as I remember that was my first question for this bug: if type objects created in BOOTSTRAP are copied somewhere | ||
15:43
rindolf left
|
|||
jnthn | nine: Well, apparently this one is being, but "should it be"...well, no. | 15:44 | |
15:44
blackcat joined,
blackcat is now known as loren
|
|||
jnthn | github.com/MoarVM/MoarVM/blob/mast...aque.c#L24 gets by on pointer equiv, not STable equiv, just to verify | 15:44 | |
15:44
Ven left
15:46
zakharyas left
|
|||
loren | I write a simple ftp client module, Net::Ftp will be a valid name? github.com/araraloren/Net-Ftp | 15:51 | |
avar | Net::FTP would be better :) | 15:52 | |
15:53
s_kilk left
|
|||
loren | Hm, thank u, avar | 15:54 | |
15:55
uruwi joined,
s_kilk joined
15:57
llfourn joined,
tokuhiro_ joined
|
|||
jdv79 | looks like the tests for a module of mine are faster since maybe 6 months ago | 15:59 | |
now only 1 order of mag behind p5 instead of 2 i think they were | 16:00 | ||
profile still dominated with listy stuff though:( | |||
jnthn | jdv79: In exclusive time or inclusive? | 16:01 | |
16:01
tokuhiro_ left
|
|||
jnthn | It'll often rank high in inclusive | 16:01 | |
jdv79 | exclusive | ||
though to a lesser degree than before iirc | 16:02 | ||
jnthn | Yeah | ||
There's still some hotspots, though they tend to be more isolated and smaller pieces of code than before at least | |||
16:07
Ven joined
|
|||
dalek | kudo/nom: 9a78309 | ugexe++ | src/core/Supply.pm: Fix precedence for Supply status Fixes JVM build travis-ci.org/rakudo/rakudo/jobs/85681162#L330 |
16:08 | |
kudo/nom: c60e687 | lizmat++ | src/core/Supply.pm: Merge pull request #553 from ugexe/patch-5 Fix precedence for Supply status |
|||
16:09
mayuresh joined
|
|||
mayuresh | hello :) | 16:09 | |
dalek | kudo/p6for_op: ba14084 | (Stefan Seifert)++ | src/Perl6/Actions.nqp: Work in progress: p6for desugar op Move some <for> logic into a desugar op for easier handling by the optimizer. Label handling still broken in this commit. |
16:10 | |
mayuresh | i just realized that perl6 is such a beast! | 16:11 | |
i might as well base my 'pxn' project around the ideas of smalltalk execution environment. | |||
ugexe | a beast with wings | ||
mayuresh | pxn == Perl6 eXecution eNvironment. :) | 16:12 | |
ugexe, yeah, a beast with wings, quite like the mythical pegasus | 16:13 | ||
;) | |||
16:14
^elyse^ joined
|
|||
pmurias | mayuresh: what is pxn supposed to be? | 16:15 | |
16:15
rindolf joined
|
|||
[Coke] | pmurias: IIRC, a new backend that doesn't separate the compiler from the vm. | 16:16 | |
mayuresh | pmurias, a combined compiler + virtual machine. | ||
pmurias | combined in what way? | 16:17 | |
mayuresh | one should be able to "run" perl6 code the way people presently run perl5 code. | ||
no need to first compile it, and then separately execute it on a 'vm'. | 16:18 | ||
flussence | so basically PHP? | ||
[Coke] | mayuresh: you know you don't have to do that with rakudo,r ight? | ||
mayuresh | flussence, yeah somewhat! :) | ||
[Coke] | you can run it without generating moarvm bytecode files. | ||
mayuresh | [coke], i had no idea about that. | 16:19 | |
[Coke] | pmurias: I just saw your blog post about nqp-js! that's great news! | ||
mayuresh: ./perl6 -e '3.say' - that doesn't generate a moarvm bytecode file on disk. | |||
mayuresh | nqp-js! does that mean p6 will be compiled for node.js? | ||
[coke], what about an entire program written in a file? | |||
[Coke] | same. | 16:20 | |
mayuresh | cool. | ||
pmurias | mayuresh: commpiled to js, to be run either on node.js or in the browser | ||
[Coke] | you only get moarvm bytecode output if you ask for it with --target | ||
mayuresh | pmurias, you worked on that! cool man. | ||
[coke], then why go for all that 'vm' stuff in the first place? | |||
pmurias | [Coke]: node nqp-bootstrapped.js runs 8 nqp tests, working on bug fixes and missing small things to pass the other ones | 16:21 | |
[Coke] | pmurias: still need to config with moarvm & js in the backend? | ||
mayuresh: it's still running in the vm. | |||
mayuresh | which 'vm'? if not moar, then there's a 'vm' inside of rakudo? | 16:22 | |
pmurias | [Coke]: yes | ||
[Coke] | mayuresh: no, moar. | ||
mayuresh | dang, now i am confused. | ||
[Coke] | mayuresh: it's running in the moar vm. there's just no external moarvm bytecode files generated. | ||
mayuresh | so if my system has just rakudo, and no moarvm, will i be able to "run" p6 code? | ||
[Coke] | no | 16:23 | |
flussence | unless it's nqp-jvm | ||
mayuresh | :) | ||
pmurias | [Coke]: nqp-js running on top of moarvm can compile nqp-js, nqp-js running on top node of can't compile itself yet | ||
[Coke] | pmurias: ok. | ||
mayuresh | [coke], does that mean, p6 "has" to rely on those two separate components? a compiler (rakudo) and a 'vm' (moarvm)? | ||
don't you think it would be better to have a slimmer and more focused all-in-one execution system for p6? | 16:24 | ||
jnthn | mayuresh: Problem not *has* to, but it's the practical way to implement it. | ||
mayuresh | i have just been intrigued by process managers embedded in interpreters. | 16:25 | |
jnthn | mayuresh: Something somewhere needs to do the gutsy stuff (garbage collection, I/O, abstracting away OS differences in various other places). | ||
[Coke] | mayuresh: I might slightly prefer it, but what jnthn said. it took us a long time to get -here-. it would have taken even longer to get there without going here first. | ||
mayuresh | ture. | ||
true | |||
i agree | |||
[Coke] | so, I wish you well on your journey, but I'm staying focused on rakudo. | ||
jnthn | mayuresh: At the same time, you really need to write most of a Perl 6 compiler in Perl 6 | ||
16:25
^elyse^ left
|
|||
mayuresh | and i don't look down on your work at all. | 16:25 | |
[coke] please do, and thanks for the wishes. | |||
jnthn | mayuresh: For example, you'll really struggle to implement Perl 6 if you don't parse it using a Perl 6 grammar. | 16:26 | |
mayuresh | jnthn, okay. | ||
i think it would be better if i do work on the 'pxn', i really want to learn about how to do what i intend to do. :) | 16:27 | ||
[Coke] | pmurias: sadly, the build died. presumably my old not-quite-the-right-node issues. :| | ||
jnthn | Learning about compilers/interpreters/language impl is always worth it :) | ||
pmurias | [Coke]: please paste the error log | ||
mayuresh | [coke] why not use io.js? | 16:28 | |
jnthn, it is very intriguing, the way those systems work. :) | |||
konobi | io.js doesn't exist anymore =0P | ||
jnthn | mayuresh: Very. It's a fun area. :-) | ||
timotimo | i think they merged back together with node.js | ||
konobi | yup | ||
pmurias | didn't node.js merge back into io.js? | 16:29 | |
konobi | io.js -> node.js | ||
s_kilk | io.js essentially became node.js 4.0 | ||
[Coke] | pmurias: : gist.github.com/coke/1b4ce850129de526dd58 | ||
16:30
s_kilk left
|
|||
mayuresh | s_kilk, coolness. :) | 16:30 | |
pmurias | mayuresh: re better to have it all-in-one, not really | ||
konobi | though node is now v4.2.1 | ||
mayuresh | pmurias, may i know why? to understand why i am thinking weirdly. | 16:31 | |
flussence | even perl5 has separate parser and opcode vm stages | 16:32 | |
[Coke] | mayuresh: what problem are you trying to solve? | 16:33 | |
pmurias | mayuresh: moarvm and rakudo are kept seperate mostly to keep order in the repos and to allow different backends | ||
mayuresh: having the code just tangled together doesn't really give us anything | |||
[Coke]: you are building things from inside the nqp-js directory | |||
[Coke]: it seems the modules built correctly but touch node_modules/npm_installed failed | 16:34 | ||
mayuresh | [coke], not solving a specific problem, especially when none exists in a big way. | ||
[coke], just learning, and going in a different direction than what exists at the moment. | |||
jnthn | mayuresh: There's probably lots of interesting answers, but for me it's an exercise in complexity management - that is, keeping different things apart, so they can be understood in relative isolation - because having to understand it all at once is too much for anyone. | ||
konobi | pmurias: oh... nqp-js is atop node? | 16:35 | |
16:35
jkva left
|
|||
mayuresh | jnthn, okay, is that high level of complexity there because p6 is such a beast of a language? | 16:35 | |
jnthn, btw, if i understood it right, live object systems like smalltalk, java, dart, all do need a 'vm' like approach, right? | 16:36 | ||
jnthn, is that why p6 too is going with a 'vm'? | |||
[Coke] | is node_modules supposed to be a directory under nqp build dir? | 16:37 | |
pmurias | yes | ||
flussence | any non-trivial language (basically, anything more useful than VB/PHP) uses a vm, whether or not it makes it visible | ||
mayuresh | by live objects, i imply the opposite of dead objects, like in c++ and ada. | ||
[Coke] | didn't get built. | ||
jnthn | mayuresh: It's a factor to some degree, but if you look at most language implementations that are used in the wild, they're all pretty involved in their own ways, and the folks building them have found typically found ways to cope with that by breaking it into manageable parts. | 16:38 | |
[Coke] | I just did a config, then 'make js-all' - maybe a mis-ordered dep? i see it in there under one of the build targets. | ||
pmurias | did stuff get installed into /Users/williamcoleda/node_modules/nqp-runtime/? | 16:39 | |
[Coke] | yes | ||
16:39
weihan left,
^elyse^ joined
|
|||
pmurias | konobi: the browsers are the real target I'm interested in, I'm just using node.js because it always to easily run stuff on the command line | 16:40 | |
mayuresh | jnthn, true, but, i am so impressed with smalltalk, it's a zang crazily well designed system of live objects. | ||
the only thing that's better would be "self". | |||
jnthn | Yes, Smalltalk is neat :-) | ||
We borrowed ideas from there and from CLOS for the Perl 6 MOP. | |||
pmurias | [Coke]: seems strange | ||
jnthn needs to go and make dinner :-) | |||
bbl o/ | |||
Ven | .oO( we added only a few operators ) |
||
mayuresh | jnthn, you guys went all the way of 'clos'!! that's rather neat. | 16:41 | |
pmurias | [Coke]: where did you get your node.js from? | ||
mayuresh | jnthn, have a good meal. :) | ||
16:43
weihan joined
|
|||
konobi | pmurias: mkay... well, if you have node/npm specific questions, lemme know | 16:43 | |
mayuresh | just a bit off-topic; are any of you guys on twitter too? | 16:45 | |
16:45
espadrine left
|
|||
dalek | p: 0c4bb9a | (Pawel Murias)++ | src/vm/js/ (4 files): [js] Make nqp::unshift work on captures. Pass tests 06 and 08. |
16:46 | |
p: 6fe7900 | (Pawel Murias)++ | tools/build/ (2 files): [js] fix a build issue when there is a node_module in a ancestor directory. |
|||
16:46
ab6tract joined
|
|||
ab6tract | o/ #perl6 | 16:47 | |
pmurias | [Coke]: it seemed there was a build issue if you had a node_modules already in your homedirectory | ||
[Coke]: thanks for finding the bug | |||
mayuresh | hi ab6tract. :) | ||
16:47
llfourn left
|
|||
ab6tract | hi mayuresh :) | 16:48 | |
16:48
weihan left
|
|||
ab6tract | can someone in the know tell me what this doc should look like in light of multi-dem ASSIGN-POS? doc.perl6.org/routine/ASSIGN-POS | 16:48 | |
16:48
weihan joined
|
|||
konobi | pmurias: to avoid npm from doing silly things like using node_modules in a homedir, make sure that there's a package.json in the folder above node_modules | 16:48 | |
ab6tract | is it even supported outside of core? | ||
sorry to keep harping on this, but it's a blocker on the async Terminal::Print :) | 16:49 | ||
[Coke] | pmurias: macports | 16:50 | |
psch | m: say Any.^can('ASSIGN-POS')[0].candidates[*-1].signature | 16:51 | |
camelia | rakudo-moar 271e84: OUTPUT«($: **@indices, *%_)» | ||
psch | interestingly that doesn't have a defined invocant in CORE... | ||
ab6tract | ooof... what does $: mean in that signature? | 16:52 | |
psch | ab6tract: it's an anonymous invocant | ||
ab6tract | psch: m: class A { has @!a; method ASSIGN-POS(**@b) { my $v = @b.pop; @!a[ @b[0],@b[1] ] = $v }; method AT-POS(**@b) { @!a[ @b[0], @b[1] ] } }; my $t = A.new; $t[6;7] = "fooo"; dd $t[6;7] | ||
erm | 16:53 | ||
m: m: class A { has @!a; method ASSIGN-POS(**@b) { my $v = @b.pop; @!a[ @b[0],@b[1] ] = $v }; method AT-POS(**@b) { @!a[ @b[0], @b[1] ] } }; my $t = A.new; $t[6;7] = "fooo"; dd $t[6;7] | |||
camelia | rakudo-moar 271e84: OUTPUT«("fooo", Any)» | ||
ab6tract | psch: ^^ | ||
m: m: class A { has @!a; method ASSIGN-POS(**@b) { my $v = @b.pop; $v.WHAT.say @!a[ @b[0],@b[1] ] = $v }; method AT-POS(**@b) { @!a[ @b[0], @b[1] ] } }; my $t = A.new; $t[6;7] = "fooo"; dd $t[6;7] | |||
camelia | rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FV6_5Rbx67Two terms in a rowat /tmp/FV6_5Rbx67:1------> 3-POS(**@b) { my $v = @b.pop; $v.WHAT.say7⏏5 @!a[ @b[0],@b[1] ] = $v }; method AT-PO expecting any of: infix infi…» | ||
ab6tract | m: m: class A { has @!a; method ASSIGN-POS(**@b) { my $v = @b.pop; $v.WHAT.say; @!a[ @b[0],@b[1] ] = $v }; method AT-POS(**@b) { @!a[ @b[0], @b[1] ] } }; my $t = A.new; $t[6;7] = "fooo"; dd $t[6;7] | ||
camelia | rakudo-moar 271e84: OUTPUT«("fooo", Any)» | ||
psch | ab6tract: CORE adds the last element seperately | 16:54 | |
or assigns, rather | |||
ab6tract | psch: ^^ that's following what I found in src/core/Array.pm | 16:55 | |
konobi | pmurias: seems like that build structure is kinda wonky for npm | ||
psch | ab6tract: oh, i was looking at Any | ||
dalek | pan style="color: #395be5">perl6-examples: 4b3170e | moritz++ | categories/games/blackjack.p6: Fix blackjack.p6 closes #35 |
16:56 | |
ab6tract | ' self.AT-POS(@indices) = value' ... curious | ||
16:56
weihan left
|
|||
ab6tract | psch: a bit surprised not to be finding this stuff in Positional | 16:57 | |
I'll look into Any.pm | |||
nine | ab6tract: array_slice.pm | ||
ab6tract | thanks nine! nice to read you btw | 16:58 | |
mayuresh | alrighty, time for me to hit bed. | ||
pmurias | konobi: what would be the sane way of doing the build? | ||
mayuresh | thanks for the healthy discussion people. | 16:59 | |
pmurias | konobi: or is just having package.json enough? | ||
mayuresh | it has been a pleasure chatting with you all. :) | ||
TimToady | sleep well | ||
mayuresh | mr. wall!! | ||
cool. | |||
konobi | pmurias: lemme see if I can build this locally | ||
mayuresh | sure, yes, will. :) | ||
TimToady | you should try to avoid excitement at bedtime :) | 17:00 | |
mayuresh | :D | ||
it's unavoidable. ;) | |||
bye. :) | |||
17:00
mayuresh left
|
|||
nine | ab6tract: likewise :) | 17:00 | |
ab6tract | nine: so am I to read this as: the answer is BIND-POS ? ;P | 17:01 | |
17:02
Ven left
|
|||
dalek | kudo/nom: 82d4eac | lizmat++ | src/core/ (2 files): Make X::Adverb::Slice more general as X::Adverb |
17:02 | |
pan style="color: #395be5">perl6-examples: 62bfdc9 | moritz++ | categories/games/tictactoe.p6: GLR-Fixes for tictactoe.p6, closes #34 |
|||
konobi | pmurias: any nqp-js specific args to Configure.pl? | ||
dalek | ast: a367d98 | lizmat++ | S (3 files): Handle X::Adverb::Slice -> X::Adverb conversion |
17:03 | |
pmurias | --backends=moar,js | ||
konobi | ta | ||
ab6tract | pmurias: you are awesome :) | ||
pmurias | konobi: ta? | 17:04 | |
konobi | pmurias: "thanks" | 17:05 | |
pmurias | ok :) | ||
dalek | pan style="color: #395be5">perl6-examples: 6bbe840 | moritz++ | categories/games/wizard.pl: Avoid a warning in wizard.pl no fix the the actual problems yet |
||
moritz | uhm, did wizard.pl ever work? | 17:06 | |
nine | ab6tract: sorry, network is laggy as hell. Am not really sure what you're trying to do, but array_slice.pm contains an important part of the code dealing with...well array slices ;) | 17:07 | |
konobi | pmurias: the "sleep" module probably wants to be updated to use "bindings" | 17:09 | |
pmurias | it doesn't build? | 17:10 | |
ab6tract | nine: I'm trying to write a multi-dim ASSIGN-POS for a class. I can't just use a 'handles' trait because I want to use the ASSIGN-POS sub to send them into a supply | ||
konobi | it does... but you'll never get a debug build that way | ||
dalek | pan style="color: #395be5">perl6-examples: 5296582 | moritz++ | categories/games/wizard.pl: Partial fix for wizward.pl this cannot have worked for a looong time. There were type constraints that had no chance of ever working, so it must be from a type before we enforced attribute type checks. |
17:11 | |
nine | ab6tract: I guess you'll need to implement a couple other methods like EXISTS-POS | ||
17:11
margeas left
|
|||
konobi | pmurias: so basicially "node_modules" is the build output for the js backend? | 17:11 | |
ab6tract | nine: ok, I've got AT-POS already | ||
pmurias | yes | ||
konobi: the sleep module is just something I found on npm | 17:12 | ||
dalek | kudo/p6for_op: ee8b0cb | (Stefan Seifert)++ | src/Perl6/Actions.nqp: Work in progress: p6for desugar op Move some <for> logic into a desugar op for easier handling by the optimizer. S04-statements/for.rakudo.moar fails Need to do the same for statement modifier <for>, too. |
17:13 | |
ab6tract | nine: from a class composition standpoint, though, the absolute most ideal situation would be to be able to define something like: method ASSIGN-POS($x,$y,$val) | ||
konobi | pmurias: mkay... i'd suggest an nqp-js directory with node_modules inside it... then you can add package.json in there, specify required dependencies (including elsewhere on the filesystem) | 17:14 | |
ab6tract | if I only want to provide two-dimensional interaction with my object | ||
nine | ab6tract: sure. As long as we keep the hot paths fast :) Array interaction is kind of important in Perl ;) | 17:15 | |
Have to leave now... cya | |||
konobi | pmurias: (even running `npm init nqp-js` should give a reasonable layout) | 17:16 | |
ab6tract | nine: still getting the same ol' error. "Cannot assign to a readonly variable or a value". AT-POS works fine though | 17:17 | |
pmurias | konobi: that nqp-js directory should then be used as the build output? | 17:18 | |
konobi | pmurias: yup... and I'd have a lib directory and put the generated JS files in there | 17:19 | |
ab6tract | nine: even stranger, ASSIGN-POS works fine during subemethod BUILD | ||
nine: gist.github.com/ab5tract/bb20ff79dddf965febe4 | 17:20 | ||
in case it piques your interest | |||
pmurias | konobi: is npm expected to rebuild all my dependencies everytime I run npm install src/vm/js/nqp-runtime? | 17:21 | |
ab6tract | ... doh | ||
konobi | not all of them | ||
ab6tract | nope, nevermind. Not a 'doh' after all. Storying a container in the @!grid during BUILD doesn't change anything | 17:23 | |
konobi | pmurias: if you declare nqp-runtime as a local fs dependency... then `npm install .` will rebuild all | ||
17:23
n0tjack left
|
|||
pmurias | konobi: it rebuilds things such as sleep | 17:24 | |
17:24
duncan_dmg left
17:25
uruwi left
|
|||
konobi | pmurias: yeah, sorta the nature of the npm beast | 17:29 | |
17:31
n0tjack joined,
pfhork joined
|
|||
pfhork | is there a similar perl5 channel? | 17:31 | |
konobi | pmurias: though you could use npm link to avoid that | ||
pmurias | pfhork: there is a #perl channel for Perl 5 questions | 17:34 | |
konobi | but that's on irc.perl.org | ||
[Coke] | konobi: there's a #Perl on freenode, also. | 17:35 | |
konobi | oh right | ||
pfhork | thanks; I didn't know my way around the irc commands and listing channels and such (links to ref/docs accepted). ttyl | 17:36 | |
pmurias | konobi: #perl on freenode is the one where you want to ask questions on | 17:37 | |
dalek | rl6-roast-data: 43e9e89 | coke++ | / (9 files): today (automated commit) |
||
17:38
Kogurr joined
|
|||
konobi | pmurias: yeah... just depends if you're looking for p5porters style channel | 17:38 | |
[Coke] | pmurias: one failure in nqp-js on the last run: | ||
17:38
n0tjack left
|
|||
dalek | kudo/nom: 80112e1 | lizmat++ | src/core/Any-iterable-methods.pm: Introduce :k/v/kv/p adverbs for List.grep :k is equivalent to current grep-index in fact, grep-index just now calls grep(:k) :kv generates a list for use in for @a.grep(:kv) -> \k, \v {} :p generates a list for use in for @a.grep(:p) -> \pair {} :v is just a synonym for no adverb at all The :k, :kv and :p adverbs can also be negated: it will just act as if no adverb was specified (handy for variable :k($force-key) case) A negated :v will cause a failure, as well as any combination of :k, :kv, :p or :v, or any unrecognized adverb. grep-index is now also between 1.5 and 2x faster. |
17:38 | |
[Coke] | github.com/coke/perl6-roast-data/b...y.out#L143 | ||
17:38
n0tjack joined,
AlexDaniel joined
|
|||
[Coke] | rakudo-jvm horribly borked. | 17:38 | |
konobi | tap would be a devDependency | 17:39 | |
[Coke] | rakudo-moar and moar-jit failing differently on require tests. | ||
konobi | (from npm that is) | ||
[Coke] | still getting random failures on S17 tests. :( | ||
pmurias | [Coke]: thanks, I forgot to add a dependency | 17:40 | |
konobi | yay for tap | ||
lizmat | [Coke]: in parallel testing, or also just by themselves ? | 17:42 | |
[Coke] | the daily runs don't do parallel. | 17:43 | |
even in ||, our S17 tests shouldn't be failing. | |||
(like, it's worse if they only fail then!) | |||
oh, wait, moar jit is working, moar-nonjit is dead. | |||
doing a local build to see if I can duplicate the issue. | 17:44 | ||
17:44
^elyse^ left,
llfourn joined
17:45
hohoho joined,
spider-mario joined
17:47
kmel joined
17:49
llfourn left
|
|||
dalek | kudo/nom: 8a8bf63 | lizmat++ | src/core/Any-iterable-methods.pm: Make sub grep() and sub grep-index() also work |
17:49 | |
17:49
hohoho left
|
|||
dalek | ecs: eb42709 | TimToady++ | S (11 files): remove mentions of Parcel/parcel |
17:50 | |
17:51
uruwi joined
|
|||
[Coke] | looks like it died on Error while constructing error object:Could not locate compile-time value for symbol X::Syntax::ConditionalOperator::PrecedenceTooLoose | 17:58 | |
but I cannot duplicate it locally right now. | |||
17:58
tokuhiro_ joined
18:03
tokuhiro_ left
18:05
ab6tract left
|
|||
[Coke] | down to 61 test files in roast that aren't part of spec or stress test. | 18:06 | |
is t/spec/S05-grammar/std.t reasonable? | 18:07 | ||
kmel | hello | 18:08 | |
[Coke] | kmel: hio | 18:09 | |
18:09
vendethiel joined
|
|||
kmel | hi [Coke] | 18:10 | |
I was wondering what editors do you use for Perl 6? | |||
PerlJam | kmel: vi(m) | 18:11 | |
boggard | notepad | 18:12 | |
18:12
pfhork left
|
|||
lizmat | m:dd <a b c>.grep(Str,:k) | 18:12 | |
m: dd <a b c>.grep(Str,:k) | |||
camelia | rakudo-moar 82d4ea: OUTPUT«("a", "b", "c").Seq» | ||
[Coke] | m: END: { say "end"}; say "mid" ; BEGIN: { say "beg"; exit} | 18:13 | |
camelia | rakudo-moar 82d4ea: OUTPUT«endmidbeg» | ||
uruwi | Atom | ||
lizmat | PerlJam: should soon say 1,2,3 | ||
kmel | vim!! I am jealous. i never learned how to use it. | ||
[Coke] | ^^ should that print mid? | ||
PerlJam | lizmat++ | ||
[Coke] | m: END { say "end"}; say "mid" ; BEGIN { say "beg"; exit} | ||
camelia | rakudo-moar 82d4ea: OUTPUT«beg» | ||
kmel | uruwi : i am using atom too | ||
[Coke] | er, I meant that, because there's a test where the END doesn't seem to run. | ||
uruwi | Prefer it to Notepad++ now | ||
[Coke] | t/spec/S04-phasers/exit-in-begin.t | 18:14 | |
uruwi | Only thing keeping me from using it all the time is Danmakufu :P | ||
lizmat | [Coke]: so what was the difference ? | ||
kmel | Danmakufu? | ||
lizmat | END: as a label ? | ||
[Coke] | no, that was a typo on my part. | ||
trying to golf it now. | |||
kmel | i use n++ when i am on windows | 18:15 | |
uruwi | kmel dmf.shrinemaiden.org/ | ||
[Coke] | m: END {say 2}; BEGIN {exit}; | 18:16 | |
camelia | ( no output ) | ||
[Coke] | ^^ there, that's the golf. | ||
test assumes exit in BEGIN still allows END's to run. | |||
lizmat | [Coke]: well, not running would make sense if the exit was in the *first* BEGIN block seen | 18:17 | |
18:17
ab6tract joined
18:18
n0tjack left
|
|||
lizmat | otherwise, other BEGIN blocks may have set things up that are expected to be handled by END blocks also already set up | 18:18 | |
[Coke] | m: END {say 2}; BEGIN {""}; BEGIN {exit}; | ||
camelia | ( no output ) | ||
[Coke] | I wouldn't expect the order of begin blocks to impact if any end blocks were run | ||
lizmat | well, BEGIN blocks *are* executed in order seen, no ? | 18:19 | |
I mean, they're executed immediately | |||
PerlJam | aye | ||
[Coke] | Sure, but why should that impact END blocks? | ||
uruwi | But why doesn't the same thing happen when you put the colons in? | ||
[Coke] | either an exit stops processing immediately, or END blocks are still run. | 18:20 | |
lizmat | uruwi: because then they're just labels | ||
uruwi | Ah | ||
[Coke] | uruwi: yah, that was a typo on my part, apologies. | ||
lizmat | exit is supposed to run ENC blocks, afaik | ||
uruwi | Suggest not allowing BEGIN and END as label names. | ||
[Coke] | ok. Will ticket it, fudge the test file, and add it to the spectest run. | 18:21 | |
18:21
n0tjack joined
|
|||
uruwi | Also does anyone else think tau should be a built-in constant? | 18:21 | |
[Coke] | nope. | ||
uruwi | I know there's a module for it, but I don't feel like saying "use Math::Tau" just to use it | ||
[Coke] | we've already had that discussion. and it's dead simple to add it in your code. | ||
PerlJam | uruwi: constant tau = 2 * pi; # done :) | 18:22 | |
uruwi | :P | ||
[Coke] | ... I am surprised to find that someone put a module for that out there. | 18:23 | |
n0tjack | m: constant τ = 2*pi; say τ; | 18:24 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«6.28318530717959» | ||
n0tjack | m: constant τ = 2*π; say τ; | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«6.28318530717959» | ||
18:24
loren left
|
|||
n0tjack | heh, of course π is predefined | 18:24 | |
[Coke] | uruwi: irclog.perlgeek.de/perl6/2014-04-29#i_8653594 | 18:25 | |
TimToady | m: constant τ = 2 * π; say τ; | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«6.28318530717959» | ||
[Coke] | m: say e**(i*π); | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«-1+1.22464679914735e-16i» | ||
TimToady | oh, you did that already :) | ||
18:26
Hor|zon left
|
|||
uruwi | m: import Math::Tau; say tau; | 18:26 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/OeP5t4D3tkCould not find module Math::Tau to import symbols fromat /tmp/OeP5t4D3tk:1------> 3import Math::Tau7⏏5; say tau;» | ||
uruwi | m: use Math::Tau; say tau; | 18:27 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«===SORRY!===Could not find Math::Tau in any of: file#/home/camelia/.perl6/2015.09-393-g8a8bf63/lib inst#/home/camelia/.perl6/2015.09-393-g8a8bf63 file#/home/camelia/rakudo-inst-2/share/perl6/lib file#/home/camelia/rakudo-inst-2/share/per…» | ||
[Coke] | uruwi: m has no modules to speak of. star: has some, but not that one. | ||
TimToady | m: say e**π\i; | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«-1+1.22464679914735e-16i» | ||
TimToady | star: use Math::Tau; say tau; | ||
camelia | star-m 2015.09: OUTPUT«===SORRY!===Could not find Math::Tau in any of: file#/home/camelia/.perl6/2015.09/lib inst#/home/camelia/.perl6/2015.09 file#/home/camelia/star-2015.09/share/perl6/lib file#/home/camelia/star-2015.09/share/perl6/vendor/lib file#/home/cam…» | ||
uruwi | Since when did Perl6 have a backslash operator? | ||
PerlJam | uruwi: you can probably guess that I would not mind it if tau were built-in, but I also have no strong feeling on the matter. | 18:28 | |
[Coke] | I was going to show my kid how to find an approximate fraction for pi using perl6 last night, but she ran away. | ||
TimToady | it's not an operator, it's just a degenerate unspace | ||
[Coke] | m: \s\a\y 3; #should fail | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zxQJL9pteeMalformed replacement part; couldn't find final \at /tmp/zxQJL9ptee:1------> 3\s\a\y 3; #should fail7⏏5<EOL> expecting any of: infix stopper» | ||
uruwi | m: say e**πi | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lFz7BgNVs_Undeclared routine: πi used at line 1» | ||
TimToady | m: say e**(π)i; | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«-1+1.22464679914735e-16i» | ||
uruwi | m: say 2 π | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QFHNSz2zf9Two terms in a rowat /tmp/QFHNSz2zf9:1------> 3say 27⏏5 π expecting any of: infix infix stopper postfix statement end statement …» | ||
TimToady | parens work too, but are twice as long | ||
uruwi | m: say 2(π) | 18:29 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«Cannot find method 'CALL-ME' in block <unit> at /tmp/WBGsTNnC1u:1» | ||
uruwi | m: say (2)π | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hxW79JqLrWTwo terms in a rowat /tmp/hxW79JqLrW:1------> 3say (2)7⏏5π expecting any of: infix infix stopper postfix statement end statement…» | ||
TimToady | it's i that's the operator here | ||
uruwi | Aaaah | ||
18:29
rurban left
|
|||
TimToady | it's just you don't need the \ when you say 42i | 18:29 | |
18:31
sufrostico left
|
|||
TimToady | m: sub postfix:<π>($n) { $n * π }; say 2π | 18:33 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«6.28318530717959» | ||
TimToady | so one could do the same trick with π | ||
m: sub postfix:<π>($n) { $n * π }; say i\π R** e | 18:34 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«-1+1.22464679914735e-16i» | ||
TimToady | but that way lies madness :) | 18:35 | |
18:35
Hor|zon joined
|
|||
TimToady | or at least irrationality :) | 18:35 | |
PerlJam | Math::Tau seems fairly ridiculous as far as modules go, but perhaps a More::Math module that had a bunch of useful mathematical constants and operators and such would be nice. | 18:36 | |
ab6tract | interesting.. gist does not support directories, and AFAICT use lib does not support '.' with 'Foo::Bar::Nest' in a single file called Foo-Bar-Nest.pm6 | 18:37 | |
18:38
uruwi left
|
|||
kmel | anyone tried head numbers in pod? | 18:38 | |
i can't make it work | |||
i tried design.perl6.org/S26.html#Numbered_headings but no luck | 18:39 | ||
PerlJam doubts that any such configuration works yet | |||
vendethiel explained TimToady++'s RosettaCode/Mad Libs | 18:41 | ||
ab6tract | ah ha! use lib './' | ||
:) | |||
vendethiel | three times today. that was fun :P. | ||
18:42
uruwi joined,
edehont joined
|
|||
n0tjack | in J, the easiest way to get a harmonic series is - reduce (1,2,3,4) , because that translates to 1-2-3-4 in J, which executes RTL, thus 1-(2-(3-(4))). I can't seem to find a succinct way to do the same in P6. None of [-], [-] reverse, [R-], or [R-] reverse does what I want. | 18:43 | |
I even tried map *+-*, (1,2,3,4), no joy | |||
sorry, not harmonic, I forget the term for a+b-c+d-e+f | 18:44 | ||
psch | that's harmonic iff a > b > c > d > e > f | 18:45 | |
(with abs() around every letter) | |||
uruwi | m: [-] (1, 2, 3, 4) | ||
camelia | ( no output ) | ||
n0tjack | yeah, but I think there's a specific term for alternating sum and difference, but it escapes me | ||
uruwi | m: say [-] (1, 2, 3, 4) | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«-8» | ||
n0tjack | that should be -2 | 18:46 | |
uruwi | m: say [R-] (1, 2, 3, 4) | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«-2» | ||
uruwi | m: say [-] reverse (1, 2, 3, 4) | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«-2» | ||
uruwi | What's the problem? | ||
n0tjack | huh, I really thought I tried [R-] | ||
PerlJam | n0tjack: um ... I think it's just called an alternating series. | ||
ab6tract | self contained multi dim ASSIGN-POS question: gist.github.com/ab5tract/bb20ff79dddf965febe4 | ||
AlexDaniel | what does that R mean? | 18:47 | |
uruwi | Reverse I suppose | ||
PerlJam | AlexDaniel: "reverse the operands" | ||
[Coke] | reverse. | ||
AlexDaniel | hm, are there any other features like R? | ||
uruwi | ab6tract, is that example from Terminal::Print? | 18:48 | |
apparently my first instinct in typing Terminal::Print is to spell Terminal with 2 L's | |||
n0tjack | m: say [R-] 1 2 3 4 5 6; | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lN_PwATU75Two terms in a rowat /tmp/lN_PwATU75:1------> 3say [R-] 17⏏5 2 3 4 5 6; expecting any of: infix infix stopper postfix statement end …» | ||
PerlJam | AlexDaniel: they're called meta-ops and there are several | ||
n0tjack | m: say [R-] (1,2, 3, 4, 5, 6); | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«-9» | ||
psch | m: my @s = -1/1, 1/1, -(1/(1 + (*.denominator))) ... *; say @s[^10] | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(-1 1 -0.5 -0.333333 -0.25 -0.2 -0.166667 -0.142857 -0.125 -0.111111)» | ||
n0tjack | m: say (1 - 2 + 3 - 4 + 5 - 6); | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«-3» | ||
psch | m: my @s = -1/1, 1/1, -(1/(1 + (*.denominator))) ... *; .Rat.say for @s[^10] | 18:49 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«-11-0.5-0.333333-0.25-0.2-0.166667-0.142857-0.125-0.111111» | ||
psch | m: my @s = -1/1, 1/1, -(1/(1 + (*.denominator))) ... *; .perl.say for @s[^10] # still not pretty :/ | 18:50 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«-1.01.0-0.5<-1/3>-0.25-0.2<-1/6><-1/7>-0.125<-1/9>» | ||
PerlJam | AlexDaniel: See S03:4127 | ||
synbot6 | Link: design.perl6.org/S03.html#line_4127 | ||
psch | eh, and sign-confusion | ||
n0tjack | uruwi: ^^ that's the problem. I need the rightmost op to always be - . With [R-] and even-parity series, it's + . | ||
m: say [R-] (1,2, 3, 4, 5, 6,0); | 18:51 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«-21» | ||
uruwi | Simply create a list of signs | ||
AlexDaniel | PerlJam: | ||
oops | |||
n0tjack | uruwi: at that point, I'd be better off just writing a loop | 18:52 | |
uruwi: I was hoping for somethign succinct, like [-] or [R-] or even [R-] reverse, etc. | |||
AlexDaniel | PerlJam: now I see that I'm actually familiar with the rest, it's just that I've never seen R | ||
n0tjack | AlexDaniel: There's others, like Z. For example, (100,10,1) Z* (1,2,3) | ||
AlexDaniel | n0tjack: yeah :) | 18:53 | |
n0tjack | oops, sorry, see you said that already :) | ||
PerlJam | AlexDaniel: weird ... we're always doing stuff with X, Z, and R. S is usually the one that surprises people | ||
18:53
Hor|zon left
|
|||
AlexDaniel | PerlJam: Well, I'm not sure if there are many times you might want to use S in user code | 18:54 | |
I might be wrong though | |||
PerlJam: yet R seems to be very useful | |||
ab6tract | uruwi: it's from my async branch, ues | 18:55 | |
*yes | |||
uruwi | Terminal::Print just deals with printing, doesn't it? | 18:56 | |
AlexDaniel | and of course, I just could not resist to do this | ||
ab6tract | if this works out right, the only functional difference in the API will be that you use [ ; ] instead of [ ][ ] | ||
AlexDaniel | m: say [RRRRRRRRRRRRRRRRRRRRRRR-] [1, 2, 3, 4]; | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«-2» | ||
AlexDaniel | rrr! | ||
ab6tract | it should be *much* faster | ||
especially the creation of new grids | |||
uruwi | And the new syntax for grid access is much cleaner too! | ||
But what about fullwidth characters? | 18:57 | ||
Wait, you're just dealing with character-by-character output. | |||
18:57
^elyse^ joined
|
|||
n0tjack | m: infix:</>(1,*)>>(1,2,3); # How do I do reciprocal? | 18:58 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«Cannot call METAOP_HYPER_POSTFIX(Num, Int, Int, Int, Int); none of these signatures match: (\obj, \op) (\obj, @args, \op) (\obj, \args, \op) in block <unit> at /tmp/NkKwdBIc4W:1» | ||
18:59
apotheon left
|
|||
uruwi | m: say 1/>>(1, 2, 3); | 18:59 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sdx1CueAwuMissing infix inside HYPERat /tmp/sdx1CueAwu:1------> 3say 1/>>7⏏5(1, 2, 3); expecting any of: infix infix stopper» | ||
uruwi | m: say 1>>/>>(1, 2, 3); | 19:00 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qrms93_00OMalformed postfixat /tmp/qrms93_00O:1------> 3say 1>>7⏏5/>>(1, 2, 3); expecting any of: postfix» | ||
uruwi | m: say 1 >>/>> (1, 2, 3); | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«Lists on either side of non-dwimmy hyperop of infix:</> are not of the same lengthleft: 1 elements, right: 3 elements in block <unit> at /tmp/g1Xw82_NnM:1» | ||
uruwi | m: say 1 <</<< (1, 2, 3); | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(1 0.5 0.333333)» | ||
psch | m: sub postfix:['⁻'] { 1 / $^a }; say 5⁻ | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«0.2» | ||
uruwi | ta-da | ||
19:00
ab6tract left
|
|||
PerlJam | you can remember which of >> or << to use by always putting the fat end to the listy thing and the pointy end to the single-valued thing. | 19:01 | |
19:01
skids joined
|
|||
AlexDaniel | m: [SR-] | 19:02 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«===SORRY!===Unknown QAST node type NQPMu» | ||
uruwi | Or spear one side to make it DWIM. | ||
19:02
PsuzeannePsy joined
|
|||
FROGGS_ | AlexDaniel: that one is rakudobuggable | 19:02 | |
AlexDaniel | FROGGS_: as LTA, right? | 19:03 | |
FROGGS_ | it leeks internal stuff without telling what's wrong, yes | ||
psch | m: say 5 S- 5 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«Cannot find method 'CALL-ME' in block <unit> at /tmp/0v5aaysYOc:1» | ||
PerlJam | I don't think S is fully implemented either | ||
psch | is meta S even implemented? | ||
... :) | |||
PerlJam | m: [S-] | 19:04 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«Method 'count' not found for invocant of class 'Int' in block <unit> at /tmp/iOpHdjInm7:1» | ||
n0tjack | uruwi: ah, never thought of <</<< | ||
PerlJam: That's a helpful tip. Thank you. | 19:05 | ||
19:05
SuzieQueue left
19:06
apotheon joined,
skids left
19:07
skids joined
|
|||
AlexDaniel | oh great, just misspelled "leaks" | 19:07 | |
psch: well, if not, then perhaps it should show NYI warning? | 19:08 | ||
psch | AlexDaniel: i'm not saying having an RT is a bad idea | 19:09 | |
AlexDaniel | psch: :) | ||
19:17
diana_olhovik_ joined
|
|||
kmel | excluding rendering it to html using pod::to::html. How can one view the pod files? | 19:17 | |
19:18
mattprelude joined
|
|||
[Coke] | theoretically, perl6/doc's p6doc (though it's dying for me here trying to use it) | 19:19 | |
perl6 --doc path/to/file.pm works | |||
kmel | i can't install p6doc | 19:21 | |
[Coke] thanks perl6 --doc works | |||
TimToady | the easiest way to remember which way to put the >> is to use X instead | 19:22 | |
then you can drop the parens too | 19:23 | ||
m: say 1 X/ 1,2,3 | |||
camelia | rakudo-moar 8a8bf6: OUTPUT«(1 0.5 0.333333)» | ||
19:23
ab6tract joined,
diana_olhovik_ left
|
|||
TimToady | but for some reason people never think of the degenerate X case with a scalar on one side | 19:24 | |
19:24
apotheon left
|
|||
vendethiel | m: say 1 Z/ 1, 2, 3 | 19:25 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«(1)» | ||
vendethiel | hah, yeah | ||
ab6tract | uruwi: we can support wide character's as well. not sure what the best way will be but it shouldn't be too hard to wire up | ||
TimToady | ab6tract: when I was playing with forest fire, I found [$i;$j] is considerable slower than [$i][$j] so far | ||
presumably it'll get optimized though | |||
19:26
edehont left
|
|||
uruwi | ab6tract is there any reason you have to use [$i;$j]? | 19:26 | |
ab6tract | re: "just about printing", it's designed to allow the construction of higher level 'text ui' libraries. so it should also be able to handle input in the way you want as well | ||
[Coke] | TimToady: I use the degenerate X all the time when trying to solve ken ken puzzles! :) | ||
ab6tract | TimToady: interesting.. in my case I would construct Column objects which would construct Cell objects.. it was all a bit over designed | 19:27 | |
creating a new grid object could take a second or more | |||
uruwi: well, we could still create columns as individual classes, I guess | |||
it's also that I want to document the multi dim ASSIGN-POS as well :) | 19:28 | ||
and to shake it down for robustness in ecosystem code | |||
19:28
jkva joined
|
|||
ab6tract | uruwi: the [ $x][$y] form existed because grid had *-POS to columns which had *-POS to cells. do you prefer the [][] syntax? I guess we could keep it without too much trouble whatsoever | 19:30 | |
19:30
weihan joined
|
|||
uruwi | Well, TimToady says that the [;] syntax is slower. | 19:30 | |
ab6tract | to that end, are you finding the library useful in your rogue quest? | ||
uruwi | I haven't tried it yet | ||
ab6tract | fair enough :) | ||
it will definitely take care of the 'keys echo characters' case | 19:31 | ||
19:31
rindolf left
|
|||
FROGGS_ | jnthn++ # blog | 19:31 | |
19:32
jkva left
19:33
skids left
|
|||
ab6tract | but there is currently no API for registering input key stokes. that is a relatively complex story in it's own right, but I think it could be added pretty easily with supplies. | 19:34 | |
uruwi | I think I solved the problem github.com/bluebear94/messing-arou...er/kbd.pl6 | 19:35 | |
n0tjack | m: say 1,-2,3,-4 ... 10; # :( | 19:36 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«===SORRY!===Unable to deduce arithmetic or geometric sequence from -2,3,-4 (or did you really mean '..'?)» | ||
19:36
^elyse^ left
|
|||
[Coke] | m: (1..10).map({state $a = -1; $a *= -1; $a*$_}).say | 19:40 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«(1 -2 3 -4 5 -6 7 -8 9 -10)» | ||
[Coke] | seems like we should be able to golf that to a $ instead of a state $a | 19:41 | |
n0tjack | m: map {$_ * (-1) ** (+$_%2)}, (1..10); | ||
camelia | ( no output ) | ||
n0tjack | m: say map {$_ * (-1) ** (+$_%2)}, (1..10); | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(-1 2 -3 4 -5 6 -7 8 -9 10)» | ||
psch | %% | 19:42 | |
m: say map {$_ * (-1) ** (+$_%%2)}, (1..10); | |||
camelia | rakudo-moar 8a8bf6: OUTPUT«(1 -2 3 -4 5 -6 7 -8 9 -10)» | ||
n0tjack | I didn't need that + | ||
[Coke] | %% works, but only on the original sequence. | ||
psch | well, or not, depending on whether you want -1 or not | ||
n0tjack | I think of $_%2 as a Bool, but obviously it isn't | ||
psch: For mod 2, %% is overkill | 19:43 | ||
[Coke] | m: (1..10).map({state$a=-1;$a*=-1;$_*$a}).say # look at all the whitespace I can skip. | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(1 -2 3 -4 5 -6 7 -8 9 -10)» | ||
n0tjack | psch: It would be helpful for mod 3+ | ||
psch shrugs | 19:44 | ||
n0tjack | m: say map{$_*(-1)**(+$_%2)},(1..10); | ||
19:44
llfourn joined
|
|||
camelia | rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/amSq_F4cwyCalling map() will never work with any of these multi signatures: (&code, + is raw)at /tmp/amSq_F4cwy:1------> 3say 7⏏5map{$_*(-1)**(+$_%2)},(1..10);» | 19:44 | |
n0tjack | heh | ||
TimToady | m: say (1,-1,1) Z* 1..* | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(1 -2 3)» | ||
TimToady | m: say (1,-1,1...* Z* 1..* | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nnvkUzdYA4Operators '...' and 'Z*' are non-associative and require parenthesesat /tmp/nnvkUzdYA4:1------> 3say (1,-1,1...* Z7⏏5* 1..* expecting any of: infix infix stopp…» | ||
TimToady | m: say (1,-1,1...*) Z* 1..* | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(...)» | ||
TimToady | m: .say for (1,-1,1...*) Z* 1..* | 19:45 | |
n0tjack | don't you want 1 xx * ? | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(timeout)1-23-45-67-89-1011-1213-1415-1617-1819-2021-2223-2425-2627-2829-3031-3233-3435-3637-3839-4041-4243-4445-4647…» | ||
TimToady | Z* 1 xx * is a no-op | 19:46 | |
n0tjack | I would have thought (blah) Z* 1 xx *; would turn the whatever into "as many elems as (blah)" | ||
TimToady | it does, but multiplying everything by 1 does nothing | 19:47 | |
19:47
skids joined
|
|||
TimToady | m: .say for |(1,-1) xx * Z* 1..20 | 19:48 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«1-23-45-67-89-1011-1213-1415-1617-1819-20» | ||
n0tjack | oh, I see, 1..* isn't 1,1,1,1,1, it's 1,2,3,4 | ||
don't know why I thought otherwise | |||
19:48
llfourn left
|
|||
n0tjack | m: say 4 * [+] map *+-*, (1 X/ (1,3,5,7 ... 25e3)); | 19:50 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«3.14151265358992» | ||
19:51
Hor|zon joined
|
|||
n0tjack | m: say 4 * [+] (1,-1,1 ... *) Z* (1 X/ (1,3,5,7 ... 25e3)); | 19:51 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«3.1415126535899» | ||
n0tjack | Whatever code is cute. | ||
TimToady | that one doesn't converge very fast... | ||
n0tjack | no, but it's short | 19:52 | |
TimToady | testing against a floater is kind of a steep price to pay for saving one char over 25000 | 19:53 | |
19:54
zakharyas joined
|
|||
n0tjack | where is the test? | 19:54 | |
TimToady | 1,3,5,7 ... 25e3 | 19:55 | |
ab6tract | uruwi: nice! | ||
n0tjack | there's a test in there? | ||
FROGGS_ | the endpoint | ||
TimToady | how do you suppose it stops? | ||
ab6tract | I think you should wrap that in a module and ship it :) | ||
19:55
telex left,
Hor|zon left
|
|||
uruwi | ab6stact I'm mainly waiting for Terminal::Print to be documented, though | 19:55 | |
n0tjack | TimToady: fair point, hadn't occured to me. | ||
TimToady: Though I suppose if you impute the function, you could try to invert it. | 19:56 | ||
TimToady | there's another function hiding in there as well, since it intuits a *+2 for you | ||
19:56
telex joined,
Peter_R joined
|
|||
ab6tract | fair enough. | 19:57 | |
TimToady | n0tjack: this is the first time that's come up, so I think the demand is too low to make it a DWI | ||
*M | |||
19:57
zakharyas left
|
|||
n0tjack | I wouldn't implement function inversion just to make ... more efficient. | 19:57 | |
But it's really useful in functional programming for broader purposes | |||
ab6tract | how to pass 'self' to the constructor of another another object? | 19:58 | |
19:59
zakharyas joined,
kmel left
20:00
tokuhiro_ joined
|
|||
ab6tract | uruwi: your work could easily go into another module entirely.. Terminal::Input, perhaps? | 20:01 | |
TimToady | nap & | 20:02 | |
uruwi | I'm kind of reluctant since it works only if stty is installed | ||
20:02
dbron joined,
dbron left
|
|||
uruwi | Also a lot of things are hardcoded in the demo | 20:02 | |
20:03
n0tjack left,
n0tjack_ joined,
^elyse^ joined,
margeas joined
|
|||
n0tjack_ | how are identity functions declared? | 20:03 | |
for example, p6 knows +'s identity is 0, and *'s is 1. | 20:04 | ||
can I declare my own identity value for a function? | |||
grondilu | m: say 4 * [+] (1,-1,1 ... *) Z/ (1,3,5,7 ... 25e3); | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«3.1415126535899» | ||
n0tjack_ | grondilu: even better! | ||
20:04
tokuhiro_ left
|
|||
ab6tract | \o/ got it! | 20:04 | |
grondilu | m: say 4 * [+] (1,-1,1 ... *) Z/ (1,3 ... 25e3); | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«3.1415126535899» | 20:05 | |
grondilu | I'm a bit surprised this stops, considering 25e3 is even | ||
psch | n0tjack_: for infix:<+> there's "multi sub infix:<+>($x = 0) { $x.Numeric }" as one candidate | ||
grondilu | m: say (1,3 ... 25e3).elems | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«12500» | ||
grondilu | m: say (1,3 ... 25e3)[*-5] | 20:06 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«24991» | ||
psch | m: say 1, 2, 4 ... 9 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(1 2 4 8)» | ||
grondilu | m: say (1,3 ... 25e3)[*-5..*] | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(24991 24993 24995 24997 24999)» | ||
grondilu | m: say (1,3...10) | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(1 3 5 7 9)» | ||
n0tjack_ | psch: I see, so reduction doesn't apply any fancy logic, each infix can just return the non-identity argument | 20:07 | |
FROGGS_ | aye | ||
n0tjack_ | psch: the reason I was asking was I thought there might be a "has identity" or something trait; I was hoping to extent that idea to "has inverse" | ||
ab6tract | uruwi: what do you use stty for? | 20:08 | |
uruwi | to disable stdin buffering, so keystrokes can go through without pressing Enter | 20:09 | |
20:09
kmel joined,
necrophcodr joined
|
|||
n0tjack_ | what I would like to do is say something like multi sub:infix<log> {$x, $y} has inverse(&infix<exp>) {...} . | 20:09 | |
20:10
FROGGS_ left
|
|||
necrophcodr | is rakudo p5 build.pm broken, or is something missing with the 2015.09 rakudo star distribution? | 20:10 | |
20:10
n0tjack_ is now known as n0tjack
|
|||
psch | n0tjack: not sure how you'd use that | 20:11 | |
[Coke] | necrophcodr: as far as I know the 2015.09 star distro was fine. | ||
necrophcodr | after installing rakudo star 2015.09 and running `panda install v5` it only gets to "Generating build order", and then doesn't go any further. i've had it running for hours. | ||
psch | n0tjack: as in, you'd need some syntax to invert a function first | ||
[Coke] | don't use v5. | ||
20:11
FROGGS joined
|
|||
[Coke] | use Inline::Perl5 | 20:11 | |
necrophcodr | [Coke]: how does that help running v5 scripts? | ||
[Coke] | well, I should phrase that: "are you sure you want v5 and not Inline::Perl5?" | 20:12 | |
20:12
darutoko left
|
|||
n0tjack | psch: I'd want to use it to write a meta-op, call it "under", something like sub under(&foo, *@) { &foo.inverse foo @* }; | 20:12 | |
necrophcodr | i am attempting to use perl6 as a perl5 drop in replacement (i am well aware that it isn't) | ||
lizmat | necrophcodr: it is my understanding that v5 is a project in hibernation | ||
n0tjack | what that would let me do is express things like (silly example) + under log, which is of course * | ||
[Coke] | I don't see any commits on v5 that aren't cleanup since maybe january. | 20:13 | |
So, it could just be that v5's build is borked. Pretty sure the panda that shipped with the last star was ok. | |||
necrophcodr | i haven't had any bad experience with the star 2015.09 distribution either, i just wanted to make sure. | 20:14 | |
lizmat: that could be it. thanks for the help, it is very valuable! | |||
[Coke] | I just tried to run the 00 sanity test in v5, and it dies. | 20:15 | |
20:15
ab6tract left
|
|||
[Coke] | ah. they used src, not lib. | 20:15 | |
m: say EnumMap | |||
camelia | rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9gOKbQcUrZUndeclared name: EnumMap used at line 1» | ||
necrophcodr | i'll have to stick to using only perl5 for now then. i hope that in the future a proper v5 will be out there, in a couple of years. would make my maintainence a lot easier. | ||
[Coke] | ^^ v5 still has that. | ||
there is no current plan for making v5 work, at least on this channel, that I'm aware of. | 20:16 | ||
I think everyone would love it if it -did- work, mind. | |||
necrophcodr | yeah, moving entire codebases isn't always feasible. | ||
n0tjack | necrophcodr: I honestly think of p5 and p6 as separate languages. | 20:17 | |
[Coke] | necrophcodr: right. the plan isn't to have people migrate from 5 to 6. | ||
it was a plan, probably over a decade ago, but that's not the current plan. | |||
psch | m: my &infix:<+> = CORE::('&infix:<+>') but role { method inverse { &infix:<-> } }; sub under(&f where &f.inverse.defined, *@a) { &f.inverse( f( @a ) ) }; | 20:18 | |
camelia | ( no output ) | ||
[Coke] | I opened github.com/rakudo-p5/v5/issues/12 to mention the EnumMap issue. | ||
n0tjack | psch: !!!! | ||
psch | n0tjack: not sure if that does anything useful though... | ||
n0tjack | even that it can be approached is awesome | ||
necrophcodr | [Coke]: i think it may still happen though, through time. although there are certain valuable uses even today, for perl5. with that, i mean mostly the amazing compatability with older perl5 installations. | 20:19 | |
not implying that modern perl5 isn't in itself useful. it is indeed. | |||
20:19
Suzeanne joined
|
|||
psch | n0tjack: it's probably kinda expensive with the role mixin, and i think the parameters of under might be wrong-ish too | 20:19 | |
20:20
lucastheisen joined
|
|||
psch | n0tjack: like, if it should work as "+ under log @a" (or, without macros more like "&infix:<+> under &log, @a") you clearly need two callable parameters | 20:20 | |
n0tjack | psch: To really support it, it'd have to be implemented in the core. Inversion has its merits, but I'm not going to try to argue it should be a near-term priority. | ||
20:20
^elyse^ left
20:21
lucastheisen left
|
|||
psch | n0tjack: i don't know, i think it could work well enough in a module, but probably wants macro support to give closer-to-meta-op syntax | 20:21 | |
20:23
PsuzeannePsy left
|
|||
n0tjack | psch: yeah, the more I play with the lang, the more excited I get for macros | 20:23 | |
20:23
apotheon joined
20:26
colomon left
|
|||
lizmat | m: sub a($a) {}; a IterationEnd #hmmmm | 20:26 | |
20:26
colomon joined
|
|||
camelia | rakudo-moar 8a8bf6: OUTPUT«X::TypeCheck::Binding exception produced no message in sub a at /tmp/wW0MmuULW7:1 in block <unit> at /tmp/wW0MmuULW7:1» | 20:26 | |
lizmat | hmmm... this hangs for me... | 20:27 | |
locally | |||
20:28
colomon left
20:29
colomon joined,
necrophcodr left
|
|||
Hotkeys | is there a reason doc.perl6.org/language/regexes doesn't talk about lazy matching (eg. /.+/ vs /.+?/) | 20:30 | |
or does it and I just don't see it | 20:31 | ||
grondilu | not sure "lazy matching" is the correct expression | ||
Hotkeys | I don't know the right term | ||
grondilu | rather "eager matching" as opposed to "minimal matching" | 20:32 | |
· To force the preceding atom to do frugal backtracking (also sometimes known as "eager matching" or "minimal matching"), append a ":?" or "?" to the atom. If the preceding token is a quantifier, the ":" may be omitted, so "*?" works just as in Perl 5. | |||
Hotkeys | ah | ||
grondilu | ^in S05 | ||
Hotkeys | okay thanks | 20:33 | |
I've seen it talked about as greedy and lazy before | |||
n0tjack | Hotkeys: I have too. | ||
grondilu | r u sure you don't confuse with list evaluation? | ||
20:34
ab6tract joined
|
|||
FROGGS | it is usually called greedy and non-greedy matching | 20:34 | |
20:34
Peter_R left,
zakharyas left
|
|||
FROGGS | lazy is about (potentially infinite) lists | 20:34 | |
n0tjack just tried [max] 1..*; and got exactly what he deserved | |||
FROGGS | :P | ||
Hotkeys | lol | ||
grondilu | m: say [+] 1 .. 10**100; | 20:35 | |
Hotkeys | do you need the square brackets there? (assuming a not-infinite list) | ||
m: say max 1 .. 10 | |||
camelia | rakudo-moar 8a8bf6: OUTPUT«(timeout)» | ||
rakudo-moar 8a8bf6: OUTPUT«10» | |||
psch | m: say + 1..10 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«1..10» | ||
psch | m: say [+] 1..10 | 20:36 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«55» | ||
Hotkeys | you do for + | ||
n0tjack | you do for any dyad | ||
s/dyad/infix/ | |||
Hotkeys | right | ||
bc [] does reduction | |||
psch | m: say &infix:<max> | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«sub infix:<max> (| is raw) { #`(Sub+{<anon|68770224>}+{Precedence}|62511920) ... }» | ||
Hotkeys | but max doesn't need reduction | ||
psch | m: say &max | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«sub max (+ is raw, :&by = { ... }) { #`(Sub|72590472) ... }» | ||
psch | Hotkeys: max is just also a sub that takes a list | ||
grondilu | m: sub prefix:<[+]>(Range $r) { $r.min*($r.max+1)/2 }; say [+] ^10; | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«0» | ||
Hotkeys | ah | 20:37 | |
does it secretly do [max] behind the scenes | |||
n0tjack | I find it weird we have &infix:<max> and &prefix:<max> but no &infix:<log> etc. | ||
psch | m: say &prefix:<max> | 20:38 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9eihiU5CHdUndeclared routine: &prefix:<max> used at line 1. Did you mean '&prefix:<~>', '&prefix:<temp>', '&prefix:<->', '&prefix:<so>', '&prefix:<+>'?» | ||
FROGGS | m: say &max | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«sub max (+ is raw, :&by = { ... }) { #`(Sub|66163848) ... }» | ||
n0tjack | m: say max 10, 100; say 10 max 100; say log 100, 10; say 10 log 100; | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cVyOaKX5PNTwo terms in a rowat /tmp/cVyOaKX5PN:1------> 3 say 10 max 100; say log 100, 10; say 107⏏5 log 100; expecting any of: infix infix stopper postfix …» | ||
n0tjack | well, you get what I mean. | ||
FROGGS | m: say &infix:<max> | 20:39 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«sub infix:<max> (| is raw) { #`(Sub+{<anon|68770224>}+{Precedence}|53111600) ... }» | ||
FROGGS | so you're missing the infix log | ||
n0tjack | yeah | ||
FROGGS | is that how you use log often? | ||
n0tjack | in general, all fundamental 2-adic math primitives should be offered as prefix and infix | ||
I write most of my functional code linearly | 20:40 | ||
FROGGS | hmmm, I've got no opinion on &infix:<log> | 20:41 | |
n0tjack | so I'd want to say [max] 2 log 3,7,22,108 to find the bit-widest number | ||
(as a contrived example) | |||
20:42
kfo left
|
|||
n0tjack | the problem with a bunch of prefix function is you (end (up, with, (lispitis(of (the, code))))))))))))))))))) | 20:42 | |
or you have to break simple things into multiple lines. | 20:43 | ||
FROGGS | true | ||
n0tjack | I suppose there could be some kinda hyper, say F, which turned $a F log $b into log $a,$b | 20:44 | |
all the birds, with one stone | |||
psch | m: say [max] 2 [&log] 3, 7, 22, 108 | 20:46 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«108» | ||
psch | :P | ||
n0tjack | m: say 2 [&log] 0b1, 0b10, 0b11, 0b100, 0b111, 0b1000 | 20:47 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«Attempt to divide 0.693147180559945 by zero using / in block <unit> at /tmp/Wc_6YRYmBv:1Actually thrown at: in block <unit> at /tmp/Wc_6YRYmBv:1» | ||
n0tjack | m: say 2 [&log] (0b1, 0b10, 0b11, 0b100, 0b111, 0b1000) | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«0.386852807234542» | ||
n0tjack | yeah, no | ||
Hotkeys | m: [max] map *.log(2), 3,7,22,108 | 20:48 | |
camelia | ( no output ) | ||
Hotkeys | wow | ||
worked for me in my shell | |||
n0tjack | say "say" | ||
Hotkeys | oh right | ||
m: say [max] map *.log(2), 3,7,22,108 | |||
camelia | rakudo-moar 8a8bf6: OUTPUT«6.75488750216347» | ||
n0tjack | yeah, whatever-code is sick | 20:49 | |
Hotkeys | tru | ||
psch | m: say log 2, 0b1 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«Attempt to divide 0.693147180559945 by zero using / in block <unit> at /tmp/k0UAGQiTpO:1Actually thrown at: in block <unit> at /tmp/k0UAGQiTpO:1» | ||
n0tjack | m: say log(2,0b1); | 20:50 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«Attempt to divide 0.693147180559945 by zero using / in block <unit> at /tmp/Qmw1ACetbB:1Actually thrown at: in block <unit> at /tmp/Qmw1ACetbB:1» | ||
n0tjack | m: say 0b1; | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«1» | ||
psch | m: say log 2, 1 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«Attempt to divide 0.693147180559945 by zero using / in block <unit> at /tmp/RGM64g4f9f:1Actually thrown at: in block <unit> at /tmp/RGM64g4f9f:1» | ||
Hotkeys | second number is base | ||
n0tjack | wait, wait | ||
m: say log 1,2; | |||
camelia | rakudo-moar 8a8bf6: OUTPUT«0» | ||
n0tjack | m: say log 100, 10; | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«2» | ||
n0tjack | the radix comes 2nd | 20:51 | |
psch | m: say max (0b1, 0b10, 0b101, 0b1100) >>[&log]>> 2 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«3.58496250072116» | ||
psch shrugs | |||
not that i really understand what that snippet was about | |||
n0tjack | also, log *,1 should return Inf | ||
20:51
sufrostico joined
|
|||
psch | m: say log Inf, 1 | 20:51 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«Attempt to divide Inf by zero using / in block <unit> at /tmp/Nqer4p1xW7:1Actually thrown at: in block <unit> at /tmp/Nqer4p1xW7:1» | ||
psch | m: say log *, 1 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«Cannot call log(Whatever, Int); none of these signatures match: (Numeric $x) (Numeric $x, Numeric $base) (Cool $x) (Cool $x, Cool $base) (num $x) in block <unit> at /tmp/gjWLfSxl3u:1» | ||
n0tjack | or Nan | ||
20:52
margeas left
|
|||
n0tjack | it shouldn't just croak | 20:52 | |
20:52
Hor|zon joined
|
|||
psch | oh, the * wasn't a Whatever but a glob | 20:52 | |
(or maybe a whatever, not a Whatever..?) | |||
Hotkeys | it should be a divide by zero error | ||
just like | |||
m: say 3/0 | |||
camelia | rakudo-moar 8a8bf6: OUTPUT«Attempt to divide 3 by zero using div in block <unit> at /tmp/lI0MtYM7I1:1Actually thrown at: in block <unit> at /tmp/lI0MtYM7I1:1» | ||
Hotkeys | or NaN | ||
NaN works | |||
n0tjack | I think 3/0 should be NaN too | 20:53 | |
or at least a pragma to switch "loud failures" vs "NaN failures" | |||
the ugly part about NaN is it's a data virus. Once it gets in, it spreads. | |||
20:53
margeas joined
|
|||
FROGGS .oO( $data.grep: NaN ) | 20:54 | ||
n0tjack | m: grep {$_ !== NaN}, (1,NaN,2,NaN,3,4); | 20:55 | |
camelia | ( no output ) | ||
n0tjack | m: say grep {$_ !== NaN}, (1,NaN,2,NaN,3,4); | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(1 NaN 2 NaN 3 4)» | ||
FROGGS | ahh, nvm, NaN smartmatches itself :o) | ||
n0tjack | NaN == NaN :) | ||
20:56
Hor|zon left
|
|||
vendethiel | it bugs me that it bugs me that NaN equals NaN... :P | 20:56 | |
FROGGS | m: say NaN == NaN | 20:57 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«False» | ||
psch | m: say NaN === NaN | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«True» | ||
n0tjack | FROGGS: I meant !== | ||
it's an important feature, like the smell they add to propane | |||
FROGGS | *g* | 20:58 | |
n0tjack | you *want* to be forced to remember and deal with NaNs | ||
psch | m: say NaN eq NaN | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«True» | ||
psch | m: say grep {$_ ne NaN}, (1,NaN,2,NaN,3,4); | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(1 2 3 4)» | ||
psch | ship it | ||
Hotkeys | lol | ||
n0tjack | if they worked "reasonably" sometimes (e.g. ==), then you'd forget about them, until they failed catastrophically | ||
21:00
sufrosti1o joined
|
|||
FROGGS | m: say Inf/Inf x 10, <Batman> | 21:01 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNBatman» | ||
FROGGS | gnight | ||
n0tjack | hahaha. | ||
lizmat | gnight FROGGS | ||
n0tjack | g'night FROGGS | ||
[Coke] | ww2.kqed.org/mindshift/2013/10/08/c...g-to-code/ | 21:03 | |
Hotkeys | m: say sqrt(-1) | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«NaN» | ||
Hotkeys | m: say sqrt(-1.Complex) | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«6.12323399573677e-17-1i» | ||
Hotkeys | that's a fun number | ||
n0tjack | m: e**pi*i; | 21:04 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«WARNINGS:Useless use of "*" in expression "**pi*i" in sink context (line 1)» | ||
n0tjack | m: say e** pi*i ; | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«0+23.1406926327793i» | ||
Hotkeys | should it be 0+1i ? | ||
or am i bad at the notation | |||
[Coke] | n0tjack: m: say e**(pi*i) | ||
n0tjack | Hotkeys: it is 0+1i, notice the e-17 | ||
Hotkeys | I see that | ||
[Coke] | m: say e**(pi*i) | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«-1+1.22464679914735e-16i» | ||
Hotkeys | I thought perl 6 was magical at rounding | ||
[Coke] | precedence. | 21:05 | |
21:05
ollej joined
|
|||
[Coke] | we use rationals until we can't. the use of pi makes it numeric, not rational. | 21:05 | |
n0tjack | [Coke]: Yeah, specifically the non-precedence of ** always gets me | ||
Hotkeys | ah | ||
n0tjack | Is there some way to ask for the numerator/denominator expression of a Rat? | ||
Hotkeys | m: say .3.perl | 21:06 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«0.3» | ||
n0tjack | m: Rat.new(22,7); # I wanna see 22/7. | ||
camelia | ( no output ) | ||
Hotkeys | er | ||
[Coke] | m: say pi.Rat(1e-10).nudes; | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«Method 'nudes' not found for invocant of class 'Rat' in block <unit> at /tmp/8O2U0GHPGQ:1» | ||
[Coke] | m: say pi.Rat(1e-10).nude; | ||
n0tjack | m: say Rat.new(22,7); # I wanna see 22/7. | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(312689 99532)» | ||
rakudo-moar 8a8bf6: OUTPUT«3.142857» | |||
Hotkeys | right | ||
that | |||
n0tjack | hahah nude | ||
[Coke] | *nu*merator*de*nominator | ||
n0tjack | of course. | ||
psch | that's why the s is funny :) | ||
n0tjack | m: say Pi.Rat(1e-10).scantily-clad; | 21:07 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KlslqObmUhUndeclared name: Pi used at line 1» | ||
Hotkeys | lol | ||
n0tjack | boy, no middle ground. | ||
psch | m: (1/2).perl.say; (22/7).perl.say # this confuses me, tbh | 21:09 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«0.5<22/7>» | ||
[Coke] accidentally killed his full copy of perl6-doc html that he built as a reference and has to rebuild the whole thing . zzzz. | |||
psch | why does 1/2 turn into decimal notation but 22/7 doesn't? | 21:10 | |
n0tjack | 0.5 is pretty clean | ||
[Coke] | psch: yah, that's not going to be fun to explain. | ||
n0tjack | 22/7 is 3.14286 | ||
uruwi | 0.5 terminates but 22/7 doesn't | ||
[Coke] | m: (1/4).perl.say | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«0.25» | ||
uruwi | m: say pi.Rat(1e-10).scantily-clad; | ||
[Coke] | m: (1234/5678).perl.say | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«Method 'scantily-clad' not found for invocant of class 'Rat' in block <unit> at /tmp/sxbhv4P7dL:1» | ||
rakudo-moar 8a8bf6: OUTPUT«<617/2839>» | |||
n0tjack | hahaha | 21:11 | |
kmel | m: say (4/2).perl.say; | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«2.0True» | ||
n0tjack | I think we need an excuse to add a .mole function, so we could have Rat.nude.mole # naked mole rats | ||
m: (1/3).perl.say; | 21:12 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«<1/3>» | ||
Hotkeys | m: my @test = 1/2, 1/4, 1/8 ... 0; say [+] @test; | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«1» | ||
n0tjack | now that's cute. | ||
Hotkeys | it's actually a finite series | ||
v sad | |||
[Coke] | m: my @test = 1/2, 1/4, 1/8 ... 0; my $a = [+] @test; say $a.WHAT; | 21:13 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«(Num)» | ||
psch | m: say (1..* Z/ 2..15)>>.perl | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(0.5 <2/3> 0.75 0.8 <5/6> <6/7> 0.875 <8/9> 0.9 <10/11> <11/12> <12/13> <13/14> <14/15>)» | ||
psch | vOv | ||
not quite what i was going for | |||
Hotkeys | lol | ||
m: say (1, 1 ...* Z/ 2..15)>>.perl | 21:14 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/v2_zonOvB1Operators '...' and 'Z/' are non-associative and require parenthesesat /tmp/v2_zonOvB1:1------> 3say (1, 1 ...* Z7⏏5/ 2..15)>>.perl expecting any of: infix inf…» | ||
Hotkeys | m: say ((1, 1 ... *) Z/ 2..15)>>.perl | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(0.5 <1/3> 0.25 0.2 <1/6> <1/7> 0.125 <1/9> 0.1 <1/11> <1/12> <1/13> <1/14> <1/15>)» | ||
psch | m: say (1 X/ 1..15)>>.perl | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(1.0 0.5 <1/3> 0.25 0.2 <1/6> <1/7> 0.125 <1/9> 0.1 <1/11> <1/12> <1/13> <1/14> <1/15>)» | ||
psch | m: say (1 X/ 1..25)>>.perl | 21:15 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«(1.0 0.5 <1/3> 0.25 0.2 <1/6> <1/7> 0.125 <1/9> 0.1 <1/11> <1/12> <1/13> <1/14> <1/15> 0.0625 <1/17> <1/18> <1/19> 0.05 <1/21> <1/22> <1/23> <1/24> 0.04)» | ||
Hotkeys | I guess that works | ||
psch | m: say 1/11 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«0.090909» | ||
psch | is it "less than 5 digits after the radix?" | ||
looks like that's the rule, to me at least :P | |||
although 1/11 should probably keep going..? | |||
m: say (1/32).perl | 21:17 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«0.03125» | ||
Hotkeys | looks like it stops at 6 | ||
psch | m: say (1/64).perl | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«0.015625» | ||
psch | m: say (1/128).perl | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«0.0078125» | ||
psch | m: say (1/256).perl | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«0.00390625» | ||
psch | m: say (1/512).perl | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«0.001953125» | ||
psch | m: say (1/1024).perl | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«0.0009765625» | ||
psch | welll... | ||
m: say (1/1022).perl | 21:18 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«<1/1022>» | ||
Hotkeys | magic | ||
m: say (1 Z/ (2, 4, 8 ... 100000000)) | 21:19 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(0.5)» | ||
Hotkeys | ... | ||
m: say (1 X/ (2, 4, 8 ... 100000000)) | |||
camelia | rakudo-moar 8a8bf6: OUTPUT«(0.5 0.25 0.125 0.0625 0.03125 0.015625 0.007813 0.003906 0.001953 0.000977 0.000488 0.000244 0.000122 0.000061 0.000031 0.000015 0.0000076 0.0000038 0.0000019 0.00000095 0.00000048 0.00000024 0.00000012 0.000000060 0.000000030 0.000000015)» | ||
psch | m: say 1 X/ 5, 10, 15 ... 1000 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/H6RDtiFjcwOperators 'X/' and '...' are non-associative and require parenthesesat /tmp/H6RDtiFjcw:1------> 3say 1 X/ 5, 10, 157⏏5 ... 1000 expecting any of: infix infix s…» | ||
psch | m: say 1 X/ (5, 10, 15 ... 1000) | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(0.2 0.1 0.066667 0.05 0.04 0.033333 0.028571 0.025 0.022222 0.02 0.018182 0.016667 0.015385 0.014286 0.013333 0.0125 0.011765 0.011111 0.010526 0.01 0.009524 0.009091 0.008696 0.008333 0.008 0.007692 0.007407 0.007143 0.006897 0.006667 0.006452 0.00625 0.…» | ||
Hotkeys | m: say ((1 X/ (2, 4, 8 ... 100000000)).perl) | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«(0.5, 0.25, 0.125, 0.0625, 0.03125, 0.015625, 0.0078125, 0.00390625, 0.001953125, 0.0009765625, 0.00048828125, 0.000244140625, 0.0001220703125, 0.00006103515625, 0.000030517578125, 0.0000152587890625, 0.00000762939453125, 0.000003814697265625, 0.0000019073…» | ||
Hotkeys | that's neat | ||
psch | 2 and 5 are what we internally reduce by | ||
for Rat.perl | 21:20 | ||
lizmat | m: class A { multi method a(Mu $t,:$last!,*%a) { say "last" }; multi method a(Callable:D $t) { say "call" } }; A.a( * %% 2, :last ) # expect to this to say "last" | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«call» | ||
lizmat | am I missing sometihng ??? | ||
psch | m: say (* %% 2) ~~ Callable | 21:21 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«True» | ||
lizmat | I guess the Callable:D is narrower than the Mu, so there's no tie-breaking involved ? | ||
psch | lizmat: i think so, yeah | ||
additionally :last fits into the Callable candidate | |||
and i think there's a bug about required nameds not being narrower than implicit nameds | 21:22 | ||
lizmat | yeah, they're done in order | ||
the first one that tie-breaks, gets it | |||
psch | ah, the bug i had in mind was about subs | 21:23 | |
so probably not quite applicable | |||
21:23
ab6tract left
|
|||
n0tjack | g'night all | 21:24 | |
21:24
n0tjack left
21:25
skids left
21:26
vendethiel left
|
|||
kmel | anyone having problems with pod? | 21:28 | |
numbered headings are not working: design.perl6.org/S26.html#Numbered_headings | 21:30 | ||
lizmat | kmel: could you provide a gist that describes the problem ? | 21:31 | |
kmel | lizmat : yup just give me 2 sec | 21:33 | |
lizmat what link should i send you? | 21:39 | ||
sorry i am new to github :) | 21:40 | ||
just made an account | |||
RabidGravy | the gist url | ||
kmel | gist.github.com/kmel88/fb1c48b71b7f634e6323 | ||
this one ^ ? | |||
RabidGravy | yep | 21:41 | |
m: gist.github.com/kmel88/fb1c48b71b7f634e6323 | |||
camelia | ( no output ) | ||
21:41
muraiki left
|
|||
lizmat | I guess it's a case of NYI ? | 21:41 | |
RabidGravy | well it oaeses :) | ||
psch | hm, i don't S06:1083 | 21:42 | |
synbot6 | Link: design.perl6.org/S06.html#line_1083 | ||
psch | +get | ||
kmel | what is NYI = Not yet implemented ? | ||
lizmat | S99:NYI | ||
PerlJam | S99:NYI | ||
synbot6 | Link: design.perl6.org/S99.html#NYI | ||
PerlJam | heh | ||
lizmat | not in there | 21:43 | |
kmel: but yeah, Not Yet Implemented | |||
sometimes I wonder whether we shouldn't move S99 to doc | |||
psch | m: sub f($, :$!) { "ok" }; say f 1 # still one of my favorite WATs in that context | 21:44 | |
camelia | rakudo-moar 8a8bf6: OUTPUT«ok» | ||
psch | a required anonymous named parameter doesn't have to be passed vOv | ||
lizmat | yeah, not going to change for xmas... | 21:45 | |
psch | i'm really not sure what it even means | ||
21:45
hohoho joined
|
|||
psch | but i suspect it somewhat relates to RT #119929 | 21:45 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=119929 | ||
lizmat | yeah :-) | 21:46 | |
21:46
rurban joined
21:47
llfourn joined
21:50
hohoho left
|
|||
kmel | quit | 21:50 | |
21:50
kmel left
21:52
firstdayonthejob joined,
apotheon left
21:53
Hor|zon joined,
llfourn left
21:57
apotheon joined,
Hor|zon left
22:02
tokuhiro_ joined,
thaljef joined
22:05
thaljef left
22:06
tokuhiro_ left
22:08
kid51 joined,
pmurias left
22:19
Ch0c0late joined,
kmel joined,
sufrosti1o left
22:23
sufrostico left
|
|||
uruwi | Is it currently possible to sandbox Perl 6 code? | 22:25 | |
m: shell("ls"); | 22:26 | ||
camelia | rakudo-moar 8a8bf6: OUTPUT«shell is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting:1 in sub shell at src/RESTRICTED.setting:15 in block <unit> at /tmp/2eRoTeDwwf:1» | ||
22:26
kid51 left
|
|||
dalek | kudo/nom: 44a7ffa | lizmat++ | src/core/Any-iterable-methods.pm: Add :end,:k,:v,:p adverbs to List.first :end indicates you want searching from the end of the list (like last-index) :k return the ordinal number, instead of the value :v return the value (default) :p return a pair of ordinal number => value This effectively makes first-index and last-index obsolete. Perhaps we should deprecate them. |
22:32 | |
lizmat | PerlJam: ^^^ | 22:33 | |
uruwi: depends on what you want to sandbox, perhaps look at how the RESTRICTED.setting is made :-) | |||
22:34
leont joined
|
|||
lizmat | good niight, #perl6! | 22:35 | |
uruwi | is there any example? | 22:36 | |
RabidGravy | toodlepip | ||
lizmat | uruwi: look at src/RESTRICTED.setting | ||
uruwi | where? | 22:37 | |
RabidGravy | in the source of rakudo | ||
lizmat | github.com/rakudo/rakudo/blob/nom/...ED.setting | 22:38 | |
really sleep& | |||
22:38
spider-mario left,
hes joined
|
|||
uruwi | And the only way to change it is to compile rakudo from source? | 22:39 | |
RabidGravy | as it currently stands yes | 22:41 | |
22:44
samb1 left
22:49
rurban left
22:53
kmel left
22:54
Hor|zon joined
22:55
samb1 joined
22:57
zacts joined
22:58
Hor|zon left
23:00
skids joined,
firstdayonthejob left
23:09
zacts left
23:14
margeas left
23:15
uruwi left
23:16
hohoho joined
23:20
hohoho left
23:35
TEttinger joined
23:36
mattprelude left
|
|||
timotimo | lizmat: didn't we introduce first-index and last-index because we felt "adding adverbs" was a design smell? | 23:40 | |
what has changed? | |||
23:43
thundergnat joined
23:50
llfourn joined
23:51
RabidGravy left
23:55
Hor|zon joined,
llfourn left
23:59
Hor|zon left
|