Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-12-03

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 pyrimidine joined #perl6
00:08 obfusk_ joined #perl6
00:17 kurahaupo_ joined #perl6
00:30 cognominal joined #perl6
00:32 canopus joined #perl6
00:35 ugexe clasclin: run with /c... so run 'cmd /c whatever' i think
00:36 ugexe er run 'cmd', '/c', 'whatever', 'whatever2'
00:41 clasclin thanks, looks like works...
00:42 clasclin I think I found some solution
00:42 clasclin If for example
00:43 pierre_ joined #perl6
00:43 clasclin my $day = qq:x/date-script.p6/
00:43 yoleaux viki: fix the -Inf thing!
00:43 clasclin $day # yyyy-mm-dd
00:44 clasclin now I can use it in
00:44 clasclin qq:x/another-script.p6 $day/
00:50 clasclin 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:51 clasclin I found it here https://perl6advent.wordpress.com/2014/12/06/​day-06-running-external-programs-from-perl-6/
00:57 aborazmeh joined #perl6
00:57 aborazmeh joined #perl6
01:04 clasclin run 'cmd', '/c', 'write.exe', 'documents/pastel.txt' # open worpad accepting the document as an argument, thanks :)
01:12 cognominal joined #perl6
01:15 skids joined #perl6
01:39 nals joined #perl6
01:39 nals hey
01:39 nals Can you give me an example of data flow being executed in a Perl program
01:40 avalenn joined #perl6
01:41 MasterDuke nals: what do you mean "data flow"?
01:42 nals the concept of data flow
01:44 MasterDuke i'm sorry, still not following you. data being passed to a function?
01:45 dj_goku joined #perl6
01:45 dj_goku joined #perl6
01:46 nals for example how operations occur in a sequential manner.
01:46 nals perl uses PDL::Dataflow to carry out this functioon
01:47 nals can you implement PDL::Dataflow in a factorial program
01:48 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 MasterDuke *use Perl 5 modules
01:50 BenGoldberg joined #perl6
01:55 nals does inLine perform the same function?
01:57 cognominal joined #perl6
01:58 ugexe what features and aspects of Dataflow are you aware of and looking for
01:59 ugexe because 'data flow concept' is still extremely vague
01:59 nals just implementing the perl API such as PDL::dataflow in a factorial program
02:00 ugexe you'll get more help if we dont have to already be familiar with that exact module and read its documentation
02:01 nals alright
02:12 cognominal joined #perl6
02:27 cognominal joined #perl6
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:48 pierre_ joined #perl6
02:59 lucs Precomp (I guess) problem: https://gist.github.com/lucs/ca​3079329b667afb8ee5362d32694f93
03:08 bjz joined #perl6
03:13 cognominal joined #perl6
03:23 noganex joined #perl6
03:23 ugexe lucs: paste the full output of whatever command causes that, but with RAKUDO_MODULE_DEBUG=1
03:27 cognominal joined #perl6
03:31 dj_goku joined #perl6
03:33 lucs ugexe: Here you go: https://gist.github.com/lucs/f2​7f5acc0336813b022fffa2986b793d
03:41 ugexe lucs: i think it would work if you installed your module. the bug looks like its here: https://github.com/perl6/doc​/blob/master/bin/p6doc#L218
03:42 ugexe its assuming a directory structure of CompUnit::Repository::Installation, but your PERL6LIB has a file path (CompUnit::Repository::FileSystem)
03:45 lucs Ah, I see what you mean.
03:46 lucs 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:56 Zoffix joined #perl6
03:57 Zoffix left #perl6
04:04 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:13 pierre_ joined #perl6
04:18 lucs ugexe: And now I learn about zef :)  -- I'll look into your suggestion.
04:18 lucs Thanks.
04:26 cognominal joined #perl6
04:28 skids .oO(man, powershell syntax is awful)
04:30 cognominal joined #perl6
04:54 thowe joined #perl6
05:09 aindilis joined #perl6
05:17 pierre_ joined #perl6
05:36 TimToady joined #perl6
05:37 James0r joined #perl6
05:42 samcv is this a bug?
05:43 samcv m: say q 'testing'
05:43 camelia rakudo-moar ae614f: OUTPUT«testing␤»
05:43 samcv m: say q'testing'
05:43 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␤   …»
05:43 samcv S02 seems to say that it should work
05:43 samcv 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.
05:45 samcv 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
05:45 bisectable6 samcv, https://gist.github.com/e7bc​d5e4541a43a884e5c2c0027dd754
05:46 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
05:46 bisectable6 samcv, https://gist.github.com/db69​33eb93b198d729a193959f112e06
05:50 telex joined #perl6
05:53 Actualeyes joined #perl6
05:59 itaipu joined #perl6
06:00 Cabanossi joined #perl6
06:00 rurban joined #perl6
06:02 cognominal joined #perl6
06:12 Woodi joined #perl6
06:16 Actualeyes joined #perl6
06:16 cyphase joined #perl6
06:20 pierre_ joined #perl6
06:41 pyrimidine joined #perl6
06:47 kurahaupo__ joined #perl6
07:01 pierre_ joined #perl6
07:09 pyrimidine joined #perl6
07:15 pierre_ joined #perl6
07:20 darutoko joined #perl6
07:23 CIAvash joined #perl6
07:29 titsuki joined #perl6
07:31 RabidGravy joined #perl6
07:42 Tonik joined #perl6
07:53 pyrimidine joined #perl6
07:59 domidumont joined #perl6
08:04 domidumont joined #perl6
08:07 RabidGravy boo!
08:12 pecastro joined #perl6
08:16 wamba joined #perl6
08:18 bjz joined #perl6
08:28 pyrimidine joined #perl6
08:29 rurban joined #perl6
08:42 Guest42590 joined #perl6
08:53 RabidGravy just catching up with the advent posts
08:53 RabidGravy all good
08:56 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 #perl6
08:59 pyrimidine joined #perl6
09:05 * stmuk_ changes a http to https in a config which means the advent stuff should now appear on perl6.org
09:07 cibs joined #perl6
09:14 lizmat joined #perl6
09:15 FROGGS joined #perl6
09:20 CIAvash joined #perl6
09:22 samcv ugh the escaping for TextMate style grammars are terrible
09:23 samcv my brain feels like mush at this point
09:23 samcv \\\\ is backslash. and \' is a quote. but \\{ is a left bracket
09:24 samcv and all these other annoying things
09:24 samcv and having to do it for all the q and qq constructs with diff delimiters seperately
09:25 [particle]1 joined #perl6
09:25 samcv too many levels of escape. because { and } mean things inside the grammar file... and they're also regex.. and ugh my head
09:26 samcv it all starts to look the same after a while, forget how many backslashes \\\\} is or how many \\\\\\ is :|
09:26 samcv need to sleep
09:26 samcv as soon i finish otherwise i might lose my place
09:27 [particle] joined #perl6
09:28 rindolf joined #perl6
09:30 lizmat joined #perl6
09:54 RabidGravy [Coke], I reckon you could do a cool thing using Tinky to create an asynchronous build pipeline for that thing
09:56 lizmat joined #perl6
10:00 pyrimidine joined #perl6
10:01 robertle joined #perl6
10:02 CIAvash joined #perl6
10:09 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 #perl6
10:09 bisectable6 titsuki, bisect log: https://gist.github.com/25ba​435d3a02a4b9c5b940ba9536c73b
10:09 bisectable6 titsuki, (2015-12-25) https://github.com/rakudo/rakudo/commit/​07fecb52eb1fd07397659f19a5cf36dc61f84053
10:11 lukaramu joined #perl6
10:11 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
10:11 bisectable6 titsuki, bisect log: https://gist.github.com/ca88​14be26dcc17404b0a49e8a0a99bc
10:11 bisectable6 titsuki, (2016-06-22) https://github.com/rakudo/rakudo/commit/​fd98fc342a34271227347d5ba8ca05e1e3f4db32
10:12 giraffe joined #perl6
10:22 moritz I've written and scheduled my post for day 6, you can read it and give me feedback if you're logged in: https://perl6advent.wordpress.com/2016/12​/06/day-6-perl-6-books-the-time-is-ripe/
10:22 xinming joined #perl6
10:26 dalek doc: a0c3071 | titsuki++ | doc/Type/Iterator.pod6:
10:26 dalek doc: Delete count-only
10:26 dalek doc: review: https://github.com/perl6/doc/commit/a0c3071275
10:26 dalek doc: 076e7ff | titsuki++ | doc/Type/Iterator.pod6:
10:26 dalek doc: Merge pull request #1026 from titsuki/delete-count-only
10:26 dalek doc:
10:26 dalek doc: Delete count-only
10:26 synopsebot6 Link: http://doc.perl6.org/type/Iterator
10:26 synopsebot6 Link: http://doc.perl6.org/type/Iterator
10:26 dalek doc: review: https://github.com/perl6/doc/commit/076e7ff52b
10:26 rindolf joined #perl6
10:32 pyrimidine joined #perl6
10:35 travis-ci joined #perl6
10:35 travis-ci Doc build errored. Itsuki Toyota 'Merge pull request #1026 from titsuki/delete-count-only
10:35 travis-ci https://travis-ci.org/perl6/doc/builds/180928983 https://github.com/perl6/doc/com​pare/7e80010ea1c6...076e7ff52b4b
10:35 travis-ci left #perl6
10:40 RabidGravy moritz, looks good - except something has gone weird with the  formatting of the last paragraph, looks like additional line breaks got in
10:43 pierre_ joined #perl6
10:50 rurban joined #perl6
11:00 cognominal joined #perl6
11:09 pyrimidine joined #perl6
11:22 Tonik joined #perl6
11:29 cognominal joined #perl6
11:30 lizmat joined #perl6
11:32 edghto joined #perl6
11:34 tadzik nine++ is just showing an overview of perl 6 web modules, annotated with the last commit date
11:34 tadzik Bailador is right there with "Nov 2016". I feel so happy :)
11:34 lizmat :-)
11:34 tadzik ufobat++
11:38 RabidGravy :) I don't think most of mine have had a commit in the last month
11:44 Tonik joined #perl6
11:54 cyphase joined #perl6
11:57 cibs joined #perl6
12:07 cibs joined #perl6
12:13 pierre_ joined #perl6
12:15 cibs joined #perl6
12:18 nkuitse joined #perl6
12:18 pyrimidine joined #perl6
12:18 nkuitse left #perl6
12:25 cibs joined #perl6
12:27 cognominal joined #perl6
12:28 moritz RabidGravy: thanks, I've fixed the formatting
12:29 RabidGravy It'll be an inspiring article for people, a nice flurry of books next year or so would raise the buzz somewhat :)
12:31 cibs joined #perl6
12:32 canopus joined #perl6
12:48 moritz the advent posts for days 4, 5, and 6 are scheduled already. Yay1
12:48 moritz s/1/!/
12:48 kalkin- joined #perl6
12:52 kalkin- Hi
12:54 kalkin- 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:55 kalkin- 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␤------> 1...3 X7⏏5 'a'...'c'␤    expec…»
12:55 psch m: my @a = 1,2,3; my @b = <a b c>; say @a.permutations X @b.permutations
12:55 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…»
12:55 kalkin- psch: that exactly what i have currently
12:56 psch kalkin-: so?  that fits your requirement, doesn't it?
12:56 kalkin- but i want to have it ordered
12:56 psch kalkin-: ordered by what
12:56 kalkin- in tuples of 3 draws where all elements are unique
12:57 psch okay just to clarify
12:57 psch "draw n times from a bucket with n elements" is always permutation of those elements
12:58 psch and you have given 'a','b','c', and 1,2,3
12:58 psch drawing is automatically without putting back, too
12:58 psch so there cannot be any duplicates
12:58 kalkin- Hmm may be i translated the algorithm wrong
12:58 psch m: say (1,2,3).permutations
12:58 camelia rakudo-moar d70482: OUTPUT«((1 2 3) (1 3 2) (2 1 3) (2 3 1) (3 1 2) (3 2 1))␤»
12:59 psch ^^^ that's all the ways you can draw from 1,2,3 three times
12:59 psch each of those gets combined with all the ways you can draw 3 times from 'a', 'b', 'c'
12:59 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
13:00 psch ah, three buckets :)
13:00 psch so you have 1,2,3 and <a b c> and <A B C>
13:00 kalkin- yes
13:00 psch you draw from each once?
13:00 kalkin- yes
13:01 kalkin- 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:02 kalkin- i have to get all the series.
13:03 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])␤»
13:04 psch &f can probably be stuffed into an inline operator somehow
13:04 psch or maybe we have a more elegant solution anyway, i can't think of one right now
13:04 kalkin- thanks will try that
13:05 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))␤»
13:06 psch not sure that's prettier, as such :)
13:06 kalkin- just a sec
13:08 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
13:08 psch m: say 'a' eq 'A'
13:08 camelia rakudo-moar d70482: OUTPUT«False␤»
13:08 psch i mean
13:08 psch the four tuples you showed contain A four times
13:08 psch three of those contain A *and* a
13:09 psch 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
13:09 kalkin- psch: thank you for your help
13:10 psch kalkin-: i tried :)
13:10 sena_kun joined #perl6
13:11 kalkin- :)
13:12 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))␤»
13:12 psch oh right
13:12 psch silly me, ~~ is the one with the confusing assoc
13:12 psch and putting X and Z together is the one that's forbidden
13:13 psch 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) #…»
13:13 psch but, it even says "identical ops may be list assoc" :|
13:15 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
13:16 MasterDuke but yeah, not sure what exactly he's looking for
13:16 psch but, well, selective memory vOv
13:20 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))␤»
13:21 MasterDuke ^^^ that maybe?
13:21 psch no idea
13:21 psch i mean, it's some kind of combinatorics thing probably
13:21 psch 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:24 MasterDuke three people each have three solutions for ways to draw three items from three lists of three items...
13:24 MasterDuke sounds like a project euler meta-problem
13:25 psch a bit, yes :)
13:25 setty1 joined #perl6
13:34 mefzz joined #perl6
13:36 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:38 psch mefzz: well, if you have some decent programming knowledge i'd suggest https://learnxinyminutes.com/docs/perl6/
13:40 MasterDuke mefzz: there's also http://perl6intro.com/
13:40 mefzz Hey thanks for the links guys.
13:42 pyrimidine joined #perl6
13:43 Zoffix joined #perl6
13:43 Zoffix left #perl6
13:44 cognominal joined #perl6
13:47 AlexDaniel joined #perl6
13:49 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␤»
13:49 sena_kun m: method seek(IO::Handle:D: Int:D $offset, SeekType:D $whence) returns True {}
13:49 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␤»
13:49 sena_kun method seek(IO::Handle:D: Int:D $offset, SeekType:D $whence) returns Int {}
13:49 sena_kun m: method seek(IO::Handle:D: Int:D $offset, SeekType:D $whence) returns Int {}
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␤»
13:50 sena_kun Is it a bog?
13:50 sena_kun *bug
13:50 mefzz No I guess
13:50 psch m: my method seek(IO::Handle:D: Int:D $offset, SeekType:D $whence) returns Int {}
13:50 camelia rakudo-moar d70482: ( no output )
13:50 mefzz http://askubuntu.com/questions/572976/what-to-​do-now-update-just-after-install/573091#573091
13:50 mefzz oops
13:50 psch sena_kun: what are you asking about?
13:50 mefzz xchat
13:51 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
13:52 AlexDaniel 「--> 42」 but can't 「returns 42」 ?
13:52 psch m: sub f returns 42 { }
13:52 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 #perl6
13:52 AlexDaniel m: my sub foo(--> 52) {}; say foo
13:52 camelia rakudo-moar d70482: OUTPUT«52␤»
13:52 psch so, yeah, that's apparently one difference.  we only parse *types* after 'returns'
13:52 psch not values
13:52 AlexDaniel well, wtf is True?
13:52 psch a value
13:52 psch an enum value, to be precise :P
13:53 psch ...or was that a philosophical question? :)
13:53 sena_kun If they are not equal, it is slightly not cool because https://github.com/perl6/doc/issues/1024 assumes that thay are.
13:53 AlexDaniel m: sub f returns True { }
13:53 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␤»
13:53 AlexDaniel ah, and it doesn't work, correct then
13:53 AlexDaniel sena_kun: ah dammit
13:53 AlexDaniel that's a good point
13:53 sena_kun Or, rather, otherwise: the issue should be patched.
13:53 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
13:54 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?
13:54 AlexDaniel why only these two are discussed
13:54 psch AlexDaniel: what are the other 2 or 3?
13:54 sena_kun They are the most common? And I don't know the other 2-3.
13:54 psch mefzz: afaik zef is more or less replacing panda recently
13:55 AlexDaniel m: sub foo of Int { 42 }; say foo
13:55 camelia rakudo-moar d70482: OUTPUT«42␤»
13:55 psch m: sub foo of Int { 42 }; say &foo.returns
13:55 camelia rakudo-moar d70482: OUTPUT«(Int)␤»
13:55 psch m: sub foo of Int { "42" }; say foo
13:55 camelia rakudo-moar d70482: OUTPUT«Type check failed for return value; expected Int but got Str ("42")␤  in block <unit> at <tmp> line 1␤␤»
13:55 AlexDaniel m: my Int sub foo { 42 }; say foo
13:55 camelia rakudo-moar d70482: OUTPUT«42␤»
13:55 psch m: my Int sub foo { 42 }; say &foo.returns
13:55 camelia rakudo-moar d70482: OUTPUT«(Int)␤»
13:55 psch m: my Int sub foo { 42 }; say &foo.of
13:55 camelia rakudo-moar d70482: OUTPUT«(Int)␤»
13:56 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␤»
13:56 psch right, so there's those two as well
13:56 psch still seems to have the same distinction -- only the one in the Signature allows a value
13:57 sena_kun Hmm.
13:57 AlexDaniel yea
13:57 AlexDaniel well, did I miss something?
13:57 psch m: sub f { also returns Int; } # scnr
13:57 camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot look up attributes in a Signature type object␤at <tmp>:1␤»
13:57 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... :)
13:58 AlexDaniel m: my Int sub A {}; sub B(--> Int) {}; sub C returns Int {}; sub D of Int {}; say (&A, &B, &C, &D)».returns
13:58 camelia rakudo-moar d70482: OUTPUT«((Int) (Int) (Int) (Int))␤»
13:58 AlexDaniel that's it, I guess
13:58 rburkholder joined #perl6
13:58 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
13:59 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))␤»
13:59 babydrop m: say -Inf²
13:59 camelia rakudo-moar d70482: OUTPUT«-Inf␤»
13:59 pyrimidine joined #perl6
13:59 AlexDaniel babydrop: oh, so that's fixed now
13:59 psch m: say (-Inf)²
13:59 camelia rakudo-moar d70482: OUTPUT«Inf␤»
13:59 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 cognominal joined #perl6
14:00 babydrop yup
14:01 gfldex m: say (-∞)²
14:01 camelia rakudo-moar d70482: OUTPUT«Inf␤»
14:01 AlexDaniel well, -∞ has always worked right
14:01 gfldex i wonder if Inf should stringy to ∞
14:01 babydrop Which magically fixed the <--Inf+-Inf> or whatever that bug was
14:01 AlexDaniel m: say <--Inf+-Inf\i>
14:01 camelia rakudo-moar d70482: OUTPUT«--Inf+-Inf\i␤»
14:01 AlexDaniel m: dd <--Inf+-Inf\i>
14:01 camelia rakudo-moar d70482: OUTPUT«"--Inf+-Inf\\i"␤»
14:02 AlexDaniel commit: HEAD~50,HEAD dd <--Inf+-Inf\i>
14:02 committable6 AlexDaniel, ¦«HEAD~50»: <0+0i>␤¦«HEAD»: "--Inf+-Inf\\i"
14:02 AlexDaniel yup
14:02 gfldex humans can spot Inf and make the right assumtion. Some shell script would be better of with ∞.
14:02 Olga joined #perl6
14:02 AlexDaniel gfldex: right now nothing prints unicode characters
14:02 AlexDaniel except for the eject symbol, I think
14:03 psch m: say &[<].perl
14:03 camelia rakudo-moar d70482: OUTPUT«sub infix:«<» (Mu $?, Mu $?) { #`(Sub+{<anon|70899152>}|68911280) ... }␤»
14:03 AlexDaniel so if we make ∞ stringify as ∞, I think we would want to change a couple of other things as well
14:03 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:04 babydrop mefzz: pretty much
14:04 gfldex AlexDaniel: worth a though before 6.d I think.
14:04 psch mefzz: https://docs.perl6.org/language/modules.html
14:04 psch mefzz: https://docs.perl6.org/language/m​odules.html#Distributing_Modules specifically
14:04 babydrop mefzz: the GitHub is meant to be temporary solution tho, and there's work being done to make CPAN accept P6 distros
14:04 AlexDaniel gfldex: ∞ thing, yes, but a lot of stuff can be done now
14:05 AlexDaniel 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
14:06 mefzz thanks for the links also. I need to start reading the documentation, or I gonna ask the whole thing in here. :)
14:07 kalkin- re
14:07 AlexDaniel m: sub foo(--> Inf) {}; say foo
14:07 camelia rakudo-moar d70482: OUTPUT«Inf␤»
14:08 AlexDaniel m: sub foo(--> -Inf) {}; say foo
14:08 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␤»
14:08 AlexDaniel m: sub foo(--> -50) {}; say foo
14:08 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␤»
14:08 AlexDaniel what?
14:08 AlexDaniel m: sub foo(--> 50) {}; say foo
14:08 camelia rakudo-moar d70482: OUTPUT«50␤»
14:08 AlexDaniel m: sub foo(--> π) {}; say foo
14:08 camelia rakudo-moar d70482: OUTPUT«3.14159265358979␤»
14:08 AlexDaniel m: sub foo(--> -π) {}; say foo
14:08 camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed return value␤at <tmp>:1␤------> 3sub foo(-->7⏏5 -π) {}; say foo␤»
14:08 AlexDaniel babydrop: um… am I missing something?
14:08 AlexDaniel m: sub foo(--> (-π)) {}; say foo
14:08 camelia rakudo-moar d70482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed return value␤at <tmp>:1␤------> 3sub foo(-->7⏏5 (-π)) {}; say foo␤»
14:09 AlexDaniel that's a regular hyphen-minus
14:09 psch right, but it's still not a constant
14:09 AlexDaniel :-|
14:09 RabidGravy tadzik, you about?
14:09 babydrop AlexDaniel: hehe
14:10 tadzik RabidGravy: aye
14:10 babydrop m: https://gist.github.com/zoffixznet​/4e60c7d298c410f8770cb6565d0ff9d5
14:10 AlexDaniel babydrop: do you want RT ticket for that?
14:10 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 …»
14:10 RabidGravy ah hah!
14:10 tadzik whatsup :)
14:11 AlexDaniel eval: https://gist.githubusercontent.com/zoffixzn​et/4e60c7d298c410f8770cb6565d0ff9d5/raw/794​a3f3e350bcfce69db6e6172759722dd8b4e7d/p6.p6
14:11 evalable6 AlexDaniel, Successfully fetched the code from the provided URL.
14:11 evalable6 AlexDaniel, rakudo-moar d704820: OUTPUT«(exit code 1)         ok 1 - bare␤        not ok 2 - plus␤␤        # Failed test 'plus'␤      …»
14:11 evalable6 AlexDaniel, Full output: https://gist.github.com/478e​9431054dc96f1a7887e86748b102
14:11 RabidGravy tadzik, I'm doing something with JSON::Unmarshal that may require a pattern that neither of us thought about
14:11 tadzik oh, interesting
14:11 tadzik what is it?
14:12 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
14:12 tadzik I think they currently do, since yesteyesterday's timotimo++'s patch
14:12 AlexDaniel babydrop: okay then
14:12 babydrop AlexDaniel: basically -π is not a constant, it's a prefix:<-> and a constant and you can't have expressions in that stuff
14:13 * 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
14:13 AlexDaniel babydrop: yea but there's a workaround for that in the signature
14:13 AlexDaniel babydrop: yea
14:13 babydrop yeah
14:13 tadzik it makes Positional[Dog] and alike DTRT
14:13 babydrop So same would need to be created for the returns stuff
14:14 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 cognominal joined #perl6
14:15 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
14:15 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␤»
14:15 gfldex m: constant term:<+∞> := -Inf; say +∞;
14:15 camelia rakudo-moar d70482: OUTPUT«-Inf␤»
14:15 MasterDuke m: say <a b c> Z <1 2 3> Z <A B C>
14:15 camelia rakudo-moar d70482: OUTPUT«((a 1 A) (b 2 B) (c 3 C))␤»
14:15 MasterDuke ^^^ that maybe?
14:15 AlexDaniel gfldex: well, that's how it was working previously
14:15 kalkin- No it returns only one possible tupple row
14:16 AlexDaniel internally
14:16 AlexDaniel and that was a bad idea :)
14:17 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␤»
14:18 RabidGravy tadzik, no that's not quite what I had in mind
14:20 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))␤»
14:20 RabidGravy I'm thinking of the case of "class Foo { has Bar @.bars; }" and JSON like "{ bars : [ "barble", "warble" ] }"
14:20 MasterDuke m: say (<a b>, <1 2>).flat.combinations(2)
14:20 camelia rakudo-moar d70482: OUTPUT«((a b) (a 1) (a 2) (b 1) (b 2) (1 2))␤»
14:21 RabidGravy so each item needs to be constructed from the data in a custom manner
14:22 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)
14:22 camelia rakudo-moar d70482: OUTPUT«((a 1) (a b) (a 2) (1 b) (1 2) (b 2))␤»
14:23 MasterDuke kalkin-: something like those ^^^
14:23 psch well, the X of three lists previously already has all solutions
14:23 psch they're just mixed through the array
14:23 psch which is probably where the "i need them ordered" earlier came in :)
14:24 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-½) {}␤»
14:24 AlexDaniel babydrop: ↑?
14:24 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
14:24 camelia rakudo-moar d70482: OUTPUT«((a 1 A) (b 2 B) (c 3 C))␤»
14:25 AlexDaniel or I'll just wait until everything is done… :)
14:26 AlexDaniel right, it is the same case as -π
14:26 AlexDaniel nvm
14:26 psch kalkin-: just to clarify, row *and* column are supposed to be unique, right?
14:26 psch kalkin-: in the matrix that is
14:27 psch there *might* be some really clever .rotor invocation that does that, but i'm not the one to think of it...
14:29 kurahaupo__ joined #perl6
14:34 AlexDaniel kalkin-: so to put it simply, the number should be unique in its row and its column?
14:35 cognominal joined #perl6
14:35 wamba joined #perl6
14:35 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
14:37 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
14:38 AlexDaniel right, it's not the same as -π, what am I smoking…
14:39 tadzik ah
14:39 tadzik unmarshalled-by, I haven't considered that...
14:39 AlexDaniel bisect: old=2015.10 say ½
14:39 bisectable6 AlexDaniel, Bisecting by exit code (old=2015.10 new=d704820). Old exit code: 1
14:39 bisectable6 AlexDaniel, bisect log: https://gist.github.com/048a​1d1ed55047ab7e7bfb27a284c19a
14:39 bisectable6 AlexDaniel, (2015-11-24) https://github.com/rakudo/rakudo/commit/​8ef5a59eebe9591325393d987566927b4d24366b
14:40 AlexDaniel that's a very small :)
14:40 AlexDaniel change*
14:46 edghto left #perl6
14:49 kalkin- Sorry now back for real
14:50 mefzz joined #perl6
14:52 kalkin- AlexDaniel: All elements of M_(0,0…n) should be unique
14:52 kalkin- M beeining the matrix with the tuples as rows
14:52 mefzz hi, why this doesn't work? http://pastebin.com/EFmNYhkk
14:54 sena_kun mefzz, ";" symbol.
14:54 sena_kun In the first statement.
14:54 psch m: my Int $i = 0 while $i <= 1000 { say $i++ }
14:54 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…»
14:55 psch well, it does complain somewhat reasonably
14:55 sena_kun It should be "my Int $i = 0;";
14:55 mefzz the error info is a bit confusing to me, hmm :(
14:56 AlexDaniel eval: http://pastebin.com/raw/EFmNYhkk
14:56 evalable6 AlexDaniel, Successfully fetched the code from the provided URL.
14:56 evalable6 AlexDaniel, rakudo-moar d704820: OUTPUT«(exit code 1) ===SORRY!=== Error while compiling /tmp/uF6esMmCr0␤Unexpected block in infix pos…»
14:56 evalable6 AlexDaniel, Full output: https://gist.github.com/5fc4​9090b42ceaa09a4c5098dcf030a7
14:56 AlexDaniel oh
14:56 AlexDaniel it is parsed as a statement modifier, right?
14:56 psch yes, the while is a statement modifier
14:57 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
14:57 psch m: 100 + 10 { "foo" }
14:57 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␤------> 100 + 107⏏5 { "foo" }␤    expecting any of:␤        infix␤        infix stopper␤»
14:57 mefzz anyway, thanks for quick spotting the error. Sorry for the lame question..
14:57 AlexDaniel mefzz: it is a good question actually
14:57 AlexDaniel mefzz: I believe the error message can be improved
14:58 psch i'm not sure we know there that we're in a statement_mod, actually
14:59 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 #perl6
14:59 AlexDaniel psch: I understand all that, but this is indeed a LTA message for a tiny semicolon that was left off
15:00 tadzik is it just me, or today's advent post is missing quite some characters?
15:00 pyrimidine joined #perl6
15:00 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
15:00 MasterDuke though maybe not if there's a string involved
15:01 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 :)
15:01 psch MasterDuke: and i don't think making \n works as statement_end is great idea
15:01 lizmat joined #perl6
15:01 psch *work
15:02 psch s/we've/we would've/
15:02 psch AlexDaniel: so does the bare case also need a different error message?
15:02 MasterDuke well, i don't think we need to check if we would've, just suggest it
15:02 AlexDaniel no
15:02 kalkin- m:  <a b c>.permutations.flat Z <1 2 3>.permutations.flat Z <A B C>.permutations.flat
15:02 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)␤»
15:03 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
15:03 AlexDaniel for that case I mean
15:03 kalkin- m: <a b c>.permutations.flat Z <1 2 3>.permutations.flat Z <A B C>.permutations.flat # this works in repl
15:03 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)␤»
15:04 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))␤»
15:04 AlexDaniel oh, wait…
15:04 AlexDaniel ummmm
15:04 kalkin- psch: ohh yeah i see.
15:05 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
15:05 psch and, well, it's six solutions too
15:05 psch ...if i counted correctly :)
15:07 lizmat_ joined #perl6
15:09 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␤»
15:09 moritz https://www.kickstarter.com/projects​/1422827986/learning-perl-6?ref=card only 3.5k USD missing
15:09 kalkin- Ohh i see
15:09 kalkin- I.ee (c 2 C) is missing
15:09 psch kalkin-: i'm pretty sure infix:<Z> is the wrong tool if you're looking for all solutions
15:10 rindolf joined #perl6
15:10 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:11 kalkin- psch: yes you are right
15:12 AlexDaniel mefzz: there is this thing https://docs.perl6.org/perl6.xhtml
15:12 babydrop :(
15:13 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
15:13 mefzz Ah, at least that is sufficient just for learning now, thanks.
15:13 kurahaupo joined #perl6
15:13 babydrop huggable: single doc :is: https://docs.perl6.org/perl6.xhtml
15:13 huggable babydrop, Added single doc as https://docs.perl6.org/perl6.xhtml
15:14 AlexDaniel babydrop: I just typed “docs.perl6 bigpage” in google and it was on the first page :)
15:14 babydrop cheater!
15:14 AlexDaniel I tried generating a print preview of that thing. No, it does not look useful
15:15 AlexDaniel but the idea is good
15:15 AlexDaniel gfldex++
15:16 AlexDaniel if horizontal scrolling is eliminated it will be much better
15:16 sena_kun Ah, also, about a pdf. We still have https://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.
15:17 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 moritz wkhtmltopdf comes to mind, it installs as a Debian package
15:17 AlexDaniel (which is the best tool)
15:17 AlexDaniel you'd probably need a custom version of wkhtmltopdf to run it without X
15:18 AlexDaniel unless it was finally fixed
15:18 moritz the one in Debian runs without X, afaict
15:18 sena_kun moritz, yes, you're totally right.
15:19 sena_kun 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)
15:20 AlexDaniel I am pretty sure it doesn't work without X on debian jessie
15:20 AlexDaniel let's try on unstable…
15:20 moritz sena_kun: well, if it's about installing a package on the server, that I can do for you
15:20 moritz sena_kun: if you need something else, we can talk about it
15:21 moritz AlexDaniel: I'll just install it on hack and see if it works
15:21 AlexDaniel no, does not work on debian unstable
15:22 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:23 moritz AlexDaniel: iirc there's a workaround, let me check...
15:23 AlexDaniel moritz: the workaround is to install a deb from here http://wkhtmltopdf.org/downloads.html
15:23 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 #perl6
15:24 gfldex i'm waiting for jnthn to fix one CONC bugs, then I will start with Pod::To::LaTeX
15:25 AlexDaniel gfldex: which one, by the way?
15:25 gfldex the start vs. IO bug
15:25 moritz AlexDaniel: or using xvfb
15:25 gfldex that's the one that stops us from building the docs multithreaded
15:26 moritz anyway, I've installed xvfb and wkhtmltopdf on hack
15:26 avalenn why the switch from specs to roast ?
15:26 AlexDaniel avalenn: hello!
15:27 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.
15:27 moritz avalenn: or rather "why did we name it roast"?
15:27 avalenn I don't care about the name
15:28 gfldex avalenn: the idea was to have proper docs alongside roast so you don't need to read roast anymore
15:28 gfldex we are working on that part
15:28 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
15:28 moritz at least not equally well
15:29 avalenn so it is more about "
15:29 avalenn so it more about "why is the specification a test suite"?
15:30 moritz because we can execute it
15:30 avalenn Ok. I am a bit disappointed about this but I can understand the argument.
15:31 avalenn I really believe that the "literate programing" style of specifications was great
15:31 James0r joined #perl6
15:31 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
15:31 avalenn Now we have "roast" on one side and "docs" on the other
15:31 babydrop Right, the docs is for humans and roast is for computers.
15:32 babydrop Until the robot uprising, of course.
15:32 avalenn with no easy way to match information between "roast" and "docs"
15:32 avalenn or I missed it
15:32 moritz we have smartlinks
15:32 moritz but I don't know how well maintained they are
15:33 moritz and I don't know if we render the result of the crosslinking
15:33 moritz we used to
15:33 babydrop avalenn: not at the moment, no. One idea I have is to use coverage reports to tell you where method XYZ is tested.
15:33 babydrop but coverage reports are a work in progress ATM :)
15:34 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
15:34 psch AlexDaniel: which "specs" is that?  specification or github/perl6/specs?
15:34 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.
15:35 moritz AlexDaniel: like how matches are numbered and nested, for example
15:35 dalek doc: cc2d14b | Altai-man++ | doc/Type/Signature.pod6:
15:35 dalek doc: Make Signature.pod6 compilable with small example code fixes
15:35 dalek doc: Missed names, semicolons or exception catches.
15:35 dalek doc: review: https://github.com/perl6/doc/commit/cc2d14b42a
15:35 synopsebot6 Link: http://doc.perl6.org/type/Signature
15:35 AlexDaniel moritz: can you submit a doc issue for that? :)
15:35 babydrop Is that really an issue?
15:36 babydrop Docs overstuffed with information aren't that awesome either
15:36 babydrop *cough* perldoc *cough*
15:36 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?
15:36 * moritz finds perldoc pretty awesome
15:36 AlexDaniel but we probably don't want to keep /specs alive forever
15:36 moritz kalkin-: [Z] @matrix  I think
15:37 khw joined #perl6
15:37 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␤»
15:37 AlexDaniel one day it will be just too outdated
15:37 AlexDaniel nobody is willing to work on them, and that's ok, basically there is no point…
15:37 kalkin- moritz: awesome thanks!
15:39 babydrop moritz: perlre is 39 pages long and that's not the only regex doc.
15:39 babydrop I've used Perl 5 personally and professionally for 11 years now and I don't think I read even 30% of perldoc.
15:39 babydrop Ain't no body got time for that.
15:39 mspo I learn somethig new every time I read perlre
15:40 cognominal joined #perl6
15:40 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?
15:40 babydrop That would be nice.
15:40 mspo almost like some kind of hypertext document
15:40 mspo with "links" of some type to additional information
15:40 lizmat joined #perl6
15:41 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 ?
15:41 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=129781
15:41 moritz and the HTML rendering of those could be collapsed by default
15:41 moritz =begin moreinfo ... =end moreinfo
15:42 mspo that would disrupt the flow of reading docs, imho
15:42 mspo how can you decide what is more vs normal or discover more stuff?
15:42 moritz depends on how it's presented
15:43 moritz you can just read what's shown to you
15:43 mspo how about you make a --tweet and default to full
15:43 moritz and when that's not detailed enough, you can look for more info
15:43 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
15:43 mspo see: whatis(1) vs man(1)
15:44 RabidGravy however I will PR the test so the behaviour doesn't change;
15:45 AlexDaniel AH F∞×「
15:46 AlexDaniel just closed a tab with new ticket that was not submitted
15:46 AlexDaniel ctrl+shift+t, the title is still there!
15:46 AlexDaniel the description is not…
15:46 gfldex AlexDaniel: #129787 (there are likely some dupes in [CONC])
15:46 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=129787
15:48 cognominal joined #perl6
15:53 AlexDaniel .tell mefzz I submitted a ticket for the issue you mentioned: #130251
15:53 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=130251
15:53 yoleaux AlexDaniel: I'll pass your message to mefzz.
15:53 RabidGravy tadzik, https://github.com/tadzik/JSON-Unmarshal/pull/21
15:55 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 #perl6
15:55 travis-ci Doc build passed. Altai-man 'Make Signature.pod6 compilable with small example code fixes
15:55 travis-ci https://travis-ci.org/perl6/doc/builds/180968447 https://github.com/perl6/doc/com​pare/076e7ff52b4b...cc2d14b42aad
15:55 travis-ci left #perl6
15:55 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)␤»
15:55 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«((((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) (…»
15:55 kalkin- I think i got it
15:56 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«()␤»
15:57 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«()␤»
15:58 psch kalkin-: i still think you don't have e.g. ('a', 2, 'A') anywhere there
15:58 psch kalkin-: and i'm pretty sure the problem as stated allows for a matrix that does contain that tuple
15:59 AlexDaniel sena_kun: where have you been? I missed you
16:00 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:01 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
16:01 sena_kun And my september-october time was really busy with a big haskell project, so no time for anything else. :/
16:01 kalkin- So I'm trying to calculate all the possible house combinations
16:03 kalkin- http://rosettacode.org/wiki/Zebra_puzzle ← It's missing a perl6 solution
16:04 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
16:05 psch kalkin-: the only thing you keep is the size of the matrix
16:05 AlexDaniel sena_kun: what did we do?
16:05 AlexDaniel sena_kun: you mean the hundreds of emails about github issues?
16:06 kalkin- psch: i wanted create all possible houses series and then iterate checking each one if it fits the rules
16:07 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 >:)
16:07 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
16:10 kalkin- psch: k, will look in to that, thanks
16:11 cognominal joined #perl6
16:13 lucs Can p6doc read an arbitrary Pod file, like foo.pod?
16:14 lucs (What I actually would have is SomeModule.pm6 and a separage SomeModule.pod.)
16:14 lucs *separate
16:18 pyrimidine joined #perl6
16:22 sena_kun lucs, I quickly tested it: yes, it can.
16:22 mspo can I get subsecond time somehow?
16:23 lizmat joined #perl6
16:23 psch m: say now
16:23 camelia rakudo-moar 947422: OUTPUT«Instant:1480782226.547037␤»
16:23 psch m: say now; sleep .1; say now
16:23 camelia rakudo-moar 947422: OUTPUT«Instant:1480782251.3505​11␤Instant:1480782251.453869␤»
16:23 lucs sena_kun: D'oh! I'm really dumb, I hadn't even tried.
16:23 lucs Thanks.
16:25 ufobat joined #perl6
16:26 babydrop m: say now.DateTime
16:26 camelia rakudo-moar 947422: OUTPUT«2016-12-03T16:26:35.943904Z␤»
16:27 mspo m: say DateTime.now.perl
16:27 camelia rakudo-moar 947422: OUTPUT«DateTime.new(2016,12,3,17,27,​44.1169629096985,:timezone(3600))␤»
16:27 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 #perl6
16:29 cognominal joined #perl6
16:31 sena_kun m: sub foo(Int,) {};
16:31 camelia rakudo-moar 3e93dd: ( no output )
16:31 sena_kun Hmmm.
16:31 girafe joined #perl6
16:32 moritz m: say time
16:32 camelia rakudo-moar 3e93dd: OUTPUT«1480782724␤»
16:33 sena_kun Does `,` in the signature counts as, eeh, list creator or what?
16:34 psch sena_kun: trailing commas are fine
16:34 sena_kun psch, they have no meaning then?
16:34 cdg joined #perl6
16:34 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␤»
16:35 psch sena_kun: well, a Signature is always a List, and trailing commas are legal
16:35 psch sena_kun: the List still contains exactly one item, with one specific kind of type constraint
16:35 sena_kun Ah, so this is how it is. psch, thanks.
16:35 psch i do think it's a bit weird looking, yes, but i don't think it *should* be illegal
16:35 lizmat joined #perl6
16:36 pyrimidine joined #perl6
16:38 lizmat_ joined #perl6
16:42 kalkin- If i have a list (a, 1, B) is there a way to check if it matches (a, *SOMETHING*, B)?
16:42 mefzz joined #perl6
16:42 kalkin- s/SOMETHING/ANYTHING/g
16:43 babydrop m: say so ("a", 1, "B") ~~ ("a", *, "B")
16:43 camelia rakudo-moar 3e93dd: OUTPUT«True␤»
16:43 psch m: say ('a', $_, 'B') ~~ ('a', *, 'B') for ^3
16:43 camelia rakudo-moar 3e93dd: OUTPUT«True␤True␤True␤»
16:43 babydrop You can also use ** to mean "any number of elements that area anything"
16:43 kalkin- when can I use * and **?
16:43 babydrop :\
16:43 kalkin- is it documented some where?
16:43 psch m: say (1, 2) ~~ (1, **, 2)
16:43 camelia rakudo-moar 3e93dd: OUTPUT«True␤»
16:43 babydrop kalkin-: they're Whatever and HyperWhatever
16:44 babydrop kalkin-: you use * to mean "whateverr" for single item and ** to meant "whatever for whatever-many items"
16:44 kalkin- Ahh there are docs for Whatever, it just can't find * and **
16:44 kalkin- thanks!
16:44 mefzz Hi, which is the class that enables you dealing with HTTP or simply downloading file?
16:44 yoleaux 15:53Z <AlexDaniel> mefzz: I submitted a ticket for the issue you mentioned: #130251
16:44 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=130251
16:45 AlexDaniel yoleaux: wget
16:45 babydrop mefzz: take a look at LWP::Simple
16:45 AlexDaniel oops
16:45 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?
16:45 AlexDaniel huggable: wget
16:45 huggable AlexDaniel, nothing found
16:45 AlexDaniel :(
16:45 babydrop mefzz: http://modules.perl6.org/dist/LWP::Simple
16:45 babydrop mefzz: I personally like http://modules.perl6.org/dist/HTTP::UserAgent
16:46 babydrop hahainternet: don't think you can. It's a point of debate ATM, actually.
16:46 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
16:46 mefzz alright thanks babydrop, I'll check that out.
16:46 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
16:47 hahainternet babydrop: that makes sense, but is a little frustrating
16:47 psch but it's not really what it's for
16:47 psch m: class A { method CALL-ME(A:U: Int $x) { self.new } }; my A $x = A(1) #
16:47 camelia rakudo-moar 3e93dd: ( no output )
16:47 psch note though that that's also not implicit
16:47 psch hence you might as well just do .new there
16:48 * babydrop doesn't follow how to apply that to coercers
16:48 babydrop like, say, in a sig
16:48 psch yeah, true
16:48 babydrop :(
16:48 firstdayonthejob joined #perl6
16:48 psch it's half there, but you're right that it goes the wrong way
16:48 psch i suppose i should take a walk :P
16:49 psch oh but
16:49 psch maybe zoffix wants to built the "if Orig.Target doesn't work try Target.new($value)" patch :P
16:49 cognominal joined #perl6
16:50 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 psch anyway, afk for a while &
16:50 babydrop If I know zoffix, and I think I do, he doesn't want to build anything :)
16:51 babydrop maybe around New Years
16:51 hahainternet well i'm perhaps just a bit confused about the 'right' way to do things
16:51 hahainternet let's say i want to have an array of values that can only be from 25 to 75
16:51 domidumont joined #perl6
16:52 hahainternet i was thinking i'd just create a 'class whatever is Int' and then override operators
16:52 hahainternet but perhaps i'm looking at it the wrong way?
16:53 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
16:53 hahainternet (i think!)
16:54 babydrop What happens to stuff that doesnt fit that range?
16:54 hahainternet it's clamped
16:54 babydrop what does that mean?
16:54 hahainternet values lower than 25 are set to 25, larger than 75 are set to 75
16:56 rurban joined #perl6
17:03 mefzz and...does rakudo perl6 interpreter(?) have autocompletion or history that you can navigate with arrow keys?
17:04 sena_kun mefzz, you can install Linenoise module and the repl will work with history by arrow keys.
17:04 sena_kun zef/panda install Linenoise
17:04 mefzz Oh, I thought it will make the output more verbose.
17:05 timotimo it's called "REPL" or "interactive mode"
17:05 mefzz Ah I see, thanks. Taking that as a note.
17:06 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 sena_kun s/it/its/
17:09 squain joined #perl6
17:10 pyrimidine joined #perl6
17:11 lizmat joined #perl6
17:13 setty1 joined #perl6
17:14 AlexDaniel [Coke]: I have changed my avatar
17:14 pyrimidine joined #perl6
17:15 AlexDaniel not entirely happy with it, but at least it won't cause any problems for others :)
17:15 setty1 joined #perl6
17:16 setty1 joined #perl6
17:17 setty1 joined #perl6
17:19 setty1 joined #perl6
17:20 cdg_ joined #perl6
17:23 jnthn .win 29
17:23 jnthn oops :)
17:24 jnthn evening, #perl6, anyways :)
17:25 babydrop \o
17:27 * tadzik https://shop.spreadshirt.co.uk/dav​org/damianware+t-shirt-A108346107 just leaves this here
17:28 tadzik there's more where that came from :o
17:28 lizmat joined #perl6
17:30 setty1 joined #perl6
17:33 pyrimidine joined #perl6
17:37 pecastro joined #perl6
17:51 pyrimidine joined #perl6
17:57 dalek mu/zostay-advent-2016: 0428f4f | (Sterling Hanenkamp)++ | misc/perl6advent-2016/schedule:
17:57 dalek mu/zostay-advent-2016: Adding myself on 14th
17:57 dalek mu/zostay-advent-2016:
17:57 dalek mu/zostay-advent-2016: 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 dalek mu/zostay-advent-2016: review: https://github.com/perl6/mu/commit/0428f4f240
17:57 dalek mu: 0428f4f | (Sterling Hanenkamp)++ | misc/perl6advent-2016/schedule:
17:57 dalek mu: Adding myself on 14th
17:57 dalek mu:
17:57 dalek mu: 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 dalek mu: review: https://github.com/perl6/mu/commit/0428f4f240
17:57 dalek mu: 45e4ccc | (Zoffix Znet)++ | misc/perl6advent-2016/schedule:
17:57 dalek mu: Merge pull request #21 from perl6/zostay-advent-2016
17:57 dalek mu:
17:57 dalek mu: Adding myself on 14th
17:57 dalek mu: review: https://github.com/perl6/mu/commit/45e4cccc40
18:00 cdg joined #perl6
18:01 sena_kun joined #perl6
18:02 cognominal joined #perl6
18:03 dalek doc/consistent-return-types: ce8d836 | Altai-man++ | doc/Type/ (11 files):
18:03 dalek doc/consistent-return-types: The signatures was updated to use `returns` instead of `-->`.
18:03 dalek doc/consistent-return-types: See https://github.com/perl6/doc/issues/1024 for the discussion.
18:03 dalek doc/consistent-return-types: review: https://github.com/perl6/doc/commit/ce8d83649f
18:03 dalek doc/consistent-return-types: 795330b | Altai-man++ | t/return-type.t:
18:03 dalek doc/consistent-return-types: A new test for return types in the signatures.
18:03 dalek doc/consistent-return-types: It checks for the absence of '-->' in a signature in every file under Type/ directory(except for Signature-related files).
18:03 dalek doc/consistent-return-types: It fails with '-->' in the signature without 'True|False' as a value.
18:03 dalek doc/consistent-return-types: It passes with current docs.
18:03 dalek doc/consistent-return-types: review: https://github.com/perl6/doc/commit/795330b3ed
18:09 RabidGravy tadzik, there this is the one that fixes my earlier problem https://github.com/tadzik/JSON-Unmarshal/pull/22
18:09 RabidGravy I can carry on with what I was doing now :)
18:10 pyrimidine joined #perl6
18:11 travis-ci joined #perl6
18:11 travis-ci Doc build failed. Altai-man 'A new test for return types in the signatures.
18:11 travis-ci https://travis-ci.org/perl6/doc/builds/180990699 https://github.com/perl6/doc/compare/ce8d83649f86^...795330b3ed52
18:11 travis-ci left #perl6
18:13 BenGoldberg joined #perl6
18:13 RabidGravy I think I need more beer, that was way harder than it should have been
18:14 abraxxa joined #perl6
18:21 dalek doc/consistent-return-types: 138cd60 | Altai-man++ | t/return-type.t:
18:21 dalek doc/consistent-return-types: Tabs->spaces for new test.
18:21 dalek doc/consistent-return-types: review: https://github.com/perl6/doc/commit/138cd60d5e
18:29 pyrimidine joined #perl6
18:40 rurban joined #perl6
18:40 MilkmanDan https://www.kickstarter.com/proj​ects/1422827986/learning-perl-6 gained $1,000 in a few hours. :)
18:40 travis-ci joined #perl6
18:40 travis-ci Doc build passed. Altai-man 'Tabs->spaces for new test.'
18:40 travis-ci https://travis-ci.org/perl6/doc/builds/180993183 https://github.com/perl6/doc/com​pare/795330b3ed52...138cd60d5e6c
18:40 travis-ci left #perl6
18:43 cognominal joined #perl6
18:48 pyrimidine joined #perl6
18:49 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 abraxxa when I remove the where clause everything is fine
18:49 abraxxa although the sqlite docs say that there is no date type sqliteman shows the columns as 'timestamp'
18:50 abraxxa DBDish::Sqlite binds them as text
18:51 dalek doc: ce8d836 | Altai-man++ | doc/Type/ (11 files):
18:51 dalek doc: The signatures was updated to use `returns` instead of `-->`.
18:51 dalek doc: See https://github.com/perl6/doc/issues/1024 for the discussion.
18:51 dalek doc: review: https://github.com/perl6/doc/commit/ce8d83649f
18:51 dalek doc: 795330b | Altai-man++ | t/return-type.t:
18:51 dalek doc: A new test for return types in the signatures.
18:51 dalek doc: It checks for the absence of '-->' in a signature in every file under Type/ directory(except for Signature-related files).
18:51 dalek doc: It fails with '-->' in the signature without 'True|False' as a value.
18:51 dalek doc: It passes with current docs.
18:51 dalek doc: review: https://github.com/perl6/doc/commit/795330b3ed
18:51 dalek doc: 138cd60 | Altai-man++ | t/return-type.t:
18:51 dalek doc: Tabs->spaces for new test.
18:51 dalek doc: review: https://github.com/perl6/doc/commit/138cd60d5e
18:51 dalek doc: 344a51e | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (12 files):
18:51 dalek doc: Merge pull request #1028 from perl6/consistent-return-types
18:51 dalek doc:
18:51 dalek doc: Consistent return types
18:51 dalek doc: review: https://github.com/perl6/doc/commit/344a51ef52
18:51 abraxxa oh FFS, I've not seen that two joins should be LEFT JOINs for hours...
18:52 timotimo oh man :(
18:52 TimToady gah, I'm trying to get rid of 'returns' in favor of -->
18:53 TimToady I'd actually like to deprecate 'returns' in 6.d
18:53 psch TimToady: was there a semantic difference between --> and 'returns'?
18:54 TimToady --> implies it's part of the contract with the caller
18:54 TimToady it also supports value returns and, someday, variable returns
18:54 TimToady 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
18:56 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.
18:56 TimToady I want to kill 'returns'
18:57 TimToady I'd much rather see --> used consistently
18:57 sena_kun TimToady, what about the other two ways?
18:57 TimToady 'of' is just the real name of 'returns', which is an alias
18:58 TimToady the prefix form is problematic too, syntactically
18:58 TimToady 'my 42 sub foo' is never gonna parse right
18:58 psch right, it still has the 'types only' thing going
18:59 psch hm, variable returns actually sound fun
18:59 sena_kun That is the different reasoning then, yes.
19:00 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.
19:00 sena_kun Will it be okay then?
19:00 mr_ron joined #perl6
19:00 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
19:01 psch and since it probably would get deprecated first...
19:01 sena_kun s/need/should/
19:01 AlexDaniel there was also a complaint that the signatures in the docs look too noisy
19:01 AlexDaniel arguably, “returns” makes them more readable, even though it sucks according to what TimToady says
19:01 psch i'm sorry, that seems kind of a weird complaint
19:01 psch i mean, if they're too noisy in the docs they're surely too noisy in code as well
19:03 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 AlexDaniel I'm not against changing everything to --> though, that works for me
19:04 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 ...
19:04 * BenGoldberg thinks that sounds very useful.
19:05 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'
19:05 BenGoldberg Even if they aren't used much, the source code of that module would be great for newcomers to the language to read.
19:06 AlexDaniel psch: I don't think we have “of” somewhere in the docs
19:06 mr_ron Whole and natural might actually be used.
19:06 psch mr_ron: aren't those the same?
19:06 AlexDaniel the choice right now is basically between --> and returns
19:07 mr_ron psch: Think 0 is whole but not natural but not an area of strength.  https://en.wikipedia.org/wiki/Lis​t_of_types_of_numbers#Main_types
19:08 psch mr_ron: ah, yes, that might be the difference
19:08 psch ...it actually is, according to wikipedia
19:08 psch mr_ron++
19:08 * AlexDaniel likes the fact that people start to talk more and more about 6.d
19:09 AlexDaniel sena_kun: okay then
19:09 AlexDaniel sena_kun: want to wait for more comments or should I just revert right now?
19:09 sena_kun Is 6.d a next/planned spec for the language?
19:10 psch m: say $*PERL.version
19:10 camelia rakudo-moar 39261e: OUTPUT«v6.c␤»
19:10 AlexDaniel yeah, with no estimate for the release date
19:10 psch well, nominally the estimate is next oktober isn't it
19:10 TimToady for multis I would suggest lining up the -->, and in general an extra space or newline before a --> will help readability
19:10 AlexDaniel psch: who said so?
19:10 CIAvash joined #perl6
19:10 AlexDaniel TimToady: that's an interesting idea
19:11 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:12 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
19:12 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.
19:12 TimToady they're just names
19:12 TimToady alphabetical order is a sufficient constraint already
19:12 psch AlexDaniel: okay.  i am now explicitly stating that was supposed a joke. it was a joke.
19:12 psch +to be
19:13 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? ;)
19:13 BenGoldberg Since perl6 is every unicode-y, I hope our future numeric subsets module includes aliases like ℕ for natual numbers, and ℤ for integers, etc. :)
19:13 AlexDaniel OH
19:14 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!
19:14 dalek doc/revert-1028-consistent-return-types: 1b33679 | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (12 files):
19:14 dalek doc/revert-1028-consistent-return-types: Revert "Consistent return types"
19:14 dalek doc/revert-1028-consistent-return-types: review: https://github.com/perl6/doc/commit/1b33679870
19:15 dalek doc: d98ea87 | (Tom Browder)++ | doc/Type/Hash.pod6:
19:15 dalek doc: shoe use of empty angle brackets
19:15 synopsebot6 Link: http://doc.perl6.org/type/Hash
19:15 dalek doc: review: https://github.com/perl6/doc/commit/d98ea87761
19:15 BenGoldberg m: constant Foo = 3 is export;
19:15 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…»
19:15 BenGoldberg m: constant Foo is export = 3;
19:15 camelia rakudo-moar 39261e: ( no output )
19:16 AlexDaniel wtf did github just do…
19:16 AlexDaniel that's not exactly what I've meant :)
19:17 lucs Why is the '-->' inside the parens? Is it part of the signature?
19:17 mefzz joined #perl6
19:17 TimToady yes, it's part of the caller's contract with the function
19:17 lucs Ah, okay, thanks.
19:18 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:19 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?
19:19 AlexDaniel sena_kun: will we use them for 6.d? Even if not, why not keep it version-agnostic?
19:20 sena_kun AlexDaniel, good point.
19:20 cognominal joined #perl6
19:20 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
19:20 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
19:21 TimToady so I didn't push it
19:21 psch BenGoldberg: i think ++geekosaur is working on that
19:21 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 #perl6
19:22 TimToady *y'all've
19:22 BenGoldberg :)
19:22 mscha m: sub foo(Int(Cool) $f) { say $f.WHAT; }; foo "42"; # This is cool (and seems to be undocumented), but ...
19:22 camelia rakudo-moar 39261e: OUTPUT«(Int)␤»
19:22 mscha my Int(Cool) $x; $x = "42"; # ... why can't you do this?
19:22 mscha m: my Int(Cool) $x; $x = "42"; # ... why can't you do this?
19:22 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␤»
19:23 TimToady it's just NYI
19:23 AlexDaniel then it should say so
19:23 * psch would've thought the error gives a good reason, actually
19:23 AlexDaniel mscha: therefore, submit a NYI ticket
19:23 psch mind, i'm not saying that coercions cannot be sufficiently type like, but then what AlexDaniel says
19:23 mscha OK, will do, thanks.
19:24 mr_ron Add to perl6 most wanted?
19:24 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".
19:24 BenGoldberg If the error message specifically said, "NYI: Coercion Int(Cool) is ..." then it would be less confusing :)
19:24 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
19:24 babydrop mr_ron: well, there's Subset::Common, perhaps the author will take a PR: http://modules.perl6.org/dist/Subsets::Common
19:24 ChoHag joined #perl6
19:25 TimToady we can't, as of yet, express the actual type of a normal hash
19:25 TimToady m: my %hash{Str()}
19:25 camelia rakudo-moar 39261e: ( no output )
19:25 TimToady well, maybe we can now
19:25 TimToady m: my %hash{Str()}; %hash{42} = 43; dd %hash
19:25 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␤␤»
19:25 babydrop m: my %hash{Str()}; %hash{42} = 42
19:25 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␤␤»
19:26 babydrop heh
19:26 psch m: my %hash{Str(Cool)}; %hash{42} = 42
19:26 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␤␤»
19:26 TimToady yeah, that's also NYI, with a run-time failure mode
19:26 BenGoldberg And a very strange error message ;)
19:27 sena_kun &afk
19:27 BenGoldberg m: my %hash{*.Str}; %hash{42} = 42;
19:27 camelia rakudo-moar 39261e: ( no output )
19:27 BenGoldberg m: my %hash{*.Str}; %hash{42} = 42; dd %hash;
19:27 camelia rakudo-moar 39261e: OUTPUT«Hash[Any] %hash = (my Any % = "42" => 42)␤»
19:27 babydrop m: my %hash{Str(Cool)}; dd %hash
19:27 camelia rakudo-moar 39261e: OUTPUT«Hash[Any,Str(Cool)] %hash = (my Any %{Str(Cool)} = )␤»
19:27 BenGoldberg m: my %hash{*.Int}; %hash{"42"} = "woot"; dd %hash;
19:27 camelia rakudo-moar 39261e: OUTPUT«Hash[Any] %hash = (my Any % = "42" => "woot")␤»
19:28 BenGoldberg NYI, with no runtime error!
19:29 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.
19:29 dalek doc: 7af1156 | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (12 files):
19:29 dalek doc: Revert "Merge pull request #1028 from perl6/consistent-return-types"
19:29 dalek doc:
19:29 dalek doc: Basically it boils down to this:
19:29 dalek doc:
19:29 dalek doc: <TimToady> I want to kill 'returns'
19:29 dalek doc:
19:29 dalek doc: See IRC discussion: https://irclog.perlgeek.de/​perl6/2016-12-03#i_13674579
19:29 dalek doc: review: https://github.com/perl6/doc/commit/7af115680e
19:29 girafe joined #perl6
19:30 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.
19:31 TimToady well, nobody ever specced that, afaicr
19:31 BenGoldberg Ok.
19:31 BenGoldberg Is there an alternative way of doing that?
19:31 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" ~_~
19:33 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
19:33 TimToady it's just a method name that is late bound, and happens to do a coercion
19:34 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 setty1 joined #perl6
19:34 travis-ci joined #perl6
19:34 travis-ci Doc build passed. Aleks-Daniel Jakimenko-Aleksejev 'Revert "Consistent return types"'
19:34 travis-ci https://travis-ci.org/perl6/doc/builds/181000480 https://github.com/perl6/doc/commit/1b336798707d
19:34 travis-ci left #perl6
19:36 AlexDaniel oh shit, people are still discussing an alternate logo
19:37 mefzz hi, I installed Task::Star, but I don't see ufo when I run it. using panda.
19:37 cognominal joined #perl6
19:37 Cet joined #perl6
19:37 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:38 CIAvash joined #perl6
19:45 cognominal joined #perl6
19:54 abraxxa what's wrong with this syntax? sprintf('%4d%2d', .year, .month given $d-start)
19:54 abraxxa https://docs.perl6.org/type/Date shows such an example
19:54 timotimo given is statement-postfix
19:54 mr_ron left #perl6
19:55 timotimo but in that example it goes into an argument list
19:55 timotimo that's not allowed
19:55 mscha m: sprintf('%4d%2d', .year, .month) given Date.today;
19:55 camelia rakudo-moar 39261e: ( no output )
19:55 mscha m: printf('%4d%2d', .year, .month) given Date.today;
19:55 camelia rakudo-moar 39261e: OUTPUT«201612»
19:55 timotimo please remove that example from the docs :)
19:55 lukaramu joined #perl6
19:55 babydrop abraxxa: move given stuff outside the sprintf
19:55 babydrop oh
19:55 babydrop Just so you done it :)
19:56 abraxxa the full code is
19:56 babydrop *saw
19:56 abraxxa my $filename = join( '_',
19:56 abraxxa sprintf('%4d%2d', .year, .month) given $d-start,
19:56 abraxxa $cost-center, $activity-type, $employee-id )
19:56 abraxxa ~ '.txt';
19:56 abraxxa Unable to parse expression in argument list; couldn't find final ')'
19:56 babydrop abraxxa: even I don't know what you meant there, so I'm not surprise the compiler doesn't know either :)
19:57 babydrop abraxxa: need parens around sprintf and its given
19:57 abraxxa yes, just tried that and it works, thanks
19:58 lucs m: print join( '_', (sprintf('%4d%2d', .year, .month) given Date.today), "moo")
19:58 camelia rakudo-moar 39261e: OUTPUT«201612_moo»
19:59 lucs Right
19:59 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 #perl6
20:10 Tom__ joined #perl6
20:19 setty1 joined #perl6
20:24 abraxxa what does this error message mean? Too many positionals passed; expected 1 argument but got 3
20:24 abraxxa the line number points to this code:
20:24 abraxxa $fh-out.say(join( "\t",
20:24 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!
20:24 abraxxa followed by a number of things which should be joined
20:25 babydrop abraxxa: there's no .say on $fh-out
20:25 psch m: my @a = [[1,2],[3,4]]; say @a[1;1]
20:25 camelia rakudo-moar 39261e: OUTPUT«4␤»
20:25 psch hahainternet: ^^^ like that?
20:25 abraxxa babydrop: https://docs.perl6.org/type/IO​$COLON$COLONHandle#method_say
20:25 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 #perl6
20:26 babydrop m: $*OUT.say: "meow"
20:26 camelia rakudo-moar 39261e: OUTPUT«meow␤»
20:26 babydrop abraxxa: OK, never mind.
20:26 timotimo hahainternet: you're supposed to be able to use || on it, yeah
20:26 hahainternet psch: yeah like that
20:27 hahainternet psch: the problem is, i have an array with (1,1) in it
20:27 hahainternet and || doesn't seem to work
20:28 psch i don't know of this || you're speaking of
20:28 psch i know infix:<||>
20:29 psch m: my @a = [[1,2],[3,4]]; $_ = [1, 1]; say @a.AT-POS(|$_)
20:29 camelia rakudo-moar 39261e: OUTPUT«4␤»
20:29 psch that works, if you're not scared of internals :P
20:31 hahainternet psch: yeah that does, a little ugly like :D
20:34 psch so anyway, we're getting a prefix-ish || for multidim array slices?
20:34 psch timotimo: ^^^?
20:35 psch or, well, not really slices i suppose..?  i mean, maybe if the thing that gets ||'d has a Range somewhere in its elements...
20:38 abraxxa migrated my Perl 5 app to export Hamster data to a SAP import compatible format to Perl 6 ;)
20:39 abraxxa 83 lines and two modules (File::HomeDir and DBIish)
20:39 abraxxa 80 lines of code
20:39 abraxxa 20 alone are the sql statement
20:39 babydrop abraxxa: so what was the issue with $fh-out..say?
20:40 abraxxa the join included a ternary op
20:40 abraxxa i had to put it in braces which wasn't required in p5
20:40 abraxxa (defined $tag && $tag eq 'bereitschaft') ?? '0804' !! '0800',
20:40 babydrop :S
20:41 psch m: say &defined
20:41 camelia rakudo-moar 39261e: OUTPUT«Sub+{<anon|52910080>}.new␤»
20:41 psch m: say Any eq 'foo'
20:41 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␤»
20:41 psch m: say quietly Any eq 'foo'
20:41 camelia rakudo-moar 39261e: OUTPUT«False␤»
20:41 moritz I'm preetty sure && has a tighter precedence than ?? !!
20:41 babydrop Ah, right, defined gobbled the ternary
20:42 moritz though defined is a sub, not a prefix op
20:42 moritz righ
20:42 moritz t
20:42 moritz abraxxa: defined($tag) && $tag eq '...' ?? ... !!;
20:42 moritz or $tag.defined && ...
20:42 babydrop $tag.defined ....
20:42 abraxxa moritz: https://docs.perl6.org/language/5to6-nutshell uses both defined and $var.defined
20:42 psch m: say quietly Any eq 'foo' ?? "bar" !! "baz"
20:42 camelia rakudo-moar 39261e: OUTPUT«baz␤»
20:43 babydrop $tag && ...
20:43 psch ^^^ probably what i'd do
20:43 babydrop m: say Str eq "foo"
20:43 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␤»
20:44 moritz abraxxa: yes
20:46 abraxxa moritz: so are braces after defined required?
20:46 telex joined #perl6
20:47 AlexDaniel joined #perl6
20:47 babydrop m: sub (+𝑒){say "meow"}(42)
20:47 camelia rakudo-moar 39261e: OUTPUT«meow␤»
20:47 babydrop dafuq
20:47 AlexDaniel /o\
20:48 psch abraxxa: no, but precedence helps the parser figure out where the arguments stop
20:48 psch m: say defined "foo"
20:48 camelia rakudo-moar 39261e: OUTPUT«True␤»
20:48 psch m: say defined "foo", 1
20:48 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␤»
20:48 psch m: say defined("foo"), 1
20:48 camelia rakudo-moar 39261e: OUTPUT«True1␤»
20:48 psch abraxxa: ^^^ like that
20:48 psch oh
20:48 psch s/precedence/parens/
20:49 abraxxa i see
20:49 abraxxa so the Perl 5 parser is smarter in figuring it out? :P
20:49 psch no, the Perl 5 parser just has completely different rules
20:49 psch i mean, sure, maybe it's also smarter in a few things because of lots more work behind it
20:49 babydrop abraxxa: yes, if you tell it your sub just takes one arg, it will give it one. Perl 6 doesn't do that.
20:50 AlexDaniel babydrop: that's an interesting finding :)
20:50 sena_kun joined #perl6
20:50 lizmat joined #perl6
20:50 psch FSDO "smarter" there i'd say vOv
20:50 AlexDaniel babydrop: it is parsed like +@a, right?
20:50 babydrop Ohhh
20:51 babydrop haha
20:51 AlexDaniel m: sub (*𝑒){say "meow"}(42)
20:51 camelia rakudo-moar 39261e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub (*7⏏5𝑒){say "meow"}(42)␤»
20:51 babydrop m: sub (+𝑒){dd 𝑒}(42)
20:51 camelia rakudo-moar 39261e: OUTPUT«(42,)␤»
20:51 babydrop yup
20:51 AlexDaniel well…
20:51 psch that's spooky
20:52 AlexDaniel m: sub (+abc){dd abc}(42)
20:52 camelia rakudo-moar 39261e: OUTPUT«(42,)␤»
20:52 AlexDaniel m: sub (+abc){dd abc}(42, 69)
20:52 camelia rakudo-moar 39261e: OUTPUT«(42, 69)␤»
20:52 psch shouldn't that fail to parse without a \ in there..?
20:52 AlexDaniel commit: all (+abc){dd abc}(42, 69)
20:52 psch m: sub (*\a) { }(1,2,3)
20:52 camelia rakudo-moar 39261e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub (*7⏏5\a) { }(1,2,3)␤»
20:53 committable6 AlexDaniel, https://gist.github.com/2cf0​08acefa4596179b745b2d6f1fbe6
20:53 psch ...maybe it should fail to parse in general :P
20:53 sena_kun
20:54 AlexDaniel commit: HEAD sub (+abc){dd abc}(42, 69)
20:54 committable6 AlexDaniel, ¦«HEAD»: (42, 69)
20:54 AlexDaniel commit: HEAD~200 sub (+abc){dd abc}(42, 69)
20:54 committable6 AlexDaniel, ¦«HEAD~200»: (42, 69)
20:54 AlexDaniel commit: 2016.11 sub (+abc){dd abc}(42, 69)
20:54 committable6 AlexDaniel, ¦«2016.11»: (42, 69)
20:54 AlexDaniel what did I do wrong? O_o
20:54 AlexDaniel ah
20:54 psch yes, 'sub'
20:54 AlexDaniel commit: all sub (+abc){dd abc}(42, 69)
20:55 committable6 AlexDaniel, https://gist.github.com/daf7​ec2de211ec7fd826a700cce5c4ee
20:55 moritz abraxxa: depends on the precedence of the operators involved
20:55 moritz abraxxa: &defined is just a function
20:56 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
20:56 moritz abraxxa: and like all functions, it expects a list of arguments
20:56 bisectable6 AlexDaniel, bisect log: https://gist.github.com/7469​c9371c7b28791b46490dcd6c35d6
20:56 bisectable6 AlexDaniel, (2015-09-16) https://github.com/rakudo/rakudo/commit/​1152728af8e6f45e6e4504c14495747406b6eb37
20:56 abraxxa moritz: so it's greedy and takes as much as it can?
20:56 psch AlexDaniel: yeah, that's what i suspected.  signature + always worked like that
20:57 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)
20:57 psch AlexDaniel: since its introduciton
20:57 psch -typo
20:57 AlexDaniel aaah
20:57 psch AlexDaniel: since the commit bisectable6 points at is the one that introduces it
20:57 AlexDaniel yup, I see now
20:57 psch +        %*PARAM_INFO<is_raw>       := $quant eq '\\' || ($quant eq '+' && !%*PARAM_INFO<sigil>);
20:57 psch seems strongly related
20:57 babydrop Hm, I think we ain't gonna support signs for constants in signatures. If you want a -π, define a constant and use that.
20:58 AlexDaniel … that's not cool
20:58 babydrop Or rather, the patch I'm working on now won't do that.
20:58 psch so we can have raw one-args without using 'is raw', but not raw slurpies without using 'is raw'
20:58 babydrop AlexDaniel: why?
20:58 babydrop AlexDaniel: why not do -$foo then too?
20:58 AlexDaniel babydrop: because if I can write π why can't I do -π
20:59 AlexDaniel 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
20:59 camelia rakudo-moar 39261e: OUTPUT«True␤»
20:59 babydrop In fact, --stage=parse tells me the constant and $foo parsed under the same token
20:59 abraxxa thanks guys!
20:59 babydrop AlexDaniel: we don't do "math" in signatures. And you can't do that because that minus is a prefix op
20:59 psch babydrop: your constant fold seemed to work out according to #perl6-dev..?
20:59 babydrop AlexDaniel: why not do -42+tau-pi if we're going that route?
21:00 babydrop it's just math
21:00 AlexDaniel babydrop: what I meant by that is that it is just a number
21:00 psch heh
21:00 babydrop AlexDaniel: except it isn't
21:00 babydrop It's a number with a prefix op on it
21:00 * psch .oO( sub f(--> &(await start LWP::Simple.get(...))) { ... } )
21:00 psch oh, needs invocation parens actually :P
21:01 AlexDaniel babydrop: as far as parser is conserned, yea? But as a user, I see it as just -π
21:01 AlexDaniel babydrop: just like -Inf
21:01 psch but -Inf² is still -Inf
21:01 psch so it's clearly math, and not a number
21:01 AlexDaniel babydrop: perhaps you are right, but I'm just saying that it is not cool
21:01 * psch does agree that it's LTA
21:02 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.
21:02 babydrop jnthn: and yeah, they're special cased.
21:02 AlexDaniel you mean like -1 works, -Inf works, -π doesn't? Yea, not cool!
21:03 babydrop AlexDaniel: and what about -$foo?
21:03 babydrop It's just math, eh?
21:04 AlexDaniel babydrop: I'm not sure why would I need it
21:04 jnthn Surely the special case would only extend to - before <value>...
21:04 psch well, variable return constraints are planned to be supported...
21:04 babydrop Inf is a literal. 1 is a literal. pi is a constant
21:04 psch not sure if "apply a random function to it" is categorically *not* supported
21:04 psch although i do see limits in practicality at least
21:04 psch but: torment the implementors on behalf of the users
21:05 AlexDaniel yes
21:05 babydrop jnthn: I'm extending it to <numish>
21:05 jnthn I guess that probably makes more sense given -'foo' wouldn't :)
21:05 babydrop :)
21:05 AlexDaniel by the way, I'm happy that bisectable can go as far as 2015.07
21:06 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:07 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... :)
21:10 dalek doc: a92a3f5 | Altai-man++ | doc/Language/classtut.pod6:
21:10 synopsebot6 Link: http://doc.perl6.org/language/classtut
21:10 dalek doc: Make reference to a class in the description valid
21:10 dalek doc:
21:10 dalek doc: Closes https://github.com/perl6/doc/issues/979; payerle++
21:10 dalek doc: review: https://github.com/perl6/doc/commit/a92a3f52ad
21:12 TEttinger joined #perl6
21:14 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
21:16 RabidGravy yeah, that's what I thought, any actual advantage of using it over doing the same in the code?
21:17 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
21:18 dalek doc: 2d92933 | Altai-man++ | doc/Type/IO/Path.pod6:
21:18 dalek doc: Update obsolete IO::Path names to IO::Spec
21:18 dalek doc:
21:18 dalek doc: IO::Path::Unix -> IO::Spec::Unix and so on.
21:18 dalek doc: It fixes https://github.com/perl6/doc/issues/931, i.e. 404 links.
21:18 synopsebot6 Link: http://doc.perl6.org/type/IO/Path
21:18 dalek doc: Still as Coke said https://github.com/perl6/doc/is​sues/931#issuecomment-264571843 the whole section can be revisited.
21:18 dalek doc: grizzlysmit++
21:18 dalek doc: review: https://github.com/perl6/doc/commit/2d92933d41
21:18 RabidGravy that's exactly what I'm doing right now
21:24 MasterDuke jnthn: i think the errors lizmat was having with TEST_HARNESS=6 are the same as with the whateverables
21:28 lizmat MasterDuke: fwiw, it's HARNESS_TYPE=6
21:28 lizmat but yeah, indeed :-)
21:33 MasterDuke lizmat: i've never actually used HARNESS_TYPE=6, is it any faster/slower?
21:36 xiaomiao joined #perl6
21:38 cognominal joined #perl6
21:38 lizmat no, but it's dogfooding  :-)
21:41 AlexDaniel [Coke]: I no longer see which comments are mine and which ones are not :(
21:47 lizmat MasterDuke: it's slower (at the moment :-)
22:04 timotimo i wonder how we get it fastered
22:04 timotimo the profiler isn't so happy about multi-threaded things still, so ... :\
22:08 kurahaupo__ joined #perl6
22:13 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␤␤»
22:13 kalkin- m: subset Foo of List; Foo.new(<a b c>)
22:13 camelia rakudo-moar c1a3a3: OUTPUT«You cannot create an instance of this type (Foo)␤  in block <unit> at <tmp> line 1␤␤»
22:13 kalkin- How do I do that?
22:18 babydrop kalkin-: well, first you can't instantiate a subset.
22:18 babydrop kalkin-: but what are you trying to do?
22:18 moritz kalkin-: what kind of subset do you want to create?
22:19 moritz m: subset Foo of List where { .elems == 2 }; say ('a', 'b') ~~ Foo
22:19 camelia rakudo-moar c1a3a3: OUTPUT«True␤»
22:19 moritz m: subset Foo of List where { .elems == 2 }; say ('a', 'b', 'c') ~~ Foo
22:19 camelia rakudo-moar c1a3a3: OUTPUT«False␤»
22:19 kalkin- ahh i see
22:19 kalkin- thanks will try that
22:20 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…»
22:21 BenGoldberg No anonymous subsets, eh?
22:23 babydrop BenGoldberg: ::
22:23 kalkin- left #perl6
22:23 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␤»
22:23 babydrop heh
22:23 babydrop m: my $c = subset :: of List; say ('a', 'b') ~~ $c;
22:23 camelia rakudo-moar c1a3a3: OUTPUT«True␤»
22:24 babydrop BenGoldberg: same with `does` or `is` on classes. If you omit the name, you need to add ::
22:37 rindolf joined #perl6
22:37 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__ joined #perl6
22:39 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(("" => []))…»
22:40 babydrop m: my ($a, $b) = "hello".comb; dd [ $a, $b ]
22:40 camelia rakudo-moar c1a3a3: OUTPUT«["h", "e"]␤»
22:40 mscha Yeah, but that doesn't work for more complex regexes.
22:40 babydrop m: my ($a, $b) = ("hello" ~~ /(.)(.))[0,1]; dd [ $a, $b ]
22:40 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 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)]␤»
22:41 babydrop m: my ($a, $b) = ("hello" ~~ /(.)(.)/)[0,1]».Str; dd [ $a, $b ]
22:41 camelia rakudo-moar c1a3a3: OUTPUT«["h", "e"]␤»
22:41 mscha m: my ($a, $b) = @("hello" ~~ m/(.)(.)/); say "Got '$a' and '$b'";  # success!
22:41 camelia rakudo-moar c1a3a3: OUTPUT«Got 'h' and 'e'␤»
22:41 babydrop \o/
22:43 babydrop sdfghydftygt
22:44 babydrop m: my ($a, $b) = |"hello".match(/(.)(.)/); say "Got '$a' and '$b'";
22:44 camelia rakudo-moar c1a3a3: OUTPUT«Got 'h' and 'e'␤»
22:46 cognominal joined #perl6
22:49 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){};␤»
22:49 gfldex m: constant f = -∞; sub f(--> f){};
22:49 camelia rakudo-moar c1a3a3: ( no output )
22:49 gfldex m: constant f = -∞; sub f(--> f){}; say f
22:49 camelia rakudo-moar c1a3a3: OUTPUT«-Inf␤»
22:54 lizmat joined #perl6
23:10 BenGoldberg m: constant f = -∞; sub j(--> f){}; say j
23:10 camelia rakudo-moar c1a3a3: OUTPUT«-Inf␤»
23:11 BenGoldberg m: sub j(--> 1234){}; say j
23:11 camelia rakudo-moar c1a3a3: OUTPUT«1234␤»
23:11 BenGoldberg m: sub j(--> -pi){}; say j
23:11 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␤»
23:11 BenGoldberg m: sub j(--> (-pi)){}; say j
23:11 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␤»
23:11 BenGoldberg m: say (constant :: = 42);
23:11 camelia rakudo-moar c1a3a3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing initializer on constant declaration␤at <tmp>:1␤------> 3say (constant7⏏5 :: = 42);␤»
23:12 BenGoldberg m: say (constant answer = 42);
23:12 camelia rakudo-moar c1a3a3: OUTPUT«42␤»
23:12 kurahaupo_ joined #perl6
23:15 kurahaupo joined #perl6
23:29 bisectable6 joined #perl6
23:29 evalable6 joined #perl6
23:29 committable6 joined #perl6
23:30 unicodable6 joined #perl6
23:33 evalable6 joined #perl6
23:36 unicodable6 joined #perl6
23:36 evalable6 joined #perl6
23:36 committable6 joined #perl6
23:36 benchable6 joined #perl6
23:36 bisectable6 joined #perl6
23:39 bjz_ joined #perl6
23:42 evalable6 joined #perl6
23:43 evalable6 joined #perl6
23:45 pyrimidine joined #perl6
23:48 evalable6 joined #perl6
23:50 masak BenGoldberg: not sure `constant ::` makes sense in the way `class ::` does
23:51 babydrop m: constant constant = constant constant = 42
23:51 camelia rakudo-moar 971e14: ( no output )
23:52 * geekosaur doesn't think so either, fwiw
23:54 BenGoldberg m: say constant $ = 42
23:54 camelia rakudo-moar 971e14: OUTPUT«42␤»
23:54 BenGoldberg m: constant $ = 42; say $
23:54 camelia rakudo-moar 971e14: OUTPUT«(Any)␤»
23:54 BenGoldberg m: constant $foo = 42; say $foo
23:54 camelia rakudo-moar 971e14: OUTPUT«42␤»
23:55 geekosaur $ is a bit special
23:55 BenGoldberg m: constant $^a = 42; say $foo
23:55 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␤»
23:55 BenGoldberg m: constant $^a = 42; say $^a
23:55 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␤»
23:55 BenGoldberg So are the placeholders.
23:55 zakharyas joined #perl6
23:56 MasterDuke i would say that error is LTA. what's the "mainline"?
23:57 babydrop the main... erm... line of stuff. Means it ain't inside a sub or block
23:58 babydrop m: try '$^a'.EVAL; say $!.^name
23:58 camelia rakudo-moar 971e14: OUTPUT«X::Placeholder::Mainline␤»
23:58 babydrop ...
23:59 MasterDuke ah, mainline is indexed in the docs, that's good at least

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo