»ö« 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:00 pyrimidine joined, RabidGravy left 00:08 obfusk_ joined, obfusk left 00:12 Guest42590 left 00:17 kurahaupo_ joined, kurahaupo_ is now known as kurahaupo 00:21 kurahaupo__ left 00:23 canopus left 00:27 cognominal left 00:30 cognominal joined 00:32 canopus joined
ugexe clasclin: run with /c... so run 'cmd /c whatever' i think 00:35
er run 'cmd', '/c', 'whatever', 'whatever2' 00:36
clasclin thanks, looks like works... 00:41
I think I found some solution 00:42
If for example
00:43 pierre_ joined
clasclin my $day = qq:x/date-script.p6/ 00:43
yoleaux viki: fix the -Inf thing!
clasclin $day # yyyy-mm-dd
now I can use it in 00:44
qq:x/another-script.p6 $day/
becouse I just wanted to interpolate the variables to reuse in another script and want to use run to capture the output but apparently shell can too 00:50
I found it here perl6advent.wordpress.com/2014/12/...om-perl-6/ 00:51
00:52 wamba left 00:57 aborazmeh joined, aborazmeh left, aborazmeh joined 01:04 Tonik left, dj_goku left
clasclin run 'cmd', '/c', 'write.exe', 'documents/pastel.txt' # open worpad accepting the document as an argument, thanks :) 01:04
01:12 cognominal left, cognominal joined 01:13 pierre_ left 01:15 skids joined 01:38 avalenn left 01:39 nals joined
nals hey 01:39
Can you give me an example of data flow being executed in a Perl program
01:40 avalenn joined
MasterDuke nals: what do you mean "data flow"? 01:41
nals the concept of data flow 01:42
MasterDuke i'm sorry, still not following you. data being passed to a function? 01:44
01:45 dj_goku joined, dj_goku left, dj_goku joined
nals for example how operations occur in a sequential manner. 01:46
perl uses PDL::Dataflow to carry out this functioon
can you implement PDL::Dataflow in a factorial program 01:47
MasterDuke ah, probably can't help you, i've never used PDL. but you can you Perl 5 modules in Perl 6 quite easily if you take a look at Inline::Perl5 01:48
*use Perl 5 modules
01:50 BenGoldberg joined, dj_goku left
nals does inLine perform the same function? 01:55
01:57 cognominal left, cognominal joined
ugexe what features and aspects of Dataflow are you aware of and looking for 01:58
because 'data flow concept' is still extremely vague 01:59
nals just implementing the perl API such as PDL::dataflow in a factorial program
ugexe you'll get more help if we dont have to already be familiar with that exact module and read its documentation 02:00
nals alright 02:01
02:04 clasclin left 02:12 cognominal left, cognominal joined 02:27 cognominal left, cognominal joined 02:45 ilbot3 left 02:46 dj_goku joined, dj_goku left, dj_goku joined 02:47 ilbot3 joined 02:48 pierre_ joined 02:51 dj_goku left
lucs Precomp (I guess) problem: gist.github.com/lucs/ca3079329b667...2d32694f93 02:59
03:02 pierre_ left 03:08 bjz joined 03:10 bjz_ left 03:12 cognominal left 03:13 cognominal joined 03:23 noganex joined
ugexe lucs: paste the full output of whatever command causes that, but with RAKUDO_MODULE_DEBUG=1 03:23
03:26 noganex_ left 03:27 cognominal left, cognominal joined 03:31 dj_goku joined
lucs ugexe: Here you go: gist.github.com/lucs/f27f5acc03368...a2986b793d 03:33
ugexe lucs: i think it would work if you installed your module. the bug looks like its here: github.com/perl6/doc/blob/master/bin/p6doc#L218 03:41
its assuming a directory structure of CompUnit::Repository::Installation, but your PERL6LIB has a file path (CompUnit::Repository::FileSystem) 03:42
lucs Ah, I see what you mean. 03:45
Hmm... Not ready for installation yet, I just wanted to read my Pod from a user's perspective (it actually doesn't feel the same as reading the source Pod). 03:46
03:57 Zoffix joined, Zoffix left 04:01 eiro left
ugexe as a workaround you could always make an alias for `zef -to=inst#/tmp/libdoc --error --force --/test install . && PERL6LIB=inst#/tmp/libdoc p6doc My::Module` 04:04
04:12 cognominal left 04:13 pierre_ joined
lucs ugexe: And now I learn about zef :) -- I'll look into your suggestion. 04:18
Thanks.
04:26 cognominal joined 04:27 cognominal left
skids
.oO(man, powershell syntax is awful)
04:28
04:30 cognominal joined, thowe left 04:33 khw left 04:54 thowe joined 05:02 dwarring left 05:05 aborazmeh left 05:09 aindilis joined 05:11 pierre_ left 05:16 AlexDaniel left 05:17 pierre_ joined 05:35 TimToady left, telex left 05:36 TimToady joined 05:37 James0r joined 05:39 pyrimidine left
samcv is this a bug? 05:43
05:43 Actualeyes left
samcv m: say q 'testing' 05:43
camelia rakudo-moar ae614f: OUTPUT«testing␤»
samcv m: say q'testing'
camelia rakudo-moar ae614f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say q'testing7⏏5'␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ statement modifier␤ …»
samcv S02 seems to say that it should work
For these "q" forms the choice of delimiters has no influence on the semantics. That is, '', "", <>, «», ``, (), [], and {} have no special significance when used in place of // as delimiters.
bisect: q'test' 05:45
bisectable6 samcv, On both starting points (old=2015.12 new=ae614f9) the exit code is 1 and the output is identical as well
samcv, gist.github.com/e7bcd5e4541a43a884...c0027dd754
samcv bisectable6: q'test' 05:46
bisectable6 samcv, On both starting points (old=2015.12 new=ae614f9) the exit code is 1 and the output is identical as well
samcv, gist.github.com/db6933eb93b198d729...959f112e06
05:50 telex joined 05:51 pecastro left 05:53 seatek left, Actualeyes joined 05:57 cognominal left 05:58 Actualeyes left, Cabanossi left 05:59 itaipu joined 06:00 Cabanossi joined, rurban joined, rurban left 06:02 cognominal joined 06:11 cyphase left 06:12 Woodi joined, pierre_ left 06:13 BenGoldberg left 06:15 James0r left 06:16 Actualeyes joined, cyphase joined 06:20 pierre_ joined 06:22 nals left 06:24 skids left 06:41 pyrimidine joined 06:46 pyrimidine left 06:47 kurahaupo__ joined 06:48 kurahaupo left 06:54 kurahaupo__ is now known as kurahaupo 06:55 pierre_ left 07:01 pierre_ joined 07:09 pyrimidine joined 07:12 pierre_ left 07:14 pyrimidine left 07:15 pierre_ joined 07:20 darutoko joined 07:23 CIAvash joined 07:29 titsuki left, titsuki joined 07:30 pierre_ left 07:31 RabidGravy joined 07:34 kurahaupo left 07:42 Tonik joined 07:53 pyrimidine joined 07:57 pyrimidine left 07:59 domidumont joined 08:04 domidumont left, domidumont joined
RabidGravy boo! 08:07
08:09 lizmat left 08:12 domidumont left, pecastro joined 08:16 wamba joined, bjz left 08:18 bjz joined 08:28 pyrimidine joined 08:29 rurban joined 08:30 xinming left 08:33 pyrimidine left 08:42 Guest42590 joined 08:49 Guest42590 left
RabidGravy just catching up with the advent posts 08:53
all good
samcv nice 08:56
RabidGravy [Coke], what I want to know is when you are releasing a replacement for e.g. Travis :)
08:56 firstdayonthejob joined 08:59 pyrimidine joined 09:03 pyrimidine left
stmuk_ changes a http to https in a config which means the advent stuff should now appear on perl6.org 09:05
09:06 cibs left 09:07 cibs joined 09:14 lizmat joined, CIAvash left 09:15 FROGGS joined 09:20 lizmat left, CIAvash joined 09:21 CIAvash left
samcv ugh the escaping for TextMate style grammars are terrible 09:22
my brain feels like mush at this point 09:23
\\\\ is backslash. and \' is a quote. but \\{ is a left bracket
and all these other annoying things 09:24
and having to do it for all the q and qq constructs with diff delimiters seperately
09:25 [particle] left, [particle]1 joined
samcv too many levels of escape. because { and } mean things inside the grammar file... and they're also regex.. and ugh my head 09:25
it all starts to look the same after a while, forget how many backslashes \\\\} is or how many \\\\\\ is :| 09:26
09:26 [particle]1 left
samcv need to sleep 09:26
as soon i finish otherwise i might lose my place
09:27 [particle] joined 09:28 rindolf joined 09:29 itaipu left 09:30 lizmat joined 09:45 lizmat left
RabidGravy [Coke], I reckon you could do a cool thing using Tinky to create an asynchronous build pipeline for that thing 09:54
09:56 lizmat joined 10:00 pyrimidine joined 10:01 robertle joined 10:02 CIAvash joined, CIAvash left 10:04 pyrimidine left, lizmat left 10:05 giraffe left
titsuki bisect: dd (^10).lazy.iterator.can("count-only") 10:09
bisectable6 titsuki, Bisecting by output (old=2015.12 new=d704820) because on both starting points the exit code is 0
10:09 xinming joined
bisectable6 titsuki, bisect log: gist.github.com/25ba435d3a02a4b9c5...ba9536c73b 10:09
titsuki, (2015-12-25) github.com/rakudo/rakudo/commit/07...dc61f84053
10:11 lukaramu joined
titsuki bisect: dd (^10).lazy.iterator.count-only 10:11
bisectable6 titsuki, Bisecting by exit code (old=2015.12 new=d704820). Old exit code: 0
titsuki, bisect log: gist.github.com/ca8814be26dcc17404...9e8a0a99bc
titsuki, (2016-06-22) github.com/rakudo/rakudo/commit/fd...e1e3f4db32
10:12 giraffe joined 10:19 rindolf left 10:21 xinming left
moritz I've written and scheduled my post for day 6, you can read it and give me feedback if you're logged in: perl6advent.wordpress.com/2016/12/...e-is-ripe/ 10:22
10:22 xinming joined
dalek c: a0c3071 | titsuki++ | doc/Type/Iterator.pod6:
Delete count-only
10:26
c: 076e7ff | titsuki++ | doc/Type/Iterator.pod6:
Merge pull request #1026 from titsuki/delete-count-only

Delete count-only
synopsebot6 Link: doc.perl6.org/type/Iterator
10:26 rindolf joined 10:32 pyrimidine joined 10:35 travis-ci joined
travis-ci Doc build errored. Itsuki Toyota 'Merge pull request #1026 from titsuki/delete-count-only 10:35
travis-ci.org/perl6/doc/builds/180928983 github.com/perl6/doc/compare/7e800...6e7ff52b4b
10:35 travis-ci left 10:37 pyrimidine left 10:40 rurban left
RabidGravy moritz, looks good - except something has gone weird with the formatting of the last paragraph, looks like additional line breaks got in 10:40
10:43 pierre_ joined 10:45 pierre_ left 10:50 rurban joined 10:58 cognominal left 11:00 cognominal joined 11:08 Tonik left 11:09 pyrimidine joined 11:14 pyrimidine left 11:22 Tonik joined 11:28 Tonik left, cognominal left 11:29 cognominal joined 11:30 lizmat joined 11:32 edghto joined
tadzik nine++ is just showing an overview of perl 6 web modules, annotated with the last commit date 11:34
Bailador is right there with "Nov 2016". I feel so happy :)
lizmat :-)
tadzik ufobat++
11:38 TEttinger left
RabidGravy :) I don't think most of mine have had a commit in the last month 11:38
11:43 lizmat left 11:44 Tonik joined 11:49 cyphase left 11:54 cyphase joined 11:55 cibs left 11:57 cibs joined 12:05 cibs left 12:07 cibs joined, bjz left 12:13 pierre_ joined, cognominal left 12:15 cibs left, cibs joined 12:16 pierre_ left 12:18 nkuitse joined, pyrimidine joined, nkuitse left 12:23 pyrimidine left 12:24 cibs left 12:25 canopus left, cibs joined 12:27 cognominal joined
moritz RabidGravy: thanks, I've fixed the formatting 12:28
RabidGravy It'll be an inspiring article for people, a nice flurry of books next year or so would raise the buzz somewhat :) 12:29
12:31 cibs left, cibs joined 12:32 canopus joined
moritz the advent posts for days 4, 5, and 6 are scheduled already. Yay1 12:48
s/1/!/
12:48 kalkin- joined
kalkin- Hi 12:53
I have two buckets 1...3 and 'a'...'c' from each bucket i draw three elements in random order. How do i combine the two arrays to get all the possible draws in perl6? 12:54
m: 1...3 X 'a'...'c' 12:55
camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Only identical operators may be list associative; since '...' and 'X' differ, they are non-associative and you need to clarify with parentheses␤at <tmp>:1␤------> 031...3 X7⏏5 'a'...'c'␤ expec…»
psch m: my @a = 1,2,3; my @b = <a b c>; say @a.permutations X @b.permutations
camelia rakudo-moar d70482: OUTPUT«(((1 2 3) (a b c)) ((1 2 3) (a c b)) ((1 2 3) (b a c)) ((1 2 3) (b c a)) ((1 2 3) (c a b)) ((1 2 3) (c b a)) ((1 3 2) (a b c)) ((1 3 2) (a c b)) ((1 3 2) (b a c)) ((1 3 2) (b c a)) ((1 3 2) (c a b)) ((1 3 2) (c b a)) ((2 1 3) (a b c)) ((2 1 3) (a c b)) ((2…»
kalkin- psch: that exactly what i have currently
psch kalkin-: so? that fits your requirement, doesn't it? 12:56
kalkin- but i want to have it ordered
psch kalkin-: ordered by what
kalkin- in tuples of 3 draws where all elements are unique
psch okay just to clarify 12:57
"draw n times from a bucket with n elements" is always permutation of those elements
and you have given 'a','b','c', and 1,2,3 12:58
drawing is automatically without putting back, too
so there cannot be any duplicates
kalkin- Hmm may be i translated the algorithm wrong
psch m: say (1,2,3).permutations
camelia rakudo-moar d70482: OUTPUT«((1 2 3) (1 3 2) (2 1 3) (2 3 1) (3 1 2) (3 2 1))␤»
psch ^^^ that's all the ways you can draw from 1,2,3 three times 12:59
each of those gets combined with all the ways you can draw 3 times from 'a', 'b', 'c'
kalkin- I have 3 bucktes from each i have to make a draw, where a draw from each bucket builds a series, I have to get all the series
psch ah, three buckets :) 13:00
so you have 1,2,3 and <a b c> and <A B C>
kalkin- yes
psch you draw from each once?
kalkin- yes
if i draw from each bucket i would have a series which looks like that (1,a,A), (2,b,C), (3,c,B) 13:01
i have to get all the series. 13:02
psch m: sub f { [|$^a, $^b] }; say (<a b c> X <A B C>) X[&f] (1,2,3) 13:03
camelia rakudo-moar d70482: OUTPUT«([a A 1] [a A 2] [a A 3] [a B 1] [a B 2] [a B 3] [a C 1] [a C 2] [a C 3] [b A 1] [b A 2] [b A 3] [b B 1] [b B 2] [b B 3] [b C 1] [b C 2] [b C 3] [c A 1] [c A 2] [c A 3] [c B 1] [c B 2] [c B 3] [c C 1] [c C 2] [c C 3])␤»
psch &f can probably be stuffed into an inline operator somehow 13:04
or maybe we have a more elegant solution anyway, i can't think of one right now
kalkin- thanks will try that
psch m: sub f { [|$^a, $^b] }; say (<a b c> X <A B C>) X[&(-> $a, $b { (|$a,$b) })] (1,2,3) # well... 13:05
camelia rakudo-moar d70482: OUTPUT«((a A 1) (a A 2) (a A 3) (a B 1) (a B 2) (a B 3) (a C 1) (a C 2) (a C 3) (b A 1) (b A 2) (b A 3) (b B 1) (b B 2) (b B 3) (b C 1) (b C 2) (b C 3) (c A 1) (c A 2) (c A 3) (c B 1) (c B 2) (c B 3) (c C 1) (c C 2) (c C 3))␤»
psch not sure that's prettier, as such :) 13:06
kalkin- just a sec
13:07 wamba left
kalkin- if i cut in to tuples of three, to get a series, i would have an ilegal result because (a A 1) (a A 2) (a A 3) (a B 1) contains A two times 13:08
psch ah, okay, so you still haven't explained your desired results properly
m: say 'a' eq 'A'
camelia rakudo-moar d70482: OUTPUT«False␤»
psch i mean
the four tuples you showed contain A four times
three of those contain A *and* a
so, yeah, i don't know what you mean :) 13:09
kalkin- I'm sorry i have to go afk suddenly, i will be back later. I think I'm explaining it wrong
psch: thank you for your help
psch kalkin-: i tried :) 13:10
13:10 sena_kun joined
kalkin- :) 13:11
MasterDuke m: say <a b c> X <A B C> X <1 2 3> 13:12
camelia rakudo-moar d70482: OUTPUT«((a A 1) (a A 2) (a A 3) (a B 1) (a B 2) (a B 3) (a C 1) (a C 2) (a C 3) (b A 1) (b A 2) (b A 3) (b B 1) (b B 2) (b B 3) (b C 1) (b C 2) (b C 3) (c A 1) (c A 2) (c A 3) (c B 1) (c B 2) (c B 3) (c C 1) (c C 2) (c C 3))␤»
psch oh right
silly me, ~~ is the one with the confusing assoc
and putting X and Z together is the one that's forbidden
m: say (1,2,3) X (4,5,6) Z (7,8,9) # this kept me from trying to X twice heh 13:13
camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Only identical operators may be list associative; since 'X' and 'Z' differ, they are non-associative and you need to clarify with parentheses␤at <tmp>:1␤------> 3say (1,2,3) X (4,5,6) Z7⏏5 (7,8,9) #…»
psch but, it even says "identical ops may be list assoc" :|
MasterDuke "you can give a psch a useful error message, but you can't make him read it" 13:15
psch oh i'm pretty sure i read it somewhen
MasterDuke but yeah, not sure what exactly he's looking for 13:16
psch but, well, selective memory vOv
13:19 zilti left
MasterDuke m: say <a b c> Z <1 2 3> Z <A B C> 13:20
camelia rakudo-moar d70482: OUTPUT«((a 1 A) (b 2 B) (c 3 C))␤»
MasterDuke ^^^ that maybe? 13:21
psch no idea
i mean, it's some kind of combinatorics thing probably
and the variance between the two explanation attempts are already big enough to make the solution space blow up in a manner appropriate to combinatorics problems :P 13:22
13:23 setty1_ left
MasterDuke three people each have three solutions for ways to draw three items from three lists of three items... 13:24
sounds like a project euler meta-problem
psch a bit, yes :) 13:25
13:25 setty1 joined 13:34 mefzz joined, lukaramu left
mefzz Hi, is there any good resources to learn Perl 6 other than quick introduction for the language? Assume me as a total beginner to the language and the philosophy. Thanks in advance. 13:36
psch mefzz: well, if you have some decent programming knowledge i'd suggest learnxinyminutes.com/docs/perl6/ 13:38
MasterDuke mefzz: there's also perl6intro.com/ 13:40
mefzz Hey thanks for the links guys.
13:42 pyrimidine joined 13:43 Zoffix joined, Zoffix left 13:44 cognominal left, cognominal joined 13:47 pyrimidine left, AlexDaniel joined
sena_kun m: method seek(IO::Handle:D: Int:D $offset, SeekType:D $whence --> True) {} 13:49
camelia rakudo-moar d70482: OUTPUT«Potential difficulties:␤ Useless declaration of a has-scoped method in mainline (did you mean 'my method seek'?)␤ at <tmp>:1␤ ------> 3method7⏏5 seek(IO::Handle:D: Int:D $offset, SeekT␤»
sena_kun m: method seek(IO::Handle:D: Int:D $offset, SeekType:D $whence) returns True {}
camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot resolve caller trait_mod:<returns>(Method, Bool); none of these signatures match:␤ (Routine:D $target, Mu:U $type)␤at <tmp>:1␤»
sena_kun method seek(IO::Handle:D: Int:D $offset, SeekType:D $whence) returns Int {}
m: method seek(IO::Handle:D: Int:D $offset, SeekType:D $whence) returns Int {}
camelia rakudo-moar d70482: OUTPUT«Potential difficulties:␤ Useless declaration of a has-scoped method in mainline (did you mean 'my method seek'?)␤ at <tmp>:1␤ ------> 3method7⏏5 seek(IO::Handle:D: Int:D $offset, SeekT␤»
sena_kun Is it a bog? 13:50
*bug
mefzz No I guess
psch m: my method seek(IO::Handle:D: Int:D $offset, SeekType:D $whence) returns Int {}
camelia ( no output )
mefzz askubuntu.com/questions/572976/what...091#573091
oops
psch sena_kun: what are you asking about?
mefzz xchat
sena_kun Isn't `returns` and `-->` should be semantically equal? `-->` works for every type, but `returns` does't work for boolean values. 13:51
psch i dimly remember that they're not supposed to be semantically equivalent, but i don't recall the difference
AlexDaniel 「--> 42」 but can't 「returns 42」 ? 13:52
psch m: sub f returns 42 { }
camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed trait␤at <tmp>:1␤------> 3sub f returns7⏏5 42 { }␤»
13:52 pierre_ joined
AlexDaniel m: my sub foo(--> 52) {}; say foo 13:52
camelia rakudo-moar d70482: OUTPUT«52␤»
psch so, yeah, that's apparently one difference. we only parse *types* after 'returns'
not values
AlexDaniel well, wtf is True?
psch a value
an enum value, to be precise :P
...or was that a philosophical question? :) 13:53
sena_kun If they are not equal, it is slightly not cool because github.com/perl6/doc/issues/1024 assumes that thay are.
AlexDaniel m: sub f returns True { }
camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot resolve caller trait_mod:<returns>(Sub, Bool); none of these signatures match:␤ (Routine:D $target, Mu:U $type)␤at <tmp>:1␤»
AlexDaniel ah, and it doesn't work, correct then
sena_kun: ah dammit
that's a good point
sena_kun Or, rather, otherwise: the issue should be patched.
psch sena_kun: yeah, i saw the github discussion, but as i don't remember the more pertinent difference (that i think exists) i didn't speak up
mefzz Ahh, erm, perl 5 has cpan as the package manager, is panda is the equivalent for cpan tool? 13:54
AlexDaniel but don't we have 4 or 5 ways to declare return type?
why only these two are discussed
psch AlexDaniel: what are the other 2 or 3?
sena_kun They are the most common? And I don't know the other 2-3.
psch mefzz: afaik zef is more or less replacing panda recently
AlexDaniel m: sub foo of Int { 42 }; say foo 13:55
camelia rakudo-moar d70482: OUTPUT«42␤»
psch m: sub foo of Int { 42 }; say &foo.returns
camelia rakudo-moar d70482: OUTPUT«(Int)␤»
psch m: sub foo of Int { "42" }; say foo
camelia rakudo-moar d70482: OUTPUT«Type check failed for return value; expected Int but got Str ("42")␤ in block <unit> at <tmp> line 1␤␤»
AlexDaniel m: my Int sub foo { 42 }; say foo
camelia rakudo-moar d70482: OUTPUT«42␤»
psch m: my Int sub foo { 42 }; say &foo.returns
camelia rakudo-moar d70482: OUTPUT«(Int)␤»
psch m: my Int sub foo { 42 }; say &foo.of
camelia rakudo-moar d70482: OUTPUT«(Int)␤»
psch m: sub foo of 42 { "42" }; say foo 13:56
camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed trait␤at <tmp>:1␤------> 3sub foo of7⏏5 42 { "42" }; say foo␤»
psch right, so there's those two as well
still seems to have the same distinction -- only the one in the Signature allows a value
sena_kun Hmm. 13:57
AlexDaniel yea
well, did I miss something?
psch m: sub f { also returns Int; } # scnr
camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot look up attributes in a Signature type object␤at <tmp>:1␤»
mefzz psch: Oh thank you for pointing that out. So, the perl6 community are not really yet decided which 'standard' tool to manage modules? 13:58
psch mefzz: considering we don't even have an official 'standard' compiler... :)
AlexDaniel m: my Int sub A {}; sub B(--> Int) {}; sub C returns Int {}; sub D of Int {}; say (&A, &B, &C, &D)».returns
camelia rakudo-moar d70482: OUTPUT«((Int) (Int) (Int) (Int))␤»
AlexDaniel that's it, I guess
13:58 rburkholder joined
AlexDaniel huggable: returns :is: my Int sub A {}; sub B(--> Int) {}; sub C returns Int {}; sub D of Int {}; say (&A, &B, &C, &D)».returns 13:58
huggable AlexDaniel, Added returns as my Int sub A {}; sub B(--> Int) {}; sub C returns Int {}; sub D of Int {}; say (&A, &B, &C, &D)».returns
psch m: my Int sub A {}; sub B(--> Int) {}; sub C returns Int {}; sub D of Int {}; say (&A, &B, &C, &D)»."$_"() for <returns of> 13:59
camelia rakudo-moar d70482: OUTPUT«((Int) (Int) (Int) (Int))␤((Int) (Int) (Int) (Int))␤»
babydrop m: say -Inf²
camelia rakudo-moar d70482: OUTPUT«-Inf␤»
13:59 cognominal left, pyrimidine joined
AlexDaniel babydrop: oh, so that's fixed now 13:59
psch m: say (-Inf)²
camelia rakudo-moar d70482: OUTPUT«Inf␤»
mefzz psch: Ah yeah, just realized that. A bit scary for sure, but the language looks fun enough to let me diving in. 14:00
14:00 cognominal joined
babydrop yup 14:00
gfldex m: say (-∞)² 14:01
camelia rakudo-moar d70482: OUTPUT«Inf␤»
AlexDaniel well, -∞ has always worked right
gfldex i wonder if Inf should stringy to ∞
babydrop Which magically fixed the <--Inf+-Inf> or whatever that bug was
AlexDaniel m: say <--Inf+-Inf\i>
camelia rakudo-moar d70482: OUTPUT«--Inf+-Inf\i␤»
AlexDaniel m: dd <--Inf+-Inf\i>
camelia rakudo-moar d70482: OUTPUT«"--Inf+-Inf\\i"␤»
AlexDaniel commit: HEAD~50,HEAD dd <--Inf+-Inf\i> 14:02
committable6 AlexDaniel, ¦«HEAD~50»: <0+0i>␤¦«HEAD»: "--Inf+-Inf\\i"
AlexDaniel yup
gfldex humans can spot Inf and make the right assumtion. Some shell script would be better of with ∞.
14:02 Olga joined
AlexDaniel gfldex: right now nothing prints unicode characters 14:02
except for the eject symbol, I think
psch m: say &[<].perl 14:03
camelia rakudo-moar d70482: OUTPUT«sub infix:«<» (Mu $?, Mu $?) { #`(Sub+{<anon|70899152>}|68911280) ... }␤»
AlexDaniel so if we make ∞ stringify as ∞, I think we would want to change a couple of other things as well
mefzz another question, I have a tiny amount experience with perl 5, and I published a working module on CPAN, and is the packaging/distributing style is same as perl 5, in this case perl6 module on Github?
14:03 pyrimidine left
babydrop mefzz: pretty much 14:04
gfldex AlexDaniel: worth a though before 6.d I think.
psch mefzz: docs.perl6.org/language/modules.html
mefzz: docs.perl6.org/language/modules.ht...ng_Modules specifically
babydrop mefzz: the GitHub is meant to be temporary solution tho, and there's work being done to make CPAN accept P6 distros
AlexDaniel gfldex: ∞ thing, yes, but a lot of stuff can be done now
e.g. gists are not that strictly defined 14:05
mefzz "there's work bei"ng done to make CPAN accept P6 distros", I'm happy to hear that. :D
thanks for the links also. I need to start reading the documentation, or I gonna ask the whole thing in here. :) 14:06
14:06 Olga left
kalkin- re 14:07
AlexDaniel m: sub foo(--> Inf) {}; say foo 14:08
camelia rakudo-moar d70482: OUTPUT«Inf␤»
AlexDaniel m: sub foo(--> -Inf) {}; say foo
camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed return value␤at <tmp>:1␤------> 3sub foo(-->7⏏5 -Inf) {}; say foo␤»
AlexDaniel m: sub foo(--> -50) {}; say foo
camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed return value␤at <tmp>:1␤------> 3sub foo(-->7⏏5 -50) {}; say foo␤»
AlexDaniel what?
m: sub foo(--> 50) {}; say foo
camelia rakudo-moar d70482: OUTPUT«50␤»
AlexDaniel m: sub foo(--> π) {}; say foo
camelia rakudo-moar d70482: OUTPUT«3.14159265358979␤»
AlexDaniel m: sub foo(--> -π) {}; say foo
camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed return value␤at <tmp>:1␤------> 3sub foo(-->7⏏5 -π) {}; say foo␤»
AlexDaniel babydrop: um… am I missing something?
m: sub foo(--> (-π)) {}; say foo
camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed return value␤at <tmp>:1␤------> 3sub foo(-->7⏏5 (-π)) {}; say foo␤»
AlexDaniel that's a regular hyphen-minus 14:09
psch right, but it's still not a constant
AlexDaniel :-|
RabidGravy tadzik, you about?
babydrop AlexDaniel: hehe
tadzik RabidGravy: aye 14:10
babydrop m: gist.github.com/zoffixznet/4e60c7d...565d0ff9d5
AlexDaniel babydrop: do you want RT ticket for that?
camelia rakudo-moar d70482: OUTPUT« ok 1 - bare␤ not ok 2 - plus␤␤ # Failed test 'plus'␤ # at <tmp> line 6␤ # Error: Malformed parameter␤ ok 3 - minus␤ ok 4 - U+2212 minus␤ 1..4␤ # Looks like you failed 1 test …»
RabidGravy ah hah!
tadzik whatsup :)
AlexDaniel eval: gist.githubusercontent.com/zoffixz...4e7d/p6.p6 14:11
evalable6 AlexDaniel, Successfully fetched the code from the provided URL.
AlexDaniel, rakudo-moar d704820: OUTPUT«(exit code 1) ok 1 - bare␤ not ok 2 - plus␤␤ # Failed test 'plus'␤ …»
AlexDaniel, Full output: gist.github.com/478e9431054dc96f1a...e86748b102
RabidGravy tadzik, I'm doing something with JSON::Unmarshal that may require a pattern that neither of us thought about
tadzik oh, interesting
what is it?
RabidGravy viz, an array of objects in the target, but they want to un-marshalled individually 14:12
babydrop AlexDaniel: well, *I* don't want a ticket, but it could be created yeah. I'm basically working on addressing that in the sig itself rather than the return type... and the return type isn't hitting the token I'm working on
tadzik I think they currently do, since yesteyesterday's timotimo++'s patch
AlexDaniel babydrop: okay then
babydrop AlexDaniel: basically -π is not a constant, it's a prefix:<-> and a constant and you can't have expressions in that stuff
RabidGravy looks 14:13
babydrop AlexDaniel: and the way it's done for type constraint is the minus is watched for and the constant gets negated
AlexDaniel babydrop: yea but there's a workaround for that in the signature
babydrop: yea
babydrop yeah
tadzik it makes Positional[Dog] and alike DTRT
babydrop So same would need to be created for the returns stuff
14:14 cognominal left
kalkin- Back to combinatorics: I have n buckets with n items each. By drawing one item from each bucket i get a n-wide Tuple t. A series is a Matrix with n lines, where each line represent a Tuple, with the property that each value in the same row is unique 14:14
14:14 cognominal joined
kalkin- psch: I first thought i could just explain part of the problem… 14:15
gfldex m: constant term:<-∞> := -Inf; say -∞; sub foo(--> -∞) {}; say foo
camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed return value␤at <tmp>:1␤------> 3t term:<-∞> := -Inf; say -∞; sub foo(-->7⏏5 -∞) {}; say foo␤»
gfldex m: constant term:<+∞> := -Inf; say +∞;
camelia rakudo-moar d70482: OUTPUT«-Inf␤»
MasterDuke m: say <a b c> Z <1 2 3> Z <A B C>
camelia rakudo-moar d70482: OUTPUT«((a 1 A) (b 2 B) (c 3 C))␤»
MasterDuke ^^^ that maybe?
AlexDaniel gfldex: well, that's how it was working previously
kalkin- No it returns only one possible tupple row 14:16
AlexDaniel internally
and that was a bad idea :)
babydrop m: constant term:<meow> := -Inf; say meow; sub foo(--> meow) {}; say foo 14:17
camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Type 'meow' is not declared␤at <tmp>:1␤------> 3eow> := -Inf; say meow; sub foo(--> meow7⏏5) {}; say foo␤»
RabidGravy tadzik, no that's not quite what I had in mind 14:18
MasterDuke m: say (<a b>, <1 2>, <A B>).flat.combinations(2) 14:20
camelia rakudo-moar d70482: OUTPUT«((a b) (a 1) (a 2) (a A) (a B) (b 1) (b 2) (b A) (b B) (1 2) (1 A) (1 B) (2 A) (2 B) (A B))␤»
RabidGravy I'm thinking of the case of "class Foo { has Bar @.bars; }" and JSON like "{ bars : [ "barble", "warble" ] }"
MasterDuke m: say (<a b>, <1 2>).flat.combinations(2)
camelia rakudo-moar d70482: OUTPUT«((a b) (a 1) (a 2) (b 1) (b 2) (1 2))␤»
RabidGravy so each item needs to be constructed from the data in a custom manner 14:21
14:21 pierre_ left
RabidGravy in this case a mapping of the item to Bar.new(name => $_) 14:22
MasterDuke m: say (<a b> Z <1 2>).flat.combinations(2)
camelia rakudo-moar d70482: OUTPUT«((a 1) (a b) (a 2) (1 b) (1 2) (b 2))␤»
MasterDuke kalkin-: something like those ^^^ 14:23
psch well, the X of three lists previously already has all solutions
they're just mixed through the array
which is probably where the "i need them ordered" earlier came in :)
AlexDaniel m: sub foo(-½) {} 14:24
camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub foo(7⏏5-½) {}␤»
AlexDaniel babydrop: ↑?
psch m: my @a = <a b c> X <1 2 3> X <A B C>; say @a[0,13...*] # is one solution for 3 times 3 items
camelia rakudo-moar d70482: OUTPUT«((a 1 A) (b 2 B) (c 3 C))␤»
AlexDaniel or I'll just wait until everything is done… :) 14:25
right, it is the same case as -π 14:26
nvm
psch kalkin-: just to clarify, row *and* column are supposed to be unique, right?
14:26 mefzz left
psch kalkin-: in the matrix that is 14:26
there *might* be some really clever .rotor invocation that does that, but i'm not the one to think of it... 14:27
14:29 kurahaupo__ joined, cognominal left 14:31 kurahaupo__ is now known as kurahaupo
AlexDaniel kalkin-: so to put it simply, the number should be unique in its row and its column? 14:34
14:35 cognominal joined, wamba joined
AlexDaniel kalkin-: otherwise I see no problem 14:35
RabidGravy tadzik, actually I think it's a slight infelicity in the way that the unmarshalled-by works for positionals
babydrop AlexDaniel: that one was missed by my test and weren't going to work 14:37
RabidGravy in that it calls the sub with the array items but then proceeds to construct the objects normally anyway
AlexDaniel right, it's not the same as -π, what am I smoking… 14:38
tadzik ah 14:39
unmarshalled-by, I haven't considered that...
AlexDaniel bisect: old=2015.10 say ½
bisectable6 AlexDaniel, Bisecting by exit code (old=2015.10 new=d704820). Old exit code: 1
AlexDaniel, bisect log: gist.github.com/048a1d1ed55047ab7e...27a284c19a
AlexDaniel, (2015-11-24) github.com/rakudo/rakudo/commit/8e...7b4d24366b
AlexDaniel that's a very small :) 14:40
change*
14:45 Actualeyes left 14:46 edghto left
kalkin- Sorry now back for real 14:49
14:50 mefzz joined
kalkin- AlexDaniel: All elements of M_(0,0…n) should be unique 14:52
M beeining the matrix with the tuples as rows
mefzz hi, why this doesn't work? pastebin.com/EFmNYhkk
sena_kun mefzz, ";" symbol. 14:54
In the first statement.
psch m: my Int $i = 0 while $i <= 1000 { say $i++ }
camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unexpected block in infix position (missing statement control word before the expression?)␤at <tmp>:1␤------> 3my Int $i = 0 while $i <= 10007⏏5 { say $i++ }␤ expecting any of:␤ infix…»
psch well, it does complain somewhat reasonably 14:55
sena_kun It should be "my Int $i = 0;";
mefzz the error info is a bit confusing to me, hmm :(
AlexDaniel eval: pastebin.com/raw/EFmNYhkk 14:56
evalable6 AlexDaniel, Successfully fetched the code from the provided URL.
AlexDaniel, rakudo-moar d704820: OUTPUT«(exit code 1) ===SORRY!=== Error while compiling /tmp/uF6esMmCr0␤Unexpected block in infix pos…»
AlexDaniel, Full output: gist.github.com/5fc49090b42ceaa09a...98dcf030a7
AlexDaniel oh
it is parsed as a statement modifier, right?
psch yes, the while is a statement modifier
AlexDaniel OK, well, that's LTA then 14:57
psch and the condition is EXPR, which is why it wants an infix after the literal 1000
m: 100 + 10 { "foo" }
camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unexpected block in infix position (missing statement control word before the expression?)␤at <tmp>:1␤------> 03100 + 107⏏5 { "foo" }␤ expecting any of:␤ infix␤ infix stopper␤»
mefzz anyway, thanks for quick spotting the error. Sorry for the lame question..
AlexDaniel mefzz: it is a good question actually
mefzz: I believe the error message can be improved
psch i'm not sure we know there that we're in a statement_mod, actually 14:58
AlexDaniel … then we have to make it know… :) 14:59
psch and, well, should the bare case above also have a different error message?
14:59 Actualeyes joined
AlexDaniel psch: I understand all that, but this is indeed a LTA message for a tiny semicolon that was left off 14:59
15:00 rindolf left
tadzik is it just me, or today's advent post is missing quite some characters? 15:00
15:00 pyrimidine joined
tadzik Consider the angle brackets version of quote words operator, . 15:00
MasterDuke i'd almost say error messages should suggest checking for a missing ';' before any newlines in what it's parsing
though maybe not if there's a string involved
psch MasterDuke: still one-pass, we can't go back to previous newlines to check if we've parsed succesfully with an added semicolon 15:01
AlexDaniel tadzik: to me it looked like the post was missing some text :)
psch MasterDuke: and i don't think making \n works as statement_end is great idea
15:01 lizmat joined
psch *work 15:01
s/we've/we would've/ 15:02
AlexDaniel: so does the bare case also need a different error message?
MasterDuke well, i don't think we need to check if we would've, just suggest it
AlexDaniel no
kalkin- m: <a b c>.permutations.flat Z <1 2 3>.permutations.flat Z <A B C>.permutations.flat
camelia rakudo-moar d70482: OUTPUT«WARNINGS for <tmp>:␤Useless use of "Z" in expression ".flat Z <1 2 3>.permutations.flat Z <A B C>.permutations.flat" in sink context (line 1)␤»
mefzz AlexDaniel: Oh, I thought I'm the only one thinking that. 15:03
AlexDaniel “did you forget a semicolon?” is a good way to improve the message, and I'm pretty damn sure there is a way to add some meaningful heuristic to that case
for that case I mean
kalkin- m: <a b c>.permutations.flat Z <1 2 3>.permutations.flat Z <A B C>.permutations.flat # this works in repl
camelia rakudo-moar d70482: OUTPUT«WARNINGS for <tmp>:␤Useless use of "Z" in expression ".flat Z <1 2 3>.permutations.flat Z <A B C>.permutations.flat" in sink context (line 1)␤»
psch m: say <a b c>.permutations.flat Z <1 2 3>.permutations.flat Z <A B C>.permutations.flat 15:04
camelia rakudo-moar d70482: OUTPUT«((a 1 A) (b 2 B) (c 3 C) (a 1 A) (c 3 C) (b 2 B) (b 2 B) (a 1 A) (c 3 C) (b 2 B) (c 3 C) (a 1 A) (c 3 C) (a 1 A) (b 2 B) (c 3 C) (b 2 B) (a 1 A))␤»
AlexDaniel oh, wait…
ummmm
kalkin- psch: ohh yeah i see.
psch kalkin-: that's not all possible solutions by far 15:05
kalkin- The above line gets me the the list of solutions in an order where i can just shift 5 elements to get my matrix
psch and, well, it's six solutions too
...if i counted correctly :)
15:07 lizmat_ joined, lizmat left
kalkin- m: sub f { for <a b c>.permutations.flat Z <1 2 3>.permutations.flat Z <A B C>.permutations.flat -> @a, @b, @c { say 'Matrix →', @a, @b, @c }}; say f(); 15:09
camelia rakudo-moar d70482: OUTPUT«Matrix →(a 1 A)(b 2 B)(c 3 C)␤Matrix →(a 1 A)(c 3 C)(b 2 B)␤Matrix →(b 2 B)(a 1 A)(c 3 C)␤Matrix →(b 2 B)(c 3 C)(a 1 A)␤Matrix →(c 3 C)(a 1 A)(b 2 B)␤Matrix →(c 3 C)(b 2 B)(a 1 A)␤Nil␤»
moritz www.kickstarter.com/projects/14228...6?ref=card only 3.5k USD missing
15:09 kurahaupo left
kalkin- Ohh i see 15:09
I.ee (c 2 C) is missing
psch kalkin-: i'm pretty sure infix:<Z> is the wrong tool if you're looking for all solutions
15:10 rindolf joined
mefzz is there any prebuild perl6 documentation in pdf file? I don't really want to download p6doc and build it myself, if the better alternative is available. 15:10
kalkin- psch: yes you are right 15:11
AlexDaniel mefzz: there is this thing docs.perl6.org/perl6.xhtml 15:12
babydrop :(
AlexDaniel mefzz: I don't think it is finished, so I doubt it could help :) 15:13
babydrop spends 2 minutes logging in on the webserver and trying to find which file it is, just so AlexDaniel could beat babydrop to it
mefzz Ah, at least that is sufficient just for learning now, thanks.
15:13 kurahaupo joined
babydrop huggable: single doc :is: docs.perl6.org/perl6.xhtml 15:13
huggable babydrop, Added single doc as docs.perl6.org/perl6.xhtml
AlexDaniel babydrop: I just typed “docs.perl6 bigpage” in google and it was on the first page :) 15:14
babydrop cheater!
AlexDaniel I tried generating a print preview of that thing. No, it does not look useful 15:15
but the idea is good
gfldex++
if horizontal scrolling is eliminated it will be much better 15:16
sena_kun Ah, also, about a pdf. We still have github.com/perl6/doc/issues/722 - it is a relatively easy issue to solve(just get html -> convert it to pdf -> done), but it need some work like picking the best tool and some decisions about where to place the pdf on the server, where to place link to it, etc.
moritz don't strive for the best tool. Look for one that's easy to install, easy to use, and produces a decent result 15:17
wkhtmltopdf comes to mind, it installs as a Debian package
AlexDaniel (which is the best tool)
you'd probably need a custom version of wkhtmltopdf to run it without X
15:18 mefzz left
AlexDaniel unless it was finally fixed 15:18
moritz the one in Debian runs without X, afaict
sena_kun moritz, yes, you're totally right.
Anyway, it needs a key to the actual server and therefore not anyone can do this task. 15:19
moritz (though it has quite some X dependencies, like xfonts-base, x11-xkb-utils, all that mesa stuff, and some qt5 libs)
AlexDaniel I am pretty sure it doesn't work without X on debian jessie 15:20
let's try on unstable…
moritz sena_kun: well, if it's about installing a package on the server, that I can do for you
sena_kun: if you need something else, we can talk about it
AlexDaniel: I'll just install it on hack and see if it works 15:21
AlexDaniel no, does not work on debian unstable
15:21 lizmat_ left
sena_kun moritz, I didn't plan to work on this *just now*, just mentioned about such issue. Maybe after I fix the current issue from my list. I'll contact you in this case, thanks. 15:22
moritz AlexDaniel: iirc there's a workaround, let me check... 15:23
AlexDaniel moritz: the workaround is to install a deb from here wkhtmltopdf.org/downloads.html
gfldex if you put perl6.xhtml on your harddrive you can supply your own CSS. To fiddle with font size and such.
15:24 lizmat joined
gfldex i'm waiting for jnthn to fix one CONC bugs, then I will start with Pod::To::LaTeX 15:24
AlexDaniel gfldex: which one, by the way? 15:25
gfldex the start vs. IO bug
moritz AlexDaniel: or using xvfb
gfldex that's the one that stops us from building the docs multithreaded
moritz anyway, I've installed xvfb and wkhtmltopdf on hack 15:26
avalenn why the switch from specs to roast ?
AlexDaniel avalenn: hello!
moritz avalenn: is your question "why is the specification a test suite"? 15:27
avalenn I found the format of specs (mixing description of the language and tests) easier to read and understand.
moritz avalenn: or rather "why did we name it roast"?
avalenn I don't care about the name
gfldex avalenn: the idea was to have proper docs alongside roast so you don't need to read roast anymore 15:28
we are working on that part
moritz avalenn: mostly because we've realized we don't have the (wo)manpower to maintain both a test suite and design docs, so we had to declare one of them primary one
at least not equally well
avalenn so it is more about " 15:29
so it more about "why is the specification a test suite"?
15:29 cognominal left
moritz because we can execute it 15:30
avalenn Ok. I am a bit disappointed about this but I can understand the argument.
I really believe that the "literate programing" style of specifications was great 15:31
15:31 James0r joined
psch fwiw, the specs repo isn't for learning the language -- it's way too broad for that 15:31
babydrop avalenn: in a perfect universe, the docs describe behaviour for humans to understand and roast tells you how well an implementation conforms to the spec
avalenn Now we have "roast" on one side and "docs" on the other
babydrop Right, the docs is for humans and roast is for computers.
Until the robot uprising, of course. 15:32
avalenn with no easy way to match information between "roast" and "docs"
or I missed it
moritz we have smartlinks
but I don't know how well maintained they are
and I don't know if we render the result of the crosslinking 15:33
we used to
babydrop avalenn: not at the moment, no. One idea I have is to use coverage reports to tell you where method XYZ is tested.
but coverage reports are a work in progress ATM :)
AlexDaniel avalenn: I'm not quite sure why would you want to read specs anyway 15:34
babydrop So basically, we could build a tool where you look up, say Str.parse-base and you can ask a thing what tests cover that method and see the tests too
psch AlexDaniel: which "specs" is that? specification or github/perl6/specs?
15:34 lizmat left
moritz AlexDaniel: oh, they contain some beautiful, in-depth descriptions that the docs simply don't have 15:34
babydrop the smartlinks are rendered on design.perl6.org, but yeah, that stuff's outdate.
moritz AlexDaniel: like how matches are numbered and nested, for example 15:35
dalek c: cc2d14b | Altai-man++ | doc/Type/Signature.pod6:
Make Signature.pod6 compilable with small example code fixes
synopsebot6 Link: doc.perl6.org/type/Signature
AlexDaniel moritz: can you submit a doc issue for that? :)
babydrop Is that really an issue?
Docs overstuffed with information aren't that awesome either 15:36
*cough* perldoc *cough*
kalkin- given a matrix of n×n elements I want to create a new matrix where each column is a row of the previous matrix. How can i do elegant in one line?
moritz finds perldoc pretty awesome
AlexDaniel but we probably don't want to keep /specs alive forever
moritz kalkin-: [Z] @matrix I think
15:37 khw joined
moritz m: say ([Z] (1, 2, 3), (4, 5, 6), (7, 8, 9)).perl 15:37
camelia rakudo-moar 947422: OUTPUT«((1, 4, 7), (2, 5, 8), (3, 6, 9)).Seq␤»
AlexDaniel one day it will be just too outdated
nobody is willing to work on them, and that's ok, basically there is no point…
kalkin- moritz: awesome thanks!
babydrop moritz: perlre is 39 pages long and that's not the only regex doc. 15:39
I've used Perl 5 personally and professionally for 11 years now and I don't think I read even 30% of perldoc.
Ain't no body got time for that.
mspo I learn somethig new every time I read perlre
15:40 cognominal joined
moritz babydrop: and I want perl6/doc to be as comprehensive one day; but maybe with a system where one can easily delve deep into details, but omit them by default 15:40
mspo perlretut is longer I think?
babydrop That would be nice.
mspo almost like some kind of hypertext document
with "links" of some type to additional information
15:40 lizmat joined
moritz or just with pod elements that are skipped by pod2text unless you supply --verbose 15:41
AlexDaniel gfldex: start vs IO? You mean #129781 ?
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129781
moritz and the HTML rendering of those could be collapsed by default
=begin moreinfo ... =end moreinfo
mspo that would disrupt the flow of reading docs, imho 15:42
how can you decide what is more vs normal or discover more stuff?
moritz depends on how it's presented
you can just read what's shown to you 15:43
mspo how about you make a --tweet and default to full
moritz and when that's not detailed enough, you can look for more info
RabidGravy tadziik, ignore my earlier comments I've just made a specific test for the behaviour I expected and it works, so there's something going weird in my code
mspo see: whatis(1) vs man(1)
RabidGravy however I will PR the test so the behaviour doesn't change; 15:44
15:44 cognominal left
AlexDaniel AH F∞×「 15:45
just closed a tab with new ticket that was not submitted 15:46
ctrl+shift+t, the title is still there!
the description is not…
gfldex AlexDaniel: #129787 (there are likely some dupes in [CONC]) 15:47
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129787
15:47 lizmat left 15:48 cognominal joined
AlexDaniel .tell mefzz I submitted a ticket for the issue you mentioned: #130251 15:53
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130251
yoleaux AlexDaniel: I'll pass your message to mefzz.
RabidGravy tadzik, github.com/tadzik/JSON-Unmarshal/pull/21
kalkin- m: sub f@a) { (loop (my $i = 0; $i++ < @a.elems; ) { @a.rotate($i) }).flat }; say (f(<a b c>) Z f(<1 2 3>) Z f(<A B C>)).rotor(3).map(*.permutations)) 15:55
camelia rakudo-moar 947422: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub f7⏏5@a) { (loop (my $i = 0; $i++ < @a.elems;␤ expecting any of:␤ new name to be defined␤»
15:55 travis-ci joined
travis-ci Doc build passed. Altai-man 'Make Signature.pod6 compilable with small example code fixes 15:55
travis-ci.org/perl6/doc/builds/180968447 github.com/perl6/doc/compare/076e7...2d14b42aad
15:55 travis-ci left
kalkin- m: sub f(@a) { (loop (my $i = 0; $i++ < @a.elems; ) { @a.rotate($i) }).flat }; say (f(<a b c>) Z f(<1 2 3>) Z f(<A B C>)).rotor(3).map(*.permutations)) 15:55
camelia rakudo-moar 947422: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unexpected closing bracket␤at <tmp>:1␤------> 3f(<A B C>)).rotor(3).map(*.permutations)7⏏5)␤»
kalkin- m: sub f(@a) { (loop (my $i = 0; $i++ < @a.elems; ) { @a.rotate($i) }).flat }; say (f(<a b c>) Z f(<1 2 3>) Z f(<A B C>)).rotor(3).map(*.permutations)
camelia rakudo-moar 947422: OUTPUT«((((b 2 B) (c 3 C) (a 1 A)) ((b 2 B) (a 1 A) (c 3 C)) ((c 3 C) (b 2 B) (a 1 A)) ((c 3 C) (a 1 A) (b 2 B)) ((a 1 A) (b 2 B) (c 3 C)) ((a 1 A) (c 3 C) (b 2 B))) (((c 3 C) (a 1 A) (b 2 B)) ((c 3 C) (b 2 B) (a 1 A)) ((a 1 A) (c 3 C) (b 2 B)) ((a 1 A) (b 2 B) (…»
kalkin- I think i got it
psch m: sub f(@a) { (loop (my $i = 0; $i++ < @a.elems; ) { @a.rotate($i) }).flat }; say (f(<a b c>) Z f(<1 2 3>) Z f(<A B C>)).rotor(3).map(*.permutations).grep({ $_ eqv ('a', 2, 'A')}) 15:56
camelia rakudo-moar 947422: OUTPUT«()␤»
psch m: sub f(@a) { (loop (my $i = 0; $i++ < @a.elems; ) { @a.rotate($i) }).flat }; say (f(<a b c>) Z f(<1 2 3>) Z f(<A B C>)).rotor(3).map(*.permutations).grep({ any($_) eqv ('a', 2, 'A')}) 15:57
camelia rakudo-moar 947422: OUTPUT«()␤»
psch kalkin-: i still think you don't have e.g. ('a', 2, 'A') anywhere there 15:58
kalkin-: and i'm pretty sure the problem as stated allows for a matrix that does contain that tuple
AlexDaniel sena_kun: where have you been? I missed you 15:59
15:59 cognominal left
sena_kun AlexDaniel, university! Now the course became easier/I have more time in the middle and I'm going to spend a month or two here. (: Glad to read it. 16:00
kalkin- psch I'm trying to solve elegantly the zebra puzzle from Rosettacode 16:01
AlexDaniel sena_kun: it's three weeks before the end of the semester here, I'm going to be dead by the end of it, that's for sure
sena_kun And my september-october time was really busy with a big haskell project, so no time for anything else. :/
kalkin- So I'm trying to calculate all the possible house combinations 16:02
rosettacode.org/wiki/Zebra_puzzle ← It's missing a perl6 solution 16:03
sena_kun AlexDaniel, I planned to have some rest in december(end of semester is easier than the actual semester time for me), but yesterday you guys returned me on the right path! 16:04
psch kalkin-: that seems like the wrong approach to me. you're ignoring nearly all information the original puzzles gives like that
kalkin-: the only thing you keep is the size of the matrix 16:05
AlexDaniel sena_kun: what did we do?
sena_kun: you mean the hundreds of emails about github issues?
kalkin- psch: i wanted create all possible houses series and then iterate checking each one if it fits the rules 16:06
sena_kun AlexDaniel, you and Coke refreshed in my mind some old issues I wanted to close and even assign me one, so I couldn't run away. 16:07
AlexDaniel >:)
psch kalkin-: well, what you have above might work out with infix:<X> instead of infix:<Z>, but you probably have to pay more attention to .rotor then
kalkin- psch: k, will look in to that, thanks 16:10
16:10 firstdayonthejob left 16:11 cognominal joined
lucs Can p6doc read an arbitrary Pod file, like foo.pod? 16:13
(What I actually would have is SomeModule.pm6 and a separage SomeModule.pod.) 16:14
*separate
16:16 pyrimidine left 16:18 pyrimidine joined
sena_kun lucs, I quickly tested it: yes, it can. 16:22
mspo can I get subsecond time somehow?
16:23 pyrimidine left, lizmat joined
psch m: say now 16:23
camelia rakudo-moar 947422: OUTPUT«Instant:1480782226.547037␤»
psch m: say now; sleep .1; say now
camelia rakudo-moar 947422: OUTPUT«Instant:1480782251.350511␤Instant:1480782251.453869␤»
lucs sena_kun: D'oh! I'm really dumb, I hadn't even tried.
Thanks.
16:25 ufobat joined
babydrop m: say now.DateTime 16:26
camelia rakudo-moar 947422: OUTPUT«2016-12-03T16:26:35.943904Z␤»
mspo m: say DateTime.now.perl 16:27
camelia rakudo-moar 947422: OUTPUT«DateTime.new(2016,12,3,17,27,44.1169629096985,:timezone(3600))␤»
lucs It would be nice if I could just say 'p6doc SomeModule.pod' or something, but that looks for method 'pod', right, so right now, I need to spell out the filename.
16:28 firstdayonthejob joined 16:29 cognominal left, cognominal joined
sena_kun m: sub foo(Int,) {}; 16:31
camelia ( no output )
sena_kun Hmmm.
16:31 girafe joined
moritz m: say time 16:32
camelia rakudo-moar 3e93dd: OUTPUT«1480782724␤»
sena_kun Does `,` in the signature counts as, eeh, list creator or what? 16:33
16:33 lizmat left
psch sena_kun: trailing commas are fine 16:34
sena_kun psch, they have no meaning then?
16:34 firstdayonthejob left, cdg joined
psch m: sub f(Int,) { }; my Int @a; f @a 16:34
camelia rakudo-moar 3e93dd: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling f(Positional[Int]) will never work with declared signature (Int)␤at <tmp>:1␤------> 3sub f(Int,) { }; my Int @a; 7⏏5f @a␤»
psch sena_kun: well, a Signature is always a List, and trailing commas are legal 16:35
sena_kun: the List still contains exactly one item, with one specific kind of type constraint
sena_kun Ah, so this is how it is. psch, thanks.
psch i do think it's a bit weird looking, yes, but i don't think it *should* be illegal
16:35 lizmat joined 16:36 pyrimidine joined 16:38 lizmat_ joined 16:40 lizmat left 16:41 pyrimidine left
kalkin- If i have a list (a, 1, B) is there a way to check if it matches (a, *SOMETHING*, B)? 16:42
16:42 mefzz joined
kalkin- s/SOMETHING/ANYTHING/g 16:42
babydrop m: say so ("a", 1, "B") ~~ ("a", *, "B") 16:43
camelia rakudo-moar 3e93dd: OUTPUT«True␤»
psch m: say ('a', $_, 'B') ~~ ('a', *, 'B') for ^3
camelia rakudo-moar 3e93dd: OUTPUT«True␤True␤True␤»
babydrop You can also use ** to mean "any number of elements that area anything"
kalkin- when can I use * and **?
babydrop :\
kalkin- is it documented some where?
psch m: say (1, 2) ~~ (1, **, 2)
camelia rakudo-moar 3e93dd: OUTPUT«True␤»
babydrop kalkin-: they're Whatever and HyperWhatever
kalkin-: you use * to mean "whateverr" for single item and ** to meant "whatever for whatever-many items" 16:44
16:44 cognominal left
kalkin- Ahh there are docs for Whatever, it just can't find * and ** 16:44
thanks!
mefzz Hi, which is the class that enables you dealing with HTTP or simply downloading file?
yoleaux 15:53Z <AlexDaniel> mefzz: I submitted a ticket for the issue you mentioned: #130251
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130251
AlexDaniel yoleaux: wget 16:45
babydrop mefzz: take a look at LWP::Simple
AlexDaniel oops
hahainternet if i create my own type, say A, then create Array[A] but want to automatically coerce ints to my preferred type, how do i go about that?
AlexDaniel huggable: wget
huggable AlexDaniel, nothing found
AlexDaniel :(
babydrop mefzz: modules.perl6.org/dist/LWP::Simple
mefzz: I personally like modules.perl6.org/dist/HTTP::UserAgent
hahainternet: don't think you can. It's a point of debate ATM, actually. 16:46
16:46 rurban left
mefzz yoleaux: oh nice, thanks for the information. 16:46
babydrop hahainternet: basically, the current coercers operate on the assumtion that the type being coerced has method .Foo that coerces the item to Foo
mefzz alright thanks babydrop, I'll check that out.
babydrop hahainternet: which makes it rather useless when trying to coerce core types to some custom class 16:47
psch well, CALL-ME currently kinda works
hahainternet babydrop: that makes sense, but is a little frustrating
psch but it's not really what it's for
m: class A { method CALL-ME(A:U: Int $x) { self.new } }; my A $x = A(1) #
camelia ( no output )
psch note though that that's also not implicit
hence you might as well just do .new there
babydrop doesn't follow how to apply that to coercers 16:48
like, say, in a sig
psch yeah, true
babydrop :(
16:48 firstdayonthejob joined
psch it's half there, but you're right that it goes the wrong way 16:48
i suppose i should take a walk :P
oh but 16:49
maybe zoffix wants to built the "if Orig.Target doesn't work try Target.new($value)" patch :P
16:49 cognominal joined
psch as in, we currently do the former for coercion types, but we might as well add the latter in the same semantic area in the code vOv 16:50
anyway, afk for a while &
babydrop If I know zoffix, and I think I do, he doesn't want to build anything :)
maybe around New Years 16:51
hahainternet well i'm perhaps just a bit confused about the 'right' way to do things
let's say i want to have an array of values that can only be from 25 to 75
16:51 domidumont joined
hahainternet i was thinking i'd just create a 'class whatever is Int' and then override operators 16:52
but perhaps i'm looking at it the wrong way?
16:53 lizmat_ left
geekosaur there are subset types 16:53
hahainternet they seem to be implicit rather than explicit though, so they 'infect' ints that are candidates for them if i write a custom operator
(i think!)
babydrop What happens to stuff that doesnt fit that range? 16:54
hahainternet it's clamped
babydrop what does that mean?
hahainternet values lower than 25 are set to 25, larger than 75 are set to 75
16:56 rurban joined
mefzz and...does rakudo perl6 interpreter(?) have autocompletion or history that you can navigate with arrow keys? 17:03
sena_kun mefzz, you can install Linenoise module and the repl will work with history by arrow keys. 17:04
zef/panda install Linenoise
mefzz Oh, I thought it will make the output more verbose.
timotimo it's called "REPL" or "interactive mode" 17:05
mefzz Ah I see, thanks. Taking that as a note.
sena_kun mefzz, it adds some features. And the autocompletion by tab is also here, but I'm not sure about it quality. Should be decent for types, but personally I didn't use autocompletion much. 17:06
s/it/its/
17:09 setty1 left, sena_kun left, squain joined 17:10 pyrimidine joined 17:11 lizmat joined, mefzz left 17:13 setty1 joined 17:14 pyrimidine left
AlexDaniel [Coke]: I have changed my avatar 17:14
17:14 pyrimidine joined 17:15 setty1 left
AlexDaniel not entirely happy with it, but at least it won't cause any problems for others :) 17:15
17:15 setty1 joined, pecastro left 17:16 setty1 left, setty1 joined 17:17 setty1 left, setty1 joined 17:18 lizmat left, setty1 left 17:19 pyrimidine left, setty1 joined 17:20 cdg_ joined 17:21 cdg left
jnthn .win 29 17:23
oops :)
evening, #perl6, anyways :) 17:24
babydrop \o 17:25
tadzik shop.spreadshirt.co.uk/davorg/dami...A108346107 just leaves this here 17:27
there's more where that came from :o 17:28
17:28 lizmat joined 17:30 setty1 left, setty1 joined 17:33 pyrimidine joined 17:37 pecastro joined 17:38 pyrimidine left 17:43 lizmat left 17:44 cognominal left 17:51 pyrimidine joined 17:54 cdg_ left 17:56 pyrimidine left
dalek /zostay-advent-2016: 0428f4f | (Sterling Hanenkamp)++ | misc/perl6advent-2016/schedule:
Adding myself on 14th

I wish I could go sooner, but I'm pretty busy between now and then. If I get it prepped sooner, it could be moved up, but I can't make any promises until then.
17:57
: 0428f4f | (Sterling Hanenkamp)++ | misc/perl6advent-2016/schedule:
Adding myself on 14th

I wish I could go sooner, but I'm pretty busy between now and then. If I get it prepped sooner, it could be moved up, but I can't make any promises until then.
: 45e4ccc | (Zoffix Znet)++ | misc/perl6advent-2016/schedule:
Merge pull request #21 from perl6/zostay-advent-2016

Adding myself on 14th
18:00 cdg joined 18:01 sena_kun joined 18:02 cognominal joined
dalek c/consistent-return-types: ce8d836 | Altai-man++ | doc/Type/ (11 files):
The signatures was updated to use `returns` instead of `-->`.
18:03
c/consistent-return-types: 795330b | Altai-man++ | t/return-type.t:
A new test for return types in the signatures.

It fails with '-->' in the signature without 'True|False' as a value. It passes with current docs.
RabidGravy tadzik, there this is the one that fixes my earlier problem github.com/tadzik/JSON-Unmarshal/pull/22 18:09
I can carry on with what I was doing now :)
18:10 pyrimidine joined 18:11 travis-ci joined
travis-ci Doc build failed. Altai-man 'A new test for return types in the signatures. 18:11
travis-ci.org/perl6/doc/builds/180990699 github.com/perl6/doc/compare/ce8d8...5330b3ed52
18:11 travis-ci left 18:13 BenGoldberg joined
RabidGravy I think I need more beer, that was way harder than it should have been 18:13
18:14 abraxxa joined 18:15 pyrimidine left
dalek c/consistent-return-types: 138cd60 | Altai-man++ | t/return-type.t:
Tabs->spaces for new test.
18:21
18:29 Sgeo__ left, pyrimidine joined, cognominal left 18:34 pyrimidine left 18:37 rurban left 18:40 rurban joined, rurban left
MilkmanDan www.kickstarter.com/projects/14228...ing-perl-6 gained $1,000 in a few hours. :) 18:40
18:40 travis-ci joined
travis-ci Doc build passed. Altai-man 'Tabs->spaces for new test.' 18:40
travis-ci.org/perl6/doc/builds/180993183 github.com/perl6/doc/compare/79533...8cd60d5e6c
18:40 travis-ci left 18:43 cognominal joined 18:48 pyrimidine joined
abraxxa i have a sqlite query that does start_time >= '2016-12-01 00:00:00' which works in Perl 5 with DBIC but I can't get it to work with DBDish::Sqlite 18:49
when I remove the where clause everything is fine
although the sqlite docs say that there is no date type sqliteman shows the columns as 'timestamp'
DBDish::Sqlite binds them as text 18:50
dalek c: ce8d836 | Altai-man++ | doc/Type/ (11 files):
The signatures was updated to use `returns` instead of `-->`.
18:51
c: 795330b | Altai-man++ | t/return-type.t:
A new test for return types in the signatures.

It fails with '-->' in the signature without 'True|False' as a value. It passes with current docs.
c: 138cd60 | Altai-man++ | t/return-type.t:
Tabs->spaces for new test.
c: 344a51e | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (12 files):
Merge pull request #1028 from perl6/consistent-return-types

Consistent return types
abraxxa oh FFS, I've not seen that two joins should be LEFT JOINs for hours...
timotimo oh man :( 18:52
TimToady gah, I'm trying to get rid of 'returns' in favor of --> 18:53
I'd actually like to deprecate 'returns' in 6.d
psch TimToady: was there a semantic difference between --> and 'returns'?
TimToady --> implies it's part of the contract with the caller 18:54
it also supports value returns and, someday, variable returns
the other variants only support type 18:55
psch ah, okay. yeah, i can see how having it in the Signature makes it stand out more as a contract
TimToady it also guarantees you know the return type before you start parsing traits, which might need that info 18:56
sena_kun TimToady, we assumed that if "returns" are way more used in the docs, then it is slightly more natural to use it everywhere where we can, not just random pick between all the ways.
TimToady I want to kill 'returns'
I'd much rather see --> used consistently 18:57
sena_kun TimToady, what about the other two ways?
TimToady 'of' is just the real name of 'returns', which is an alias
the prefix form is problematic too, syntactically 18:58
'my 42 sub foo' is never gonna parse right
psch right, it still has the 'types only' thing going
hm, variable returns actually sound fun 18:59
sena_kun That is the different reasoning then, yes.
TimToady and 'my $retval sub foo' is even worse 19:00
sena_kun We need to revert the PR and replace all 716 usages of `returns` then.
Will it be okay then?
19:00 mr_ron joined
AlexDaniel I am… not so sure 19:00
psch well, 'need' is a bit strong until we only want to serve 6.d documentation -- assuming 'returns' actually leaves then
and since it probably would get deprecated first... 19:01
sena_kun s/need/should/
AlexDaniel there was also a complaint that the signatures in the docs look too noisy
arguably, “returns” makes them more readable, even though it sucks according to what TimToady says
psch i'm sorry, that seems kind of a weird complaint
i mean, if they're too noisy in the docs they're surely too noisy in code as well
AlexDaniel psch: that's true. The thing is, the docs are mostly read by newcomers… so if you are not very familiar with the way perl 6 code looks, then it might be a bit confusing 19:03
I'm not against changing everything to --> though, that works for me
psch i mean, i can see that some people might like 'returns' more 19:04
mr_ron I am not very good at (pure?) math. Is there a module for Even, Odd, Whole, Natural, Prime, Composite, etc. number subsets or are they part of the language someplace? There is an .is-prime function but the subsets may be handy ...
BenGoldberg thinks that sounds very useful.
sena_kun AlexDaniel, I'm not sure about this. The docs are read by everyone who is in need of method/sub/type explanation. It is not a tutorial or something, just description of the language. 19:05
psch but i think we don't need 'returns' *and* 'of'
BenGoldberg Even if they aren't used much, the source code of that module would be great for newcomers to the language to read.
AlexDaniel psch: I don't think we have “of” somewhere in the docs 19:06
mr_ron Whole and natural might actually be used.
psch mr_ron: aren't those the same?
AlexDaniel the choice right now is basically between --> and returns
mr_ron psch: Think 0 is whole but not natural but not an area of strength. en.wikipedia.org/wiki/List_of_type...Main_types 19:07
psch mr_ron: ah, yes, that might be the difference 19:08
...it actually is, according to wikipedia
mr_ron++
AlexDaniel likes the fact that people start to talk more and more about 6.d
sena_kun: okay then 19:09
sena_kun: want to wait for more comments or should I just revert right now?
sena_kun Is 6.d a next/planned spec for the language?
psch m: say $*PERL.version 19:10
camelia rakudo-moar 39261e: OUTPUT«v6.c␤»
AlexDaniel yeah, with no estimate for the release date
psch well, nominally the estimate is next oktober isn't it
TimToady for multis I would suggest lining up the -->, and in general an extra space or newline before a --> will help readability
AlexDaniel psch: who said so?
19:10 CIAvash joined
AlexDaniel TimToady: that's an interesting idea 19:10
psch AlexDaniel: sorry, missed a reliable joke indicator there. 'nominally', as in, 'per the name', and i recently learned here that diwali is on 19th october next year 19:11
TimToady we're not going to tie releases to the actual date of any holiday 19:12
AlexDaniel psch: if I recall correctly, people were against having a specific date
sena_kun AlexDaniel, I don't know, tbh. TimToady word is a quite sure things to do, but I wonder why almost everybody used "returns" then.
TimToady they're just names
alphabetical order is a sufficient constraint already
psch AlexDaniel: okay. i am now explicitly stating that was supposed a joke. it was a joke.
+to be
TimToady it's not a joke in the sense that the name will be diwali, in fact 19:13
AlexDaniel psch: oh wait, was it supposed to be a joke? There's some noise on the line, could you repeat? ;)
BenGoldberg Since perl6 is every unicode-y, I hope our future numeric subsets module includes aliases like ℕ for natual numbers, and ℤ for integers, etc. :)
AlexDaniel OH
sena_kun AlexDaniel, about setbagmix - I thought that we don't need to touch anything outside ot Type/, because otherwise it can be some other signature examples and match every will be tedious and not so important in this particular case. 19:14
AlexDaniel BenGoldberg: great idea!
dalek c/revert-1028-consistent-return-types: 1b33679 | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (12 files):
Revert "Consistent return types"
19:14 cognominal left
dalek c: d98ea87 | (Tom Browder)++ | doc/Type/Hash.pod6:
shoe use of empty angle brackets
19:15
synopsebot6 Link: doc.perl6.org/type/Hash
BenGoldberg m: constant Foo = 3 is export;
camelia rakudo-moar 39261e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3constant Foo = 37⏏5 is export;␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ statement m…»
BenGoldberg m: constant Foo is export = 3;
camelia ( no output )
19:16 setty1 left
AlexDaniel wtf did github just do… 19:16
that's not exactly what I've meant :)
lucs Why is the '-->' inside the parens? Is it part of the signature? 19:17
19:17 mefzz joined
TimToady yes, it's part of the caller's contract with the function 19:17
lucs Ah, okay, thanks.
sena_kun In the end, this question relies on two points. Firsty, will we use current docs(updated) for 6.d or not. Secondly, do we need to take seriously complaint about "returns looks better than -->". 19:18
lucs sena_kun: Um, in my opinion, it doesn't (look better). 19:19
BenGoldberg How long do you suppose until code like "sub foo(-->Array) {...}; my Int $bar = foo();" throws an exception at compile time?
AlexDaniel sena_kun: will we use them for 6.d? Even if not, why not keep it version-agnostic?
sena_kun AlexDaniel, good point. 19:20
19:20 cognominal joined
AlexDaniel sena_kun: so the only question left is if “returns” looks better or not :) 19:20
TimToady basically, I've been trying to move from 'returns' to '-->' for a couple of years, but didn't manage to get 'returns' deprecated in time for 6.c
babydrop mr_ron: make one yourself and publish it as a module :) subset Even of Numeric where * %% 2; subset Prime of Int where .is-prime; etc
TimToady so I didn't push it 19:21
psch BenGoldberg: i think ++geekosaur is working on that
TimToady I did, however, manage to get some things implemented for --> that aren't for 'returns', as you've'all noticed
19:21 mscha joined
TimToady *y'all've 19:22
BenGoldberg :)
mscha m: sub foo(Int(Cool) $f) { say $f.WHAT; }; foo "42"; # This is cool (and seems to be undocumented), but ...
camelia rakudo-moar 39261e: OUTPUT«(Int)␤»
mscha my Int(Cool) $x; $x = "42"; # ... why can't you do this?
m: my Int(Cool) $x; $x = "42"; # ... why can't you do this?
camelia rakudo-moar 39261e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Coercion Int(Cool) is insufficiently type-like to qualify a variable␤at <tmp>:1␤------> 3my Int(Cool) $x7⏏5; $x = "42"; # ... why can't you do this␤ expecting any of:␤ constraint␤»
TimToady it's just NYI 19:23
19:23 ChoHag left
AlexDaniel then it should say so 19:23
psch would've thought the error gives a good reason, actually
AlexDaniel mscha: therefore, submit a NYI ticket
psch mind, i'm not saying that coercions cannot be sufficiently type like, but then what AlexDaniel says
mscha OK, will do, thanks. 19:24
mr_ron Add to perl6 most wanted?
sena_kun Creating of PR with "returns->-->" changes is an easy thing to do. The question for me is "Will all who wrote the docs one great morning wake up and be happy with all signatures changed".
BenGoldberg If the error message specifically said, "NYI: Coercion Int(Cool) is ..." then it would be less confusing :)
TimToady where we really need coercion types is in the key of a hash; currently the only key type that coerces is default string hashes
babydrop mr_ron: well, there's Subset::Common, perhaps the author will take a PR: modules.perl6.org/dist/Subsets::Common
19:24 ChoHag joined
TimToady we can't, as of yet, express the actual type of a normal hash 19:25
m: my %hash{Str()}
camelia ( no output )
TimToady well, maybe we can now
m: my %hash{Str()}; %hash{42} = 43; dd %hash
camelia rakudo-moar 39261e: OUTPUT«Type check failed in binding to key; expected Str(Any) but got Int (42)␤ in block <unit> at <tmp> line 1␤␤»
babydrop m: my %hash{Str()}; %hash{42} = 42 19:26
camelia rakudo-moar 39261e: OUTPUT«Type check failed in binding to key; expected Str(Any) but got Int (42)␤ in block <unit> at <tmp> line 1␤␤»
babydrop heh
psch m: my %hash{Str(Cool)}; %hash{42} = 42
camelia rakudo-moar 39261e: OUTPUT«Type check failed in binding to key; expected Str(Cool) but got Int (42)␤ in block <unit> at <tmp> line 1␤␤»
TimToady yeah, that's also NYI, with a run-time failure mode
BenGoldberg And a very strange error message ;)
sena_kun &afk 19:27
19:27 sena_kun left
BenGoldberg m: my %hash{*.Str}; %hash{42} = 42; 19:27
camelia ( no output )
BenGoldberg m: my %hash{*.Str}; %hash{42} = 42; dd %hash;
camelia rakudo-moar 39261e: OUTPUT«Hash[Any] %hash = (my Any % = "42" => 42)␤»
babydrop m: my %hash{Str(Cool)}; dd %hash
camelia rakudo-moar 39261e: OUTPUT«Hash[Any,Str(Cool)] %hash = (my Any %{Str(Cool)} = )␤»
BenGoldberg m: my %hash{*.Int}; %hash{"42"} = "woot"; dd %hash;
camelia rakudo-moar 39261e: OUTPUT«Hash[Any] %hash = (my Any % = "42" => "woot")␤»
BenGoldberg NYI, with no runtime error! 19:28
19:28 girafe left
TimToady I don't know what you think a Whatevercode is supposed to do there... 19:29
BenGoldberg I suppose that it's only looking for a constraint.
dalek c: 7af1156 | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (12 files):
Revert "Merge pull request #1028 from perl6/consistent-return-types"

Basically it boils down to this:
  <TimToady> I want to kill 'returns'
See IRC discussion: irclog.perlgeek.de/perl6/2016-12-03#i_13674579
19:29 girafe joined, cognominal left
TimToady I'm guessing it ignores the .{*.Int} subscript but doesn't complain that it's useless 19:30
BenGoldberg I expect the WhateverCode to be called to convert/canonicalize keys.
TimToady well, nobody ever specced that, afaicr 19:31
BenGoldberg Ok.
Is there an alternative way of doing that?
TimToady and how would it know that *.Int actually implies an Int key? 19:32
babydrop raiph: "I think responding here is feeding the troll.... but I'll respond anyway" ~_~
BenGoldberg *.Int would imply that it has a method named Int. 19:33
TimToady BenGoldberg: my %hash{Int()} ought to call Int($newvalue), but doesn't yet
it's just a method name that is late bound, and happens to do a coercion
mr_ron babydrop: thanks - could try to add whole, natural and a few others to Subsets::Common. Might also be nice to add module to R* ... 19:34
19:34 setty1 joined, travis-ci joined
travis-ci Doc build passed. Aleks-Daniel Jakimenko-Aleksejev 'Revert "Consistent return types"' 19:34
travis-ci.org/perl6/doc/builds/181000480 github.com/perl6/doc/commit/1b336798707d
19:34 travis-ci left 19:35 CIAvash left
AlexDaniel oh shit, people are still discussing an alternate logo 19:36
mefzz hi, I installed Task::Star, but I don't see ufo when I run it. using panda. 19:37
19:37 cognominal joined, Cet joined
AlexDaniel at first when Zoffix closed the issue I was like “that's not nice”. But then I read the whole conversation again and dammit, burn this whole thread with fire!! 19:37
19:38 CIAvash joined 19:41 darutoko left 19:42 Cet left 19:45 cognominal left, cognominal joined
abraxxa what's wrong with this syntax? sprintf('%4d%2d', .year, .month given $d-start) 19:54
docs.perl6.org/type/Date shows such an example
timotimo given is statement-postfix
19:55 mr_ron left
timotimo but in that example it goes into an argument list 19:55
that's not allowed
mscha m: sprintf('%4d%2d', .year, .month) given Date.today;
camelia ( no output )
mscha m: printf('%4d%2d', .year, .month) given Date.today;
camelia rakudo-moar 39261e: OUTPUT«201612»
timotimo please remove that example from the docs :)
19:55 lukaramu joined
babydrop abraxxa: move given stuff outside the sprintf 19:55
oh
Just so you done it :)
abraxxa the full code is 19:56
babydrop *saw
abraxxa my $filename = join( '_',
sprintf('%4d%2d', .year, .month) given $d-start,
$cost-center, $activity-type, $employee-id )
~ '.txt';
Unable to parse expression in argument list; couldn't find final ')'
babydrop abraxxa: even I don't know what you meant there, so I'm not surprise the compiler doesn't know either :)
abraxxa: need parens around sprintf and its given 19:57
abraxxa yes, just tried that and it works, thanks
lucs m: print join( '_', (sprintf('%4d%2d', .year, .month) given Date.today), "moo") 19:59
camelia rakudo-moar 39261e: OUTPUT«201612_moo»
lucs Right
19:59 mefzz left
babydrop abraxxa: FWIW, the Dateish have &formatter attribute 19:59
abraxxa babydrop: yes, but I need to format it different depending on use
20:07 Guest42590 joined 20:09 CIAvash left 20:10 Tom__ joined, AlexDaniel left 20:11 Tom__ left 20:15 setty1 left 20:18 domidumont left 20:19 setty1 joined
abraxxa what does this error message mean? Too many positionals passed; expected 1 argument but got 3 20:24
the line number points to this code:
$fh-out.say(join( "\t",
hahainternet can i use a two element list as a semicolon list for array access? i have a 2d array and a list of coords, and doing [$_[0]][$_[1]] is darn ugly!
abraxxa followed by a number of things which should be joined
babydrop abraxxa: there's no .say on $fh-out 20:25
psch m: my @a = [[1,2],[3,4]]; say @a[1;1]
camelia rakudo-moar 39261e: OUTPUT«4␤»
psch hahainternet: ^^^ like that?
abraxxa babydrop: docs.perl6.org/type/IO$COLON$COLON...method_say
babydrop abraxxa: you're getting the default Mu one, which is for outputting $fh-out to STDOUT, not for `say`ing stuff into the filehandle
20:25 Sgeo__ joined
babydrop m: $*OUT.say: "meow" 20:26
camelia rakudo-moar 39261e: OUTPUT«meow␤»
babydrop abraxxa: OK, never mind.
timotimo hahainternet: you're supposed to be able to use || on it, yeah
hahainternet psch: yeah like that
psch: the problem is, i have an array with (1,1) in it 20:27
and || doesn't seem to work
psch i don't know of this || you're speaking of 20:28
i know infix:<||>
m: my @a = [[1,2],[3,4]]; $_ = [1, 1]; say @a.AT-POS(|$_) 20:29
camelia rakudo-moar 39261e: OUTPUT«4␤»
psch that works, if you're not scared of internals :P
hahainternet psch: yeah that does, a little ugly like :D 20:31
20:33 ufobat left
psch so anyway, we're getting a prefix-ish || for multidim array slices? 20:34
timotimo: ^^^?
or, well, not really slices i suppose..? i mean, maybe if the thing that gets ||'d has a Range somewhere in its elements... 20:35
abraxxa migrated my Perl 5 app to export Hamster data to a SAP import compatible format to Perl 6 ;) 20:38
83 lines and two modules (File::HomeDir and DBIish) 20:39
80 lines of code
20 alone are the sql statement
babydrop abraxxa: so what was the issue with $fh-out..say?
abraxxa the join included a ternary op 20:40
i had to put it in braces which wasn't required in p5
(defined $tag && $tag eq 'bereitschaft') ?? '0804' !! '0800',
babydrop :S
psch m: say &defined 20:41
camelia rakudo-moar 39261e: OUTPUT«Sub+{<anon|52910080>}.new␤»
psch m: say Any eq 'foo'
camelia rakudo-moar 39261e: OUTPUT«Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤ in block <unit> at <tmp> line 1␤False␤»
psch m: say quietly Any eq 'foo'
camelia rakudo-moar 39261e: OUTPUT«False␤»
moritz I'm preetty sure && has a tighter precedence than ?? !!
babydrop Ah, right, defined gobbled the ternary
moritz though defined is a sub, not a prefix op 20:42
righ
t
abraxxa: defined($tag) && $tag eq '...' ?? ... !!;
or $tag.defined && ...
babydrop $tag.defined ....
abraxxa moritz: docs.perl6.org/language/5to6-nutshell uses both defined and $var.defined
psch m: say quietly Any eq 'foo' ?? "bar" !! "baz"
camelia rakudo-moar 39261e: OUTPUT«baz␤»
babydrop $tag && ... 20:43
psch ^^^ probably what i'd do
babydrop m: say Str eq "foo"
camelia rakudo-moar 39261e: OUTPUT«Use of uninitialized value of type Str in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤ in block <unit> at <tmp> line 1␤False␤»
moritz abraxxa: yes 20:44
20:45 telex left
abraxxa moritz: so are braces after defined required? 20:46
20:46 telex joined 20:47 AlexDaniel joined
babydrop m: sub (+𝑒){say "meow"}(42) 20:47
camelia rakudo-moar 39261e: OUTPUT«meow␤»
babydrop dafuq
AlexDaniel /o\
psch abraxxa: no, but precedence helps the parser figure out where the arguments stop 20:48
m: say defined "foo"
camelia rakudo-moar 39261e: OUTPUT«True␤»
psch m: say defined "foo", 1
camelia rakudo-moar 39261e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling defined(Str, Int) will never work with proto signature (Mu)␤at <tmp>:1␤------> 3say 7⏏5defined "foo", 1␤»
psch m: say defined("foo"), 1
camelia rakudo-moar 39261e: OUTPUT«True1␤»
psch abraxxa: ^^^ like that
oh
s/precedence/parens/
abraxxa i see 20:49
so the Perl 5 parser is smarter in figuring it out? :P
psch no, the Perl 5 parser just has completely different rules
i mean, sure, maybe it's also smarter in a few things because of lots more work behind it 20:50
babydrop abraxxa: yes, if you tell it your sub just takes one arg, it will give it one. Perl 6 doesn't do that.
AlexDaniel babydrop: that's an interesting finding :)
20:50 sena_kun joined, lizmat joined
psch FSDO "smarter" there i'd say vOv 20:50
AlexDaniel babydrop: it is parsed like +@a, right?
babydrop Ohhh 20:51
haha
AlexDaniel m: sub (*𝑒){say "meow"}(42)
camelia rakudo-moar 39261e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub (*7⏏5𝑒){say "meow"}(42)␤»
babydrop m: sub (+𝑒){dd 𝑒}(42)
camelia rakudo-moar 39261e: OUTPUT«(42,)␤»
babydrop yup
AlexDaniel well…
psch that's spooky
AlexDaniel m: sub (+abc){dd abc}(42) 20:52
camelia rakudo-moar 39261e: OUTPUT«(42,)␤»
AlexDaniel m: sub (+abc){dd abc}(42, 69)
camelia rakudo-moar 39261e: OUTPUT«(42, 69)␤»
20:52 cdg left
psch shouldn't that fail to parse without a \ in there..? 20:52
AlexDaniel commit: all (+abc){dd abc}(42, 69)
psch m: sub (*\a) { }(1,2,3)
camelia rakudo-moar 39261e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub (*7⏏5\a) { }(1,2,3)␤»
committable6 AlexDaniel, gist.github.com/2cf008acefa4596179...b2d6f1fbe6 20:53
psch ...maybe it should fail to parse in general :P
sena_kun
AlexDaniel commit: HEAD sub (+abc){dd abc}(42, 69) 20:54
committable6 AlexDaniel, ¦«HEAD»: (42, 69)
AlexDaniel commit: HEAD~200 sub (+abc){dd abc}(42, 69)
committable6 AlexDaniel, ¦«HEAD~200»: (42, 69)
AlexDaniel commit: 2016.11 sub (+abc){dd abc}(42, 69)
committable6 AlexDaniel, ¦«2016.11»: (42, 69)
AlexDaniel what did I do wrong? O_o
ah
psch yes, 'sub'
AlexDaniel commit: all sub (+abc){dd abc}(42, 69) 20:55
committable6 AlexDaniel, gist.github.com/daf7ec2de211ec7fd8...00cce5c4ee
moritz abraxxa: depends on the precedence of the operators involved
abraxxa: &defined is just a function
AlexDaniel bisect: old=2015.07 sub (+abc){}(42, 69) 20:56
bisectable6 AlexDaniel, Bisecting by exit code (old=2015.07 new=39261e7). Old exit code: 1
moritz abraxxa: and like all functions, it expects a list of arguments
bisectable6 AlexDaniel, bisect log: gist.github.com/7469c9371c7b28791b...0dcd6c35d6
AlexDaniel, (2015-09-16) github.com/rakudo/rakudo/commit/11...7406b6eb37
abraxxa moritz: so it's greedy and takes as much as it can?
psch AlexDaniel: yeah, that's what i suspected. signature + always worked like that
AlexDaniel what do you mean by “always” 20:57
moritz abraxxa: so if you write defined $thing REST, then it only works if the operator in REST has looser precedence than the comma (which separates list items)
psch AlexDaniel: since its introduciton
-typo
AlexDaniel aaah
psch AlexDaniel: since the commit bisectable6 points at is the one that introduces it
AlexDaniel yup, I see now
psch + %*PARAM_INFO<is_raw> := $quant eq '\\' || ($quant eq '+' && !%*PARAM_INFO<sigil>);
seems strongly related
babydrop Hm, I think we ain't gonna support signs for constants in signatures. If you want a -π, define a constant and use that.
AlexDaniel … that's not cool 20:58
babydrop Or rather, the patch I'm working on now won't do that.
psch so we can have raw one-args without using 'is raw', but not raw slurpies without using 'is raw'
babydrop AlexDaniel: why?
AlexDaniel: why not do -$foo then too?
AlexDaniel babydrop: because if I can write π why can't I do -π
that's just basic math, it should be able to handle it 20:59
psch m: sub f(\a) { }; &f.signature.params[0].raw.say
camelia rakudo-moar 39261e: OUTPUT«True␤»
babydrop In fact, --stage=parse tells me the constant and $foo parsed under the same token
abraxxa thanks guys!
babydrop AlexDaniel: we don't do "math" in signatures. And you can't do that because that minus is a prefix op
psch babydrop: your constant fold seemed to work out according to #perl6-dev..?
babydrop AlexDaniel: why not do -42+tau-pi if we're going that route?
it's just math 21:00
AlexDaniel babydrop: what I meant by that is that it is just a number
psch heh
babydrop AlexDaniel: except it isn't
It's a number with a prefix op on it
psch .oO( sub f(--> &(await start LWP::Simple.get(...))) { ... } )
oh, needs invocation parens actually :P
AlexDaniel babydrop: as far as parser is conserned, yea? But as a user, I see it as just -π 21:01
babydrop: just like -Inf
psch but -Inf² is still -Inf
so it's clearly math, and not a number
AlexDaniel babydrop: perhaps you are right, but I'm just saying that it is not cool
psch does agree that it's LTA
jnthn If things like -1 are going to work in signatures, it's going to have to be a pretty special case... 21:02
babydrop jnthn: they do work right now.
jnthn: and yeah, they're special cased.
AlexDaniel you mean like -1 works, -Inf works, -π doesn't? Yea, not cool!
21:03 abraxxa left
babydrop AlexDaniel: and what about -$foo? 21:03
It's just math, eh?
AlexDaniel babydrop: I'm not sure why would I need it 21:04
jnthn Surely the special case would only extend to - before <value>...
psch well, variable return constraints are planned to be supported...
babydrop Inf is a literal. 1 is a literal. pi is a constant
psch not sure if "apply a random function to it" is categorically *not* supported
although i do see limits in practicality at least
but: torment the implementors on behalf of the users
AlexDaniel yes 21:05
babydrop jnthn: I'm extending it to <numish>
jnthn I guess that probably makes more sense given -'foo' wouldn't :)
babydrop :)
AlexDaniel by the way, I'm happy that bisectable can go as far as 2015.07
jnthn AlexDaniel: ooc, you mentioned that while the GC panic was gone in whateverable, there was still something else...did it get golfed/RT'd? 21:06
AlexDaniel jnthn: no, I don't think so. Not yet at least 21:07
jnthn OK. It's not like there aren't plenty more things in RT for me to do... :)
dalek c: a92a3f5 | Altai-man++ | doc/Language/classtut.pod6:
Make reference to a class in the description valid

Closes github.com/perl6/doc/issues/979; payerle++
21:10
synopsebot6 Link: doc.perl6.org/language/classtut
21:12 TEttinger joined
RabidGravy does the cached trait work well enough for a single argument sub that returns an object? 21:14
babydrop It just stores stuff in a hash and returns it if it finds it
RabidGravy yeah, that's what I thought, any actual advantage of using it over doing the same in the code? 21:16
moritz you don't have to do yourself :-) 21:17
lizmat RabidGravy: if the single arg is a string, you're probably better off with a "state %cache{$key} //= create_object" or some such
dalek c: 2d92933 | Altai-man++ | doc/Type/IO/Path.pod6:
Update obsolete IO::Path names to IO::Spec

IO::Path::Unix -> IO::Spec::Unix and so on. It fixes github.com/perl6/doc/issues/931, i.e. 404 links. Still as Coke said github.com/perl6/doc/issues/931#is...-264571843 the whole section can be revisited.
  grizzlysmit++
21:18
synopsebot6 Link: doc.perl6.org/type/IO/Path
RabidGravy that's exactly what I'm doing right now
MasterDuke jnthn: i think the errors lizmat was having with TEST_HARNESS=6 are the same as with the whateverables 21:24
lizmat MasterDuke: fwiw, it's HARNESS_TYPE=6 21:28
but yeah, indeed :-)
21:30 cognominal left
MasterDuke lizmat: i've never actually used HARNESS_TYPE=6, is it any faster/slower? 21:33
21:35 xiaomiao left 21:36 xiaomiao joined 21:38 cognominal joined
lizmat no, but it's dogfooding :-) 21:38
AlexDaniel [Coke]: I no longer see which comments are mine and which ones are not :( 21:41
21:43 setty1 left
lizmat MasterDuke: it's slower (at the moment :-) 21:47
21:58 lizmat left
timotimo i wonder how we get it fastered 22:04
the profiler isn't so happy about multi-threaded things still, so ... :\
22:08 kurahaupo__ joined
kalkin- m: subset Foo of List; Foo(<a b c>) 22:13
camelia rakudo-moar c1a3a3: OUTPUT«Cannot invoke this object (REPR: Uninstantiable; Foo)␤ in block <unit> at <tmp> line 1␤␤»
kalkin- m: subset Foo of List; Foo.new(<a b c>)
camelia rakudo-moar c1a3a3: OUTPUT«You cannot create an instance of this type (Foo)␤ in block <unit> at <tmp> line 1␤␤»
kalkin- How do I do that?
babydrop kalkin-: well, first you can't instantiate a subset. 22:18
kalkin-: but what are you trying to do?
moritz kalkin-: what kind of subset do you want to create?
m: subset Foo of List where { .elems == 2 }; say ('a', 'b') ~~ Foo 22:19
camelia rakudo-moar c1a3a3: OUTPUT«True␤»
moritz m: subset Foo of List where { .elems == 2 }; say ('a', 'b', 'c') ~~ Foo
camelia rakudo-moar c1a3a3: OUTPUT«False␤»
kalkin- ahh i see
thanks will try that
BenGoldberg m: constant Foo = subset of List; say ('a', 'b') ~~ Foo; 22:20
camelia rakudo-moar c1a3a3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3constant Foo = subset of7⏏5 List; say ('a', 'b') ~~ Foo;␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement…»
BenGoldberg No anonymous subsets, eh? 22:21
babydrop BenGoldberg: :: 22:23
22:23 kalkin- left
babydrop m: constant Foo = subset :: of List; say ('a', 'b') ~~ Foo; 22:23
camelia rakudo-moar c1a3a3: OUTPUT«===SORRY!===␤QAST::Block with cuid 1 has not appeared␤»
babydrop heh
m: my $c = subset :: of List; say ('a', 'b') ~~ $c;
camelia rakudo-moar c1a3a3: OUTPUT«True␤»
babydrop BenGoldberg: same with `does` or `is` on classes. If you omit the name, you need to add :: 22:24
22:34 rindolf left 22:35 girafe left 22:37 rindolf joined
mscha m: my ($a, $b) = "hello" ~~ m/(.)(.)/; say "Got '$a' and '$b'"; 22:37
camelia rakudo-moar c1a3a3: OUTPUT«Use of uninitialized value $b of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤ in block <unit> at <tmp> line 1␤Got 'he' and ''␤»
22:39 kurahaupo__ left, kurahaupo__ joined
mscha m: my ($a, $b) = "hello" ~~ m/(.)(.)/; dd $a, $b; # Any way to DWIM in perl 6? 22:39
camelia rakudo-moar c1a3a3: OUTPUT«Match $a = Match.new(ast => Any, list => (Match.new(ast => Any, list => (), hash => Map.new(()), orig => "hello", to => 1, from => 0), Match.new(ast => Any, list => (), hash => Map.new(()), orig => "hello", to => 2, from => 1)), hash => Map.new(("" => []))…»
babydrop m: my ($a, $b) = "hello".comb; dd [ $a, $b ] 22:40
camelia rakudo-moar c1a3a3: OUTPUT«["h", "e"]␤»
mscha Yeah, but that doesn't work for more complex regexes.
babydrop m: my ($a, $b) = ("hello" ~~ /(.)(.))[0,1]; dd [ $a, $b ]
camelia rakudo-moar c1a3a3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse regex; couldn't find final '/'␤at <tmp>:1␤------> 3my ($a, $b) = ("hello" ~~ /(.)(.)7⏏5)[0,1]; dd [ $a, $b ]␤ expecting any of:␤ infix stopper␤ term␤»
22:41 pyrimidine left
babydrop m: my ($a, $b) = ("hello" ~~ /(.)(.)/)[0,1]; dd [ $a, $b ] 22:41
camelia rakudo-moar c1a3a3: OUTPUT«[Match.new(ast => Any, list => (), hash => Map.new(()), orig => "hello", to => 1, from => 0), Match.new(ast => Any, list => (), hash => Map.new(()), orig => "hello", to => 2, from => 1)]␤»
babydrop m: my ($a, $b) = ("hello" ~~ /(.)(.)/)[0,1]».Str; dd [ $a, $b ]
camelia rakudo-moar c1a3a3: OUTPUT«["h", "e"]␤»
mscha m: my ($a, $b) = @("hello" ~~ m/(.)(.)/); say "Got '$a' and '$b'"; # success!
camelia rakudo-moar c1a3a3: OUTPUT«Got 'h' and 'e'␤»
22:41 kurahaupo left
babydrop \o/ 22:41
22:43 Tonik left
babydrop sdfghydftygt 22:43
m: my ($a, $b) = |"hello".match(/(.)(.)/); say "Got '$a' and '$b'"; 22:44
camelia rakudo-moar c1a3a3: OUTPUT«Got 'h' and 'e'␤»
22:45 cognominal left 22:46 cognominal joined
gfldex m: constant $f = -∞; sub f(--> $f){}; 22:49
camelia rakudo-moar c1a3a3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed return value␤at <tmp>:1␤------> 3constant $f = -∞; sub f(-->7⏏5 $f){};␤»
gfldex m: constant f = -∞; sub f(--> f){};
camelia ( no output )
gfldex m: constant f = -∞; sub f(--> f){}; say f
camelia rakudo-moar c1a3a3: OUTPUT«-Inf␤»
22:54 lizmat joined 23:00 lizmat left 23:01 FROGGS left 23:06 Guest42590 left 23:08 RabidGravy left
BenGoldberg m: constant f = -∞; sub j(--> f){}; say j 23:10
camelia rakudo-moar c1a3a3: OUTPUT«-Inf␤»
BenGoldberg m: sub j(--> 1234){}; say j 23:11
camelia rakudo-moar c1a3a3: OUTPUT«1234␤»
BenGoldberg m: sub j(--> -pi){}; say j
camelia rakudo-moar c1a3a3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed return value␤at <tmp>:1␤------> 3sub j(-->7⏏5 -pi){}; say j␤»
BenGoldberg m: sub j(--> (-pi)){}; say j
camelia rakudo-moar c1a3a3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed return value␤at <tmp>:1␤------> 3sub j(-->7⏏5 (-pi)){}; say j␤»
BenGoldberg m: say (constant :: = 42);
camelia rakudo-moar c1a3a3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing initializer on constant declaration␤at <tmp>:1␤------> 3say (constant7⏏5 :: = 42);␤»
BenGoldberg m: say (constant answer = 42); 23:12
camelia rakudo-moar c1a3a3: OUTPUT«42␤»
23:12 kurahaupo_ joined 23:13 kurahaupo__ left 23:15 kurahaupo joined 23:23 committable6 left 23:25 evalable6 left 23:27 bisectable6 left 23:29 bisectable6 joined, ChanServ sets mode: +v bisectable6, evalable6 joined, committable6 joined, ChanServ sets mode: +v committable6 23:30 unicodable6 left, unicodable6 joined 23:31 firstdayonthejob left 23:33 evalable6 left, evalable6 joined 23:34 andrewalker left 23:35 bisectable6 left, evalable6 left, committable6 left, benchable6 left, unicodable6 left 23:36 unicodable6 joined, evalable6 joined, committable6 joined, ChanServ sets mode: +v committable6, benchable6 joined, bisectable6 joined, ChanServ sets mode: +v bisectable6 23:39 bjz_ joined, evalable6 left 23:42 evalable6 joined 23:43 evalable6 left, evalable6 joined 23:45 pyrimidine joined, wamba left 23:48 evalable6 left, evalable6 joined 23:50 pyrimidine left, evalable6 left
masak BenGoldberg: not sure `constant ::` makes sense in the way `class ::` does 23:50
babydrop m: constant constant = constant constant = 42 23:51
camelia ( no output )
geekosaur doesn't think so either, fwiw 23:52
BenGoldberg m: say constant $ = 42 23:54
camelia rakudo-moar 971e14: OUTPUT«42␤»
BenGoldberg m: constant $ = 42; say $
camelia rakudo-moar 971e14: OUTPUT«(Any)␤»
BenGoldberg m: constant $foo = 42; say $foo
camelia rakudo-moar 971e14: OUTPUT«42␤»
geekosaur $ is a bit special 23:55
BenGoldberg m: constant $^a = 42; say $foo
camelia rakudo-moar 971e14: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use placeholder parameter $^a in the mainline␤at <tmp>:1␤------> 3constant $^a7⏏5 = 42; say $foo␤»
BenGoldberg m: constant $^a = 42; say $^a
camelia rakudo-moar 971e14: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use placeholder parameter $^a in the mainline␤at <tmp>:1␤------> 3constant $^a7⏏5 = 42; say $^a␤»
BenGoldberg So are the placeholders.
23:55 zakharyas joined
MasterDuke i would say that error is LTA. what's the "mainline"? 23:56
babydrop the main... erm... line of stuff. Means it ain't inside a sub or block 23:57
m: try '$^a'.EVAL; say $!.^name 23:58
camelia rakudo-moar 971e14: OUTPUT«X::Placeholder::Mainline␤»
23:58 lukaramu left
babydrop ... 23:58
MasterDuke ah, mainline is indexed in the docs, that's good at least 23:59