»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:02
spider-mario left
|
|||
orbus | RabidGravy: you have a pi or a pi2? | 00:05 | |
on pi2 it's not super fast but if you do make -j5, that helps some | |||
RabidGravy | both | 00:06 | |
orbus | I only have the pi2 | ||
finally seem to have gotten it stable incidentally - the first sd card I made worked for a while and then started getting massive filesystem corruption | 00:07 | ||
RabidGravy | oh on the rev b pi it's go away and have a bunch of beer while you make perl | ||
orbus | until it wouldn't boot anymore | ||
haha, yeah, parallel make helps - put those cores to work | |||
RabidGravy | on the original pi there's only one core | 00:08 | |
orbus | yeah, I know | 00:09 | |
that's why when I started looking at getting one, I waited till the pi2 released | |||
perl builds a lot better on arm than it does on sparc at least | 00:10 | ||
I can just about get moar to build on sparc, but it segfaults as soon as you try to build nqp | |||
from what I've read, sparc is super picky about memory alignment and I think it doesn't like something moar is doing | |||
stmuk__ | I keep meaning to try qemu-arm and raspian | 00:11 | |
00:11
joydon joined
|
|||
orbus | I'm a rebel so I didn't use raspbian - I just took the arm fedora image and hacked in the pi kernel | 00:12 | |
I'm kind of amazed it runs | |||
00:12
vike1 left,
vendethiel left
|
|||
RabidGravy | yeah I use the fedora on the Pi, at least on one of them | 00:13 | |
00:15
grassass joined
|
|||
orbus | I implemented lock based compare and swap that seems to correspond to S17's intentions and seems to work | 00:16 | |
m: multi casx($ref is rw, $expected, $new) {state $l=Lock.new; my $z; $l.protect({if $ref == $expected { $ref = $new; $z=True } else { $z=False };}); return $z; }; multi casx(\val, &code){my $o=val; while casx(val,$o,code(val))==False {$o=val}}; my $x=0; await start {for ^1000 { casx($x,{$_+1}) }} xx 8; put $x | |||
camelia | rakudo-moar a28270: OUTPUT«8000» | ||
orbus | only thing I changed is the 3 argument version of cas in the synopsis returns the original value of $ref | 00:17 | |
which seems kind of useless to me | |||
so I changed it to true / false which seems more useful | |||
00:18
setty1 left,
vike1 joined
|
|||
orbus | hrm, except maybe it's intended that the 3 argument version always succeed | 00:19 | |
maybe I better try this again | 00:20 | ||
ely-se | What's with all the all-caps language names? C, C++, C#, D, etc | 00:21 | |
Juerd | ely-se: And PERL of course ;) | 00:22 | |
orbus | Hrmm. No, I think it's right how it is - the 3 argument version described in S17 returns the original value of $ref whether the comparison succeeds or not, when you really need to know whether or not it succeeded. | 00:25 | |
and if you try to compare after doing cas, then there's a potential for race conditions | |||
so having true/false seems decidedly better | |||
gfldex | ely-se: back in the days folk used typewriters, easy to stand out if you don't git <i>c</i> | 00:26 | |
00:28
firstdayonthejob left
00:30
Timbus joined
|
|||
RabidGravy | also 7 bit, the style stuck | 00:37 | |
00:38
AlexDaniel joined
|
|||
AlexDaniel | m: say ⹂test” | 00:39 | |
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5===Argument to "say" seems to be malformedat /tmp/jYZUvx1z1a:1------> 3say7⏏5 ⹂test”Bogus postfixat /tmp/jYZUvx1z1a:1------> 3say 7⏏5⹂test” expecting any of: infix infix stopper…» | ||
AlexDaniel | .u ⹂” | ||
yoleaux | U+201D RIGHT DOUBLE QUOTATION MARK [Pf] (”) | ||
AlexDaniel | m: ‘⹂’.uniname.say; ‘”’.uniname.say | ||
camelia | rakudo-moar a28270: OUTPUT«DOUBLE LOW-REVERSED-9 QUOTATION MARKRIGHT DOUBLE QUOTATION MARK» | ||
00:39
lnrdo left
00:41
pjscott joined
00:42
lnrdo joined
|
|||
lucasb | AlexDaniel: can I suggest a puzzle? sort all uninames by length and find the longest name | 00:42 | |
AlexDaniel | lucasb: easy | ||
00:44
pjscott left
|
|||
AlexDaniel | m: say (0..0x1FFFF).sort(*.uniname.chars)[*-1].chr.uniname | 00:45 | |
m: say (0..0x1FFFF).sort(*.uniname.chars)[*-1].chr | |||
camelia | rakudo-moar a28270: OUTPUT«ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM» | ||
rakudo-moar a28270: OUTPUT«ﯹ» | |||
00:45
ely-se left
|
|||
AlexDaniel | lucasb: told ya, easy | 00:45 | |
lucasb | AlexDaniel++, very good :) | ||
AlexDaniel | m: say (0..0x1FFFF).sort(*.uniname.chars)[*-2].chr | 00:46 | |
camelia | rakudo-moar a28270: OUTPUT«ﯻ» | ||
AlexDaniel | m: say (0..0x1FFFF).sort(*.uniname.chars)[*-2].chr.uniname | ||
camelia | rakudo-moar a28270: OUTPUT«ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA INITIAL FORM» | ||
RabidGravy | m: say «foo» | ||
camelia | rakudo-moar a28270: OUTPUT«foo» | ||
AlexDaniel | is there anything non arabic | 00:47 | |
lucasb | are these names canonical? can't a codepoint have more than one official name? | ||
AlexDaniel | m: say (0..0x1FFFF).sort(*.uniname.chars)[*-10].chr.uniname | ||
camelia | rakudo-moar a28270: OUTPUT«MUSICAL SYMBOL TEMPUS IMPERFECTUM CUM PROLATIONE IMPERFECTA DIMINUTION-2» | ||
AlexDaniel | lucasb: I don't think so. In fact, it cannot even have more than one group | ||
I might be wrong but I haven't ever seen that | |||
RabidGravy | so yeah it those quotes work *all* quotes should work | ||
AlexDaniel | RabidGravy: all quotes do work actually | ||
m: say “…” | 00:48 | ||
camelia | rakudo-moar a28270: OUTPUT«…» | ||
AlexDaniel | m: say ”…” | ||
camelia | rakudo-moar a28270: OUTPUT«…» | ||
AlexDaniel | m: „…“ | ||
camelia | rakudo-moar a28270: OUTPUT«WARNINGS for /tmp/yTMyjC8KWS:Useless use of constant string "…" in sink context (line 1)» | ||
AlexDaniel | m: say „…“ | ||
camelia | rakudo-moar a28270: OUTPUT«…» | ||
RabidGravy | you just showed the lower quotes don't | ||
00:48
pjscott joined
|
|||
AlexDaniel | m: ,…’ | 00:48 | |
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tQXomzasC7Comma found before apparent series operator; please remove comma (or put parens around the ... listop, or use 'fail' instead of ...)at /tmp/tQXomzasC7:1------> 3,7⏏5…’» | ||
AlexDaniel | m: say ,…’ | ||
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/OGMrrIVyNvComma found before apparent series operator; please remove comma (or put parens around the ... listop, or use 'fail' instead of ...)at /tmp/OGMrrIVyNv:1------> 3say ,7⏏5…’» | ||
AlexDaniel | .u , | ||
yoleaux | U+002C COMMA [Po] (,) | ||
AlexDaniel | hey!! What? | 00:49 | |
geekosaur | .u ¸ | ||
yoleaux | U+00B8 CEDILLA [Sk] (¸) | ||
geekosaur | hm, wrong one | ||
AlexDaniel | m: say ‚…’ | ||
camelia | rakudo-moar a28270: OUTPUT«…» | ||
RabidGravy | yeah uncomposed ç | ||
AlexDaniel | here. Wikipedia got that wrong | ||
unless somebody is actually using a comma instead of a lower quote… | |||
Quom__ | .u ‚ | 00:50 | |
yoleaux | U+201A SINGLE LOW-9 QUOTATION MARK [Ps] (‚) | ||
AlexDaniel | lucasb: in fact, these names are guaranteed not change | ||
not to* | |||
at least that's what I've read on unicode.org somewhere… | 00:51 | ||
RabidGravy: I showed that some new weird unicode char is not supported, yes | 00:52 | ||
geekosaur | .u ‚ | ||
yoleaux | U+201A SINGLE LOW-9 QUOTATION MARK [Ps] (‚) | ||
geekosaur | ok, that's how i compose it. sigh | 00:53 | |
AlexDaniel | geekosaur: how, by the way? | ||
geekosaur | too much crap in the compose file >.> | ||
<compse> , ' | |||
RabidGravy | to be honest I only care about things I can type without too much effort | ||
AlexDaniel | ‚oh’! | ||
geekosaur | (comma, apostrophe) | ||
Skarsnik | damn this Perl6 process is growing in memory :( | ||
but it should not | |||
AlexDaniel | Skarsnik: time to buy more memory | 00:54 | |
Skarsnik: memory is cheap!! | |||
00:54
lucasb left
|
|||
AlexDaniel | RabidGravy: the thing is, there is a subset of combinations that are actually used by people. These are already supported by Perl 6. Should we support anything else? Well, do we actually want to support things like 🙶🙷 or ❮❯ or ❛❜ or ‹› … | 00:56 | |
dalek | c: e79fa57 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod: better example for Cool::uniname (AlexDaniel++) |
||
c: 2f763ce | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod: Merge pull request #336 from gfldex/master better example for Cool::uniname (AlexDaniel++) |
|||
AlexDaniel | RabidGravy: and why not leave those for user-defined things? :) | 00:57 | |
gfldex: wrong snippet though. should be *-1, not *-2 | |||
RabidGravy | well I think everyone should be fairly consevative in what they do and perl should be liberal in what it accepts | 00:58 | |
00:58
lnrdo left
|
|||
RabidGravy | and the first thing there my computer no have a thing for that code point | 00:59 | |
dalek | c: 251eb2f | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod: late night copypasta error, fixed |
||
c: 306013c | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod: Merge pull request #337 from gfldex/master late night copypasta error, fixed |
|||
AlexDaniel | m: say ‚hello ‚nested’’ | ||
camelia | rakudo-moar a28270: OUTPUT«hello ‚nested’» | ||
RabidGravy | but would you accept it in a code review? | 01:00 | |
AlexDaniel | RabidGravy: if it used consistently, then yes | 01:01 | |
is* | |||
m: say ‘»ö«’.uniname | |||
camelia | rakudo-moar a28270: OUTPUT«RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK» | ||
AlexDaniel | gfldex: hmm, what's the point of this? ↑ | 01:02 | |
gfldex: shouldn't it be this? ↓ | |||
m: say ‘»ö«’.uninames | |||
camelia | rakudo-moar a28270: OUTPUT«(RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK LATIN SMALL LETTER O WITH DIAERESIS LEFT-POINTING DOUBLE ANGLE QUOTATION MARK)» | ||
gfldex | AlexDaniel: indeed | ||
m: say ‘»ö«’>>.uniname | |||
camelia | rakudo-moar a28270: OUTPUT«(RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK)» | ||
AlexDaniel | or this, yes | 01:03 | |
gfldex | that doesnt work either, because there is no split | ||
AlexDaniel | m: say ‘»ö«’.comb>>.uniname | ||
camelia | rakudo-moar a28270: OUTPUT«(RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK LATIN SMALL LETTER O WITH DIAERESIS LEFT-POINTING DOUBLE ANGLE QUOTATION MARK)» | 01:04 | |
AlexDaniel | m: say ‘»ö«’.comb».uniname | ||
camelia | rakudo-moar a28270: OUTPUT«(RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK LATIN SMALL LETTER O WITH DIAERESIS LEFT-POINTING DOUBLE ANGLE QUOTATION MARK)» | ||
AlexDaniel | gfldex: that's why we have plural forms, I guess. To save the forest by not using .comb | 01:05 | |
01:05
lnrdo joined
|
|||
AlexDaniel | gfldex: also, I don't really see it documented. So perhaps this example should show .uninames :) | 01:06 | |
use* | |||
01:07
uruwi left
|
|||
gfldex | on it. | 01:08 | |
AlexDaniel | gfldex: also, the night is really late, because it is not just *-1. This MAKSURA thing should be in ISOLATED form, not INITIAL | ||
01:09
uruwi joined
|
|||
AlexDaniel | m: say (0..0x1FFFF).sort(*.uniprop.chars)[*-1].chr.uniprop # just for fun | 01:09 | |
camelia | rakudo-moar a28270: OUTPUT«So» | ||
AlexDaniel | m: say (0..0x1FFFF).sort(*.uniprop.chars)[0].chr.uniprop # just for fun | 01:10 | |
camelia | rakudo-moar a28270: OUTPUT«» | ||
AlexDaniel | m: say ‘a’.uniprop | ||
camelia | rakudo-moar a28270: OUTPUT«Ll» | ||
AlexDaniel | ah right, there are some unused code points with no prop. Got it | 01:11 | |
mspo | panda sucks | 01:14 | |
RabidGravy | mspo, please feel free to improve upon it | 01:15 | |
AlexDaniel | mspo: or at least submit bug reports, that works too | ||
mspo | where is --notests supposed to go? | 01:16 | |
AlexDaniel | panda --notests install Something | ||
gfldex .oO( complaining and fixing are mutual inclusive ) | |||
RabidGravy | no saying it sucks requires actual material fixing | ||
mspo | Usage: panda <action> [options] | ||
AlexDaniel | mspo: hahaha! | ||
mspo | and then | 01:17 | |
Actions: | |||
install Installs the modules listed on the command line, and their | |||
dependencies. | |||
--notests Don't run tests for the modules being installed. | |||
AlexDaniel | but it says panda [options] <action> here | ||
so not hahaha… | |||
RabidGravy | mspo, in that case I think you mean Perl 6 sucks | ||
mspo | AlexDaniel: you mean your usage is different? | ||
RabidGravy | you can fix the MAIN implementation as a penance | 01:18 | |
AlexDaniel | mspo: yeah, where did you find <action> [options] ? | ||
mspo | I typed panda -h | ||
AlexDaniel | mspo: yeah, I definitely see “panda [options] <action>” exactly in that order | 01:20 | |
RabidGravy | it's a LTA result of the way the MAIN helpers work | ||
mspo | ? | 01:21 | |
AlexDaniel | yeah. ? | ||
01:21
nzkindest left
|
|||
mspo | how do I get the version of my panda/ | 01:22 | |
it must be out of date | |||
AlexDaniel | I've tried 「panda info Panda」 but it does not show the version | 01:24 | |
mspo | between 2015.11 and 2015.12 that help message was switched | ||
RabidGravy | panda has been changed frequently in the last month | 01:30 | |
mspo | just keep repeating and it will work, I guess: gist.github.com/msporleder/d0aa0318f78a5654560f | 01:31 | |
notests was required to get past the pod coverage module | 01:32 | ||
01:32
AlexDaniel left
01:35
colomon left,
lsm-desktop joined
|
|||
RabidGravy | I'd forgotten about the pod coverage thing | 01:35 | |
mspo | p6doc doesn't work on bsd because fmt takes different options from gnu | 01:36 | |
why is p6doc calling out to the shell so much? | 01:37 | ||
RabidGravy | dunno, that sucks | ||
mspo | fmt feels like a perl-friendly thing ;) | 01:38 | |
RabidGravy | probably because no one implemented fmt in perl 6 yet | ||
there you go, job for you | 01:39 | ||
01:39
psy_ left
|
|||
mspo | yeah | 01:39 | |
RabidGravy | :) | ||
mspo | it might just be netbsd being weird in fmt, actually | 01:40 | |
dalek | c: 4f27969 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod: get the first part of the example right and link to uninames |
||
c: 6b1b6c8 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod: doc uninames |
|||
c: 9bf3a84 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod: title Cool a class |
|||
c: 54e9b9c | (Wenzel P. P. Peppmeyer)++ | /: Merge remote-tracking branch 'upstream/master' |
|||
c: 37b0eaf | (Wenzel P. P. Peppmeyer)++ | doc/Type/ (2 files): name Code and Ducation a class too |
|||
c: d19f3b7 | (Wenzel P. P. Peppmeyer)++ | doc/Type/ (3 files): Merge pull request #338 from gfldex/master name Cool, Code and Ducation a class | doc uninames | get the first part of the example right and link to uninames |
|||
01:42
nzkindest joined
01:43
psy_ joined
01:44
Ch0c0late left
01:45
colomon joined,
pjscott left
|
|||
mspo | how can I troubleshoot this? Variable '%?RESOURCES' is not declared | 01:46 | |
Skarsnik | Oo | ||
01:47
pjscott joined,
travis-ci joined
|
|||
travis-ci | Doc build errored. Wenzel P. P. Peppmeyer 'Merge pull request #338 from gfldex/master | 01:47 | |
travis-ci.org/perl6/doc/builds/101346339 github.com/perl6/doc/compare/30601...9f3b7cbcd0 | |||
01:47
travis-ci left
01:52
wollmers left
|
|||
RabidGravy | mspo, pre-release rakudo I'd say | 01:54 | |
lichtkind | am so happy | 01:55 | |
RabidGravy | %?RESOURCES is fairly fundamental to the way most things find compiled helper libraries | 01:56 | |
lichtkind | you can no write $matrix ** -2 and it does what oyu expect | ||
perl 6 makes it so easy | |||
02:02
molaf__ joined
|
|||
mspo | I guess I should try deleting my local install before compiling next time | 02:02 | |
BenGoldberg | lichtkind, Just because perl5's Math::Matrix does not have exponentiation, is not the fault of perl5, but rather the fault of the author of that particular module. | ||
RabidGravy | indeed | 02:03 | |
lichtkind | i know you can define ops i p5 but its easier in perl 6 | 02:04 | |
BenGoldberg | Reading en.wikipedia.org/wiki/Matrix_exponential, it's really easy to see why he chose to omit it... | ||
RabidGravy | but there's the out of the box thing :) | ||
anyway toodles | 02:05 | ||
02:05
lnrdo left
|
|||
lichtkind | BenGoldberg, matrix exponentiation is something different | 02:05 | |
than power of an matrix | |||
mspo | does panda have a delete? | ||
BenGoldberg | Err, what's the difference between power and exponentiation? | 02:06 | |
02:06
molaf_ left
|
|||
lichtkind | matrix exponential is a matrix of limits of series | 02:08 | |
i speak about calculating with matrices like integer | |||
much more simler | |||
its analog to num math | |||
much more practical | 02:09 | ||
i only encountered matrix exponential in few ordinary differential tasks | |||
02:09
RabidGravy left
02:13
jeturcotte joined
|
|||
BenGoldberg | Well, regardless, defining a math-like operator for a particular class is not very difficult, so long as you choose to use a "normal" operator, such as +, -, *, /, **, ^, etc. | 02:13 | |
02:13
xpen joined
|
|||
jeturcotte | ahoy; where can I find documentation on nqp::bindattr ? | 02:14 | |
BenGoldberg | package MyMatrices { use overload '**' => 'my_method'; ... define sub my_method here ... }, and you're done. But that's a discussion for #perl, not for #perl6. | ||
lucs | Is an identifier like $ɡfoo supposed to be allowed? | 02:19 | |
(U-0261 LATIN SMALL LETTER SCRIPT G) | 02:20 | ||
Hmm... Seems to work with camelia (but not in my current version). | 02:21 | ||
lichtkind | BenGoldberg, thanks for syntax but i actually didnt wanted expand much into it :) | 02:22 | |
jeturcotte, sorry i nevr heard of any docs about it | |||
jeturcotte | hm... seems heavily relied on in some of the core packages w/perl6, but I can't find any reference to how it works | ||
02:23
cdg joined
|
|||
lichtkind | jeturcotte, maybe check chatlogs of this channel to see when jnthn is around | 02:24 | |
he is the author | |||
lucs | (oops, it appears I has accidentally entered some kind of invisible combining character -- all is well) | 02:27 | |
BenGoldberg | github.com/perl6/nqp/blob/master/d...n#bindattr | 02:28 | |
02:30
nzkindest left
|
|||
jeturcotte | oooh! | 02:32 | |
02:34
nzkindest joined
|
|||
jeturcotte | thank you; I think that tells me what I needed to know | 02:35 | |
02:37
joydon left
02:42
zwu joined,
livyathan left
02:44
yeahnoob joined
|
|||
timotimo | äh | 02:45 | |
02:45
livyathan joined,
lichtkind left
02:46
ilbot3 left
02:47
ilbot3 joined
02:54
pjscott left
02:55
zwu left
|
|||
lucs | m: say <a s d f>.grep({$_ !~~ /d/}); # Okay, gives (a s f), but can it be usefully shortened? | 02:56 | |
camelia | rakudo-moar a28270: OUTPUT«(a s f)» | ||
lucs | (but not golfbufscated) | 02:57 | |
*golfbuscated | 02:58 | ||
02:58
pjscott joined
02:59
sortiz joined,
molaf_ joined
03:03
molaf__ left
03:06
vendethiel joined,
jeturcotte left
03:08
kid51_ joined
03:11
pjscott left,
kid51 left,
kid51_ is now known as kid51
|
|||
lucs | (golbfuscated? Yeah, musnt' do that) | 03:12 | |
03:13
nzkindest left
03:14
cdg left
03:17
pjscott joined
03:22
pjscott left
03:23
nzkindest joined
03:24
pjscott joined,
pjscott left
03:28
yqt left
03:29
vendethiel left
03:32
lolisa joined
03:33
Herby_ joined
|
|||
Herby_ | Good evening, everyone! | 03:33 | |
03:34
skids joined
|
|||
Herby_ | m: my @x <== 1..5; say @x; | 03:35 | |
camelia | rakudo-moar a28270: OUTPUT«[1 2 3 4 5]» | ||
03:35
kaare_ joined
|
|||
Skarsnik | Good night #perl6 | 03:35 | |
Herby_ | night! | ||
m: my @x = 1..5; @x ==> @y ==> print; | 03:36 | ||
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_wK5uHrZF_Variable '@y' is not declaredat /tmp/_wK5uHrZF_:1------> 3my @x = 1..5; @x ==> 7⏏5@y ==> print;» | ||
Herby_ | m: my @x = 1..5; @x ==> my @y ==> print; | ||
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XbmGbydASHPreceding context expects a term, but found infix => insteadat /tmp/XbmGbydASH:1------> 3my @x = 1..5; @x ==> my @y ==>7⏏5 print;» | ||
Herby_ | m: my @y; my @x = 1..5; @x ==> @y ==> print; | ||
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sbcExETgwMUnsupported use of bare "print"; in Perl 6 please use .print if you meant $_, or use an explicit invocant or argument, or use &print to refer to the function as a nounat /tmp/sbcExETgwM:1----…» | ||
Herby_ | m: my @y; my @x = 1..5; @x ==> @y; say @y; | 03:37 | |
camelia | rakudo-moar a28270: OUTPUT«[1 2 3 4 5]» | ||
Herby_ | m: my @y; my @x = 1..5; @x ==> @y ==> .print; | ||
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BgUf46AnfKSorry, do not know how to handle this case of a feed operator yet.at /tmp/BgUf46AnfK:1------> 3y @y; my @x = 1..5; @x ==> @y ==> .print7⏏5;» | ||
Herby_ | not sure who maintains this: en.wikibooks.org/wiki/Perl_6_Progr..._and_Feeds | ||
03:37
pecastro joined,
lnrdo joined
|
|||
Herby_ | but the example with @x ==> @y ==> print doesn't seem to work currently | 03:37 | |
unless I'm fudging something up | 03:38 | ||
m: my @y; my @x = 1..5; @x ==> @y ==> &print; | |||
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GCvIZEisqUSorry, do not know how to handle this case of a feed operator yet.at /tmp/GCvIZEisqU:1------> 3y @y; my @x = 1..5; @x ==> @y ==> &print7⏏5;» | ||
Herby_ | m: my @x = 1..5; my @y; @x ==> map {$_ * 2} ==> @y; say @y; | 03:39 | |
camelia | rakudo-moar a28270: OUTPUT«[2 4 6 8 10]» | ||
Herby_ | m: my @x = 1..5; my @y; @x ==> map {$_ * 2} ==> @y; @x ==>> @y ==> @z; say @z; | 03:41 | |
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bNa57y4EA9Only identical operators may be list associative; since '==>>' and '==>' differ, they are non-associative and you need to clarify with parenthesesat /tmp/bNa57y4EA9:1------> 3; @x ==> map {$…» | ||
03:41
Skarsnik left
|
|||
Herby_ | m: my @x = 1..5; my @y; my @z; @x ==> map {$_ * 2} ==> @y; @x ==>> @y ==> @z; say @z; | 03:42 | |
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sEZewlXl7rOnly identical operators may be list associative; since '==>>' and '==>' differ, they are non-associative and you need to clarify with parenthesesat /tmp/sEZewlXl7r:1------> 3; @x ==> map {$…» | ||
03:42
lnrdo left
|
|||
Herby_ | m: my @x = 1..5; my @y; my @z; @x ==> map {$_ * 2} ==> @y; @x ==>> @y; say @y; | 03:43 | |
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZZGkyPxdAi==>> feed operator not yet implemented. Sorry. at /tmp/ZZGkyPxdAi:1------> 3; @x ==> map {$_ * 2} ==> @y; @x ==>> @y7⏏5; say @y;» | ||
Herby_ | m: my $x = gather { take 5; } say $x; | 03:44 | |
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HBxQHFKJ9oStrange text after block (missing semicolon or comma?)at /tmp/HBxQHFKJ9o:1------> 3my $x = gather { take 5; }7⏏5 say $x; expecting any of: infix infix stopper…» | ||
Herby_ | m: my $x = gather { take 5; }; say $x; | ||
camelia | rakudo-moar a28270: OUTPUT«(5)» | ||
Herby_ | m: my @x = gather for 1..5 { take $_ * 2; }; say @x; | 03:45 | |
camelia | rakudo-moar a28270: OUTPUT«[2 4 6 8 10]» | ||
03:46
glucosade joined
03:47
nzkindest left
|
|||
Herby_ | m: my @a = 1, 2; my @b = 2, 3; my @c = @a X+ @b; say @c; | 03:49 | |
camelia | rakudo-moar a28270: OUTPUT«[3 4 4 5]» | ||
Herby_ | m: my @a = 1, 2; my @b = 2, 3; my @c = @a X* @b; say @c; | ||
camelia | rakudo-moar a28270: OUTPUT«[2 3 4 6]» | ||
Herby_ | m: my @a = 1, 2, 3; my @b = 2, 3; my @c = @a X* @b; say @c; | ||
camelia | rakudo-moar a28270: OUTPUT«[2 3 4 6 6 9]» | ||
Herby_ | m: my $options = 1 | 2 | 3 | 4; if $options == 2 { say "its equal to 2"; }; | 03:51 | |
camelia | rakudo-moar a28270: OUTPUT«its equal to 2» | ||
Herby_ | m: my $options = 1 | 2 | 3 | 4; if $options == 6 { say "its equal to 2"; }; | 03:52 | |
camelia | ( no output ) | ||
Herby_ | well thats pretty handy | ||
dumb question here... but can perl 6 be used as a functional programming language? | 03:58 | ||
03:58
kid51 left
|
|||
Herby_ | I've just started reading into functional programming and am trying to get a better grasp on it | 03:58 | |
03:59
noganex joined
04:00
xpen left
|
|||
Juerd | Perl6 implements some ideas from functional programming but it's not purely a functional programming language. There are mutable variables and side-effects that you'd need to avoid if you want to keep everything functional... | 04:01 | |
04:01
noganex_ left
|
|||
Herby_ | thanks, that makes sense | 04:02 | |
Juerd | m: @fib = 1, 1, *+* ... Inf; @fib[4] = 42; say @fib[^10]; | 04:03 | |
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DKrWlfjeulVariable '@fib' is not declaredat /tmp/DKrWlfjeul:1------> 3<BOL>7⏏5@fib = 1, 1, *+* ... Inf; @fib[4] = 42; » | ||
Juerd | m: my @fib = 1, 1, *+* ... Inf; @fib[4] = 42; say @fib[^10]; | ||
camelia | rakudo-moar a28270: OUTPUT«(1 1 2 3 42 8 13 21 34 55)» | ||
04:05
TEttinger joined
|
|||
Herby_ | as a learning exercise, I'm trying to do "99 problems of Haskell" in Perl 6 | 04:05 | |
wiki.haskell.org/H-99:_Ninety-Nine...l_Problems | |||
how do I slice an array? For instance if I had an array of @array = <james peter robert sally> and I wanted to get the second to last value | 04:06 | ||
Juerd | Interesting. Are you documenting your answers somewhere? | ||
Herby_ | just started about 10 minutes ago :) | ||
but I should try to document | |||
Juerd | say: my @a = <j p r s>; say @a[*-1]; | ||
m: my @a = <j p r s>; say @a[*-1]; | |||
camelia | rakudo-moar a28270: OUTPUT«s» | ||
Juerd | m: my @a = <j p r s>; say @a[*-2]; | 04:07 | |
camelia | rakudo-moar a28270: OUTPUT«r» | ||
Juerd | etc. | ||
Herby_ | is there a simple explanation of the * operator? | ||
Juerd | Which one? ;) | ||
Herby_ | lol | ||
@a[*-2] | |||
I see the * operator used a lot but I'm not really grasping when/why to use it | 04:08 | ||
Juerd | That's the whatever operator. I'm looking for a doc link for you | ||
doc.perl6.org/type/Whatever | |||
Basically, * + 2 is turned into { $_ + 2 } | |||
Herby_ | ok. how is that working with your @a[*-2] example? | 04:09 | |
Juerd | m: my $square = * * *; say $square(4); | ||
camelia | rakudo-moar a28270: OUTPUT«Too few positionals passed; expected 2 arguments but got 1 in block <unit> at /tmp/ozsJ1SN3wN line 1» | ||
Juerd | m: my $times = * * *; say $times(4, 3); | 04:10 | |
camelia | rakudo-moar a28270: OUTPUT«12» | ||
Juerd | Forgot that each * is its own argument :) | ||
Herby_: The [ ] operator, when given a WhateverCode, calls that code with the number of elements in the array as its argument. | |||
Herby_ | m: my $squares = * ** *; say $squares(2,3); | ||
camelia | rakudo-moar a28270: OUTPUT«8» | ||
Herby_ | ah ok | 04:11 | |
m: my @array = <james robert sally jesse raphael>; say @array[*-1]; | 04:12 | ||
camelia | rakudo-moar a28270: OUTPUT«raphael» | ||
Herby_ | m: my @array = <james robert sally jesse raphael>; say @array[-1]; | ||
camelia | rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_BDSq1k_7jUnsupported use of a negative -1 subscript to index from the end; in Perl 6 please use a function such as *-1at /tmp/_BDSq1k_7j:1------> 3ert sally jesse raphael>; say @array[-1]7⏏5;» | ||
Juerd | m: my $year = 2016; .say for sort map *.value.tail, classify *.month, grep *.day-of-week == 5, Date.new("$year-01-01") .. Date.new("$year-12-31"); | ||
camelia | rakudo-moar a28270: OUTPUT«(2016-01-29)(2016-02-26)(2016-03-25)(2016-04-29)(2016-05-27)(2016-06-24)(2016-07-29)(2016-08-26)(2016-09-30)(2016-10-28)(2016-11-25)(2016-12-30)» | ||
Herby_ | that makes sense | ||
Juerd | Those are the last fridays of each month of 2016 | ||
Herby_ | that is pretty slick | ||
Juerd | Note how for example *.value.tail could also have been written as { *.value.tail } | ||
NO. I should really go to bed. | 04:13 | ||
Note how for example *.value.tail could also have been written as { $^month.value.tail } | |||
Herby_ | what is the $^month doing for you? specifically the '^' | 04:14 | |
Juerd | $^foo is an implicitly declared argument | ||
Herby_ | hmm ok | ||
Juerd | They're sorted, so $^ape comes before $^beer, even if you have $^beer earlier in your code. | ||
m: my $sub = -> $foo, $bar { say "$foo/$bar" }; say $sub(42, 23); | 04:15 | ||
camelia | rakudo-moar a28270: OUTPUT«42/23True» | ||
Juerd | m: my $sub = { say "$^foo/$^bar" }; say $sub(42, 23); | ||
camelia | rakudo-moar a28270: OUTPUT«23/42True» | ||
Herby_ | that hurts my brain | 04:16 | |
let me take a look | |||
Juerd | m: my $sub = (* ~ "/" ~ *).say; say $sub(42, 23); | ||
camelia | rakudo-moar a28270: OUTPUT«42/23True» | ||
Juerd | I'm off to bed. Can't think straight and probably shouldn't try explaining things right now :) | ||
Herby_ | hah well thanks for the help, have a good night! | 04:17 | |
m: my @array = <1 2 3 4 5>; say @array.last; | 04:19 | ||
camelia | rakudo-moar a28270: OUTPUT«Method 'last' not found for invocant of class 'Array' in block <unit> at /tmp/opnFGRlojB line 1» | ||
Juerd | Try .tail | ||
Herby_ | m: my @array = <1 2 3 4 5>; say @array[*-1] | ||
camelia | rakudo-moar a28270: OUTPUT«5» | ||
Herby_ | m: my @array = <1 2 3 4 5>; say @array.tail | ||
camelia | rakudo-moar a28270: OUTPUT«(5)» | ||
Herby_ | m: my @array = <1 2 3 4 5>; say @array.tail; say @array; | ||
camelia | rakudo-moar a28270: OUTPUT«(5)[1 2 3 4 5]» | ||
Herby_ | :) | ||
Juerd | Also, try to use more creative values, so you know that what you're getting is actually your value, not the index or something | 04:20 | |
Herby_ | lol good point | ||
maybe I should go to bed too | |||
and I'll try documenting my fledgling attempt at "99 problems of Haskell/Perl 6" | |||
Juerd | Good night :) | 04:21 | |
Herby_ | night! | ||
ugexe | m: my &tap = -> $s { $s.say }; my $s = Supplier.new; $s.?blah.Supply.act(&tap); # bug? | 04:22 | |
camelia | rakudo-moar a28270: OUTPUT«(Any)» | ||
04:27
pjscott joined
|
|||
Herby_ | m: my @list = <james sally jesse raphael>; say @list.tail; | 04:27 | |
camelia | rakudo-moar a28270: OUTPUT«(raphael)» | ||
Herby_ | m: my @list = <james sally jesse raphael>; say @list[*-1]; | 04:28 | |
camelia | rakudo-moar a28270: OUTPUT«raphael» | ||
04:36
pjscott left
|
|||
Herby_ | m: my @a = <1 2 3>; my @b = <1 2 3>; if @a eq @b { say "they are equal" }; | 04:36 | |
camelia | rakudo-moar a28270: OUTPUT«they are equal» | ||
Herby_ | m: my @a = <1 2 3>; my @b = <3 2 1>; if @a eq @b { say "they are equal" }; | 04:37 | |
camelia | ( no output ) | ||
Herby_ | m: my @a = <1 2 3 2 1>; if @a eq @a.reverse { say "the list is a palindrome" }; | ||
camelia | rakudo-moar a28270: OUTPUT«the list is a palindrome» | ||
Herby_ | m: my @a = <1 2 3 2 1>; if @a == @a.reverse { say "the list is a palindrome" }; | ||
camelia | rakudo-moar a28270: OUTPUT«the list is a palindrome» | ||
Juerd | m: my @a = <1 2 3 2 1>; my @b = <x x x x x>; if @a == @b { say "the lists have the same number of elements" } | 04:38 | |
camelia | rakudo-moar a28270: OUTPUT«the lists have the same number of elements» | ||
Juerd | ! | ||
Herby_ | doh | ||
I'm sure that would have bit me at some point in time, thanks for pointing it out | 04:39 | ||
Juerd | Do positive *and* negative tests :) | ||
Herby_ | m: my @a = <x x x x x>; if @a eq @a.reverse { say "the list is a palindrome" }; | 04:40 | |
camelia | rakudo-moar a28270: OUTPUT«the list is a palindrome» | ||
Herby_ | lol | ||
i seriously need to go to bed | |||
m: my @a = <x x x y y>; if @a eq @a.reverse { say "the list is a palindrome" }; | |||
camelia | ( no output ) | ||
Juerd | eqv | 04:41 | |
Herby_ | but I shall press on, for science | ||
m: my @list = (1, 2, 3, (4,5), 6); say @list.flatten; | 04:44 | ||
camelia | rakudo-moar a28270: OUTPUT«Method 'flatten' not found for invocant of class 'Array' in block <unit> at /tmp/wemZZmAXUy line 1» | ||
Herby_ | m: my @list = (1, 2, 3, (4,5), 6); say @list.flat; | ||
camelia | rakudo-moar a28270: OUTPUT«(1 2 3 (4 5) 6)» | ||
sortiz | Herby: Try @a.List.flat | 04:45 | |
Herby_ | m: my @list = (1, 2, 3, (4,5), 6); say @list.List.flat; | ||
camelia | rakudo-moar a28270: OUTPUT«(1 2 3 4 5 6)» | ||
skids | m: my @list := (1, 2, 3, (4,5), 6); say @list.flat | ||
camelia | rakudo-moar a28270: OUTPUT«(1 2 3 4 5 6)» | ||
Herby_ | works like a charm, thanks | ||
why is that .List needed? | 04:46 | ||
skids | Arrays itemize their elements automatically. | 04:47 | |
As if they all had $ in front. | |||
Herby_ | ok | 04:48 | |
On Problem 8 of "99 problems of haskell" and this one is tripping me up | |||
eliminate consecutive duplicates of a list of elements, with the order unchanged | 04:49 | ||
so <a a b c c a d> should output <a b c a d> | |||
sortiz | And using := you are "binding" the List, avoiding the Array. | ||
Juerd | Herby_: .squish | 04:50 | |
skids | m: (1,1,2,2,1,1,3).squish.say; | 04:51 | |
camelia | rakudo-moar a28270: OUTPUT«(1 2 1 3)» | ||
Herby_ | m: my @list = <a a b c c a d>; say @list.squish; | ||
camelia | rakudo-moar a28270: OUTPUT«(a b c a d)» | ||
Herby_ | thats built in? nice | ||
04:53
pjscott joined
|
|||
ugexe | is there a phaser that fires inside a loop on LAST but also if the loop is left via a return? | 04:57 | |
skids | m: sub a ($leaveat) { for (0..4) { return if $leaveat; LEAVE { "left".say } } }; a(2); a(5); | 05:00 | |
camelia | rakudo-moar a28270: OUTPUT«leftleft» | ||
skids | oh nm. | ||
05:02
pjscott left
05:12
yurivish left
|
|||
Quom__ | m: my @list = <a a b c c a d>; my $last; @list = eager gather for @list { take $last = $_ unless $last === $_ }; say @list | 05:19 | |
camelia | rakudo-moar a28270: OUTPUT«[a b c a d]» | ||
Quom__ | m: my @list = <a a b c c a d>; my $last; @list.=map:{ $last = $_ unless $last === $_ }; say @list | 05:20 | |
camelia | rakudo-moar a28270: OUTPUT«[a b c a d]» | ||
05:22
pjscott joined
05:26
lnrdo joined
05:31
lnrdo left,
Cabanossi left
05:35
Cabanossi joined
05:39
glucosade left
05:40
pjscott left,
pjscott joined
05:49
tonginbox joined
05:50
tonginbox left
05:51
pjscott left
05:54
pjscott joined
05:57
Ch0c0late joined
06:05
espadrine left
06:09
havenwood joined
06:14
BenGoldberg left
06:16
ghost_ left
06:19
anaeem1_ joined
06:20
pjscott left
06:22
anaeem1_ left
06:24
pjscott joined
06:28
darutoko joined,
pjscott left
06:29
Herby_ left
06:30
yurivish joined,
pjscott joined
06:33
pjscott left,
pjscott joined
06:35
nzkindest joined,
pjscott left
06:37
pjscott joined,
kjk left,
psy_ left
06:40
pjscott left,
khw left,
pjscott joined
06:41
Penguiniator joined
06:42
pjscott left
06:43
pjscott joined
06:45
pjscott left
06:49
pjscott joined
06:52
schnuppi joined
06:59
linuxuser9000 joined
07:04
Tonik joined,
Tonik left
07:05
_nadim joined
07:06
pjscott left,
pjscott joined
07:10
_nadim left
07:14
lnrdo joined
07:19
lnrdo left
07:27
sortiz left
07:29
skids left,
domidumont joined
07:31
pjscott left
07:32
anaeem1_ joined,
anaeem1_ left
07:34
domidumont left
07:35
domidumont joined
07:42
grassass left
07:46
CIAvash joined
07:51
pecastro left
07:59
linuxuser9000 left
08:19
joydo joined
08:22
tjt263 left
08:31
schnuppi left,
firstdayonthejob joined
|
|||
gfldex | m: dd so any((Nil, (Nil, Nil))) | 08:40 | |
camelia | rakudo-moar a28270: OUTPUT«Bool::True» | ||
08:58
rindolf joined
08:59
xpen joined
09:03
lnrdo joined
09:07
lnrdo left,
rindolf left
|
|||
moritz | m: say so (Nil, Nil) | 09:09 | |
camelia | rakudo-moar a28270: OUTPUT«True» | ||
09:12
wamba joined
09:15
vendethiel joined
09:21
rindolf joined
09:25
wollmers joined
09:26
woolfy joined
09:27
schnuppi joined,
woolfy left
|
|||
wollmers | hello rakudistas | 09:29 | |
moritz | \o wollmers | ||
nine | Good morning! | ||
09:30
schnuppi left
|
|||
wollmers | moritz: What's the current policy regarding changes of spec-tests and/or specs? | 09:30 | |
nine | wollmers: from the backlog: we still have to establish good practices with regard to fixing spectests. On the one hand the 6.c tests are frozen, on the other hand straight forward bugs in there may be negotiable. | ||
09:30
aindilis left
|
|||
moritz | wollmers: it's not really ironed out | 09:30 | |
wollmers: is there a particular change you have in mind? | |||
09:30
aindilis joined
|
|||
moritz | adding tests for stuff that already works and that isn't controversial or experimental should be fine, for example | 09:31 | |
nine | wollmers: 6.d spec tests are there for the changing, but we haven't decided yet how to implement the distinction :) docs/language_versions.md is a proposal that's in discussion | ||
wollmers | moritz: there is a minor/cosmetic with sprintf and the binary format. IMHO the spec-test are wrong. | 09:32 | |
moritz | wollmers: does rakudo implement the wrong tests? | ||
wollmers | P6: my uint64 $z = +^0;say sprintf("%064b",$z); | 09:33 | |
moritz | m: my uint64 $z = +^0;say sprintf("%064b",$z); | ||
camelia | rakudo-moar a28270: OUTPUT«00000000000000000000000000000000000000000000000000000000000000-1» | ||
moritz | eeks | ||
if that's what the test expects, feel free to fix it :-) | 09:34 | ||
wollmers | moritz: try it with uint8. Or try the same in Perl5 (which does it IMHO correct). | ||
As a pull request? Or directly with an inactivated test? | 09:36 | ||
moritz | wollmers: the latter | 09:37 | |
09:38
vendethiel left
|
|||
stmuk__ | .tell zoffix the perl6.org home page link to stevemynott.blogspot.com/2016/01/fo...ineup.html wrongly points to stevemynott.blogspot.com/feeds/1832...ts/default .. AFAIK it's not my problem with the feed :) but if it is bounce to back to me | 09:39 | |
yoleaux | stmuk__: I'll pass your message to zoffix. | ||
moritz | stmuk__: why not simply fix it yourself? | ||
stmuk__: it's in a public repo to which you should have push access | 09:40 | ||
09:41
lnrdo joined
09:43
schnuppi joined,
spider-mario joined
09:44
schnuppi left
|
|||
stmuk__ | I'm not really a client side dev | 09:45 | |
moritz | stmuk__: this is just changing an URL in a text file | ||
stmuk__: get over your self-categorization | |||
stmuk__ | is it? I'd have assumed it was an ajax call | 09:46 | |
moritz | find the location with 'git grep stevemynott' | ||
edit the file, fix it, commit, push | |||
bartolin_ | by the way, there is also RT #123979 for problems with %064b in sprintf | ||
stmuk__ | I think it's more likely to be misparsing the pl6anet.org/atom.rss feed | 09:47 | |
moritz | stmuk__: oh wait, is this in the feed box? sorry, I thought it was hard-coded | ||
stmuk__: that might be non-trivial, sorry | |||
stmuk__ | yeah that's my guess too .. I'll look anyway | ||
09:48
Actualeyes joined
|
|||
stmuk__ | it's probably out by one in some data structure parsing in javascript in some nasty way | 09:48 | |
moritz | it's picking up the first <link>, it should pick up <link rel="alternate" type="text/html" | 09:50 | |
stmuk__ | actually it looks like CSS :/ | ||
moritz waits for XLST | 09:52 | ||
stmuk__ does Awful Hack (tm) with source feed | 09:53 | ||
hmmm something seems to be cached | 09:55 | ||
dalek | c: 659c832 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/Cool.pod: Typo (while → whole) |
09:57 | |
09:57
AlexDaniel joined
|
|||
wollmers | How can I call a method of a class fully qualified, i.e. like Perl5 A::B->foo() | 09:59 | |
nine | wollmers: just the same AFAIK, but what are you actually trying to do? | 10:02 | |
10:03
joydo left
|
|||
stmuk__ | .tell zoffix I hacked the feed to fix it .. root issue is < moritz> it's picking up the first <link>, it should pick up <link rel="alternate" type="text/html" | 10:03 | |
yoleaux | stmuk__: I'll pass your message to zoffix. | ||
wollmers | If I have two packages with the same method names, and I won't instantiate an object. | ||
stmuk__ | moritz++ | ||
10:03
vendethiel joined
|
|||
nine | That's really just A::B.foo() | 10:04 | |
wollmers | nine: thx, will try. Missing examples for call variants in docs. | 10:05 | |
10:06
frankjh joined
|
|||
AlexDaniel | m: say <a s d f>.grep({$_ !~~ /d/}); | 10:08 | |
camelia | rakudo-moar a28270: OUTPUT«(a s f)» | ||
stmuk__ | oh the atom.rss parsing is in perl | ||
:D | |||
10:08
glucosade joined
|
|||
AlexDaniel | m: say <a s d f>.grep: {!/d/} | 10:09 | |
camelia | rakudo-moar a28270: OUTPUT«(a s f)» | ||
AlexDaniel | lucs: ↑ ? | ||
10:09
nzkindest left
|
|||
moritz | m: say <a s d f>.grep: none('d') | 10:10 | |
camelia | rakudo-moar a28270: OUTPUT«(a s f)» | ||
AlexDaniel | nice | ||
10:12
yeahnoob left
|
|||
AlexDaniel | m: say <a s d f>.grep: ‘d’ # too bad you cannot invert this easily | 10:13 | |
camelia | rakudo-moar a28270: OUTPUT«(d)» | ||
lizmat | AlexDaniel: invert? not sure what you mean? | 10:15 | |
AlexDaniel | lizmat: so that it finds a s f instead of d | ||
m: say <a s d f>.grep: * !~~ ‘d’ | 10:16 | ||
camelia | rakudo-moar a28270: OUTPUT«(a s f)» | ||
AlexDaniel | well perhaps this is easy enough | ||
lizmat | AlexDaniel: I have been thinking about a .filter counterpart, like .split and .comb are counterparts | 10:19 | |
masak | good antenoon, #perl6 | 10:22 | |
10:22
travis-ci joined
|
|||
travis-ci | Doc build passed. Aleks-Daniel Jakimenko-Aleksejev 'Typo (while → whole)' | 10:22 | |
travis-ci.org/perl6/doc/builds/101384069 github.com/perl6/doc/compare/d19f3...9c83296a94 | |||
10:22
travis-ci left
10:31
lnrdo left
10:33
lnrdo joined
|
|||
nine | Is there a way to replace a class' method in a lexical scope? With augment I seem to only be able to add methods. | 10:33 | |
10:33
xpen left
|
|||
lizmat | nine: subclass in a scope with that method ? | 10:34 | |
or mixin a role with but ? | |||
nine | When it's a static method? | 10:35 | |
(in Rakudo::Internals) | |||
lizmat | m: my $a = 42 but role { method gist { "The Answer" } }; say $a | ||
camelia | rakudo-moar a28270: OUTPUT«The Answer» | ||
lizmat | m: my $a = 42 but role { method gist { "The Answer" } }; say +$a | 10:36 | |
camelia | rakudo-moar a28270: OUTPUT«The Answer» | ||
lizmat | hmmm... | ||
m: my $a = 42 but role { method gist { "The Answer" } }; say $a.Str | |||
camelia | rakudo-moar a28270: OUTPUT«42» | ||
dalek | href="https://perl6.org:">perl6.org: 061cbe2 | (Steve Mynott)++ | fetch-recent-blog-posts.pl: selector now pulls first 'text/html' link to fix wrong link with a blogger.com site |
10:37 | |
lizmat | stmuk__++ | 10:38 | |
nine | stmuk__: is the ".broked" in line 14 really deliberate? | 10:39 | |
m: multi sub foo("foo") { say "outer" }; sub bar() { foo("foo"); }; { multi sub foo("foo") { say "inner"; }; sub bar() { foo("foo") }; { bar; } } | 10:43 | ||
camelia | rakudo-moar a28270: OUTPUT«outer» | ||
nine | lizmat: ^^^ this is the actual problem I'd like to solve. Overwriting the multi sub in the inner lexical scope doesn't seem to work | ||
That means that I cannot replace multi sub INITIALIZE_DYNAMIC('$*ARGFILES') in the CORE.d setting | |||
lizmat | I see | 10:44 | |
maybe directly modify using the MOP ? | |||
moritz | m: multi sub foo("foo") { say "outer" }; sub bar() { foo("foo"); }; { multi sub foo("foo") { say "inner"; }; sub bar() { say "inner bar"; foo("foo") }; { bar; } } | ||
camelia | rakudo-moar a28270: OUTPUT«inner barouter» | ||
lizmat | hmmm... but that wouldn't be lexical :-( | 10:45 | |
10:45
wollmers left
|
|||
moritz | m: multi sub foo("foo") { say "outer" }; sub bar() { foo("foo"); }; { only sub foo("foo") { say "inner"; }; sub bar() { say "inner bar"; foo("foo") }; { bar; } } | 10:45 | |
camelia | rakudo-moar a28270: OUTPUT«inner barinner» | ||
[Tux] | csv-ip5xs 50000 18.233 18.113 | 10:46 | |
test 50000 23.223 23.104 | |||
test-t 50000 12.669 12.550 | |||
csv-parser 50000 50.363 50.244 | |||
lizmat | moritz: afraid it will have to be a multi | ||
nine | Yep. Otherwise we kill all other dynamic variables | ||
10:46
xpen joined
|
|||
lizmat | well, perhaps we will have to abandon the INITIALIZE_DYNAMIC mechanism then | 10:47 | |
it was an easy and elegant hack at the time, but it was that | |||
nine | m: multi sub foo("foo", Version) { say "outer" }; sub bar() { foo("foo", Version); }; { multi sub foo("foo", v6.d) { say "inner"; }; sub bar() { foo("foo", v6.d) }; { bar; } } | 10:48 | |
camelia | rakudo-moar a28270: OUTPUT«inner» | ||
nine | Maybe use the Perl version as a tie breaker? | ||
stmuk__ | nine: errrm | ||
10:48
xpen_ joined
|
|||
lizmat | nah, maybe we just need a Rakudo::Internals.REGISTER-DYNAMIC('$*ARGFILES', { .... } ) | 10:49 | |
and have DYNAMIC look in there | |||
dalek | href="https://perl6.org:">perl6.org: 3929453 | (Steve Mynott)++ | fetch-recent-blog-posts.pl: remove debugging url nine++ |
||
10:49
xpen left
|
|||
nine | lizmat: that was my second idea. But then we'd have to replace REGISTER-DYNAMIC in the 6.d setting, hence my question on how to do that lexically :) | 10:49 | |
lizmat | mmm.. REGISTER-DYNAMIC could take the current $*PERL as an additional key | 10:51 | |
and the associated LOOKUP-DYNAMIC could use the current $*PERL also as a key ? | 10:52 | ||
if not found with $*PERL key, then try without ? | |||
I think I could make that work | |||
unless you want to do it, nine | |||
10:52
xpen_ left
10:53
xpen joined
|
|||
dalek | kudo/nom: f0cddab | lizmat++ | src/core/ (5 files): Move MAKE-ABSOLUTE-PATH to Rakudo::Internals |
10:54 | |
nine | lizmat: I really don't want to let myself be dragged into another coding day. I haven't been to the airfield in two months, so I'll gladly let you take this one :) | 10:55 | |
AlexDaniel | lizmat: perhaps it would make sense to have filter | ||
nine | I'll push my current changes | ||
lizmat | nine: will do, you deserve some flying time! | ||
AlexDaniel | lizmat: but I believe that there are other more important things to focus on… :) | ||
lizmat | AlexDaniel: wouldn't want to do this until we have a working 6.d dev model anyway :-) | ||
nine | no dalek? | 10:56 | |
anyway, pushed | |||
dalek | kudo/language_versions: d43a998 | (Stefan Seifert)++ | / (5 files): First attempt at adding a CORE.d setting |
10:58 | |
kudo/language_versions: cba6766 | (Stefan Seifert)++ | / (8 files): Bring back IO::CatPath and IO::CatHandle in 6.d nine@sphinx:~> perl6 -e 'IO::ArgFiles.new;' nine@sphinx:~> perl6 -e 'use v6.d; IO::ArgFiles.new;' Could not find symbol '&ArgFiles' |
|||
10:58
lucasb joined,
xpen left
11:00
xpen joined,
xpen left,
xpen joined
|
|||
lizmat | nine: it's correct that you didn't touch the JVM makefile ? | 11:01 | |
11:04
pjscott joined
11:05
xpen left
11:10
pjscott left
|
|||
nine | lizmat: yes, that's still TODO | 11:12 | |
lizmat | okidok | ||
Juerd | Is .flat on an Array effectively a no-op? | 11:13 | |
moritz | Juerd: I don't think so | ||
m: my @a = [(1, 2), (3, 4)]; say @a.perl; say @a.flat.perl | 11:14 | ||
camelia | rakudo-moar f0cdda: OUTPUT«[(1, 2), (3, 4)]($(1, 2), $(3, 4)).Seq» | ||
moritz | huh, why does that itemize the sublists? | ||
that looks vaguely buggy to me | |||
dalek | kudo/nom: 807bf71 | lizmat++ | src/core/ (4 files): Move MAKE-BASENAME to Rakudo::Internals |
||
Juerd | 05:47 < skids> Arrays itemize their elements automatically. | ||
05:47 < skids> As if they all had $ in front. | |||
That's why I was asking... | |||
moritz | ah, right | 11:15 | |
m: my @a; @a[0] := (1, 2); @a[1] := (3, 4); say @a.perl; say @a.flat.perl | |||
camelia | rakudo-moar f0cdda: OUTPUT«[(1, 2), (3, 4)]((1, 2), (3, 4)).Seq» | ||
Juerd | But given this, I don't see much value in allowing .flat on them. It's just confusing if it returns practically the same, unflattened, thing... | ||
AlexDaniel | Juerd: rt.perl.org/Public/Bug/Display.html?id=127121 | 11:16 | |
AlexDaniel is a bot that does efficient lookups on rt :) | 11:17 | ||
Juerd | It could warn that you want @array.List.flat, or it could just delegate to that because it's the only sensible thing to do anyway... Or there might be some surprising use for @array.flat after all :) | ||
nine | m: my @a = 1, (2, 3), 4; dd @a.List.flat | 11:19 | |
camelia | rakudo-moar f0cdda: OUTPUT«(1, 2, 3, 4).Seq» | ||
AlexDaniel | yeah, I'd appreciate if it dwimmed | ||
nine | Juerd: is $a.flat useless? | 11:20 | |
lizmat | m: use nqp; say nqp::getcomp('perl6').language_version # nine, does that give the right answer when in 6.d setting ? | ||
camelia | rakudo-moar f0cdda: OUTPUT«6.c» | ||
nine | lizmat: not yet | ||
lizmat | ok | ||
nine | I really hacked it only far enough to demonstrate a nested 6.d setting | ||
lizmat | I'll make the version parameter obligatory then | ||
Juerd | nine: I see what you did there. You reworded my question, basically saying "what do you think?"... But sorry, I have no idea if it's useful :) | 11:21 | |
nine | We can easily pass v6.d or even "6.d" or just "d" from the .d setting | ||
11:21
_nadim joined
|
|||
lizmat | yeah, but more importantly, we need that to work for automatic selection of the right dynamic | 11:21 | |
11:22
_nadim left
|
|||
nine | Juerd: point is: $a could be anything. Could be an Array or a List or something else. | 11:22 | |
11:22
_nadim joined
|
|||
lizmat | nine: also, I guess we won't be able to have base values of dynamic variables live in PROCESS:: | 11:22 | |
11:22
RabidGravy joined
|
|||
lizmat | nine: they would need to live higher, as PROCESS:: will be the same between settings, I suppose | 11:23 | |
Juerd | nine: That's not a point. What's your actual point? | ||
nine | Juerd: Array.flat has to be there, so the user doesn't have to care what kind of iterable she got. And Arrays are speced as itemizing their contents, so it may not just go ahead and pretend that they arent. | 11:26 | |
11:26
_nadim left
|
|||
nine | lizmat: we will stumble upon lots of questions like that in the coming weeks :) But yes, it seems like we're gonna need some kind of lexical scoping for those dynamic variables... Could also be that it's gonna be some case by case decisions. | 11:28 | |
Juerd | nine: But that does mean that there's a case where .flat is unlikely to dwim, or do anything useful really. | ||
nine: It could provide a helpful warning, or just do the intended thing. | |||
lizmat | nine: testing $*ARGFILES living in SETTING now | ||
that's the only one for now that would need this for sure, I guess | 11:29 | ||
Juerd | Especially if this is unintended fallout from design decisions, special casing it would be fine imho | ||
nine | Juerd: just because you would like .flat to flatten your array's items, doesn't mean that's the only use case. In other cases, users may actually want to flatten Lists but keep itemized values intact. If we ignored the itemization, that'd be quite impossible to do. | ||
Juerd | nine: What's the use case for .flat on an array, then? | 11:30 | |
nine | lizmat: $*PERL will need to be different, too :) You really want $*PERL.version to give you 6.d in 6.d code :) | ||
lizmat | nine: yeah, but that's dependent on the nqp code I just posted anyway | ||
Juerd | We've already had several people running into this violation of the least surprise thing, some immediately considering it a bug. | 11:31 | |
nine | Or....actually it's gonna be more complicated than that. The 6.c setting will have to know that, too. Because there will be some cases where the nested setting trick will just not be enough. | ||
timotimo | does that mean we'll get a $*COMPILER.supported-versions list/set/something? | ||
lizmat | nine: so making that work, will automagically fix $*PERL.version as well | ||
nine | In any case I'm gonna leave this highly interesting discussion and be afk for a couple of hours :) Bye. | 11:32 | |
lizmat | nine++ # merry flying | ||
11:32
user74747 joined
|
|||
lizmat | m: dd (1,(2,3),4).flat, [1,(2,3),4].flat # seems inconsistent to me | 11:32 | |
camelia | rakudo-moar 807bf7: OUTPUT«(1, 2, 3, 4).Seq(1, $(2, 3), 4).Seq» | ||
lizmat | but TimToady will have a reason for this behaviour, I assume... | 11:33 | |
timotimo | hm. | 11:34 | |
is there actually a way to suppress a "potential difficulties" message? | |||
i thought "# OK" might do it, but it doesn't | 11:35 | ||
Juerd | If there isn't, I'd like to propose "no worries;" ;-) | ||
timotimo | ah | ||
Juerd | That was not an answer :) | ||
timotimo | that doesn't suppress that particular warning though | ||
m: 01234 | 11:36 | ||
camelia | rakudo-moar 807bf7: OUTPUT«Potential difficulties: Leading 0 does not indicate octal in Perl 6. Please use 0o1234 if you mean that. at /tmp/NNuiJlLiKh:1 ------> 03012347⏏5<EOL>WARNINGS for /tmp/NNuiJlLiKh:Useless use of constant integer 1234 in si…» | ||
Juerd | Oh, worries.pm already exists? /me goes to look for what it does | ||
timotimo | worries.pm doesn't exist, but we do have that pragma | ||
AlexDaniel | .u ¯ | 11:37 | |
yoleaux | U+00AF MACRON [Sk] (¯) | ||
Juerd | Ah, assuming a .pm exits is probably a p5ism | ||
timotimo | yeah :) | ||
AlexDaniel | m: say ‘¯’.uniname.say | ||
camelia | rakudo-moar 807bf7: OUTPUT«MACRONTrue» | ||
Juerd | Where we keep loading strict.pm :( | ||
AlexDaniel | m: say ‘¯’.uniname | ||
camelia | rakudo-moar 807bf7: OUTPUT«MACRON» | ||
Juerd | worries is not documented | ||
11:43
pierre-vigier joined
|
|||
dalek | c: 9e44aa1 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/unicode_texas.pod: Make it clear that “⁻” is a minus and “¯” is macron |
11:44 | |
11:50
TEttinger left
11:56
pierre-vigier left
11:59
sortiz joined
|
|||
stmuk__ | m: pl6anet.org/atom.xml | 12:03 | |
camelia | rakudo-moar 807bf7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NTFLzVtNzZConfusedat /tmp/NTFLzVtNzZ:1------> 3http:7⏏5//pl6anet.org/atom.xml expecting any of: colon pair» | ||
stmuk__ | oops | 12:04 | |
m: {no worries; say 0123} | |||
camelia | rakudo-moar 807bf7: OUTPUT«Potential difficulties: Leading 0 does not indicate octal in Perl 6. Please use 0o123 if you mean that. at /tmp/TVxLHdQtcU:1 ------> 3{no worries; say 01237⏏5}123» | ||
sortiz | .tell lizmat TimToady should comment on Array::flat, the recent Day 15 advent affirms that "Simple arrays could be flattened with the .flat method" | 12:08 | |
yoleaux | sortiz: I'll pass your message to lizmat. | ||
lizmat | .botsnack | 12:09 | |
yoleaux | :D | ||
12:08Z <sortiz> lizmat: TimToady should comment on Array::flat, the recent Day 15 advent affirms that "Simple arrays could be flattened with the .flat method" | |||
lizmat | alas, one cannot tell TimToady that he should do anything :-) | ||
or anybody else for that matter :-) | |||
DrForr | Grumble. I found this once before... What's a module that modifies existing grammar? I thought masak's 007 did that, but I might have been wrong. | ||
AlexDaniel | DrForr: any Slang:: module does | 12:10 | |
DrForr | Slang, thanks. | ||
Knew there was a keyword... | |||
funrep | how do i check equality of strings? | ||
DrForr | Ah, Slang::Tuxic was what I was after. | 12:11 | |
AlexDaniel | funrep: 「eq」 | ||
DrForr | Just *one* page down. | ||
AlexDaniel | m: say ‘one’ eq ‘one’ | ||
camelia | rakudo-moar 807bf7: OUTPUT«True» | ||
DrForr | And incidentally Travis is now enabled for Readline. | ||
funrep | aah, tried eq(x,y) and x.eq(y) :P thanks! | ||
CIAvash | AlexDaniel: What do you think about an empty circle as whatever? 🞅 | 12:12 | |
AlexDaniel | m: say [eq] ‘one’, ‘one’ | ||
camelia | rakudo-moar 807bf7: OUTPUT«True» | ||
AlexDaniel | m: say &infix:<eq>(‘one’, ‘one’) | ||
camelia | rakudo-moar 807bf7: OUTPUT«True» | ||
AlexDaniel | funrep: ↑ there are other ways as well :) | 12:14 | |
.u 🞅 | |||
yoleaux | No characters found | ||
funrep | interesting! :) | ||
AlexDaniel | m: say ‘🞅’.uniname | ||
camelia | rakudo-moar 807bf7: OUTPUT«MEDIUM BOLD WHITE CIRCLE» | ||
AlexDaniel | m: say ‘🞆’.uniname # so ok, perhaps bold circle is sometimes not enough | 12:15 | |
camelia | rakudo-moar 807bf7: OUTPUT«BOLD WHITE CIRCLE» | ||
AlexDaniel | m: say ‘🞇’.uniname # so we have heavy circles. But what if that's not enough as well? | 12:16 | |
camelia | rakudo-moar 807bf7: OUTPUT«HEAVY WHITE CIRCLE» | ||
AlexDaniel | m: say ‘🞈’.uniname # surely we need a very heavy circle! | ||
camelia | rakudo-moar 807bf7: OUTPUT«VERY HEAVY WHITE CIRCLE» | ||
AlexDaniel | m: say ‘🞉’.uniname # and this, just in case… | ||
camelia | rakudo-moar 807bf7: OUTPUT«EXTREMELY HEAVY WHITE CIRCLE» | ||
AlexDaniel | CIAvash: I don't think that it fits very well. What does the circle represent? | 12:18 | |
RabidGravy | If one applies a role to an object and then add a method to the role subsequently is it possible to have the object compose the new method? | 12:21 | |
CIAvash | AlexDaniel: I don't know :| I was just thinking of something empty that will be filled or replaced. | ||
AlexDaniel | CIAvash: and why exactly this circle? Why not ◌ for example | ||
CIAvash: or ◯ | 12:22 | ||
or ✪… | |||
CIAvash | It just looked better to me :) | ||
AlexDaniel | or ⭕ or 🔾 | 12:23 | |
CIAvash: Don't get me wrong, it's a good suggestion. But it has to have some reasoning behind it, I think | 12:24 | ||
12:24
Ch0c0late left
|
|||
AlexDaniel | CIAvash: e.g. ✪ is a star, as in whatever “star”. But besides that there's not much to it | 12:24 | |
CIAvash: ⍰ looks great, just like in “something empty that will be filled or replaced”. But besides that, again, not so much | 12:25 | ||
funrep | is there any method of arrays that allows you to check if it contains a particular value? | ||
AlexDaniel | CIAvash: and I'm not sure if it's a good idea to use APL chars | ||
12:27
kid51 joined
|
|||
AlexDaniel | by the way, what about having ⁇ and ‼ as non-texas versions of ?? and !! ? | 12:27 | |
sortiz | lizmat: The current definition of method flat in core/Array.pm seems suspicious, where are the flattening?? | 12:28 | |
12:29
joydo joined
|
|||
lizmat | List.flat probably lives in role Iterable | 12:30 | |
RabidGravy | funrep, "grep" | ||
m: my @a = <a b c>; say so @a.grep('v') | 12:31 | ||
camelia | rakudo-moar 807bf7: OUTPUT«False» | ||
RabidGravy | m: my @a = <a b c>; say so @a.grep('b') | ||
camelia | rakudo-moar 807bf7: OUTPUT«True» | ||
sortiz | lizmat: Yes, but Array.flat creates its own Seq, so, @foo.List.flat works, but @foo.flat no. | 12:37 | |
lizmat | sortiz: yeah, it feels wrong to me too, but I hope TimToady will shine his light on this issue soon :-) | 12:38 | |
sortiz | lizmat: I hope so, this issue is one of the most asked/questioned in #perl6. Thanks. | 12:40 | |
12:48
joydo left
|
|||
dalek | c: de8fc13 | (Siavash Askari Nasr)++ | doc/Language/unicode_texas.pod: Change L<> to C<> |
12:49 | |
timotimo | so, discourse (the thing jeff atwood started) seems kinda good | 12:50 | |
lizmat | CIAvash++ # good catch! | ||
timotimo: ?? | |||
timotimo | see discourse.org | 12:51 | |
just a thing i randomly noticed | |||
dalek | kudo/nom: 4680dc8 | (Dan Kogai)++ | src/core/Complex.pm: decent infix:<**> for Complex |
12:52 | |
kudo/nom: 79f77f7 | lizmat++ | src/core/Complex.pm: Merge pull request #679 from dankogai/nom decent infix:<**> for Complex |
|||
sortiz Need more unicode fonts | |||
[Tux] | CSV timings for more languages: gist.github.com/Tux/e2d49c06efcb6a27a75b | 12:55 | |
lizmat | [Tux]: do they all have the flexibility that Text::CSV provides ?? | 12:56 | |
timotimo | we still have to get 100x faster at least, i see. | 12:57 | |
frankjh | Hi, if I have I subroutine which is supposed to operate on various types(CArray, buf, ...) like in sub remove_leading_elems($buf!, Int $num_elems_to_remove) {loop ..} and which should return something of the same type as $buf with the leading elems removed, how to I do that? I thought of querying the type of $buf, make a new thing of that type and then loop over $buf with an offset? | ||
[Tux] | lizmat: None :) | 12:59 | |
lizmat | ok, so the comparison is not entirely fair :-) | ||
timotimo | frankjh: you can usually just call .new on the instance to get a new instance of the same type | ||
frankjh | timotimo: Wow! Thanks. | 13:00 | |
timotimo | m: my Buf[int8] $foo .= new(1, 2, 3, 4); say $foo; say $foo.new(9, 9, 9, 9); say $foo | 13:01 | |
camelia | rakudo-moar 807bf7: OUTPUT«Buf[int8]:0x<01 02 03 04>Buf[int8]:0x<09 09 09 09>Buf[int8]:0x<01 02 03 04>» | ||
timotimo | ^- you get the same type and unless the ".new" method is horribly b0rked, it won't change the original | ||
El_Che | [Tux]: 3th column is rows? what are the times? max - min ? | ||
AlexDaniel | [Tux]: more is better, right? | ||
timotimo | El_Che: i think it's run time and run time minus start-up time | 13:02 | |
13:02
chienjo joined
|
|||
chienjo | Anyone know a solution to 'resolve stage failed for Task::Star: Dependency DBIish is not present in the module ecosystem' when running panda install Tast::Star? | 13:02 | |
lizmat | no, but it sounds the same problem as CurtisOvidPoe had yesterday, perhaps there's something to be found in the backlog | 13:03 | |
El_Che | timotimo: java startup time of 0.012? nah | 13:04 | |
timotimo | chienjo: huh. can you try "panda update", then try installing again? | ||
chienjo | timotimo: On it. | 13:05 | |
13:07
Skarsnik joined
|
|||
frankjh | If I have a module and an internal helper subroutine like sub remove_leading_elems, is there a way to write a test for that subroutine without exporting it? | 13:07 | |
timotimo | you can export it under a different tag than ":DEFAULT" or something? | 13:08 | |
i don't know if that'll give users that sub if they explicitly ask for :ALL with use | |||
otherwise, "is export(:TESTING)" could do the trick? | 13:09 | ||
Skarsnik | It will :) | ||
I have this in a NC test | |||
m: use NativeCall :TEST; guess_library_name(Str); nativesizeof(int32); | 13:10 | ||
camelia | rakudo-moar 807bf7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FcUkwBxB1OUndeclared routine: nativesizeof used at line 1» | ||
Skarsnik | m: use NativeCall :ALL; guess_library_name(Str); nativesizeof(int32); | ||
camelia | ( no output ) | ||
13:11
sena_kun joined
|
|||
frankjh | Uh: What is the relation between : TESTING and :TEST. Or is this a name(tag?) which I can choose freeely? | 13:12 | |
Skarsnik | it's just a name | 13:13 | |
frankjh | Ok thanks | ||
timotimo | other tags commonly suggested are :YOLO, :ORLY, :WAT, and - curiously - :DOOD | ||
[Tux] | El_Che, I'll make a HTML page to explain … | 13:14 | |
first column: language, second: test script, third: field count (should be 50000), 4th: time taken (lower is better), 5th: time taken without startup time | 13:15 | ||
lizmat | [Tux]: maybe we should also make a P6 version of Text::CSV version with as many features as the C version? | ||
El_Che | [Tux]: I apologise. I have the the impression I have asked you a few times and I forget after a while | 13:16 | |
[Tux] | lizmat, I seriously doubt if that would cause considerable speedup | ||
20% max | |||
timotimo | [Tux]: do you currently use native ints in some way? | ||
lizmat | timotimo: yes | 13:17 | |
[Tux] | yes, I think I do | ||
timotimo | because native ints - when used with operators and subs and such - are currently a bit pessimized | ||
because they always allocate IntLexRef and will never inline the operators | |||
it may seem counter-intuitive, but could you try replacing int* with Int and re-time? | |||
13:17
pierre-vigier joined
|
|||
frankjh | timotimo: I feed old now. None of these acronyms had any meaning for me. ... YOLO was here in Germany "Jugendwort des Jahres 2012" | 13:18 | |
timotimo | YOLO is the only acronym in that list, actually | ||
chienjo | timotimo: Many thanks. running 'Panda update' solves the issue. | ||
timotimo | the others are just allcaps because export tags usually look like that | ||
[Tux] | timotimo: the repo is on github (eco system), feel free to experiment | ||
timotimo | [Tux]: ah, sure. it'll have to wait a few hours, though | ||
frankjh: orly is from that meme/macro with the owl, wat is from that amusing talk about oddities in the javascript language, dood is used pretty much everywhere, but i usually associate it with a Prinny | 13:19 | ||
frankjh | timotimo: I am aging faster--- | 13:20 | |
timotimo | and, fwiw, "läuft bei dir" was jugendwort des jahres 2015 or 2014 and nobody i know has ever heard that phrase before it got elected | ||
13:21
sortiz left
|
|||
dalek | kudo/nom: 620d893 | lizmat++ | src/core/ (13 files): Re-imagine lazy init of system dynamic vars The old system was using MMD to select the right candidate for lazy initialization of system dynamic vars such as $*CWD. This however appeared to be incompatible with the multiple settings idea of being able to support 6.c and 6.d by switching settings. The new system uses an internal method for registering the initialization of a system dynamic var. And the internal method for looking up system dynamic vars, now uses another initial method to do the lookup and initialization. So, this should now be ready for settings.d |
13:22 | |
DrForr | Aah, finally have an actual bug to report :) #127230 - Pretty trivial, found it while playing. | ||
lizmat | .tell nine github.com/rakudo/rakudo/commit/620d8931c6 | 13:23 | |
yoleaux | lizmat: I'll pass your message to nine. | ||
frankjh | timotimo: Thanks. I will use "is export(:TESTING)" and stop googling for youth... | 13:25 | |
lizmat | cycling& | ||
13:39
lnrdo left,
glucosade left
13:40
nzkindest joined
13:42
risou is now known as risou_awy,
risou_awy is now known as risou
13:46
cognominal left,
dekiss joined,
cognominal joined
|
|||
[Tux] | El_Che, does tux.nl/Talks/CSV6/speed5.html help? | 13:49 | |
Skarsnik | Wow that freaking slow x) | 13:53 | |
13:54
chienjo left
|
|||
[Tux] | but fast compared to when I started testing: tux.nl/Talks/CSV6/speed4.html | 13:55 | |
13:55
vendethiel left,
sena_kun left
13:56
lnrdo joined
|
|||
awwaiid | so "provides" in meta.json -- that needs to have ALL the modules I want installed, not just the ones users reference? | 14:00 | |
14:01
sjoshi joined
|
|||
Skarsnik | yes, all file your modules need to work | 14:02 | |
14:02
vendethiel joined,
lichtkind joined
|
|||
awwaiid | k | 14:04 | |
14:10
lnrdo left,
lnrdo joined
|
|||
lucasb | o/ suggestion of links to include in the perl6.org/community page: stackoverflow, reddit, facebook group and maybe twitter #perl6 hashtag search | 14:14 | |
El_Che | [Tux]++ | ||
[Tux]: fantastisch canary in the mine | 14:15 | ||
lucasb | And you should probably decide what to do with the perl6-announce mailing list. the last thing that was announced there was parrot, in the last year | ||
14:18
leont joined
|
|||
frankjh | Hi, if I want to refactor my module, howdo I get rid of old copies installed somewhere? I have changed the name of my module, but my tests still pass.... I did panda install . and panda install git://github uptonow. | 14:19 | |
Skarsnik | I am not sure panda have a uninstall? | ||
frankjh | I saw only --force | 14:20 | |
lucasb | frankjh: does removing your ~/.perl6 folder helps? | ||
frankjh | Will try. | ||
lucasb | oh, maybe theres some .precomp hidden dir somewhere. remove those too. | 14:21 | |
14:22
Ven joined,
psy_ joined
|
|||
lucasb | maybe this won't help. those folders only have the precompiled modules. the source modules will still be in the share directory | 14:22 | |
RabidGravy | is there some way I can over-ride the way that multi dispatch works in a way that is localised to a particular method or sub? | 14:23 | |
frankjh | lucasb: Yes .perl6 is gone, .precomp gone, but tests still work. Where is /share/ located? | 14:24 | |
lucasb | mine is at $MOARPREFIX/share/perl6/site. but if you are using rakudobrew, it's somewhere inside ~/.rakudobrew | 14:25 | |
sjn | \o | 14:27 | |
funrep | so perl6intro.com recommends .pl6 extension for perl6 files, but ive seen .pm and .pm6 used as well, what is the conventional naming convention? | ||
sjn would love to listen in on toolchain stuff, is there a separate channel for that? | |||
funrep | oh perhaps that stands for perl module | ||
lucasb | sjn: #perl6-toolchain | ||
El_Che | sjn: coming to fosdem? | ||
sjn | El_Che: yes | 14:28 | |
El_Che | \o/ | ||
sjn | lucasb: thanks! ^^ | ||
El_Che: I'll arrive a few days early, even | |||
RabidGravy | funrep, it's really a matter of personal taste | 14:29 | |
frankjh | lucasb: Yes there are references to my code inside ~/.radukobrew, but the filenames are binary.../moar-2015.12/install/share/perl6/site/sources/E458F666F75270A91C1D018AE9D94510E1ED5487 not quite sure howto clean this up. | ||
lucasb | frankjh: I think removing install/share/perl6/site will remove all user modules you installed, like panda, etc. | 14:30 | |
RabidGravy | yeah, I m not quite sure if you simple remove those files | 14:31 | |
^ what will happen if ... rather | |||
frankjh | RabidGravy: Sounds like reinstalling is the safe path? | 14:32 | |
awwaiid | [Tux]: would be interesting to see how that game plays with use csv:from<Ruby> :) | 14:33 | |
[Tux] | sure. Code example please :) | ||
awwaiid | you're going off of this csv-game thing, ya? bitbucket.org/ewanhiggs/csv-game | 14:34 | |
[Tux] | as you can see in speed5.html (at the bottom) | ||
14:35
sftf joined
|
|||
Skarsnik | how the c++ version is slower than the c version x) | 14:37 | |
El_Che | [Tux]: startup time on java is without jvm startup? | 14:38 | |
[Tux] | the clean startup is </dev/null, that time is then subtracted from the </tmp/hello.csv in column5 | 14:39 | |
El_Che | i see | ||
frankjh | I removed ~/.radukobrew/moar-2015.12/install/share/perl6/site, reinstalled panda and Linenoise and my tests are now failing as expected... | 14:40 | |
[Tux] | hmm, actually it is a bit different. let me see if I can cange that to what I want | ||
lucasb | frankjh++ :) | 14:41 | |
14:41
psy__ joined,
psy_ left
14:42
psy__ left,
psy__ joined
14:43
lnrdo left
14:46
Ven left
|
|||
RabidGravy | frankjh, hopefully uninstall will come along at some point as that is quite a common use-case for developers | 14:48 | |
El_Che | for everyone actually | 14:49 | |
14:49
ChoHag left
|
|||
El_Che | a good admin (even admin of your own workstation) don't want ununused old libs all over the place | 14:49 | |
lucs | class Foo { method postcircumfix:<< >>(Str $s) { $s.uc } }; say Foo.new<"bar">; # How can I fix this, wanting 「BAR」? | 14:50 | |
(And ideally, I'd like to make it invocable as 「⋯<bar>」) | 14:52 | ||
vendethiel | lucs: you can't really define operator methods | 14:53 | |
lucs | Oh :/ | ||
vendethiel | also, << >> is not what you think it is :) | ||
lucs | I guess not :) | 14:54 | |
I just concocted what kind of appeared reasonable, hoping you folks could help me fix it. | |||
14:54
pierre-vigier left
|
|||
vendethiel | m: say <<hey you>> | 14:54 | |
camelia | rakudo-moar 620d89: OUTPUT«(hey you)» | ||
lucs | Ah, right. | 14:55 | |
vendethiel | kinda like <>, but with quoting etc | ||
moritz | lucs: << >> as a post-circumfix is not a separate operator, but desugars to { } as a postcircumfix | ||
lucs | Basically, what I'm after is a way to have an instance of Class Foo, $foo for example, able to invoke one of its methods taking a string argument, "bar" for example, as 「$foo<bar>」 | 14:56 | |
Does that make sense? | 14:58 | ||
moritz | m: class Foo { method AT-KEY($bar) { say "|$bar|" } }; Foo.new<blubb> | ||
camelia | rakudo-moar 620d89: OUTPUT«|blubb|» | ||
lucs | Hmm... Where does that AT-KEY come from (which docs to read?) | 14:59 | |
(I'll grep the specs.) | |||
moritz | lucs: doc.perl6.org/language/subscripts | ||
Skarsnik | wow building the doc is slow x) | 15:00 | |
lucs | moritz: Thanks. Strange, but 'ack AT-KEY' finds nothing in the specs (S*.pod files) | 15:01 | |
moritz | lucs: there has to be *something* where doc.perl6.org is better :-) | ||
lucs | :) | ||
awwaiid | m: class Foo { method say-hi($n) { say "hi $n!" } }; multi sub postcircumfix:<{ }>(Foo $f, $arg) { $f.say-hi($arg) }; Foo.new<bob>; # also works | 15:02 | |
camelia | rakudo-moar 620d89: OUTPUT«hi bob!» | ||
15:03
xdoctor joined
15:05
balazs left
|
|||
lucs | awwaiid: Nice, but I'm missing how the 「<{ }>」 somehow works when invoked as 「<⋯>」 :/ | 15:05 | |
lucs saw moritz mention something about desugaring, but doesn't quite understand what it all means. | 15:06 | ||
moritz | lucs: as I said, foo<..> is syntactic sugar for foo{"..."} | ||
lucs | Ah, I see, gotcha. | ||
moritz | lucs: it's a special rule built into the language | ||
lucs | Excellent :-) | 15:07 | |
Wow, super neato. | |||
DrForr | Do we have doco for Slangs yet? | 15:09 | |
awwaiid | yep, neato and also very useful to realize it is sugar and not otherwise-special | ||
DrForr | (he says, *just* before pulling up d.p6.org...) | 15:10 | |
moritz | DrForr: I'd be surprised if we did; slangs are very much experimental, afaict | ||
DrForr | Not surprising. | 15:11 | |
The %*LANG object is rather opaque, I was just going to figure out how to use nqp::atkey() to get at the grammar actions. As I think I need that. | 15:12 | ||
moritz | DrForr: might be easist to look at existing slangs in the ecosystem | 15:14 | |
DrForr | None of them do. | ||
Skarsnik | We can't have link in a table? (pod) | 15:15 | |
DrForr | At least not that I can tell... Looking again. | 15:16 | |
moritz | Skarsnik: there are various forms to write tables; I'm sure some of them support links | ||
DrForr | Oh, never mind, missed one. | ||
Yay, hacking. | |||
Skarsnik | in the pod doc that does not exist? x) | 15:17 | |
moritz | S26 does exist | ||
Skarsnik | The table section is small ~~ | 15:22 | |
15:26
pierre-vigier joined
|
|||
Skarsnik | I try to have | 15:26 | |
Module name Description | |||
==================================================== ============================================ | |||
L<App::Mi6|modules.perl6.org/dist/App::Mi6> Minimal authoring tool for Perl6 | |||
but the L<> is not interpreted | |||
interesting, putting a blank line after ==== make the parsin fail x) | 15:30 | ||
15:30
pierre-vigier left
15:31
balazs joined
|
|||
[Tux] | lizmat, tux.nl/Talks/CSV6/speed5.html <= column 5 now shows the actual processing time | 15:32 | |
15:32
espadrine joined
15:33
lucasb left
15:36
sjoshi left
15:38
pjscott joined
|
|||
funrep | gist.github.com/funrep/bf18880254e4355ccae2 could someone explain why $class.puthide prints (Any) and not "foo"? | 15:41 | |
15:42
zwu joined,
pjscott left
|
|||
Skarsnik | I am not sure you can affect a private in new? | 15:43 | |
funrep | so i need to define my own new initializing it? | ||
pochi | funrep: try to put in a submethod BUILD(:$!hidden, :$!public) {} in your class | 15:45 | |
funrep | what is the difference between submethod BUILD and method new ? | 15:47 | |
mst | overriding new is generally to be avoided because you get a lot of machinery for free if you do things via BUILD | 15:48 | |
over in perl5 land, the existence of BUILD and BUILDARGS basically means "overriding new is an error" at this point (barring exigent circumstances, as usual for any rule of thumb) | 15:49 | ||
grondilu is not sure he knows what :$!parameter means | 15:50 | ||
funrep | what does ":" mean? | ||
15:50
zwu left
|
|||
Skarsnik | : named parameter | 15:51 | |
pochi | m: my $a; say :$a | ||
camelia | rakudo-moar 620d89: OUTPUT«Unexpected named parameter 'a' passed in block <unit> at /tmp/uWa5k4r8RE line 1» | ||
pochi | m: my $a; :$a | ||
camelia | rakudo-moar 620d89: OUTPUT«WARNINGS for /tmp/vALvXWibSZ:Useless use of ":$a" in sink context (line 1)» | ||
pochi | :-( | ||
15:52
caoutchouc joined
|
|||
grondilu | say it | 15:52 | |
pochi | m: my $b = "hello"; say (:$b).gist | ||
camelia | rakudo-moar 620d89: OUTPUT«b => hello» | ||
grondilu | m: my $a; say :$a | ||
camelia | rakudo-moar 620d89: OUTPUT«Unexpected named parameter 'a' passed in block <unit> at /tmp/UT0vTSoqTS line 1» | ||
grondilu | m: my $a; .say for :$a | 15:53 | |
camelia | rakudo-moar 620d89: OUTPUT«a => (Any)» | ||
funrep | what is a named parameter? | ||
grondilu | it's a parameter with a name | ||
funrep | or well, a named parameter is a named parameter, but i dont quite understand it is this context | ||
mst | funrep: perl6 signatures have both positional and named, so you can supply options by name and etc. | ||
funrep | it automagically creates named params for the has'es in the bless method? | ||
s/has'es/attributes | 15:54 | ||
mst | I think that something somewhat equivalent to that happens but I'm fuzzy on the details, sorry | ||
15:54
sammers left,
caoutchouc left
|
|||
mst | (I know Moo(se) rather better than perl6 at this point, I'm afraid) | 15:54 | |
grondilu | m: class A { has $.attr; }; say A.new: :attr("foo"); | 15:55 | |
camelia | rakudo-moar 620d89: OUTPUT«A.new(attr => "foo")» | ||
grondilu | m: class A { has $.attr; }; say A.new(:attr("foo")).attr; | ||
camelia | rakudo-moar 620d89: OUTPUT«foo» | ||
Skarsnik | m: sub foo (:$a) {say 'foo'}; foo('hello'); | ||
camelia | rakudo-moar 620d89: OUTPUT«Too many positionals passed; expected 0 arguments but got 1 in sub foo at /tmp/cQlu1qXyy4 line 1 in block <unit> at /tmp/cQlu1qXyy4 line 1» | ||
Skarsnik | m: sub foo (:$a) {say 'foo'}; foo(:a('hello')); | 15:56 | |
camelia | rakudo-moar 620d89: OUTPUT«foo» | ||
16:00
vividsnow left,
vividsnow joined
|
|||
funrep | still same problem gist.github.com/funrep/b6b67edd788a2da663fe | 16:00 | |
Skarsnik | you have affect $hidden to $!hidden | 16:01 | |
pochi | you're missing the !'s | ||
Skarsnik | or that | ||
funrep | now it works awesome! :) | 16:02 | |
what is it that BUILD handle that new doesnt? | |||
nine | m: dd (1, (2, 3), 4).flat; dd (1, $(2, 3), 4).flat; | 16:03 | |
pochi | binding of the variables I think | ||
yoleaux | 13:23Z <lizmat> nine: github.com/rakudo/rakudo/commit/620d8931c6 | ||
camelia | rakudo-moar 620d89: OUTPUT«(1, 2, 3, 4).Seq(1, $(2, 3), 4).Seq» | ||
El_Che | funrep: everything what new doesn't handle? | ||
mst | funrep: the default new() initializes the object, then calls all BUILD submethods from superclass to tip | ||
funrep | but why cant you assign private variables in new? or did i miss something | ||
Skarsnik | because they are privte x) | 16:04 | |
nine | lizmat: cooool :) So to override a dynamic, I have to let nqp::getcomp('perl6').language_version give me v6.d? | ||
mst | private variables are private to the object - to things called on the object | ||
new() is a class method that -creates- an object | |||
funrep | yes but the new method is the objects own method right? so it should have access to private variables? | ||
mst | but BUILD() is called -on- the object | ||
no, the new method isn't | |||
it's a class method that acts as a constructor -for- objects | |||
it's called on the class, not the object | |||
llfourn | funrep: new is not special in any way other than there's a default for it | ||
mst | Class->new results in $obj->BUILD being called | 16:05 | |
16:05
zwu joined
|
|||
mst | bah, s/->/./ ;) | 16:05 | |
funrep | i still dont get why it cant access private variables though, because that's what the whole point of the constructor usually is in other languages ive programmed in | ||
pochi | old habits :-) | ||
mst | funrep: yes, because their constructor is more equivalent to BUILD | 16:06 | |
llfourn | funrep: yep. Unfortunetly private perl6 attributes are not like other languages | ||
well maybe fortunetly :P | |||
nine | .tell sortiz I doubt that Array.flat's behavior is one of the most asked questions in #perl6. I usually read _all_ of #perl6 and cannot remember it coming up all that often. | ||
yoleaux | nine: I'll pass your message to sortiz. | ||
mst | funrep: if you're trying to do the equivalent of e.g. the constructor() block in ES6 classes, or a ruby initialize method - that's BUILD | ||
funrep | i understand that, that's why im asking so i can understand how it works in perl6 | ||
so what i new then? | |||
mst | funrep: other languages have their 'new' as a language feature, ours is a plain method so you *can* override it | ||
funrep: but generally there's no good reason to | 16:07 | ||
llfourn | funrep: private = can't be set in constructor and can't be seen by .perl and don't have accessors set up by default | ||
16:07
sammers joined
|
|||
mst | llfourn: isn't set by default in the constructor | 16:07 | |
llfourn | mst: can't be set by bless rather :) | 16:08 | |
mst | right | ||
but that's not the question at hand really | |||
or at least, I don't think it is :) | |||
funrep: javascript's 'new' is a language feature. ES6's constructor() block in a class declaration is our BUILD | |||
llfourn | well the point is that you can't pass the value of a private attribute into new/bless and have it set and attribute :) | ||
mst | llfourn: yes, but that's not what we've been discussing for some time now | 16:09 | |
llfourn | ok I thought it was but I'll lurk more then | ||
mst | llfourn: started off with what, the question now is "what's the difference between new and BUILD" | ||
funrep: perl6's new will do bless(), basic attribute population for public attributes, and call BUILD submethods. it's just it didn't -have- to be a hardcoded language feature, so it isn't | 16:10 | ||
nine: I'm not on crack with the above, right? | |||
zwu | after exploration of perl 6, I think it was very attractive as a programming language. But I doubt if it is production ready. The features list for rakodu in perl6.org/compilers/features shows almost completed, but actually not. Such as the module loading support, there are quite a lot NYI (not yet implemented). | 16:11 | |
nine | RabidGravy: why is uninstall important for developers? | ||
funrep | i dont understand how this is "Zero-boilerplate initiazation" as the documents states | ||
mst | funrep: it would be expect you've decided to make a private attribute that isn't entirely private | ||
*except | |||
llfourn | funrep: tbh I agree with you on that point. If you want to have private attributes that are set by .new args it's not zero boilerplate | 16:12 | |
funrep | how is it not private? i am printing it but the one who runs the method can have no idea that it prints a private variables (unless they read the source code ofc) | ||
mst | personally, if I'm passing it into the constructor, I tend to go for a public-but-readonly attribute | ||
zwu: er, rakudo is only missing the last one in module loading and I'm not even sure what that means anyway | 16:13 | ||
llfourn | tbh that's outdated module loading is pretty solid now | ||
thanks to nine++ | |||
funrep | so public-but-readonly is possible to specifiy and possible to initialize in the consructor? | ||
mst | I'm wondering if that table needs updating | ||
funrep | what is the syntax for them? | 16:14 | |
llfourn | funrep: yep it's the default | ||
has $.a; #public read-only | |||
nine | mst: you're right | ||
mst | nine: just wanted my working checking, ta | ||
RabidGravy | nine, well if you have a module X::Y::Z that is used by X::Y and you change it's name then it's hard to check if you have fixed X::Y properly if you still have an old version of X::Y::Z installed :) | 16:15 | |
mst | nine: and given the way CUR works, being able to install a version-in-progress and then uninstall it after so nothing else uses it | ||
nine | llfourn: if new could automatically initialize private attributes, those private attributes would be part of your class' external interface and you couldn't rename or remove them anymore without your users noticing | ||
funrep | is there any syntax for a setter or do you have to define one yourself? | ||
ie read-and-write attributes | |||
16:15
zwu left
|
|||
llfourn | nine: yes I agree with that point :) | 16:16 | |
pochi | funrep: has $.a is rw, declares a method a that you can read/write from | ||
llfourn | nine: I thikn what I was saying that if you want to break that idea you do have to write some boilerplate | 16:17 | |
mst | yes. but I'm not really sure why you would | ||
funrep | pochi: but llfourn said read only was the default? | ||
mst | funrep: yes | ||
funrep: hence 'is rw' | |||
pochi | funrep: yes, has $.x is the same as has $.x is read-only | ||
nine | RabidGravy, mst: thanks | ||
mst | funrep: 'is rw' is actual perl6 syntax :) | ||
funrep | "rw" == read write? | 16:18 | |
or something else? | |||
mst | funrep: exactly | ||
funrep | but what | ||
mst | funrep: 'has $.a is rw' is actual code. | ||
funrep | read only != read write | ||
mst | funrep: that'll generate an accessor | ||
funrep | i hope :P | ||
mst | funrep: 'has $.a' <- ro | ||
funrep: 'has $.a is rw' <- rw | |||
funrep | aah | ||
okey | |||
pochi | funrep: I meant readonly (not read-only) | ||
mst | llfourn: I can see a use case of "I want to construct and return an object that mediates for another object and therefore keeps the other object entirely private" | 16:19 | |
funrep | i read "has $.a is rw" as an actual sentence and not code ;) | ||
Skarsnik | you can put class A is rw if you want everything on rw | ||
RabidGravy | yeah, bear in mind that it's the generated accessor that is affected to "is rw", the underlying attribute is always read/write | ||
Skarsnik | $.a is a method call: $!a is the real symbol | 16:20 | |
El_Che | Skarsnik: if you're start playing with BUILD, one is oncused by that at the beginning :) | ||
mst | it does seem like it'd be helpful to have a trait that lets you can an attribute an init arg but not an accessor, but eh | 16:21 | |
awwaiid | I bet we could write one in userspace :) | ||
mst | almost certainly | ||
llfourn | I already have haven't released it yet :) | ||
mst tickles llfourn | |||
awwaiid | 'has $!foo is constructable' | ||
llfourn | I has 'is param' | 16:22 | |
had* | |||
awwaiid | is constructable-param-despite-being-private | ||
pochi would like to see something like that in core | |||
llfourn | but I'm thinking of changing it to something like has $!attr is public; | ||
mst | I quite like constructable actually | 16:23 | |
public would imply settable, I think | |||
awwaiid | I think 'is public' implies a lifetime after construction | ||
pochi | public is confusing imo | ||
llfourn | I think that we are conflating "public" with having an accessor set up by default | ||
awwaiid | exactly | ||
feedback is that as a casual reader of your code I'd make that conflation | |||
llfourn | so you can have a attribute without accessors set up by defaul but it is public | 16:24 | |
mst | llfourn: if I saw public I'd expect an external was to set it | ||
*way | |||
moritz | attributes without accessors can't be public | ||
llfourn | hmmm yeah me too I'm not sold either way | ||
mst | what we really want is a shorter synonym for constructable | 16:25 | |
llfourn | moritz: well it depends on your definition of public. I think public means can be seen in .perl and can be set in constructor | ||
mst | because just 'param' while neat doesn't imply constructor param | ||
Skarsnik | is init | ||
llfourn | or I think it could mean that | ||
mst | is init feels like bad english to me, but is at least short | ||
16:25
khw joined
|
|||
geekosaur | newable? | 16:25 | |
mst | hang on. could we do 'is init-arg' ? | 16:26 | |
RabidGravy | yes | ||
llfourn | yeah that would be consistent with moose | ||
and we could have 'is init-arg("some-alias")' | |||
mst | <3 | ||
pochi | sexy | 16:27 | |
llfourn | which could be used on $.attrs as well | ||
mst | we should probably check it seems equally good to people who didn't come from Moose though | ||
there will be a fair number of us, but it needs to make sense to everybody else too :) | |||
awwaiid | seems ok to me, having never seen/used that in moose | ||
mst | hrm, would 'is buildarg' or 'is build-arg' be more in keeping with perl6? unsure | 16:29 | |
llfourn | is 'init-named', 'init-arg', 'new-named','build-named','bless-named','named-in-init'.. | ||
mst | I'm still drawn to init-arg, but that could be pre-existing bias | 16:30 | |
llfourn | I think arg makes sense because arg vs param, means from the callers perspective where as param means from the sub's persepective | 16:31 | |
funrep | can one use given on lists? | ||
llfourn | funrep: yes | ||
moritz | funrep: yes | ||
m: given <a b c> { say .join } | |||
camelia | rakudo-moar 620d89: OUTPUT«abc» | ||
awwaiid | nine: I might start needing some common Inline:: things, like ObjectKeeper or trying to factor out some roles. I was thinking Inline::Lang for the namespace -- suggestions? | ||
funrep | is it possible to match just first element of a list? | ||
moritz | awwaiid: Inline::Base ? | 16:32 | |
funrep: sure | |||
awwaiid | that would be great too | ||
some are base roles, but some might be utilities | |||
nine | If Inline weren't already taken... | ||
mst squints at using 'base' for something other than a superclass | |||
awwaiid | maybe those those are Inline::Util if I need | ||
llfourn | funrep: there area couple of ways. Most simple is given @list { when .[0] ~~ something } | 16:33 | |
mst | awwaiid: Inlining::Kit | ||
moritz | or given @list[0] {... } | ||
awwaiid | Inline:: doesn't even seem like the right thing for these lang integrations in the first place really | ||
but that is getting distracted | |||
moritz | Bridge::Perl5? | ||
mst | mm. Lang::Foo with an Inline:: wrapper or something would be nice | ||
replace Lang:: with something better | |||
pochi | m: my @a = <a b c>; say @a.head | ||
camelia | rakudo-moar 620d89: OUTPUT«(a)» | ||
pochi | oh, it still returns a list :-( | 16:34 | |
funrep | llfourn: perfect, thanks! | ||
awwaiid | distracted I say! | ||
nine | awwaiid: yes, Inline:: is not that good a name. It has seen a lot of marketing though. | ||
awwaiid | nine: yeah. Well anyway I'll pick a common spot at random, maybe PR against I::P5. What are you working on lately? | 16:35 | |
mst | Embedded::Perl5 for the bridge and Embedding:: for the tools would be ok in my head | ||
RabidGravy | I had an Inline t-shirt that Ingy auctioed at some yapc years ago | 16:36 | |
nine | awwaiid: I'd actually like to get support for creating wrappers for submodules out the door. So you use Foo; and will get a Perl 6 Foo class and also Foo::Bar; | ||
awwaiid: but rakudo's core seem to be an infinite time sink | |||
awwaiid | nine: my current experiment kinda along those lines is in Ruby I hooked class-creation; you 'use csv:from<Ruby>' and it notices that CSV and CSV::Row, CSV::Table, etc. I had to because stupid ruby doesn't have filenames and class names predictably correspond (csv -> CSV for example) | 16:38 | |
nine: but that required hte host language have that class-created hook feature | 16:39 | ||
er, target lang | |||
16:41
uruwi left
16:43
AlexDaniel left
16:47
kid51 left
16:48
AlexDaniel joined
16:50
Ch0c0late joined
17:03
BenGoldberg joined
17:06
pecastro joined
17:08
thom__ joined,
thom__ left
17:18
frankjh left
|
|||
El_Che | blogs.perl.org/users/jt_smith/2016/...async.html | 17:18 | |
llfourn | mst, awwaiid, pochi -- would you expect to see $! attributes with init-arg in .perl? | 17:20 | |
(I writing AttrX::InitArg) | |||
mst | I wouldn't | 17:21 | |
largely because the primary use to me seems to be | |||
method public_handler { return My::PublicHandler.new(:guts(self!guts)) } | 17:22 | ||
where the guts object isn't meant to be visible outside | |||
llfourn | mst: I agree. But it will break .perl's EVALability | 17:23 | |
mst | oooh | ||
HRM | |||
maybe .gist should exclude it but .perl include? unsure | 17:24 | ||
llfourn | I like that idea. I'll give it a shot. | 17:25 | |
17:25
_nadim joined
|
|||
AlexDaniel | .u 🄅 | 17:26 | |
yoleaux | U+1F105 DIGIT FOUR COMMA [No] (🄅) | ||
AlexDaniel | m: say 🄅 +5; | ||
camelia | rakudo-moar 620d89: OUTPUT«9» | ||
AlexDaniel | m: say 4, +5; | ||
camelia | rakudo-moar 620d89: OUTPUT«45» | ||
17:34
_nadim left,
_nadim joined
|
|||
RabidGravy | I know this is is a bit like poking a snake and being surprised at its reaction, but what's this all about? | 17:38 | |
m: multi sub trait_mod:<is>(Method:D $m, :$Zub!) { say $m.HOW.can('xFur'); }; class Foo { multi method bar() is Zub { } } | |||
camelia | rakudo-moar 620d89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0GgKcU1tCzToo few positionals passed; expected 3 arguments but got 2at /tmp/0GgKcU1tCz:1» | ||
AlexDaniel | oh finally I can see the colors | 17:39 | |
llfourn | RabidGravy: I have found that capital letters in trait names is kinda broken | ||
RabidGravy: but not sure if that's what it is | |||
moritz | iirc the compiler the case as a heuristic for distinguishing traits and type names | 17:40 | |
m: role R { }; class A is R { }; | |||
camelia | ( no output ) | ||
moritz | should that warn/error? | ||
RabidGravy | ah, no | 17:41 | |
moritz | "did you mean 'does R'?" | ||
llfourn | moritz: but isn't it the case that the 'is' which does .^add_parent is just another trait_mod<is>? | ||
RabidGravy | it's the can() on the methods HOW | ||
requires an object orgument, as well as a method name | 17:42 | ||
but the location of the error is weird | |||
17:43
skids joined
|
|||
RabidGravy | yeah, is and does are just traits | 17:43 | |
17:43
dekiss left,
dekiss joined
|
|||
nine | awwaiid: the same is quite true for Perl 5 (and Perl 6 for that matter). That's why I compare the list of available symbols before and after loading a module: github.com/niner/Inline-Perl5/blob...5.pm6#L785 | 17:43 | |
llfourn | RabidGravy: ah then my problem must have been because I had a type name the same name as my trait name | 17:44 | |
RabidGravy | yeah that will confuse it I guess | ||
llfourn | which now that I say it sounds like a terrible idea | ||
but to be fair it was a trait_mod is on a routine like yours so I didn't think it would try and make the method do it | 17:45 | ||
17:48
pecastro left
17:49
_nadim left
|
|||
AlexDaniel | So I decided to get all proposed unicode things into a list. See this gist and let me know what you think: gist.github.com/AlexDaniel/c89bd2786f9b63f31e4c . If I forgot something then please yell at me :) | 17:51 | |
17:55
pmurias joined
|
|||
pmurias | AlexDaniel: does the unicode version of ?? !! offer benefits? | 17:57 | |
AlexDaniel | pmurias: besides being shorter by one character? I'm not sure | ||
pmurias | I think one of the goal of ?? !! is to be visible | 17:58 | |
AlexDaniel | pmurias: but the fact is that there is an operator that exists in the unicode, so I listed it | ||
pmurias | * goals | ||
AlexDaniel | pmurias: well, weird unicode characters also catch my attention, so I don't think that it is a downgrade :) | 17:59 | |
pmurias: but you are right that some of those things are probably a bit too much… :) | 18:00 | ||
18:01
skids left
|
|||
AlexDaniel | the first part of the list is more like “here we have a character that obviously fits”, not “oh, there's a unicode character for that, LET'S ADD IT NOW!!!” | 18:01 | |
18:02
skids joined
|
|||
grondilu | m: say "\u2047" | 18:03 | |
camelia | rakudo-moar 620d89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IwDLeK4uMpUnrecognized backslash sequence: '\u'at /tmp/IwDLeK4uMp:1------> 3say "\7⏏5u2047" expecting any of: argument list double quotes term» | ||
AlexDaniel | m: say "\c2047" | ||
camelia | rakudo-moar 620d89: OUTPUT«߿» | ||
AlexDaniel | m: say "\x2047" | ||
camelia | rakudo-moar 620d89: OUTPUT«⁇» | ||
grondilu | print "\x2047 \x203C" | 18:04 | |
m: print "\x2047 \x203C" | |||
camelia | rakudo-moar 620d89: OUTPUT«⁇ ‼» | ||
18:06
ab6tract joined
|
|||
ab6tract | those are lot less questionable to me than the bind character | 18:06 | |
which i think will be hard to distinguish in many fonts | 18:07 | ||
18:08
sftf left
18:10
dekiss left
|
|||
BenGoldberg | .u ⁇ ‼ | 18:10 | |
yoleaux | U+0020 SPACE [Zs] ( ) | ||
U+203C DOUBLE EXCLAMATION MARK [Po] (‼) | |||
U+2047 DOUBLE QUESTION MARK [Po] (⁇) | |||
BenGoldberg | .u ₙ | 18:12 | |
yoleaux | U+2099 LATIN SUBSCRIPT SMALL LETTER N [Lm] (ₙ) | ||
gtodd | naïve p6 for sysadmins benchmark: bit.ly/1kY3XTX | 18:14 | |
pmurias | ab6tract: most unicode symbols look Perl 6 supports look a bit better then the texas variant (at the code of being harder to type), the unicode double question mark/eclamation mark just IMHO looks uglier and makes code harder to read for me | ||
18:16
keix left
|
|||
ab6tract | pmurias: i'm not sold either, but relative to that bind they are clear as day | 18:17 | |
18:17
salv0 joined
|
|||
ab6tract | .u ≔ | 18:17 | |
yoleaux | U+2254 COLON EQUALS [Sm] (≔) | ||
ab6tract | nearly impossible to make out for me | 18:18 | |
18:18
_nadim joined
18:19
keix joined
18:25
xxpor_lap joined,
_nadim left,
xxpor_lap left
18:28
pierre-vigier joined
|
|||
RabidGravy | does Signature.ACCEPTS have any role in determining which multi candidate is selrcted? | 18:28 | |
still struggling with this | |||
18:29
havenwood left
18:30
telex left
18:31
telex joined
|
|||
AlexDaniel | ab6tract: well, one good thing about that bind character is that it is as long as regular assignment, so it's going to looking great with vertical alignment. It is pretty sad though that fonts don't render it good, I think that it could have been better | 18:32 | |
18:32
pierre-vigier left
|
|||
AlexDaniel | ab6tract: but sure, one could say that it should stand out. And I wont argue! :) | 18:32 | |
say $a < $b ¿ 42 ¡ 69 # hehe | 18:33 | ||
BenGoldberg | m: my $y̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆ = 3; dd $y̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆; | 18:35 | |
camelia | rakudo-moar 620d89: OUTPUT«Int $y̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆ = 3» | ||
mspo | that did weird things to my client | ||
BenGoldberg | And how does it appear on irc.perl6.org? | 18:36 | |
AlexDaniel | it looks wrong in my browser | ||
BenGoldberg grins | |||
AlexDaniel | I have seen that a couple of time – combining characters apply on the next char instead of the previous one… what the? | 18:37 | |
times* | |||
BenGoldberg | m: say ' | 18:39 | |
BxCCx9AxCDxA3xCDxADxCDx97xCDx8AxCCx85xCDxA7xCCx92xCCxA9xCCx97xCCxADExCCx94xCCx8CxCDx92xCCx81xCDx8CxCDxABxCCxA8xCCx97xCDx8DxCCxA0xCCxA6xCCx9DFxCCx92xCDxAFxCDx92xCCxBExCDxA9xCDxA0xCDx81xCDx93xCDx99xCCx98xCCxA0OxCCx9AxCDx82xCDxA8xCDx97xCDxA7xCCx8BxCDx84xCCx82xCCxA8xCCxB5xCCxABxCDx94xCDx93xCCxA9xCCxA4xCCxBARxCDx9BxCCx91xCDx84xCCx9BxCDxA1xCCxA4xCDx8ExCCx97ExCDx92xCCx9AxCDxA3xCCx85xCDx86xCDx81xCCx9ExCCxBAHxCDx90xCCx85xCCxA2xCCxAExCDx87xCCxBAAxCDx92xCDxA6xCCx8BxCCxB8xCCxAFxCCxAFxCDx85xCDx9AxCDx8ExCDx89xCCxADxCCx9CxCCxAANxCDx82xCDx8CxCDx91xCCxA7xCDxA1xCCxA6xCCxA0xCDx93xCDx95xCCxB3DxCCx82xCDxA9xCDx85xCCxBAxCDx96xCDx87:xCCx94xCDx9BxCCx93xCDx84xCDxAAxCDx9ExCCxACxCDx96 xCDx82xCDxAExCDx9BxCCxBExCCx91xCDxACxCCx94xCDx95xCDx99xCDx8ExCCxAExCCxB0xCDx99xCCxABxCDx96cxCCx86xCDx8AxCDx92xD2x89xCDx81xCCxA1xCCxAExCCx97xCDx8ExCCxA5xCCxB1xCCxA5xCCxB0xCCxAClxCDx83xCDxAAxCDx80xCDxA0xCCx99xCCxA3xCCxBCoxCDx97xCCx87xCCx8AxCCx8ExCCx94xCDx8BxCDxAExCCx93xCDx81xCDx9CxCCxBBxCCx9CxCCxBBxCCxBBsxCDxAAxCDxA8xCCx8DxCCx92xCDx8BxCCxB5xCCx96xCCxB0xCDx95xCCxABxCCx9CxCDx8ExCDx99xCCx99exCCx81xCCx83xCDx92xCDxA7xCCx8FxCCx81xCDx9ExCDx99 xCCx84xCDxA8xCCxBExCDxA6xCCx8DxCDx91xCCx87xCDxA0xCCx95xCCxADxCCx9DxCDx99xCCxBCxCDx93xCDx96xCCxBCdxCDxA7xCDxA4xCDxA4xCDxA1xCCx99xCCx9CxCCx9DxCCxA6xCDx96xCCxADo̓ | |||
xCDxABxCDxA9xCCx89xCCx8ExCDx8AxCCxA5xCCx9EoxCCx89xCCx9FxCDx99xCCx9ExCCxBBxCCxBBxCCxB9xCCxB9rxCDxADxCCxB5xCCxA8xCDx87xCCxABxCCxA6xCCxBAxCCxAExCCxBC,xCCx85xCCx89xCDx9BxCDxABxCCxA7xCDxA0xCCxB7xCCxACxCCxB2xCDx88xCCxA4xCCxA4 xCDx97xCCx8BxCDx98xCCxA3xCDx95xCCx9DxCCxB3xCCx97xCCxB2xCCxA9xCCxA3exCDxA9xCCx94xCCxBFxCCxBExCCx8BxCCxBExCDx98xCCxBCaxCDx8AxCDxAFxCDxAAxCDxA4xCDxACxCDx8AxCDx86xCDxA0xCCxB8xCCx99xCDx99xCDx94xCCx9CxCDx99xCCxB3xCCxBBcxCCx83xCCx93xCCx88xCCxBExCDx97xCDx9DxCDx81xCDx9DxCCxA6hxCCx86xCCxA7xCDx89xCDx93xCCxA6xCCxAFxCCx9E xCDxAAxCCx80xCCxB5xCDx81xCDx87xCDx8DwxCDxA9xCDx97xCCx83xCDx92xCCxB7xCDx8FxCCx95xCCxB2xCCxBCxCCxAFixCCx85xCCx82xCDx8BxCDx80xCCx9ExCCxABxCCx9CxCCxAExCCxA3xCCxB0xCDx8ExCDx85nxCCx81xCCx90xCCx81xCDx86xCCx85xCCxA2xCCxA8xCCxAAxCDx85xCCxADxCCxA0xCCxBCxCDx95xCDx8EdxCDxA9xCCx83xCCx8FxCCx83xCCx8DxCDx8AxCCx94xCCxB0xCCxA4xCCx9DxCDx8ExCCxB9xCDx95oxCCx91xCCxBExCDxA8xCCx88xCCx84xCDxA4xCCx9AxCCx84xCCxB6xCCx95xCCxBCxCCxBAxCCxAAwxCDxA7xCDxAAxCCx8AxCCx92xCDx9DxCCx95xCCx99xCCxBBxCCxB1xCCx99xCCxBAxCDx8ExCDx9AxCCx99 xCDxA4xCCx8BxCCx8FxCCx87xCDx9BxCCxB4xCCxBCxCCxB0xCCxB1xCDx88xCCxA0&xCCxBDxCDx83xCCx81xCCx94xCCx87xCDxA9xCDx9BxCCx9AxCDxA7xCCxA0xCCxBAxCCx9FxCCx9ExCDx8ExCCxB3xCCxBBxCCx99 xCDx90xCCx8CxCCx90xCCx8CxCDxACxCDxA6xCCx82xCCxA1xCDx9ExCCxA1xCCxABxCCxBB | |||
camelia | rakudo-moar 620d89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vtPMfW5A9QUnable to parse expression in single quotes; couldn't find final "'" at /tmp/vtPMfW5A9Q:1------> 3say '7⏏5<EOL> expecting any of: argument list single quotes…» | ||
BenGoldberg | exCDxA7xCDxAFxCCxBFxCCxBDxCDxA9xCDx8FxCCx9BxCCxB4xCDx95xCDx96xxCCx93xCDx83xCCxB6xCCxAFxCDx8EixCDxACxCCxACxCDx85xCDx8DxCDx87xCCxACtxCCx8FxCDx91xCCx92xCCxB6xCCxB4xCDx88;xCCx8DxCDxA5xCCxBDxCCx88xCDxA6xCCxAA xCDxA7xCDx97xCCx8DxCDx91xCCx89xCDxABxCCx85xCCxB8xCDx9FxCCxA3xCCxA0xCCxBBxCDx9AxCCxBCxCCxA9xCDx95xCCxA9wxCCx8BxCCx80xCDx9BxCCxBFxCCxA7xCDx81xCCxBBxCCx9ExCCxADxCDx88axCDx86xCDx82xCDxA9xCCx8CxCCxBFxCDx9BxCCx8CxCCxA7xCCxADxCCxA5xCDx95xCDx8ExCCx9CxCCxA5ixCDx83xCCx91xCCx81xCCx81xCCx90xCCxB9xCDx99xCCxAExCDx9AxCCx99xCCxA9xCCxAEtxCDxAAxCDx92xCDxAFxCDxA9xCCxBDxCCxAExCCxA9 xCCx86xCDx9BxCCx92xCCx8AxCCx8BxCDx8AxCCx85xCCx94xCCxA5xCDx89xCDx85xCDx93xCDx99uxCDxA9xCDx9BxCCxBFxCDx9ExCDx9DxCCxA6xCCxA0xCCx96nxCDxABxCDx90xCDx8AxCCx86xCCx89xCCx92xCCxA1xCDx8FxCDx93xCCxA5xCDx99xCCxA6xCCxA9xCCxBAxCDx85xCDx8EtxCDx82xCDx84xCDxA5xCDx97xCDx8AxCCx93xCDx9BxCDx81xCDx8FxCCxB5xCDx85xCDx96xCDx96xCCx98xCCxA5xCCxBAxCCx9DxCDx93xCCxBCixCCx8AxCCx84xCDx82xCDxABxCCx8DxCCx94xCDx98xCCx9DxCCxA4lxCDxADxCCx8CxCDxA1xCDx98xCDxA2xCCxB1xCCx9FxCCx9ExCCxADxCDx93xCCxA9xCCxA0 xCDxA9xCDxA7xCCx8FxCCx85xCDxA9xCDx8CxCCx9BxCDxA0xCCxABxCDx8DxCCxA4xCCxB3xCDx99xCCxAAxCCx99xCCxBAtxCDxA6xCCx8FxCCx80xCDx92xCDx97xCCxBDxCDx9ExCDx88xCCx96xCCxBBxCCxBCxCCxA3xCCxB9ixCDxA5xCCx9AxCCx92xCDxA8xCCxBDxCCx8ExCDx82xCDx84xCCxB4 | ||
18:39
lolisa left
|
|||
BenGoldberg | mxCDxACxCDxABxCCx82xCDxA6xCCx83xCCx89xCDx86xCDxABxCCx82xCCxB6xCDxA0xCCxB8xCDx94xCCx98xCDx88xCCxB3xCDx89exCCx94xCDxADxCCx8BxCCx8FxCDxABxCCx85xCDxAExCDx8CxCCx87xCCxAAxCCx96xCCxBCxCDx95xCCxBA'; | 18:39 | |
nebuchadnezzar | erf | ||
BenGoldberg | Sorry about that | ||
it was supposed to be on one line. | |||
llfourn | cool the matrix | 18:40 | |
BenGoldberg | Or at least, the output from eeemo.net/ :) | ||
18:41
zwu joined
|
|||
nine | On thing is sure: Perl 6 added a whole new area for bikeshedding :) | 18:43 | |
vendethiel | :D | 18:44 | |
that's why lisp-case is so great :D. | |||
AlexDaniel | BenGoldberg: we've already tried some one-liner that printed 300 combiners on one char | 18:46 | |
BenGoldberg: one of the bots on this channel ran away immediately | 18:47 | ||
ah no, it was 400 | 18:48 | ||
here it is irclog.perlgeek.de/perl6/2015-11-12#i_11522710 | |||
but irclog broke it | |||
BenGoldberg | m: my $ก้้้้้้้้้้้้้้้้้้้้ก็็็็็็็็็็็็็็็็็็็็กิิิิิิิิิิิิิิิ = 'the future of black perl'; dd $ก้้้้้้้้้้้้้้้้้้้้ก็็็็็็็็็็็็็็็็็็็็กิิิิิิิิิิิิิิิ; | 18:51 | |
camelia | rakudo-moar 620d89: OUTPUT«Str $ก้้้้้้้้้้้้้้้้้้้้ก็็็็็็็็็็็็็็็็็็็็กิิิิิิิิิิิิิิิ = "the future of black perl"» | ||
BenGoldberg | .u ก้้้้้้้้้้้้้้้้้้้้ก็็็็็็็็็็็็็็็็็็็็กิิิิิิิิิิิิิิิ | ||
yoleaux | U+0E01 THAI CHARACTER KO KAI [Lo] (ก) | ||
U+0E34 THAI CHARACTER SARA I [Mn] (◌ิ) | |||
U+0E47 THAI CHARACTER MAITAIKHU [Mn] (◌็) | |||
AlexDaniel | this is it, I guess: say ‘a’ ~ join ‘’, ((0..0x1FFFF) ==> grep { .uniname ~~ m/COMBINING/ } ==> map { .chr }) | ||
here's the output: gist.github.com/AlexDaniel/0521bc38fe827bd7d37b | 18:52 | ||
18:54
Khisanth left
18:57
adhoc left
|
|||
leont got the error «Type check failed in assignment to @!dependencies; expected Build::Simple::Node:D but got Build::Simple::Node:D», I suspect that last :D is a bug | 18:57 | ||
dalek | kudo/language_versions: 9396718 | (Stefan Seifert)++ | / (6 files): First attempt at adding a CORE.d setting |
18:58 | |
kudo/language_versions: 7fba273 | (Stefan Seifert)++ | / (8 files): Bring back IO::CatPath and IO::CatHandle in 6.d nine@sphinx:~> perl6 -e 'IO::ArgFiles.new;' nine@sphinx:~> perl6 -e 'use v6.d; IO::ArgFiles.new;' Could not find symbol '&ArgFiles' |
|||
18:59
adhoc joined,
AlexDaniel left
|
|||
nine | .tell lizmat just pushed: > perl6 -e 'use v6.d; say $*ARGFILES.^name' # IO::Handle, > perl6 -e 'say $*ARGFILES.^name' # IO::ArgFiles | 18:59 | |
yoleaux | nine: I'll pass your message to lizmat. | ||
19:00
pjscott joined,
pjscott left
|
|||
RabidGravy | nine++ that is quite cool | 19:00 | |
BenGoldberg | m: my $base = 3585.chr; my $left = 3655.chr; my $right = 3656.chr; say $base ~ $left x 20; say $base ~ $right x 20; | 19:02 | |
camelia | rakudo-moar 620d89: OUTPUT«ก็็็็็็็็็็็็็็็็็็็็ก่่่่่่่่่่่่่่่่่่่่» | ||
lizmat | nine: cool! | ||
yoleaux | 18:59Z <nine> lizmat: just pushed: > perl6 -e 'use v6.d; say $*ARGFILES.^name' # IO::Handle, > perl6 -e 'say $*ARGFILES.^name' # IO::ArgFiles | ||
llfourn | nine: nicely done! | 19:03 | |
lizmat | still, we're not of the hook yet, I'm afraid | ||
nine | Was easy building on lizmat++'s work :) | ||
lizmat: sooo...what's next? | |||
19:03
pjscott joined
|
|||
El_Che | nine: fix the performance numbers of [Tux] :) | 19:03 | |
lizmat | well, what if: my $a = $*ARGFILES; use 6.d; my $b = $*ARGFILES | 19:04 | |
El_Che: that will need jnthn++ | |||
19:04
ab6tract left
|
|||
lizmat | nine: as in, if the dynamic variable is already initialized, changing the setting won't automagically run the new initializtion code | 19:04 | |
El_Che | I hope jnthn++ has been able to get some rest | 19:05 | |
19:05
pmurias left
|
|||
nine | lizmat: even if we could pull that off, I'm not sure if it would help all that much, since those objects do carry a bit of state. So changing the one should change the other. And that sounds like hell. | 19:06 | |
19:06
pmurias joined
|
|||
nine | lizmat: so I guess it will never be a 100 % perfect. But it doesn't have to be. It just has to be good enough for real life code. | 19:07 | |
lizmat | nine: agree... but it poses some interesting issues on using multiple settings leaking objects to each other | ||
nine | And yes, I fully expect people to show up throwing totally contrieved examples at us that show that Perl 6 is not perfect :) | ||
lizmat | but I really think we have a deeper problem wrt to fixing bugs in 6.c | ||
19:07
Khisanth joined
19:08
Actualeyes left
|
|||
lizmat | take the Date.later bug that I fixed (moving from a leap-day by years to non-leap years) | 19:08 | |
nine | lizmat: yes, hoelzro++ had an interesting idea about coercing versions of core objects. I have just no idea how we could do this automatically, since we'd have to detect moving the object across to code written in another version. | ||
lizmat | if you say "use 6.c" you cannot know which behaviour you're going to get | ||
19:09
Sqirrel joined
|
|||
lizmat | of course, the Date.later issue is minor | 19:09 | |
it's just an example | |||
we know there are several bugs with meta-operators | |||
nine | Meta operators sound like easy to manage, since they don't carry state. It's just changed behavior. Of course the interesting questions will be whether to fix them retroactively. But we'll have to decide that case by case. | 19:11 | |
19:12
Calibellus left
|
|||
lichtkind | are there API guidlines for perl 6 | 19:12 | |
and i currently pondering about Math::Type | 19:13 | ||
a type collection to be eused my math modules | |||
19:16
ghost_ joined
|
|||
lizmat | m: "foo" ~~ True # there are versions of 6.c that don't warn | 19:17 | |
camelia | rakudo-moar 620d89: OUTPUT«Potential difficulties: Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead at /tmp/mGar7Dbmqu:1 ------> 3"foo" ~~ 7⏏5True # there are versions of 6.c that » | ||
lizmat | so, fwiw, I'm sold now on the multiple settings idea | 19:21 | |
well, I want to see if we can make this work | |||
I'm definitely *not* sold on the idea of keeping the language now at 6.c while fixing bugs / making improvements | 19:22 | ||
what I would really not like to see, is conditional code on $*PERL.compiler.version | 19:24 | ||
m: $*PERL.compiler.version.say | |||
camelia | rakudo-moar 620d89: OUTPUT«v2015.12.165.g.620.d.893» | ||
nine | lizmat: btw. use v6.d; say $*PERL.version # now prints v6.d | 19:26 | |
lizmat | nine: cool! | ||
but I was talking about $*PERl.compiler.version | |||
star-m: $*PERL.compiler.version.say | |||
camelia | star-m 2015.09: OUTPUT«v2015.9» | ||
nine | Sooo...I think before we merge language_versions, we'll have to change that so you have to say use v6.d.PREVIEW; as we don't support a 6.d yet. And update the JVM build | ||
Zeah, compiler.version would be awful | 19:27 | ||
leont | Is there an easy way to automatically generate « method foo(Str $key) { %!foo{$key} } » ? | ||
19:28
zakharyas joined
|
|||
nine | leont: github.com/niner/Inline-Perl5/blob...5.pm6#L812 | 19:28 | |
zwu | mst: here is what sortiz said: Found that in rakudo much of import is NYI, see: github.com/perl6/roast/blob/maste....t#L22-L34 | 19:32 | |
mst | zwu: that's almost certainly a terrible idea, anyway - all of the features that are 'everyday use' -are- there, I think | 19:35 | |
llfourn | hmmm github.com/perl6/roast/blob/master...uire.t#L31 actually works | 19:36 | |
time to unfudge | |||
zwu | dynamic loading is a good feature I think, such as plugin system support. | ||
llfourn | although maybe require $name is meant to work right now it works as require ::($name); | 19:37 | |
zwu | it looks like only the sub is support for the require; | ||
llfourn | m: my $name = "Test"; { require ::($name) <&ok>; ok 1}; | ||
camelia | rakudo-moar 620d89: OUTPUT«WARNINGS for /tmp/7SiG1lfDX5:Useless use of $name in sink context (lines 1, 1)ok 1 - » | ||
llfourn | oh...yeah that bug.. | 19:38 | |
but that's just a warning doesn't count :P | |||
require $name is not even meant to work according to S11 | 19:40 | ||
design.perl6.org/S11.html#Runtime_Importation | |||
moritz | require ::($name); or require $path; | 19:41 | |
zwu | please note only the exported sub works, but not class. | ||
llfourn | moritz: ah right not looking closely enough thanks | 19:42 | |
19:42
hankache joined
|
|||
llfourn | zwu: classes are globalish you don't need to specify them I think. | 19:43 | |
m: require ::('Test'); say ::('Test').HOW.^name; | |||
camelia | rakudo-moar 620d89: OUTPUT«Perl6::Metamodel::ModuleHOW» | ||
llfourn | ^^ same should work for classes | ||
if you do class Something is export though it should work... if it doesn't it's a bug | 19:44 | ||
(IMO) | |||
moritz | llfourn: no | 19:45 | |
llfourn | moritz: no? | ||
moritz | llfourn: require is run time, and lexical scopes are immutable at run time | ||
llfourn: so require can't ever install a new symbol, except if its name is known at compile time | |||
m: require Pod::To::Text; say Pod::To::Text | 19:46 | ||
camelia | rakudo-moar 620d89: OUTPUT«Could not find symbol '&Text' in block <unit> at /tmp/9cCSNcSwxj line 1Actually thrown at: in block <unit> at /tmp/9cCSNcSwxj line 1» | ||
hankache | hello everyone | ||
moritz | that could work | ||
llfourn | moritz: yeah that's what the args after require are for. What I meant was require ::('SomeModule') <SomeClass>; | ||
if SomeClass has been is export then it should work | |||
moritz | llfourn: right; and it needs to be a constant expression | ||
\o hankache | |||
llfourn | moritz: good we are on the same page :) | ||
wait no it doesn't need to be a constant SomeClass = imo :\ | 19:47 | ||
zwu | llfourn, can you please create a test for the module loading with class support? | ||
moritz | <SomeClass> is a literal | ||
llfourn | zwu: I will put it on todo list as soon as moritz agrees with me :P | ||
moritz | m: my $name = 'Pod::To::Text'; require ::($name) <Pod::To::Text>; say Pod::To::Text; | 19:48 | |
camelia | rakudo-moar 620d89: OUTPUT«WARNINGS for /tmp/albzJ5ORaN:Useless use of $name in sink context (lines 1, 1)Trying to import symbols Pod::To::Text from 'Pod::To::Text', but it does not export anything in block <unit> at /tmp/albzJ5ORaN line 1» | ||
dalek | href="https://perl6.org:">perl6.org: 81c0cb6 | (Zoffix Znet)++ | fetch-recent-blog-posts.pl: Fix incorrect blog URL for stmuk__'s blog |
||
llfourn | moritz: yes because Pod::To::Text doens't have is export | ||
moritz | TimToady: ^^ looks like a sink warning bug | 19:49 | |
llfourn: aye | |||
llfourn | what I am saying is already how it's implemented AFAIK | ||
19:49
pjscott left
|
|||
llfourn | is export will add it to UNIT::EXPORT::DEFAULT | 19:49 | |
which is where require is getting it from | |||
19:49
ZoffixWin joined,
ZoffixWin left,
ZoffixWin joined
19:50
ZoffixWin is now known as Zoffix
|
|||
Zoffix pets the bot | 19:50 | ||
yoleaux | 09:39Z <stmuk__> Zoffix: the perl6.org home page link to stevemynott.blogspot.com/2016/01/fo...ineup.html wrongly points to stevemynott.blogspot.com/feeds/1832...ts/default .. AFAIK it's not my problem with the feed :) but if it is bounce to back to me | ||
10:03Z <stmuk__> Zoffix: I hacked the feed to fix it .. root issue is < moritz> it's picking up the first <link>, it should pick up <link rel="alternate" type="text/html" | |||
Zoffix | stmuk__, I don't see your fix.. Where is it? | ||
19:50
zakharyas left
|
|||
llfourn | and it will be exported with it's shortname like class Super { class Innner is export { } }. Then require Super <Inner>; say Inner.WHAT # Super::Inner | 19:51 | |
I'm at least 80% sure that's what happens right now :P | |||
zwu | a module file_path.pm6: module A { class TC is default {}; sub foo is default { say "foo" }}; in a script, I use 'require 'file_path.pm6' <&foo>; foo(); my $tc = TC.new; "; but failed as I remembered when I tested yesterday. | ||
sorry, is default is a typo, it is export. | |||
moritz | m: require 'Test.pm6' <&plan>; plan 42; | 19:52 | |
camelia | rakudo-moar 620d89: OUTPUT«Could not find Test.pm6 in: /home/camelia/.perl6/2015.12-165-g620d893 /home/camelia/rakudo-m-inst-2/share/perl6/site /home/camelia/rakudo-m-inst-2/share/perl6/vendor /home/camelia/rakudo-m-inst-2/share/perl6 CompUnit::Reposito…» | ||
llfourn | zwu: you would have to require <&foo TC> | ||
moritz | m: require ::('Test') <&plan>; plan 42; | ||
camelia | rakudo-moar 620d89: OUTPUT«WARNINGS for /tmp/3wkBlNUVCg:Useless use of constant string "Test" in sink context (lines 1, 1)1..42# Looks like you planned 42 tests, but ran 0» | 19:53 | |
llfourn | zwu: but yeah maybe require path aint working so good | ||
19:53
pjscott joined,
orbus left
|
|||
dalek | href="https://perl6.org:">perl6.org: a4ace53 | (Zoffix Znet)++ | fetch-recent-blog-posts.pl: Close XLST attack vector |
19:55 | |
19:56
ely-se joined,
pjscott left
19:57
yqt joined
|
|||
zwu | llfourn: the output is try to import symbol..., but it does not export anything..., I tested use require "full_path.pm6" <&foo, TC>, and require "full_path.pm6" <&A::foo, A::TC> both; | 19:57 | |
19:58
Zoffix left,
pjscott joined
19:59
pjscott left
|
|||
llfourn | zwu: Thanks. This means the test is still failing. See what happens if you do require ::('ModuleName') <&foo TC>; | 19:59 | |
(after putting whatever is in full_path.pm6 into lib/ModuleName.pm6) | 20:00 | ||
20:03
orbus joined
20:04
darutoko left
20:08
pjscott joined
20:10
frankjh joined,
pjscott left
|
|||
mst | .tell FROGGS github.com/andk/pause/issues/198 may be relevant to your interests | 20:10 | |
yoleaux | mst: I'll pass your message to FROGGS. | ||
stmuk__ | .tell Zoffix I added at('link[type="text/html"]') (which I now see you improved) | 20:14 | |
yoleaux | stmuk__: I'll pass your message to Zoffix. | ||
zwu | llfourn: thanks. | ||
llfourn | zwu: worked? | 20:15 | |
20:15
domidumont left
|
|||
zwu | no, just report the same failing | 20:15 | |
20:15
stmuk__ is now known as stmuk_
|
|||
llfourn | zwu: hmm there is this bug: rt.perl.org/Public/Bug/Display.html?id=125951 which I repored a while back | 20:17 | |
but it should work unless you are doing something clever | |||
also rt.perl.org/Public/Bug/Display.html?id=126658 | |||
so yeah there are some problems with require even when not doing a filename | 20:18 | ||
but it works for me usually | |||
llfourn goes and tries | |||
moritz | the German Perl Workshop 2016 is stil looking for talks on Perl 6 (and Perl 5, for that matter); anybody interested? | 20:19 | |
lizmat | moritz: did jnthn submit already ? | 20:21 | |
llfourn | zwu: you are correct. This is a bug in itself! | 20:22 | |
20:22
_nadim joined
|
|||
llfourn | wow it doens't even work with &foo by itself for me | 20:24 | |
zwu: ya it's super broken | |||
dalek | kudo/nom: 9f64cec | lizmat++ | src/core/Complex.pm: Revert "decent infix:<**> for Complex" This reverts commit 4680dc81f2720cc50e2d144ebb12116f90a3b231. It severely borked t/spec/S32-num/power.t :-( |
20:25 | |
llfourn | zwu: It looks like require ::('Test') <&ok> works but nothing from your non core dist modules | 20:26 | |
yikes! | |||
roast only tests require Test ;_; | |||
orbus | I guess I really should get an rt account | 20:28 | |
orbus doesn't like registering for more things - too many accounts already | 20:30 | ||
20:33
CIAvash left
|
|||
llfourn | orbus: I've been filing bugs for months and never bothered to get an account :) | 20:33 | |
orbus | I saw something on the site about filing by e-mail | ||
but I couldn't figure out where to send to | |||
maybe I'm blind | |||
llfourn | orbus: [email@hidden.address] | ||
RabidGravy | yeah | ||
orbus | ah, okay | ||
well I'll give that a shot | 20:34 | ||
I think I found a concurrency bug | |||
probably lots of those :p | |||
llfourn | please do :D | ||
orbus | I can reproduce it semi-regularly - seems there's a race condition around state variables and concurrent processing - namely if the timing's just right and two threads try to enter the sub at the same time, the state variable gets messed up | 20:35 | |
seems to be on state variable initialization | |||
llfourn | zwu: rt.perl.org/Public/Bug/Display.html?id=127233 Sorry about sending you on wild goose chase there :P | 20:36 | |
20:36
spider-mario left
|
|||
llfourn | orbus: I am not surprised :) | 20:37 | |
orbus | actually, come to think of it, maybe not on initialization | ||
hmm | |||
well I'm not really either | |||
concurrency is hard to get right and it's amazing it works as well as it does so far | |||
lots of wrinkles left to iron out | |||
BenGoldberg | m: sub foo { state $bar = 0; ++$bar }; say [+] await (start { foo } xx 2) for 1..10; | ||
camelia | rakudo-moar 9f64ce: OUTPUT«3711151923Memory allocation failed; could not allocate 14816 bytes» | ||
BenGoldberg | m: sub foo { state $bar = 0; ++$bar }; say [+] await (start { foo } xx 2) for 1..10; | 20:38 | |
orbus | :) | ||
camelia | rakudo-moar 9f64ce: OUTPUT«37111519Memory allocation failed; could not allocate 14816 bytes» | ||
orbus | I ran into it on a state Lock | ||
sometimes it works | |||
sometimes on of the threads gripes that the state variable isn't a Lock | 20:39 | ||
like it hasn't been initialized | |||
BenGoldberg | m: for (1..10) { my sub foo { state $bar = 0; ++$bar }; say [+] await (start { foo } xx 2) }; | ||
camelia | rakudo-moar 9f64ce: OUTPUT«333333Memory allocation failed; could not allocate 14816 bytes» | ||
orbus | is camelia running 2015.12? | 20:40 | |
BenGoldberg | m: use v10000; | ||
camelia | rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cWj1_bNtfsNo compiler available for Perl v10000at /tmp/cWj1_bNtfs:1------> 3use v100007⏏5;» | ||
BenGoldberg | m: use $*VERSION; | 20:41 | |
camelia | rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wuu2OHNEuaUndeclared routine: use used at line 1» | ||
BenGoldberg | m: use $?VERSION; | ||
camelia | rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nQYkAFlST8Variable '$?VERSION' is not declared. Did you mean 'Version'?at /tmp/nQYkAFlST8:1------> 3use 7⏏5$?VERSION;» | ||
BenGoldberg | m: use $?Version; | ||
camelia | rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MtSpRzxRcfVariable '$?Version' is not declared. Did you mean 'Version'?at /tmp/MtSpRzxRcf:1------> 3use 7⏏5$?Version;» | ||
BenGoldberg | I kmnow there's a variable with the version.... | ||
BenGoldberg looks around for his cheat sheet | |||
orbus | m: put $*PERLVERSION | 20:42 | |
RabidGravy | m: say $*PERL.version | ||
camelia | rakudo-moar 9f64ce: OUTPUT«Dynamic variable $*PERLVERSION not found in block <unit> at /tmp/n_YBrkQHdV line 1Actually thrown at: in block <unit> at /tmp/n_YBrkQHdV line 1» | ||
rakudo-moar 9f64ce: OUTPUT«v6.c» | |||
orbus | oh | ||
BenGoldberg | m: $*PERL | ||
camelia | ( no output ) | ||
orbus | that's the perl version, not the rakudo version | ||
BenGoldberg | m: $*PERL.perl.say | ||
camelia | rakudo-moar 9f64ce: OUTPUT«Perl.new(compiler => Compiler.new(id => "61EFC50B7FEF96D41C933C212DA935F964BBF936.1452457829.90565", release => "", codename => "", name => "rakudo", auth => "The Perl Foundation", version => Version.new('2015.12.166.g.9.f.64.cec'), signature => Blob, desc…» | ||
orbus | there we go | ||
m: for ^10 { my &x=sub ($x is rw) { state $l=Lock.new; $l.protect({ $x++ }); }; my $z=5; await start {&x($z)} xx 2; put $z } | 20:43 | ||
camelia | rakudo-moar 9f64ce: OUTPUT«77777Memory allocation failed; could not allocate 15032 bytes» | ||
orbus | oh that's interesting | ||
that runs on my box | |||
at least sometimes | |||
sometimes it throws No such method 'protect' for invocant of type 'Any' | |||
RabidGravy | I think there's a ulimit or something on it | ||
orbus | could be | 20:44 | |
to keep people from doing nutty things to camelia | |||
BenGoldberg | But wouldn't await cause the thread to be cleaned up? | ||
20:45
yurivish_ joined
|
|||
orbus | there's probably a really small memory allocation limit on the account camelia runs under | 20:45 | |
20:45
hankache left
|
|||
orbus | to keep somebody malicious from gobbling up all the memory on the host box | 20:45 | |
camelia's for one-liners | |||
zwu | llfourn: I appreciated your filing a bug. | 20:46 | |
lizmat | orbus: somehow it feels *VERY* wrong that you store a Lock in a state variable | 20:49 | |
20:50
ceronman joined,
wamba left
20:51
zwu left
|
|||
lizmat | orbus: but it's more a gut feeling | 20:51 | |
ah, I see it now | |||
yes, bad idea | |||
BenGoldberg | m: for ^10 { my &x=sub ($x is rw) { constant $l = Lock.new; $l.protect({ $x++ }); }; my $z=5; await start {&x($z)} xx 2; put $z } | 20:52 | |
camelia | rakudo-moar 9f64ce: OUTPUT«77777Memory allocation failed; could not allocate 15208 bytes7» | ||
lizmat | well, the lock appears to be shared between multiple threads | ||
I'm not sure the lock itself is created to handle that evantuality | 20:54 | ||
*eventuality | |||
BenGoldberg | m: sub foo { state $bar = do { say 'when is this done' }; 42 }; say 'before'; foo; say 'after'; | ||
camelia | rakudo-moar 9f64ce: OUTPUT«beforewhen is this doneafter» | ||
BenGoldberg | m: for (1..2) { sub foo { state $bar = do { say 'when is this done' }; 42 }; say 'before'; foo; say 'after' } | ||
camelia | rakudo-moar 9f64ce: OUTPUT«beforewhen is this doneafterbeforewhen is this doneafter» | ||
BenGoldberg | m: for (1..2) { sub foo { state $bar = do { say 'when is this done' }; 42 }; say 'before'; foo; foo; say 'after' } | ||
camelia | rakudo-moar 9f64ce: OUTPUT«beforewhen is this doneafterbeforewhen is this doneafter» | ||
20:55
psy__ left
|
|||
ceronman | Hi everyone, I just installed Perl 6 on OS X (via brew install rakudo-star). I'm just trying the language. | 20:55 | |
BenGoldberg | m: for (1..2) { sub foo { state $bar = do { say 'when is this done' }; 42 }; say 'before'; foo; foo; say 'after' }; foo | ||
camelia | rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UDU9xtrymdUndeclared routine: foo used at line 1» | ||
ceronman | while playing with it, I ran into an error when running this: perl6 -e 'sub one { 1 }; one;' | ||
BenGoldberg | m: for (1..2) { our sub foo { state $bar = do { say 'when is this done' }; 42 }; say 'before'; foo; foo; say 'after' }; foo | 20:56 | |
camelia | rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oBqEvQPfIGUndeclared routine: foo used at line 1» | ||
ceronman | why is the error happening? it seems the name 'one' is colliding with something as it doesn't happen with other function names | ||
20:56
spider-mario joined
|
|||
BenGoldberg | m: say one; | 20:56 | |
camelia | rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/U9LOJjZO5dFunction "one" may not be called without arguments (please use () or whitespace to denote arguments, or &one to refer to the function as a noun)at /tmp/U9LOJjZO5d:1------> 3say one7⏏5;» | ||
BenGoldberg | m: sub one { 42 }; one; | ||
camelia | rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pTc51hLMH3Function "one" may not be called without arguments (please use () or whitespace to denote arguments, or &one to refer to the function as a noun)at /tmp/pTc51hLMH3:1------> 3sub one { 42 }; o…» | ||
BenGoldberg | m: sub one { 42 }; one(); | ||
camelia | ( no output ) | ||
BenGoldberg | m: sub one { 42 }; say one.WHAT; | 20:57 | |
camelia | rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MHO9dMTX6SFunction "one" may not be called without arguments (please use () or whitespace to denote arguments, or &one to refer to the function as a noun)at /tmp/MHO9dMTX6S:1------> 3sub one { 42 }; s…» | ||
BenGoldberg | m: sub one { 42 }; say &one.WHAT; | ||
camelia | rakudo-moar 9f64ce: OUTPUT«(Sub)» | ||
BenGoldberg | m: sub one { 42 }; say &one.perl; | ||
camelia | rakudo-moar 9f64ce: OUTPUT«sub one () { #`(Sub|81598528) ... }» | ||
BenGoldberg | m: say &one.perl; | ||
camelia | rakudo-moar 9f64ce: OUTPUT«sub one (+ is raw) { #`(Sub+{<anon|49450304>}|67143056) ... }» | ||
BenGoldberg | m: my $foo; one($foo); | ||
camelia | rakudo-moar 9f64ce: OUTPUT«WARNINGS for /tmp/7WEXfjzD9B:Useless use of "one($foo)" in expression "one($foo)" in sink context (line 1)» | ||
BenGoldberg | m: my $foo; say one($foo); | ||
camelia | rakudo-moar 9f64ce: OUTPUT«one((Any))» | ||
BenGoldberg | m: my $foo; say one($foo); say $foo | ||
camelia | rakudo-moar 9f64ce: OUTPUT«one((Any))(Any)» | ||
BenGoldberg | m: my $foo = ; say one($foo); say $foo | ||
camelia | rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/A0DGNFryKuMalformed initializerat /tmp/A0DGNFryKu:1------> 3my $foo =7⏏5 ; say one($foo); say $foo expecting any of: prefix term» | ||
BenGoldberg | m: my $foo = 1; say one($foo); say $foo; # stupid fingers | ||
camelia | rakudo-moar 9f64ce: OUTPUT«one(1)1» | ||
20:58
wollmers joined
|
|||
BenGoldberg | m: my $foo = 2; say one($foo); say $foo; | 20:58 | |
camelia | rakudo-moar 9f64ce: OUTPUT«one(2)2» | ||
BenGoldberg | m: my $foo = 2; say one($foo++); say $foo; | ||
camelia | rakudo-moar 9f64ce: OUTPUT«one(2)3» | ||
wollmers | hello rekudistas | ||
BenGoldberg | m: my $foo = 2; say one(1); say $foo; | ||
camelia | rakudo-moar 9f64ce: OUTPUT«one(1)2» | ||
BenGoldberg | m: say one('what does this button do'); | ||
camelia | rakudo-moar 9f64ce: OUTPUT«one(what does this button do)» | ||
20:59
ely-se left
|
|||
lizmat | m: dd one(True,False,False), one(True,True,False) # ceronman | 20:59 | |
camelia | rakudo-moar 9f64ce: OUTPUT«Method 'name' not found for invocant of class 'Bool' in any at gen/moar/m-Metamodel.nqp line 3124 in block <unit> at /tmp/hIMatcxyJm line 1» | ||
lizmat | hmmm... | ||
m: say one(True,False,False), one(True,True,False) | |||
camelia | rakudo-moar 9f64ce: OUTPUT«one(True, False, False)one(True, True, False)» | ||
wollmers | p6: my $h = {a => [[1,2]]}; for (@($h{'a'})) -> $x { say '$x: ',$x.perl; }; | 21:00 | |
camelia | rakudo-moar 9f64ce: OUTPUT«$x: 1$x: 2» | ||
lizmat | m: say so one(True,False,False), so one(True,True,False) | ||
camelia | rakudo-moar 9f64ce: OUTPUT«TrueFalse» | ||
BenGoldberg | m: say one(1).WHAT; | ||
camelia | rakudo-moar 9f64ce: OUTPUT«(Junction)» | ||
lizmat | one() creates a junction that yields True if only one of the values is True | ||
leont | How can I 'inherit' a method from a role, and also override it? | 21:01 | |
ceronman | I understand that, but then why if I define my own 'one' function, I get that error? | ||
leont | Call it explicitly? | ||
BenGoldberg | Add parens. | ||
21:01
colomon left
|
|||
wollmers | How can I get the arrayref [1,2] out of [[1,2]] into a for loop? | 21:02 | |
ceronman | ok, if I type the parens, I don't get the error, but why do I get it without the parens? | ||
21:04
yurivish_ left
|
|||
dalek | kudo/nom: 9927409 | lizmat++ | src/core/Rakudo/Internals.pm: Add IS-WIN as cheap way to know if we're on Win Having to create a Distro for this, is really stupid. |
21:04 | |
kudo/nom: 5cb4372 | lizmat++ | src/core/ (3 files): Use Rakudo::Internals.IS-WIN where appropriate |
|||
lizmat | ceronman: *that* could actually be a bug | ||
OTOH, one is just a sub in the setting... hmmm... | 21:05 | ||
ceronman | lizmat: it looks like a bug. It doesn't happen with other names, even if they collide with thigs: perl6 -e 'sub elems { 1 }; say elems;' | 21:06 | |
wollmers | What's wrong with this: Malformed loop spec: ------> for ( @($ranks{$rank}) ) -> ⏏$hunk { | 21:10 | |
moritz | wollmers: do you want to iterate over 1 and 2? or get [1, 2] in a single iteration? | ||
m: my $ranks; my $rank; for ( @($ranks{$rank}) ) -> $hunk { } | 21:11 | ||
camelia | ( no output ) | ||
moritz | wollmers: maybe a syntax error before that? | ||
dalek | osystem/add-perl6-slang-roman: d74c047 | (Jeffrey Goff)++ | META.list: Add perl6-slang-roman |
21:12 | |
wollmers | moritz: the second case. I want array-refs as $x. | ||
21:12
colomon joined
|
|||
lizmat | ceronman: indeed, could you please report this [email@hidden.address] and quote the conversation here ? | 21:12 | |
ceronman | lizmat: I will thanks for the help | 21:13 | |
moritz | m: for [[1, 2],] -> $x { say $x.perl } | ||
camelia | rakudo-moar 5cb437: OUTPUT«$[1, 2]» | ||
dalek | osystem: d74c047 | (Jeffrey Goff)++ | META.list: Add perl6-slang-roman |
||
osystem: 5278038 | drforr++ | META.list: Merge pull request #118 from perl6/add-perl6-slang-roman Add perl6-slang-roman |
|||
moritz | wollmers: ^^ | ||
wollmers | moritz: The AoA is constructed via push. Does push set the "magic comma"? | 21:14 | |
moritz | wollmers: yes; it never flattens | 21:15 | |
m: my @a; @a.push: [1, 2]; for @a -> $x { say $x.perl } | |||
camelia | rakudo-moar 5cb437: OUTPUT«$[1, 2]» | ||
moritz | wollmers: seems to do what you want: a single iteration with an array in $x | ||
21:16
Skarsnik left,
[particle] joined
|
|||
wollmers | moritz: thx. So I should isolate my syntax bug. Maybe a porting relict from P5. | 21:17 | |
moritz | wollmers: also, the parens around the list expression isn't necessary (for ... -> $x instead of for ( ... ) -> $x ) | 21:18 | |
21:19
[particle]1 left
|
|||
wollmers | moritz: I know, that's just P5-ish. | 21:19 | |
21:20
pi4 left,
pi4 joined
|
|||
nine | orbus: using a state variable like that looks like a classic test and set race condition. Does Perl 6 actually guarantee that state variable initialization is thread safe? | 21:24 | |
lizmat | I'm pretty sure it doesn't | ||
same for once blocks | |||
nine | orbus: oh an while I'm at it: your cas implementation seems to be using the same lock for all cas operations while it should be one lock per compared variable. | 21:25 | |
orbus | that is a good point | ||
nine | One of these days I'm gonna have to start looking at parallelism in Perl 6 :) | 21:26 | |
orbus | I changed it around some more already | ||
but that is a good point | |||
21:26
geraud joined
|
|||
orbus | I've been looking for a writeup on what perl6 actually guarantees is thread safe | 21:26 | |
I haven't found one | |||
scalar assignment seems to be atomic (seems to be) | 21:27 | ||
anything past that, maybe only jnthn knows | |||
lizmat | orbus: that's about the only thing that is guaranteed | ||
nine | Well the emphasis was really on higher level abstractions, so you shouldn't have to care about those as much. | ||
orbus | well, maybe that's true but I think it still ought to be in writing somewhere - it's really easy to trip over otherwise | 21:28 | |
lizmat: that's about what I've been figuring | |||
21:29
colomon left
21:30
atweiden joined
|
|||
orbus | as far as whether perl6 guarantees state variable initialization to be safe - it may well not, but it seems like it probably should or it breaks a lot of assumptions I know I would probably make about when it's safe to use start | 21:30 | |
lizmat | orbus: yes, that's a good point | ||
nine | Guaranteeing safety usually makes the common case of non-threaded access slower, too. | ||
That's the opposite of what we'd like to do :) | 21:31 | ||
orbus | always a balance to strike | ||
you could just put a big red NOT THREAD SAFE warning on it | |||
but I feel like if it's not safe you're going to wind up with a lot of non thread-safe modules | 21:32 | ||
dalek | kudo/nom: 5240dec | lizmat++ | src/core/ (5 files): Move MAKE-EXT to Rakudo::Internals Do some streamlining, and make sure all calls to MAKE-EXT are adapted |
||
21:32
colomon joined
|
|||
lizmat | nine: using a state variable in a module in the ecosystem, making that unsafe for use in async, that would be bad :-( | 21:32 | |
cxreg | whoever convinced JT to reconsider perl 6 and write about it, nice job | 21:33 | |
orbus | anyway, I wrote a little test program that demonstrates the issue (usually) | 21:36 | |
DrForr | Indeed. | ||
orbus | so when I get a chance I'll throw it in an email and send to rakudobug | ||
as far as the cas, I'm still just messing around with it - it's been a good opportunity to try to wrap my head around binding and containers | 21:37 | ||
but that's a good point about the locking - what I've done so far is probably suboptimal | |||
21:37
wamba joined,
zwu joined
|
|||
orbus | although I'm not sure how I'd do a separate lock per compared variable - keep a big hash? could get large quickly | 21:40 | |
have to think about it I guess | |||
nine | lizmat: I'd bet that pretty much all ecosystem code is thread unsafe. A user has to care for that by herself by stuffing the code into supplies and promises | ||
orbus | yeah, but with the state thing | 21:41 | |
nine | orbus: or...you could just dive in an implement it properly in the vm ;) | ||
orbus | if there's a function in a module that uses a state variable | 21:42 | |
ha - I think that's probably over my head | |||
the last C I did was a very long time ago | |||
but as I was saying, if you have a module function that uses a state variable | |||
nine | And if there's a module that uses objects with state and methods or lexical variables in the module's main line, you have the same issues. State variables are just one way to have kinda global state. | ||
orbus | those would get initialized when you call use right? | 21:43 | |
I don't think it's the same | |||
21:44
Psyche^_ joined
|
|||
nine | my $foo; sub do_something($bar) { $foo //= $bar; ... } | 21:44 | |
same race condition right there without state | |||
Or if it's no lexical but an object's property and you pass that objects to multiple thread, same thing can happen. | 21:45 | ||
orbus | what's //= ? | ||
nine | defined or assign | ||
orbus | that's what I thought | 21:46 | |
not in the operators document :p | |||
lizmat | hmmm... perhaps state variables are thread safe after all: | 21:47 | |
m: my int $a = 0; sub a() { once $a = $a + 1 }; await do for ^100 { Promise.start(&a) }; say $a | |||
camelia | rakudo-moar 5cb437: OUTPUT«Memory allocation failed; could not allocate 15504 bytes» | ||
lizmat | ooh, wow | ||
orbus | yeah | ||
we ran into that earlier | |||
our guess is camelia has a small memory cap | |||
lizmat | $ 6 'my int $a = 0; sub a() { once $a = $a + 1 }; await do for ^10000 { Promise.start(&a) }; say $a' | ||
1 | |||
21:48
Psyche^ left
|
|||
orbus | yeah I have an example like that | 21:48 | |
sometimes it works | |||
sometimes it doesn't | |||
lizmat | I haven't been able to get this one to fail yet | ||
orbus | although | ||
come to think of it | |||
I was assigning an object | |||
so maybe it's falling down in the object construction | |||
that could well be | 21:49 | ||
lizmat | $ 6 'my Int $a; sub a() { once $a = $a + 1 }; await do for ^10000 { Promise.start(&a) }; say $a' | ||
Invocant requires an instance of type Int, but a type object was passed. Did you forget a .new? | |||
21:49
kaare_ left
|
|||
orbus | there you go | 21:50 | |
lizmat | now, in this case, we don't have an Int to start with | ||
orbus | that's the kind of thing I was getting | ||
in my case it was a Lock | |||
I was trying to assign a Lock to a state variable | |||
lizmat | if you initialize the Int $a = 0, then there is no problem, because there is container to begin with | ||
nine | Good night all! | ||
lizmat | good night, nine! | 21:51 | |
orbus | and sometimes it would act like the Lock variable hadn't been initialized when it got to the point of trying to call protect | ||
21:51
uvtc joined
|
|||
orbus | later nine | 21:51 | |
I dunno - it just feels like there's a lot of landmines in concurrency | |||
which makes sense - it's a hard problem | 21:52 | ||
but it would be nice to start making a map of where the landmines are | |||
lizmat | yes, but we try to shield user from those landmines... | ||
orbus | that's kind of my hope | ||
protect people from what it's possible to protect from | 21:53 | ||
and put big warning signs around the stuff you can't | |||
cxreg | i believe in jnthn | ||
orbus | well he probably has some ideas around all this | ||
cxreg | he absolutely does | ||
just needs more work | |||
orbus | yup | ||
that's my assumption | |||
I'm just trying to point things out as I trip over them to raise awareness :) | 21:54 | ||
cxreg | orbus++ | ||
uvtc | m: my @a = 1, 2, 3; my @b = 2, 1, 3; say @a == @b; # How do I compare two arrays? | ||
camelia | rakudo-moar 5240de: OUTPUT«True» | ||
uvtc | ^^ I'd expect that to return False. | ||
RabidGravy | m: my @a = 1, 2, 3; my @b = 2, 1, 3; say @a ~~ @b; | 21:55 | |
camelia | rakudo-moar 5240de: OUTPUT«False» | ||
uvtc | What is `@a == @b` doing? | ||
RabidGravy | m: my @a = 1, 2, 3; my @b = 1, 2, 3; say @a ~~ @b; | ||
camelia | rakudo-moar 5240de: OUTPUT«True» | ||
cxreg | is there a non-smartmatch way of doing that? | ||
RabidGravy | comparing the lengths I think | ||
uvtc | Ah. Numerical. | ||
Right. | |||
El_Che | uvtc: iirc, object identitiy | ||
uvtc | Oh. | ||
wollmers | Seems I need to write my own Test::is-deeply() | 21:56 | |
21:56
silug left
|
|||
orbus | m: my @a=1,2,3; my @b=2,1,3,4; put @a==@b | 21:56 | |
camelia | rakudo-moar 5240de: OUTPUT«False» | ||
uvtc | I'd forgotten: `==` for numerical, `eq` for strings, `~~` for ... smart matching. | ||
El_Che | uvtc: have a look at the Array class, the doc about any, all, unique etc. That's also very nice | ||
uvtc | Ok. Thanks, El_Che. | 21:57 | |
wollmers | in the test file: is-deeply([allLCS([<A B C>], [<D E F>])], [[[],],],); | ||
The result: # expected: $[] # got: $[[[],],] | 21:58 | ||
El_Che | m: my @a=1,2,3; my @b=1,3,2; say @a.sort ~~ @b.sort | ||
camelia | rakudo-moar 5240de: OUTPUT«True» | ||
El_Che | uvtc: in the case you only care about the contents | ||
uvtc | Is there a general rule Perl 6 follows regarding whether or not a method mutates its object (the "invocant"?) vs if it instead returns a new object? | 22:00 | |
lizmat | the general rule is: return new object, but there are exceptions | ||
like push/unshift/append/prepend :-) | 22:01 | ||
uvtc | Nice. Thanks, lizmat and El_Che . Right, I see: with push/pop/shift/unshift/append/prepend you expect modification. | ||
22:01
wamba left
|
|||
orbus | I'm assuming that doesn't apply to ecosystem classes? | 22:01 | |
just that the core tries to behave that way? | 22:02 | ||
El_Che | uvtc: kind of related, similar ro-behavious for method signature parameters. You need to add "is rw" or "is copy" if you want a different behaviouer | ||
22:02
average joined
|
|||
average | blogs.perl.org/users/jt_smith/2016/...async.html | 22:03 | |
uvtc | El_Che, Ok. I see. Default is `ro` --- you need to ask for `rw`. | ||
average | I very much liked that blogpost ^^ | ||
this was something I asked a week ago in this channel | |||
El_Che | uvtc: so is the default for Str.subst a new Str. For rw there is substr-mutate. | 22:04 | |
orbus | the concurrency stuff is very much what got me interested | 22:05 | |
El_Che | uvtc: so like Liz says: new obj except when not for obvious or explicit reasons | ||
uvtc | Ah, didn't know there was a `substr-mutate`. Ok. Thanks, El_Che . | ||
orbus | most other scripting type languages leave much to be desired in terms of concurrency support | ||
lizmat | orbus: fwiw, I'm not convinced anymore that state variables are inherently thread-unsafe | ||
orbus | lizmat: I think I need to do some more experiments | 22:06 | |
El_Che | orbus: most? all | ||
orbus: :) | |||
orbus | because I had object construction in the mix | ||
well | |||
lizmat | orbus: you see, a once block uses a hidden state variable | ||
22:06
silug joined
|
|||
lizmat | and I have not been able to make that break | 22:06 | |
orbus | of the available ones, groovy seems to come the closest from what I've seen - but that's because it's java in disguise | ||
lizmat: hmm - okay, I'll play with it some more | 22:07 | ||
thanks | |||
it might just be that it's not safe to try to assign it to like SomeObject.new | |||
uvtc | El_Che, Oops, typo. I see that besides `substr` there's also a `subst` and `subst-mutate` (but no "`substr-mutate`"). | ||
El_Che | uvtc: typo indeed :) | 22:08 | |
uvtc: I am a s/// guy :) | |||
uvtc | Oh. Does `subst` mean "substitute"? (Where's `substr` means "substring".) | 22:10 | |
skids | yep | 22:11 | |
uvtc | Ah. Thanks skids . | ||
skids | substr-rw would be the mutable | 22:12 | |
22:13
frankjh left
|
|||
uvtc | Ah, nice. | 22:13 | |
22:14
uvtc left
|
|||
dalek | osystem: c081228 | skids++ | META.list: switch X::Protocol from META.info to META6.json |
22:16 | |
22:16
_Vi left
22:18
ceronman left
|
|||
masak | 'night, #perl6 | 22:18 | |
22:18
amoe left
|
|||
wollmers | In which repository lives the source of the module Test? | 22:20 | |
22:20
TEttinger joined
|
|||
llfourn | wollmers: github.com/rakudo/rakudo/tree/nom/lib | 22:21 | |
wollmers | llfourn: thx. Found no link on rakudo.org. | 22:22 | |
llfourn | when it doubt go to github :) | 22:23 | |
22:34
zwu left
22:36
pmurias left
22:37
rindolf left
|
|||
dalek | osystem: cb23569 | LLFourn++ | META.list: Add AttrX::InitArg to ecosystem github.com/LLFourn/p6-AttrX-InitArg |
22:37 | |
llfourn | mst: I did it! | ||
awwaiid: ^ | 22:38 | ||
break & | |||
22:40
vendethiel left
|
|||
skids | How does one force panda to refresh a module's META? | 22:41 | |
leont | Is it me, or does IO::Path not support anything like catfile/catdir? | 22:48 | |
dalek | kudo/nom: 34d2b6f | lizmat++ | src/core/ (3 files): Move MAKE-CLEAN-PARTS to Rakudo::Internals and streamline it |
22:49 | |
lizmat | leont: $*SPEC supports that | ||
it's a mess | |||
yes | |||
I know | |||
lizmat goes to bed | |||
leont | Yeah it is | ||
lizmat | good night, #perl6! | 22:50 | |
leont has an open PR about $*SPEC | |||
Night! | |||
lizmat | I still think $*SPEC needs to die | ||
sleep& | |||
skids | m: my $a = IO::Path.new("/tmp"); $a.child("foo").say; | ||
camelia | rakudo-moar 5240de: OUTPUT«IO::Path is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting line 1 in method new at src/RESTRICTED.setting line 32 in block <unit> at /tmp/XkIxx7gbwK line 1» | ||
leont | I wouldn't mind $*SPEC dying, but we'd need something in its place instead | 22:51 | |
utime is documented as «Gone, see Path.times.», but there is no such method in IO::Path | 22:53 | ||
22:54
niceperl joined
|
|||
RabidGravy | skids, "panda update" | 22:56 | |
skids | That does not seem to, it only updates modules.list. | ||
leont | Seems my options are shelling out and using NativeCall… | 22:57 | |
22:58
Herby_ joined
|
|||
Herby_ | Good afternoon, everyone! | 22:58 | |
RabidGravy | I just discovered that one can use an $!attribute in a where on a method parameter, against my expectations | ||
skids | Well, to be precise, "panda update" will pull new copies of individual module META files if it sees a change in the META.list, but not if just the module's META file changes. | 22:59 | |
23:00
niceperl left
|
|||
RabidGravy | ah right, | 23:01 | |
23:03
vendethiel joined
23:11
_nadim left
|
|||
Herby_ | what is the: -> operator used for? I'm looking at an advent tutorial from last year | 23:18 | |
$measurements.tap(-> $value { say "Measured: $value"; }); | |||
that is in the tutorial | 23:19 | ||
not sure what the ' -> ' does | |||
awwaiid | llfourn: nice! Also nice because I was telling people about traits the other day and this gives a wonderful example of user-defined attribute traits | ||
Herby_ | perl6advent.wordpress.com/2013/12/...ogramming/ | ||
23:20
wollmers left
23:21
kid51 joined
23:22
RabidGravy left
|
|||
geekosaur | Herby_, design.perl6.org/S06.html#%22Pointy_blocks%22 | 23:23 | |
Herby_ | Thanks, geekosaur. I'll give that a read | ||
23:24
vendethiel left,
firstdayonthejob left
|
|||
Herby_ | m: my $sq = -> $val { $val ** 2 }; say $sq(10); | 23:25 | |
camelia | rakudo-moar 34d2b6: OUTPUT«100» | ||
leont | zostay: IO::Glob is in the index as IO-Glob, that may be a bit confusing | 23:33 | |
Herby_ | m: say 1..10; | ||
camelia | rakudo-moar 34d2b6: OUTPUT«1..10» | ||
Herby_ | m: say (1..3) | 23:34 | |
camelia | rakudo-moar 34d2b6: OUTPUT«1..3» | ||
Herby_ | m: say (^5) | ||
camelia | rakudo-moar 34d2b6: OUTPUT«^5» | ||
leont | zostay: it's also failing its tests, apparently because it's assuming a particular order returned from IO::Path.dir | 23:35 | |
awwaiid | m: say (^5).WHAT; say (1..3).WHAT | ||
camelia | rakudo-moar 34d2b6: OUTPUT«(Range)(Range)» | ||
awwaiid | m: say (^5).WHAT; say (1..3).WHAT; say (0..3).WHAT | ||
camelia | rakudo-moar 34d2b6: OUTPUT«(Range)(Range)(Range)» | ||
awwaiid | m: say (0..3) | ||
camelia | rakudo-moar 34d2b6: OUTPUT«0..3» | ||
awwaiid | *shrug* | ||
Herby_ | m: my $a = 1..5; say $a; | 23:36 | |
camelia | rakudo-moar 34d2b6: OUTPUT«1..5» | ||
Herby_ | m: my @a = 1..5; say @a; | ||
camelia | rakudo-moar 34d2b6: OUTPUT«[1 2 3 4 5]» | ||
Herby_ | m: my @a = ^5; say @a; | ||
camelia | rakudo-moar 34d2b6: OUTPUT«[0 1 2 3 4]» | ||
awwaiid | it must have some metadata to know that ^5 is ^5 rather than 0..4 | ||
Herby_ | hmm | 23:37 | |
23:47
Gruber is now known as Grrrr
|
|||
Quom__ | It's always ^5, but when flattened or accessed with [] brackets, it'll expand into a list | 23:59 | |
m: say ^5 | |||
camelia | rakudo-moar 34d2b6: OUTPUT«^5» | ||
Quom__ | m: say flat ^5 | ||
camelia | rakudo-moar 34d2b6: OUTPUT«(0 1 2 3 4)» | ||
Quom__ | m: say List(^5) | ||
camelia | rakudo-moar 34d2b6: OUTPUT«(^5)» |