Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-02-22

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 AlexDaniel joined #perl6
00:08 huf https://www.youtube.com/watch?v=Qs8KNgT-kqo
00:09 tony-o what happened to just putting large tariffs on fun things like egg toys and automatic weapons
00:10 IOninja :D
00:11 cdg joined #perl6
00:21 perlpilot joined #perl6
00:32 AlexDaniel IOninja: re ༳, if I recall correctly nobody knows if -0.5 is what this character actually means
00:33 AlexDaniel but yes, it's nice to have something that produces a non-integer negative thingy just with one char :)
00:42 IOninja I recall it made good sense why it produced -0.5
00:43 IOninja half two is 1.5, half one is 0.5, half zero is -0.5, which why I like that char :)
00:43 IOninja 'cause it includes negatives and zero :)
00:46 AlexDaniel IOninja: http://babelstone.blogspot.com.ee/2007/04/numbers-that-dont-add-up-tibetan-half.html
00:47 AlexDaniel huggable: ༳ :is: http://babelstone.blogspot.com.ee/2007/04/numbers-that-dont-add-up-tibetan-half.html
00:47 huggable AlexDaniel, Added ༳ as http://babelstone.blogspot.com.ee/2007/04/numbers-that-dont-add-up-tibetan-half.html
00:47 Woodi joined #perl6
01:01 aindilis joined #perl6
01:09 cibs joined #perl6
01:10 itcharlie joined #perl6
01:12 pyrimidine joined #perl6
01:15 SmokeMachine tony-o: isn't everything from the ecosystem in modules.zef.pm?
01:16 Actualeyes joined #perl6
01:18 astj joined #perl6
01:24 broquaint joined #perl6
01:29 SmokeMachine tony-o: my modules aren't there... :(
01:35 ZzZombo joined #perl6
01:36 ZzZombo_ joined #perl6
01:40 itaipu joined #perl6
02:05 eyck joined #perl6
02:07 LeCamarade joined #perl6
02:07 cdg joined #perl6
02:08 ZzZombo__ joined #perl6
02:08 ZzZombo__ joined #perl6
02:09 ZzZombo___ joined #perl6
02:10 ZzZombo joined #perl6
02:15 ZzZombo joined #perl6
02:16 ZzZombo joined #perl6
02:19 IOninja zzzzzz-zzzz-zzzzz-zzzzzooomboooo!
02:19 ZzZombo I luv u to
02:22 IOninja m: "\c[couple with heart: man man]".say
02:22 camelia rakudo-moar 80e0bc: OUTPUT: «👨‍❤️‍👨␤»
02:25 user__ joined #perl6
02:28 AlexDaniel renders nicely here!
02:29 itcharlie left #perl6
02:30 MasterDuke "welcome to zombo.com. the impossible is not known at zombo.com". what i think of every time i see ZzZombo's nick
02:31 ZzZombo :(
02:32 MasterDuke you don't like zombo.com?
02:32 ZzZombo Why would I?
02:36 MasterDuke i remember loving it ~15 years ago, but now my browser doesn't have the required plugin, so i have no idea if it's changed
02:43 user__ ohh i just noticed a bug source in perl6 syntax
02:46 kalkin- m: say 2 ... 6
02:46 camelia rakudo-moar 80e0bc: OUTPUT: «(2 3 4 5 6)␤»
02:46 kalkin- m: say [2 ... 6]
02:46 camelia rakudo-moar 80e0bc: OUTPUT: «[2 3 4 5 6]␤»
02:46 kalkin- m: say [2...^6]
02:46 camelia rakudo-moar 80e0bc: OUTPUT: «[2 3 4 5]␤»
02:46 kalkin- m: say [2 ... ^6]
02:46 camelia rakudo-moar 80e0bc: OUTPUT: «[2 1 0 1 2 3 4 5]␤»
02:46 kalkin- i guess it's because the actual routines are called '...^' and '...' so there is no way for compiler to figure out what the user means
02:46 kalkin- m: say [2 … ^6]
02:46 camelia rakudo-moar 80e0bc: OUTPUT: «[2 1 0 1 2 3 4 5]␤»
02:47 IOninja ? what's the bug?
02:47 IOninja Ah
02:47 kalkin- It's not a bug but a source for bugs. You can't put space between ^ and … when doing 1…^6
02:48 IOninja Yeah, 'cause Range is Cool
02:48 kalkin- I understand why it is like it is, but still can be missed easily and you are wondering what the hell is going on
02:49 IOninja m: &infix:<...>.candidates».signature.say
02:49 camelia rakudo-moar 80e0bc: OUTPUT: «((\a, Mu \b) (|lol is raw))␤»
02:49 IOninja m: &infix:<…>.candidates».signature.say
02:49 camelia rakudo-moar 80e0bc: OUTPUT: «((|c is raw))␤»
02:50 IOninja s: &SEQUENCE
02:50 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/blob/80e0bce/src/core/operators.pm#L112
02:52 IOninja pretty big routine... prolly can complain when we get a  Range `\right`
02:52 IOninja And avoid that issue
02:55 labster joined #perl6
02:55 labster joined #perl6
02:55 Undercover joined #perl6
02:56 kalkin- m: say -4 ... ^5; say [-4 ... ^5]
02:56 IOninja e: say -4 ... ^5; say [-4 ... ^5]
02:56 evalable6 IOninja, rakudo-moar 80e0bce: OUTPUT«(-4 -3 -2 -1 0 1 2 3 4)␤[-4 -3 -2 -1 0 1 2 3 4]»
02:57 IOninja Amusing :)
02:57 kalkin- say -4 ... ^5; say [-4 ... ^5]
02:57 kalkin- e: say -4 ... ^5; say [2 ... ^5]
02:57 evalable6 kalkin-, rakudo-moar 80e0bce: OUTPUT«(-4 -3 -2 -1 0 1 2 3 4)␤[2 1 0 1 2 3 4]»
02:57 kalkin- e: say 2 ... ^5; say [2 ... ^5]
02:57 evalable6 kalkin-, rakudo-moar 80e0bce: OUTPUT«(2 1 0 1 2 3 4)␤[2 1 0 1 2 3 4]»
02:58 kalkin- this is a weird corner case? Do you guys see this?
02:58 IOninja What's the corner? I don't see it.
02:58 Juerd joined #perl6
02:58 SmokeMachine m: Channel.new.emit: 42
02:58 evalable6 SmokeMachine, rakudo-moar 80e0bce: OUTPUT«(exit code 1) Too many positionals passed; expected 1 argument but got 2␤  in block <unit> at /tmp/yMa8q0tENU line 1␤»
02:58 IOninja The first case just ends up producing "right" result because the flattened range is part of it.
02:58 SmokeMachine whats wrong?
02:58 IOninja the ones' with negatives
02:59 IOninja SmokeMachine: .send
02:59 kalkin- yes negative number handling is different
02:59 IOninja Channel.new.emit would send a CX::Emit (?) control exception and it don't take args
02:59 IOninja kalkin-: no, it's the same, as I see it
03:00 IOninja kalkin-: walks towards zero and the rest is the range
03:00 IOninja e: say -6, -4 … ^6
03:00 SmokeMachine m: Channel.new.send: 42
03:00 evalable6 IOninja, rakudo-moar 80e0bce: OUTPUT«(-6 -4 -2 0 1 2 3 4 5)»
03:00 evalable6 SmokeMachine, rakudo-moar 80e0bce: OUTPUT«»
03:00 IOninja see?
03:00 IOninja e: say 6, 4 … ^6
03:00 kalkin- e: say 2 ... ^5; say [2 ... ^5]
03:00 evalable6 IOninja, rakudo-moar 80e0bce: OUTPUT«(6 4 2 0 1 2 3 4 5)»
03:00 evalable6 kalkin-, rakudo-moar 80e0bce: OUTPUT«(2 1 0 1 2 3 4)␤[2 1 0 1 2 3 4]»
03:00 kalkin- e: say -4 ... ^5; say [-4 ... ^5]
03:00 evalable6 kalkin-, rakudo-moar 80e0bce: OUTPUT«(-4 -3 -2 -1 0 1 2 3 4)␤[-4 -3 -2 -1 0 1 2 3 4]»
03:00 SmokeMachine IOninja: thanks!
03:01 IOninja m: supply { CONTROL { default { .^name.say } }; emit 42 }
03:01 evalable6 IOninja, rakudo-moar 80e0bce: OUTPUT«»
03:01 kalkin- the handling differs in the above to cases, or did i just miss the pattern?
03:02 IOninja kalkin-: Did you see my explanation and evals?
03:02 pierre joined #perl6
03:02 IOninja In -4 -3 -2 -1 0 1 2 3 4 =>  START[-4] -3 -2 -1 <-- these reach the goal GOAL[0] 1 2 3 4 and the GAOL and the rest of the numbers are part of the ^5 Range
03:03 IOninja In 2 1 0 1 2 3 4 =>  START[2] 1 <-- these reach the goal GOAL[0] 1 2 3 4 and the GAOL and the rest of the numbers are part of the ^5 Range
03:03 kalkin- IOninja: NOW i see, thank you for your elaborate explanation!
03:03 Bucciarati joined #perl6
03:04 IOninja :)
03:04 camelia joined #perl6
03:04 IOninja e: CONTROL { default { .^name.say } }; emit 42
03:04 evalable6 IOninja, rakudo-moar 80e0bce: OUTPUT«CX::Emit»
03:04 IOninja yup, it's CX::Emit
03:05 cyphase joined #perl6
03:05 IOninja e: CONTROL { default { .^name.say } }; Channel.new.emit
03:05 evalable6 IOninja, rakudo-moar 80e0bce: OUTPUT«CX::Emit»
03:05 IOninja :)
03:05 * IOninja & # bed
03:08 * AlexDaniel throws some meat at evalable6
03:08 AlexDaniel good bot
03:10 AlexDaniel and yes, m: works too
03:12 Sgeo joined #perl6
03:13 cale2 joined #perl6
03:13 ugexe joined #perl6
03:15 cale2 .seen jnthn
03:15 yoleaux I saw jnthn 21 Feb 2017 14:52Z in #perl6: <jnthn> Basiaclly, (<transform> if <condition> for <list>)
03:16 agentzh joined #perl6
03:17 cale2 what is the perl6 version of `$promise.then(&function);`
03:18 cale2 I guess it's `await` :) nevermind
03:19 IOninja $promise.then: {function}
03:20 Actualeyes left #perl6
03:28 noganex joined #perl6
03:35 cyphase joined #perl6
03:36 ZzZombo The "array doesn't allow assoc. indexing" happens when I try to
03:36 ZzZombo say $_<key-value>,$_<section>
03:36 ZzZombo where $_ comes from
03:36 ZzZombo for $/.list -> $_ in a grammar action.
03:36 ZzZombo https://gist.github.com/ZzZombo/5caa51f9b238462d628a5b556920a0d8
03:36 ZzZombo timotimo, it's what you told me to do :(
03:36 ZzZombo can I blame you for that one?
03:37 xtreak joined #perl6
03:38 kyan joined #perl6
03:38 Khisanth joined #perl6
03:54 wamba1 joined #perl6
04:23 LeCamarade join #xcp
04:23 BenGoldberg /
04:23 * LeCamarade … ooops.
04:24 BenGoldberg :)
04:29 pyrimidine joined #perl6
04:30 retupmoca joined #perl6
04:31 cibs joined #perl6
04:32 llfourn joined #perl6
04:56 Cabanoss- joined #perl6
04:59 labster joined #perl6
05:00 Actualeyes joined #perl6
05:00 gdonald joined #perl6
05:03 xtreak joined #perl6
05:03 CIAvash joined #perl6
05:14 eroux joined #perl6
05:17 pierre joined #perl6
05:20 Geth ¦ ecosystem: 8d54203e5b | (Andrew Egeler)++ | META.list
05:20 Geth ¦ ecosystem: Add JSON::JWT
05:20 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/8d54203e5b
05:21 retupmoca joined #perl6
05:25 pyrimidine joined #perl6
05:30 ZzZombo is it possible to parse directives like #include so it would be first go through a rule such as
05:30 ZzZombo # \w+
05:30 ZzZombo and only then a proto regex would branch to one of implemented directives?
05:31 telex joined #perl6
05:34 eady joined #perl6
05:43 curan joined #perl6
05:55 kyan joined #perl6
05:59 Tonik joined #perl6
06:00 rurban joined #perl6
06:04 labster joined #perl6
06:11 pierre joined #perl6
06:16 petercommand joined #perl6
06:20 abraxxa joined #perl6
06:26 agentzh joined #perl6
06:26 pierre_ joined #perl6
06:27 pyrimidine joined #perl6
06:31 wamba1 joined #perl6
06:38 dakkar joined #perl6
06:40 ZzZombo joined #perl6
06:40 ZzZombo joined #perl6
06:44 faraco joined #perl6
06:44 faraco m: sub f(&g:($)) {
06:44 camelia rakudo-moar 80e0bc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub f(&g:($)) {7⏏5<EOL>␤»
06:44 faraco g(2)
06:44 faraco }
06:45 faraco m: sub f(&g:($)) { g(2) }
06:45 camelia rakudo-moar 80e0bc: ( no output )
06:46 faraco m: sub f(&g:($)) { g (2)}; f(-> $n { say "Hi {$n}" })
06:46 camelia rakudo-moar 80e0bc: OUTPUT: «Hi 2␤»
06:47 faraco cool..the brackets looks like #{var} in ruby
06:48 faraco but why its matter if you can just interpolate with barebone $var in strings?
06:48 RabidGravy joined #perl6
06:49 faraco is there any other use case that I did not yet found?
06:51 mr_ron joined #perl6
06:51 TimToady "Hi {$n + 1}"
06:52 faraco TimToady: Oh..I see thank you ^^
06:53 ufobat_ joined #perl6
07:00 abraxxa joined #perl6
07:04 movl joined #perl6
07:10 andrzejku hello perl6!:)
07:11 faraco hi
07:11 Sgeo joined #perl6
07:12 xtreak joined #perl6
07:15 darutoko joined #perl6
07:16 abraxxa hi
07:20 mr-foobar joined #perl6
07:22 rurban joined #perl6
07:25 gfldex m: say Q:c⟨$a {1+2} $b⟩
07:25 camelia rakudo-moar 80e0bc: OUTPUT: «$a 3 $b␤»
07:25 RabidGravy boom
07:25 gfldex faraco: ^^^
07:25 mcmillhj joined #perl6
07:26 faraco yay...what is Q:c though
07:26 faraco Some of Perl 6 operations looks like it uses a lot of smile yo me
07:28 moritz quoting that allows code block interpolation
07:29 faraco oh
07:30 faraco m: my @tank = Q{hermit fish crab}
07:30 camelia rakudo-moar 80e0bc: ( no output )
07:30 gfldex Q is the general quote form from which all other quotes are derived
07:30 gfldex https://docs.perl6.org/language/quoting
07:30 jast that page doesn't mention :c, does it?
07:30 gfldex it does not
07:34 wamba1 joined #perl6
07:38 mroy joined #perl6
07:38 gfldex m: dd Q:p⟨/dev/null⟩
07:38 camelia rakudo-moar 80e0bc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unrecognized adverb: :p␤at <tmp>:1␤------> 3dd Q:p7⏏5⟨/dev/null⟩␤»
07:38 faraco m: my @tank = Q{flamingo water tree}; say " Hi {@tank[0]} ";
07:38 camelia rakudo-moar 80e0bc: OUTPUT: « Hi flamingo water tree ␤»
07:40 gfldex m: dd Q:regex⟨.*⟩
07:40 camelia rakudo-moar 80e0bc: OUTPUT: «===SORRY!===␤Cannot look up attributes in a Perl6::RegexGrammar type object␤»
07:41 Geth ¦ doc: fb0bea5fde | (Wenzel P. P. Peppmeyer)++ | doc/Language/quoting.pod6
07:41 Geth ¦ doc: add Q adverb table
07:41 Geth ¦ doc: review: https://github.com/perl6/doc/commit/fb0bea5fde
07:43 CIAvash gfldex++
07:58 faraco m: say "dog".split.?; say "dog".flip.?
07:58 camelia rakudo-moar 80e0bc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix call␤at <tmp>:1␤------> 3say "dog".split.?7⏏5; say "dog".flip.?␤»
08:00 faraco m: say "dog".?split; say "dog".?flip
08:00 camelia rakudo-moar 80e0bc: OUTPUT: «Cannot resolve caller split(Str: ); none of these signatures match:␤    (Str:D $: Regex:D $pat, $limit is copy = Inf;; :$v is copy, :$k, :$kv, :$p, :$skip-empty, *%_)␤    (Str:D $: Cool $match;; :$v is copy, :$k, :$kv, :$p, :$skip-empty, *%_)␤    (…»
08:01 faraco m: say "dog".?flip
08:01 camelia rakudo-moar 80e0bc: OUTPUT: «god␤»
08:03 faraco so..the ? method..just return Empty object if the invocant methods not exist..
08:03 RabidGravy it's not a method
08:03 gfldex it returns Nil
08:03 lizmat m: dd "foo".?bar
08:03 camelia rakudo-moar 80e0bc: OUTPUT: «Nil␤»
08:05 faraco gfldex: I misread them, heh.
08:06 RabidGravy though I coulld see some virtue in it working in the can't find a matching multi candidate case
08:08 gfldex I believe I found a usecase for the .? operator exactly once in the last 2 years
08:10 RabidGravy I think I have used it in a module, it's difficult to search for :)
08:11 faraco m: dd "747484".Num
08:11 camelia rakudo-moar 80e0bc: OUTPUT: «747484e0␤»
08:16 RabidGravy actually I've used it in three different modules
08:17 Resol joined #perl6
08:18 agentzh joined #perl6
08:19 labster joined #perl6
08:22 pyrimidine joined #perl6
08:26 rindolf joined #perl6
08:28 pyrimidi_ joined #perl6
08:33 pierre_ joined #perl6
08:40 zakharyas joined #perl6
08:47 mcmillhj joined #perl6
08:51 samcv use nqp; my int $BITS := nqp::iseq_i(0x1ffffffff,8589934591) ?? 64 !! 32; say $BITS
08:51 samcv m: use nqp; my int $BITS := nqp::iseq_i(0x1ffffffff,8589934591) ?? 64 !! 32; say $BITS
08:51 camelia rakudo-moar 80e0bc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot bind to natively typed variable '$BITS'; use assignment instead␤at <tmp>:1␤------> 3eq_i(0x1ffffffff,8589934591) ?? 64 !! 327⏏5; say $BITS␤»
08:51 samcv m: use nqp; my int $BITS = nqp::iseq_i(0x1ffffffff,8589934591) ?? 64 !! 32; say $BITS
08:51 camelia rakudo-moar 80e0bc: OUTPUT: «64␤»
08:51 samcv j: use nqp; my int $BITS = nqp::iseq_i(0x1ffffffff,8589934591) ?? 64 !! 32; say $BITS
08:51 camelia rakudo-jvm fb4f16: OUTPUT: «64␤»
08:55 pyrimidine joined #perl6
08:58 wamba1 joined #perl6
09:03 gdonald joined #perl6
09:03 mcmillhj joined #perl6
09:04 jonas1 joined #perl6
09:17 Actualeyes left #perl6
09:19 mcmillhj joined #perl6
09:19 cpage_ joined #perl6
09:31 xtreak joined #perl6
09:34 rurban joined #perl6
09:35 RabidGravy joined #perl6
09:35 mcmillhj joined #perl6
09:36 Geth ¦ doc: 07af2a607f | (Wenzel P. P. Peppmeyer)++ | doc/Language/quoting.pod6
09:36 Geth ¦ doc: fix table layout
09:36 Geth ¦ doc: review: https://github.com/perl6/doc/commit/07af2a607f
09:36 lukaramu joined #perl6
09:36 RabidGravy Not sure why I'm on "virginmediabusiness" now
09:36 cibs joined #perl6
09:37 RabidGravy I guess that's how the work VPN enters the internet
09:47 xtreak joined #perl6
09:47 stmuk joined #perl6
09:48 gfldex RabidGravy: it's actually quite easy to search for: `find -iname '*.p6' -or -name '*.pm6' -or -name '*.pm' | xargs grep '\.?'`
09:48 gfldex seams to be quite popular with exceptions and nativacall
09:53 mr_ron joined #perl6
10:00 RabidGravy yeah I always forget what type of regular expressions the grep that I find myself using at any time might support
10:09 andrzejku yesterday my friend asked me if I join to Perlers witnesses
10:10 pierre_ joined #perl6
10:17 DrForr Never heard of 'em.
10:24 lucs Could 'witnesses' be an English to Polish to English version of 'mongers'?
10:25 agentzh joined #perl6
10:25 lucs s/Polish/not quite sure what/
10:25 rurban joined #perl6
10:25 pyrimidine joined #perl6
10:29 stmuk_ joined #perl6
10:37 itaipu joined #perl6
10:40 Wanderer68 joined #perl6
10:41 cibs joined #perl6
10:42 andrzeju_ joined #perl6
10:42 robertle joined #perl6
10:44 rurban joined #perl6
10:45 tadzik I think it's a joke about Jehovah's Witnesses
10:45 gfldex well, we do have a guru
10:46 DrForr It's certainly a reference. But we're not going to find out for a little while.
10:56 rurban joined #perl6
11:03 cibs joined #perl6
11:05 john51 joined #perl6
11:13 rurban joined #perl6
11:18 stmuk joined #perl6
11:21 Geth ¦ doc: f0ed86afd0 | (Tom Browder)++ | doc/Type/Proc.pod6
11:21 Geth ¦ doc: it's not a slurpy arg
11:21 Geth ¦ doc: review: https://github.com/perl6/doc/commit/f0ed86afd0
11:22 stmuk_ joined #perl6
11:28 pyrimidine joined #perl6
11:30 stmuk joined #perl6
11:30 CIAvash Isn't that commit wrong? ↑
11:31 bjz joined #perl6
11:33 agentzh joined #perl6
11:34 go|dfish joined #perl6
11:35 stmuk_ joined #perl6
11:36 tbrowder why, please, i'm just tidying here.  i think a slurpy arg must be the last is a sig, and named params must follow the unamed params.
11:36 CIAvash tbrowder: https://github.com/rakudo/rakudo/blob/fb381908ed9a28f4291e3617c6fe57a2e6fe1bfd/src/core/Proc.pm#L142
11:37 Geth ¦ doc: 83bfabe929 | (Tom Browder)++ | doc/Type/Proc.pod6
11:37 Geth ¦ doc: add method run, correct shell signature
11:37 Geth ¦ doc: review: https://github.com/perl6/doc/commit/83bfabe929
11:39 CIAvash tbrowder: It doesn't have to be the last arg
11:39 Geth ¦ doc: 47618c2c7b | (Tom Browder)++ | doc/Type/Proc.pod6
11:39 Geth ¦ doc: correct run signature
11:39 Geth ¦ doc: review: https://github.com/perl6/doc/commit/47618c2c7b
11:41 tbrowder that should be correct now--wasn't aware of that part of sig. that erroneous part of docs has been there for a long, hence the attention lately when trying to get info on proper run and shell use. thaks for the look-see attention!
11:41 ZzZombo m: say 'asd' ~~ /[ || s || a || ]/
11:41 camelia rakudo-moar b2eb11: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Null regex not allowed␤at <tmp>:1␤------> 3say 'asd' ~~ /[ || s || a || 7⏏5]/␤    expecting any of:␤        infix stopper␤»
11:42 IOninja m: say 'asd' ~~ /[ || s || a ]/
11:42 camelia rakudo-moar b2eb11: OUTPUT: «「a」␤»
11:42 IOninja m: say 'asd' ~~ /[ || s || a || '']/
11:42 camelia rakudo-moar b2eb11: OUTPUT: «「a」␤»
11:42 ZzZombo m: say 'asd' ~~ /g:[ || s || a || ]/
11:42 camelia rakudo-moar b2eb11: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Null regex not allowed␤at <tmp>:1␤------> 3say 'asd' ~~ /g:[ || s || a || 7⏏5]/␤    expecting any of:␤        infix stopper␤»
11:42 ZzZombo m: say 'asd' ~~ /g:[ || s || a ]/
11:42 camelia rakudo-moar b2eb11: OUTPUT: «Nil␤»
11:43 ZzZombo wtf is null regex
11:43 IOninja one without stuff to match
11:46 IOninja I don't see any method run in Proc. It's .spawn and the sig is still wrong, missing the splat on @args
11:46 bjz joined #perl6
11:48 IOninja https://github.com/rakudo/rakudo/blob/fb381908ed9a28f4291e3617c6fe57a2e6fe1bfd/src/core/Proc.pm#L102
11:49 IOninja Well, the whole sig is wrong.
11:55 zakharyas joined #perl6
11:56 buggable joined #perl6
11:57 Geth joined #perl6
11:59 tbrowder okay, will try again. it helps to look at the code, doesn't it?
12:00 abraxxa joined #perl6
12:01 xtreak joined #perl6
12:07 RabidGravy joined #perl6
12:08 tbrowder both run and shell are shown as subs returning a proc.  only shell is shown as a method. neither should be shown grouped with the proc new method. and shell as a method has a different sig than its method version. correct so far? no wonder doc is so confusing.
12:09 ZzZombo m: say 'asd' ~~ /:g[ || s || a ]/
12:09 camelia rakudo-moar b2eb11: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unrecognized regex modifier :g␤at <tmp>:1␤------> 3say 'asd' ~~ /:7⏏5g[ || s || a ]/␤    expecting any of:␤        term␤»
12:10 ZzZombo m: say 'asd' ~~ m:g/[ || s || a ]/
12:10 camelia rakudo-moar b2eb11: OUTPUT: «(「a」 「s」)␤»
12:10 ZzZombo m: say 'asd' ~~ m:g/[ s || a ]/
12:10 camelia rakudo-moar b2eb11: OUTPUT: «(「a」 「s」)␤»
12:11 ZzZombo why  [ || s ] doesn't match an empty string?
12:13 erdic joined #perl6
12:14 Geth ¦ doc: b379c9a3f8 | (Tom Browder)++ | doc/Type/Proc.pod6
12:14 Geth ¦ doc: run is not a method
12:14 Geth ¦ doc:
12:14 Geth ¦ doc: correct signature of method shell
12:14 Geth ¦ doc: review: https://github.com/perl6/doc/commit/b379c9a3f8
12:16 araraloren joined #perl6
12:19 rurban joined #perl6
12:22 wamba1 joined #perl6
12:22 [Coke] ZzZombo: I seem to recall it's intentional so you can nicely format multi-line ||'s so the alternations all line up, but cannot find anything to back up this recollection.
12:26 bjz_ joined #perl6
12:28 Sqirrel joined #perl6
12:29 IOninja Yup, I too know it to be the case for the same reason.
12:29 pyrimidine joined #perl6
12:30 IOninja Null regex is not allowed. Quote an empty string if you meant nothing
12:30 IOninja But it being first alternative don't make much sense :)
12:31 arnsholt Or use <?>
12:39 avalenn joined #perl6
12:39 rindolf joined #perl6
12:39 peteretep joined #perl6
12:42 cibs joined #perl6
12:45 ZzZombo So grammars it seems somehow advance after each rule ignoring whitespace, example: token digit { \d+ } token string { \w+ } token TOP { <digit> <string> } would parse "123\nwobla" w/o having to put whitespace/newlines after each token, but I don't see anything saying so in the docs. Is it right? What exactly constitutes what does it skip over?
12:50 jnthn ZzZombo: token does not, rule does
12:51 jnthn ZzZombo: In rules, significant whitespace is replaced with a call to <.ws>
12:52 jnthn The default one is something like <!ww> || \s+
12:52 jnthn But you can write your own token ws to change that
12:52 araraloren m: grammar T {  token digit { \d+ }; token string { \w+ }; rule TOP { <digit> <string> }; }; say T.parse("123\nwobla");
12:52 camelia rakudo-moar b2eb11: OUTPUT: «「123␤wobla」␤ digit => 「123」␤ string => 「wobla」␤»
12:53 araraloren m: grammar T {  token digit { \d+ }; token string { \w+ }; token TOP { <digit> <string> }; }; say T.parse("123\nwobla");
12:53 camelia rakudo-moar b2eb11: OUTPUT: «Nil␤»
12:57 cibs joined #perl6
13:00 nhywyll joined #perl6
13:00 agentzh joined #perl6
13:00 bjz joined #perl6
13:03 Stown joined #perl6
13:06 RabidGravy so much for the "working from home is easy with vagrant" - it just took me four hours to get this working :-\
13:08 Woodi hallo today :)
13:09 ZzZombo token babble($l, @base_tweaks?) {
13:09 ZzZombo :my @extra_tweaks;
13:09 ZzZombo what is this? The grammar docs seem to miss much :/
13:09 Woodi jnthn: re rules: and what <!ww> is by default ? ! <ww> so ! \w ?
13:10 ZzZombo <ww> means "within word".
13:10 Woodi pmurias++
13:11 ZzZombo however, a much better question is, what <ws> is exactly? Where can I see it in the source form?
13:11 araraloren ZzZombo, you can refer this https://github.com/ohmycloud/rakudo-and-nqp-internals-course-zh
13:12 ZzZombo ugh, I-I am unable to read... that?
13:12 araraloren ...why ?
13:12 jnthn Woodi: Not between two \w chars
13:12 araraloren <ws> is white space , i think .
13:12 arnsholt <ws> is whitespace
13:13 Woodi pmurias: I found on Wiki link to paper that says CPS is bad and propose to replace it with something simpler: https://users.soe.ucsc.edu/~cormac/papers/pldi93.pdf
13:13 Woodi jnthn: that a bit madness ;)
13:14 Woodi ...from baby user perspective :)
13:14 jnthn Woodi: It "does what you mean"
13:14 mr_ron joined #perl6
13:14 jnthn $a+$b # !ww is true between a and + so don't need whitespace there
13:15 araraloren The dot after **<** means non-captured, such as <.ws>
13:15 cale2 joined #perl6
13:15 cale2 Is it considered a good practice to not even have getters on objects? Is that why the P6 default is to make even attributes private?
13:15 Woodi jnthn: that explains it to ma A->B->C brain :) thanx
13:16 Woodi *my
13:16 ZzZombo can you read this: "Тухайн мэдээлэлые өөршэлхэ, баяжуулха боломжо хүн бүридэ нээлтэтэй байдаг.", araraloren?
13:16 Geth ¦ doc: 0c421ace11 | (Tom Browder)++ | doc/Type/IO.pod6
13:16 Geth ¦ doc: neaten comments
13:16 Geth ¦ doc: review: https://github.com/perl6/doc/commit/0c421ace11
13:16 Woodi ZzZombo: no, but I see symbols :)
13:17 ZzZombo arnsholt: I know that, but I want to see what it looks like exactly.
13:17 ZzZombo see, same here, it's gibberish for me.
13:18 [Coke] https://github.com/perl6/nqp/blob/master/src/QRegex/P6Regex/Grammar.nqp#L102
13:18 araraloren ZzZombo, my mistake, this is the EN version: https://github.com/edumentab/rakudo-and-nqp-internals-course
13:19 ZzZombo huh, it somehow looks also for Perl comments?
13:19 [Coke] that's the simple nqp version. Rakudo's is more complicated: https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L612
13:20 [Coke] but yes, <ws> is used to skip whitespace and comments.
13:20 travis-ci joined #perl6
13:20 travis-ci Doc build errored. Tom Browder 'run is not a method
13:20 travis-ci https://travis-ci.org/perl6/doc/builds/204170717 https://github.com/perl6/doc/compare/47618c2c7b17...b379c9a3f8bf
13:20 travis-ci left #perl6
13:21 ZzZombo that's certainly should be reflected in the docs, because it means nearly always, if you are not making yet another Perl parser, you should change <ws> to exclude that, at the very least.
13:21 IOninja But that's not what's available to users, eh?
13:21 IOninja We redefine <ws> in rakudo to include all sorts of stuff.
13:21 arnsholt ZzZombo: The default definition is in NQP, src/QRegex/Cursor.nqp
13:22 arnsholt That's the definition you get in a plain grammar Foo {}
13:22 IOninja m: say '#Fooo' ~~ /<ws>/
13:22 camelia rakudo-moar 91a4ac: OUTPUT: «「」␤ ws => 「」␤»
13:22 IOninja See no comments
13:23 ZzZombo what repo is src/QRegex/Cursor.nqp in?
13:23 IOninja arnsholt: and what is it? In Cursor I only see a method.
13:23 IOninja ZzZombo: perl6/nqp
13:24 arnsholt IOninja: What is what?
13:24 IOninja arnsholt: what does <ws> match in plain grammar Foo {}
13:24 araraloren ZzZombo, here https://github.com/perl6/nqp/tree/master/src/QRegex
13:24 arnsholt What it says in the code O:)
13:24 IOninja OK
13:25 arnsholt If I read it correctly, anything with the whitespace property
13:26 arnsholt (Or rather, it rejects the match if it's between two word characters and then does a scan for the next character that is *not* whitespace)
13:26 araraloren Docs said that `The default ws matches "whitespace", such a sequence of spaces (of whatever type), newlines, unspaces, or heredocs.`
13:27 arnsholt So that you'll get a zero-length match in the middle of ")a" but not in "ab"
13:27 IOninja ah
13:27 IOninja m: say "ab" ~~ /a <ws> b/
13:27 camelia rakudo-moar 91a4ac: OUTPUT: «Nil␤»
13:27 IOninja m: say "ab" ~~ /')' <ws> b/
13:27 camelia rakudo-moar 91a4ac: OUTPUT: «Nil␤»
13:28 IOninja m: say ")b" ~~ /')' <ws> b/
13:28 camelia rakudo-moar 91a4ac: OUTPUT: «「)b」␤ ws => 「」␤»
13:28 IOninja cool
13:28 arnsholt araraloren: What docs are that?
13:28 araraloren https://docs.perl6.org/language/grammars#index-entry-ws
13:29 IOninja araraloren: yeah, it's wrong.
13:29 IOninja And I bet I wrote it too...
13:29 * IOninja fixes
13:29 araraloren Oh..
13:29 timotimo ZzZombo: please note that i later corrected myself that you actually need $/[0].list instead of $/.list
13:29 IOninja Yup, t'was me
13:30 arnsholt The *Perl 6* grammar includes that stuff in its <ws>, but the default is pretty bare-bones
13:31 TimToady joined #perl6
13:31 wamba joined #perl6
13:31 pyrimidine joined #perl6
13:31 lukiramu joined #perl6
13:32 IOninja Yup. The younger and dummer IOninja wrote that I meant :)
13:32 IOninja just wanna find what nqp::const::CCLASS_WHITESPACE matches
13:33 Geth ¦ doc: 5b1788c18f | (Tom Browder)++ | doc/Type/Proc.pod6
13:33 Geth ¦ doc: tweak grammar
13:33 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5b1788c18f
13:33 timotimo can we get proper errors back for when you try to feed perl5 code to rakudo? i.e. not "Undeclared routine: use used at line 1" for "use 5.10"
13:34 IOninja .oO( sub use (|) { die "This isn't the compiler you're looking for" }
13:34 john51_ joined #perl6
13:34 IOninja )
13:35 IOninja TBH I find all these "features" we have to cater to Perl 5 converts get in the way and I rather we have fewer of them.
13:35 IOninja m: sub circumfix:<? :> ($x) {};  ?42:
13:36 camelia rakudo-moar 91a4ac: ( no output )
13:37 IOninja m: m: sub infix:<?> ($, $) {};  sub infix:<:> ($, $) {}; 42 ? 42, 5 : 5
13:37 camelia rakudo-moar 91a4ac: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of ? and : for the ternary conditional operator; in Perl 6 please use ?? and !!␤at <tmp>:1␤------> 3$, $) {};  sub infix:<:> ($, $) {}; 42 ?7⏏5 42, 5 : 5␤»
13:37 IOninja m: say
13:37 camelia rakudo-moar 91a4ac: OUTPUT: «5===SORRY!5===␤Argument to "say" seems to be malformed␤at <tmp>:1␤------> 3say7⏏5<EOL>␤Other potential difficulties:␤    Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument…»
13:37 IOninja m: :foo<STDIN>
13:37 camelia rakudo-moar 91a4ac: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of <STDIN>; in Perl 6 please use $*IN.lines (or add whitespace to suppress warning)␤at <tmp>:1␤------> 3:foo<7⏏5STDIN>␤»
13:38 IOninja I don't know Perl 5. I'm wring Perl 6. It's like... GTFO
13:38 timotimo yeah, i'm only suggesting things blow up helpfully when they'd blow up anyway otherwise
13:39 IOninja m: sub use (|) { say "test" }; use v6
13:39 camelia rakudo-moar 91a4ac: ( no output )
13:39 IOninja m: sub use (|) { say "test" }; use 6
13:39 camelia rakudo-moar 91a4ac: OUTPUT: «test␤»
13:39 IOninja heh
13:40 IOninja huh
13:41 IOninja m: use v5
13:41 camelia rakudo-moar 91a4ac: OUTPUT: «===SORRY!===␤Could not find Perl5 at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    CompUnit::Repos…»
13:41 IOninja Interesting.
13:42 IOninja Sticking a matcher for [ '5.' <[\d.]>+ ] in here maybe? https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L1594-L1620
13:43 IOninja or as another alternative in that conditional
13:47 llfourn_ joined #perl6
13:47 cale2 Found this blog post again and cleared up my question: https://6guts.wordpress.com/2016/11/25/perl-6-is-biased-towards-mutators-being-really-simple-thats-a-good-thing/
13:48 IOninja You question didn't really make sense to me. Given a choice between $!foo and $.foo, I don't see how we "
13:48 mcmillhj joined #perl6
13:48 IOninja default" to private attributes...
13:49 IOninja oh, I was meant to update the grammar doc!
13:54 telex joined #perl6
13:55 ZzZombo timotimo: can you tell me why exactly do I get there an array of matches in another array, I can't explain that myself.
13:56 moritz you always get an array of matches when you use a quantifier
13:56 moritz (foo)+ makes $0 an array
13:57 moritz (I don't know the context, just spewing general knowledge here)
13:57 arnsholt Except the ? quantifier, no?
13:57 arnsholt Or am I misremembering?
13:58 timotimo m: "hello" ~~ / (lol)? /; dd $/[0]
13:58 camelia rakudo-moar 1cafc6: OUTPUT: «Nil␤»
13:58 timotimo m: "hello" ~~ / (lo)? /; dd $/[0]
13:58 camelia rakudo-moar 1cafc6: OUTPUT: «Nil␤»
13:58 timotimo oh, right
13:58 timotimo earliest match wins
13:58 timotimo m: "hello" ~~ / .*(lo)? /; dd $/[0]
13:58 camelia rakudo-moar 1cafc6: OUTPUT: «Nil␤»
13:58 timotimo m: "hello" ~~ / hel(lo)? /; dd $/[0]
13:58 camelia rakudo-moar 1cafc6: OUTPUT: «Match.new(ast => Any, list => (), hash => Map.new(()), to => 5, orig => "hello", from => 3)␤»
13:59 araraloren m: say "aaa" ~~ /(\w)+/;
13:59 camelia rakudo-moar 1cafc6: OUTPUT: «「aaa」␤ 0 => 「a」␤ 0 => 「a」␤ 0 => 「a」␤»
13:59 Geth ¦ doc: c2060901d2 | (Zoffix Znet)++ | doc/Language/grammars.pod6
13:59 Geth ¦ doc: Correct erroneous info on default <ws> token
13:59 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c2060901d2
14:00 araraloren m: "aaa" ~~ /(\w)+/; dd $/[0]
14:00 camelia rakudo-moar 1cafc6: OUTPUT: «[Match.new(ast => Any, list => (), hash => Map.new(()), to => 1, orig => "aaa", from => 0), Match.new(ast => Any, list => (), hash => Map.new(()), to => 2, orig => "aaa", from => 1), Match.new(ast => Any, list => (), hash => Map.new(()), to => 3, orig =>…»
14:01 cale2 IOninja: I'm just speaking of the better choice when given the option between $!foo and $.foo
14:01 cale2 design-wise
14:03 moritz arnsholt: yes, ? is special
14:04 araraloren m: "aaa" ~~ /(\w)+?/; say $/[0]
14:04 camelia rakudo-moar 1cafc6: OUTPUT: «[「a」]␤»
14:05 timotimo you can always get a list there if you want by using ** 0..1
14:05 IOninja huh, I thought  ? was greedy
14:05 moritz no, the opposite
14:05 moritz well, ? is greed, +? is frugal
14:05 araraloren yeah, not greed
14:05 IOninja No, I meant ?
14:06 moritz ? it self is greedy
14:06 IOninja Also, I'm surprised Perl 5 doesn't set $1 in "hello" =~ /.(ll)?./ match  due to there being a ? wtf
14:06 IOninja m: say "hello" ~~ / (lol)? /;
14:06 camelia rakudo-moar 1cafc6: OUTPUT: «「」␤»
14:06 araraloren ? is a quantifer, hm ?
14:06 IOninja moritz: then how come there's no capture ^ there?
14:06 moritz IOninja: the "left-most match first" wins over ? being greedy
14:07 moritz it also wins over LTM, or any such rules
14:07 moritz it's really the rule with highest precedence
14:07 IOninja m: say "hello" ~~ / (lo)? /;
14:07 camelia rakudo-moar 1cafc6: OUTPUT: «「」␤»
14:07 IOninja m: say "hello" ~~ / (ll)? . /;
14:07 camelia rakudo-moar 1cafc6: OUTPUT: «「h」␤»
14:07 IOninja m: say "hello" ~~ / . (ll)? . /;
14:07 camelia rakudo-moar 1cafc6: OUTPUT: «「he」␤»
14:08 araraloren m: say "hello" ~~ m:P5/ . (ll)? . /;
14:08 camelia rakudo-moar 1cafc6: OUTPUT: «False␤»
14:08 IOninja m: say "hllo" ~~ / . (ll)? . /;
14:08 camelia rakudo-moar 1cafc6: OUTPUT: «「hllo」␤ 0 => 「ll」␤»
14:08 IOninja OK, I think I get it. Thanks.
14:08 araraloren m: say "hello" ~~ m:P5/.(ll)?./;
14:08 camelia rakudo-moar 1cafc6: OUTPUT: «「he」␤»
14:09 IOninja And I get what perl 5 does too :) Was confused
14:09 moritz the logic to retry at a different position is basically the same as adding a ^.+? <( in front of the match
14:11 ChoHag joined #perl6
14:15 yadzi joined #perl6
14:15 AlexDaniel joined #perl6
14:18 AlexDaniel \o/
14:19 IOninja |
14:19 IOninja /\
14:20 araraloren --------
14:21 IOninja 🐛🐛  🐛 🐛 🐛
14:22 AlexDaniel 👾 👾 👾
14:22 pyrimidine joined #perl6
14:22 AlexDaniel wait… wrong way :P
14:24 AlexDaniel u: ALIEN
14:24 unicodable6 AlexDaniel, U+1F47D EXTRATERRESTRIAL ALIEN [So] (👽)
14:24 unicodable6 AlexDaniel, U+1F47E ALIEN MONSTER [So] (👾)
14:25 * AlexDaniel wonders when you should use one or another…
14:26 IOninja m: "42".comb: {}
14:26 camelia rakudo-moar 1cafc6: OUTPUT: «Cannot resolve caller comb(Str: Hash); none of these signatures match:␤    (Cool $: *%_)␤    (Cool $: Regex $matcher, $limit = Inf, *%_)␤    (Cool $: Str $matcher, $limit = Inf, *%_)␤    (Str:D $: *%_)␤    (Str:D $: Int:D $size, $limit = *, *%_…»
14:26 IOninja m: "42".comb: {;}
14:26 camelia rakudo-moar 1cafc6: OUTPUT: «Cannot resolve caller comb(Str: Block); none of these signatures match:␤    (Cool $: *%_)␤    (Cool $: Regex $matcher, $limit = Inf, *%_)␤    (Cool $: Str $matcher, $limit = Inf, *%_)␤    (Str:D $: *%_)␤    (Str:D $: Int:D $size, $limit = *, *%…»
14:26 IOninja why do we have a test for this one.
14:27 IOninja Um... well, I guess infiniloop is bad.
14:27 AlexDaniel well, let's see!
14:27 AlexDaniel c: all "42".comb: {;}
14:27 pyrimidi_ joined #perl6
14:27 IOninja AlexDaniel: it's RT #66340
14:27 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=66340
14:27 committable6 AlexDaniel, https://gist.github.com/ba0e2a6035a2bed33beae0a8af796715
14:27 IOninja I'm just annoyed it's interfering with my fix :P
14:28 IOninja But then that means we got hangs in all the Cool capture forwarders...
14:28 AlexDaniel IOninja: well, welcome to the club!
14:28 IOninja m: ''.words: {;}
14:28 camelia rakudo-moar 1cafc6: OUTPUT: «Cannot resolve caller Numeric(Block: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at <tmp> line 1␤␤»
14:28 itcharlie1 joined #perl6
14:28 IOninja AlexDaniel: what sort of club?
14:28 AlexDaniel IOninja: “I fixed something, but there's a stupid test”
14:29 IOninja heh
14:29 travis-ci joined #perl6
14:29 travis-ci Doc build errored. Tom Browder 'neaten comments'
14:29 travis-ci https://travis-ci.org/perl6/doc/builds/204189050 https://github.com/perl6/doc/compare/b379c9a3f8bf...0c421ace119e
14:29 travis-ci left #perl6
14:29 sena_kun joined #perl6
14:30 IOninja hm, the only reason .lines and .words don't hang is we accept any type...
14:30 IOninja m: ''.words: |<la la la>
14:30 IOninja Aha. Well, that's a hang
14:30 IOninja m: ''.lines: |<la la la>
14:31 IOninja that too
14:31 IOninja m: ''.subst: |<la la la>
14:31 IOninja That three
14:31 camelia rakudo-moar 1cafc6: OUTPUT: «(timeout)»
14:31 camelia rakudo-moar 1cafc6: OUTPUT: «(timeout)»
14:31 camelia rakudo-moar 1cafc6: OUTPUT: «Cannot resolve caller subst(Str: Str, Str, Str); none of these signatures match:␤    (Str:D $: $matcher, $replacement, :global(:$g), :ii(:$samecase), :ss(:$samespace), :mm(:$samemark), *%options)␤  in block <unit> at <tmp> line 1␤␤»
14:32 IOninja Ahhh. I see. Duh. Don't make Cool method a proto
14:32 AlexDaniel IOninja: good that we had a test :D
14:32 IOninja hehe
14:32 IOninja I guess in the long run, yes :)
14:35 AlexDaniel huggable: TimToady
14:35 huggable AlexDaniel, nothing found
14:35 AlexDaniel huggable: TimToady :is: 👽
14:35 huggable AlexDaniel, Added TimToady as 👽
14:36 IOninja u: 👽
14:36 unicodable6 IOninja, U+1F47D EXTRATERRESTRIAL ALIEN [So] (👽)
14:36 IOninja heh, why?
14:37 AlexDaniel I just though we might want to have an entry for those who wonder who TimToady is
14:37 IOninja huggable: TimToady :is: 👦🐸
14:37 huggable IOninja, Added TimToady as 👦🐸
14:37 AlexDaniel that's not a very precise definition, I guess, but feel free to improve :)
14:39 AlexDaniel huggable: TimToady :is: 👦‍🐸
14:39 huggable AlexDaniel, Added TimToady as 👦‍🐸
14:39 IOninja hehe :) That's more accurate :)
14:42 tharkun joined #perl6
14:44 lichtkind__ joined #perl6
14:45 girafe joined #perl6
14:47 cdg joined #perl6
14:47 bwisti joined #perl6
14:56 skids joined #perl6
14:56 wamba1 joined #perl6
14:57 travis-ci joined #perl6
14:57 travis-ci Doc build passed. Tom Browder 'tweak grammar'
14:57 travis-ci https://travis-ci.org/perl6/doc/builds/204194315 https://github.com/perl6/doc/compare/0c421ace119e...5b1788c18fb2
14:57 travis-ci left #perl6
15:05 mcsnolte joined #perl6
15:05 pyrimidine joined #perl6
15:06 sena_kun [Coke], https://github.com/perl6/doc/issues/1194#issuecomment-281695160
15:16 cibs joined #perl6
15:23 cibs joined #perl6
15:23 araraloren joined #perl6
15:28 Geth ¦ doc: 5fe17c8e1d | Altai-man++ | doc/Language/grammars.pod6
15:28 Geth ¦ doc: Fix examples
15:28 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5fe17c8e1d
15:29 travis-ci joined #perl6
15:29 travis-ci Doc build passed. Zoffix Znet 'Correct erroneous info on default <ws> token'
15:29 travis-ci https://travis-ci.org/perl6/doc/builds/204203357 https://github.com/perl6/doc/compare/5b1788c18fb2...c2060901d25d
15:29 travis-ci left #perl6
15:31 Geth ¦ doc: 854dc48757 | (Zoffix Znet)++ | doc/Language/grammars.pod6
15:31 Geth ¦ doc: Fix typo
15:31 Geth ¦ doc: review: https://github.com/perl6/doc/commit/854dc48757
15:36 khw joined #perl6
15:41 mcmillhj_ joined #perl6
15:43 Actualeyes joined #perl6
15:44 Geth ¦ doc: 2a02ba23cb | (Will "Coke" Coleda)++ | xt/examples-compilation.t
15:44 Geth ¦ doc: Have walk return actual code
15:44 Geth ¦ doc: review: https://github.com/perl6/doc/commit/2a02ba23cb
15:46 mcmillhj joined #perl6
15:48 [Coke] (docs) several of the samples in doc/Type/Sub.pod6 are dying with "write string requires an object with REPR MVMOSHandle"
15:48 [Coke] sena_kun++
15:49 [Coke] sena_kun: I was trying to work around the fact that I forgot to give 'walk' a signature. perl5 thinko, maybe.
15:49 sena_kun [Coke], I think this duying is because we changed $*OUT and $*ERR to a dummy. At the end of the script even "say 'haha'" won't work and will die with this error.
15:50 IOninja that sounds like trying to call a method on a closed filehandle
15:50 IOninja and I saw IO::Handle.new used as a dummy, eh?
15:50 sena_kun IOninja, yep.
15:50 IOninja m: IO::Handle.new.lines
15:50 camelia rakudo-moar 742573: OUTPUT: «IO::Handle is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in method new at src/RESTRICTED.setting line 32␤  in block <unit> at <tmp> line 1␤␤»
15:50 IOninja s: (IO::Handle.new.lines; exit)
15:50 SourceBaby IOninja, Something's wrong: ␤ERR:
15:51 IOninja s: (IO::Handle.new.get; exit)
15:51 IOninja oops
15:51 SourceBaby IOninja, Something's wrong: ␤ERR: readline requires an object with REPR MVMOSHandle␤  in block <unit> at -e line 6␤␤
15:51 IOninja Ah, no oops but yey :)
15:51 sena_kun [Coke], I'm closing the issue?
15:51 [Coke] IOninja, sena_kun: we need to put IO::String bakc.
15:51 IOninja [Coke]: which examples, OOC?
15:51 [Coke] That class handles this case, whereas the bare IO::Handle does not
15:52 [Coke] IOninja: e.g. https://gist.github.com/coke/9f4df5c5b90b356c40cbfe3cbbe98fb6
15:53 IOninja I guess it's the `say 'start'` that does it..
15:53 Geth ¦ doc: 97f2eca0c1 | (Will "Coke" Coleda)++ | 2 files
15:53 Geth ¦ doc: Revert "remove dep on IO::String"
15:53 Geth ¦ doc:
15:53 Geth ¦ doc: This reverts commit 8f1d849c82e042cd25497a6f1b7c4d2868860e3e.
15:53 Geth ¦ doc:
15:53 Geth ¦ doc: Some of the more complex examples require this class.
15:53 Geth ¦ doc: review: https://github.com/perl6/doc/commit/97f2eca0c1
15:54 [Coke] sena_kun++ for noticing I broke everything. :)
15:55 IOninja s: (class { ::?CLASS.^add_method: $_, -> | {} for IO::Handle.^methods».name }.new.get; exit)
15:55 SourceBaby IOninja, Something's wrong: ␤ERR:
15:55 sena_kun [Coke], you did all the work that I promised(?) to do on last weekends, but ended up with no time, so my part was not so great here. :)
15:55 IOninja dunno what you're using that dummy class for, but if you just need an IO::Handle with dummy methods ^ that's one way you could do it without a dep
15:56 [Coke] I don't really have a problem with having a dep.
15:56 IOninja :)
15:58 rurban1 joined #perl6
16:00 [Coke] getting a sporadically failing example test on doc/Type/IO/Socket/INET.pod6 (chunk 1) when run under load. seems to be fine on its own.
16:00 timotimo maybe neglecting to use different ports for everything?
16:03 IOninja The first two examples on the page are meant to be run together, one after the other (first one's a server, the second one's the client for it)
16:04 [Coke] any code chunk is run as a free-standing bit of code, and isn't run so much as fake-compiled.
16:04 [Coke] (it's wrapped in an if False { } to avoid most things)
16:04 IOninja Ah
16:05 erdic joined #perl6
16:05 * [Coke] tries another 'make xtest' to see if it fails again.
16:05 [Coke] tell you what, 'make xtest' now gives a HUGE set of examples where code is printing directly to stderr or stdout instead of going through the Rakudo handles.
16:06 El_Che joined #perl6
16:06 IOninja :o
16:06 IOninja m: $*OUT.close; say "meow"
16:06 camelia rakudo-moar 742573: OUTPUT: «write string requires an object with REPR MVMOSHandle␤  in block <unit> at <tmp> line 1␤␤»
16:07 pyrimidine joined #perl6
16:07 IOninja m: BEGIN $*OUT.close, $*ERR.close; 42
16:07 camelia rakudo-moar 742573: ( no output )
16:07 IOninja m: BEGIN $*OUT.close, $*ERR.close; note "meow"
16:07 camelia rakudo-moar 742573: ( no output )
16:08 IOninja Well, I would be interesting in seeing which examples. I guess this falls under IO stuff? :)
16:08 [Coke] well, i can see output like;
16:08 [Coke] Useless use of constant integer 500000 in sink context (lines 2, 3)
16:08 [Coke] Redeclaration of symbol '$fh'
16:09 [Coke] so there's two big ones. :)
16:09 IOninja m: BEGIN $*OUT.close, $*ERR.close; my $fh; my $fh
16:09 camelia rakudo-moar 742573: ( no output )
16:09 IOninja m: my $fh; my $fh
16:09 camelia rakudo-moar 742573: OUTPUT: «Potential difficulties:␤    Redeclaration of symbol '$fh'␤    at <tmp>:1␤    ------> 3my $fh; my $fh7⏏5<EOL>␤»
16:09 IOninja Feels like it's a bug in your examples runner, at first glance.
16:10 [Coke] m: $*ERR=IO::Handle.new; my $fh; my $fh;
16:10 camelia rakudo-moar 742573: OUTPUT: «Potential difficulties:␤    Redeclaration of symbol '$fh'␤    at <tmp>:1␤    ------> 3$*ERR=IO::Handle.new; my $fh; my $fh7⏏5;␤IO::Handle is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in meth…»
16:10 [Coke] m: $*ERR=IO::Handle.new; note "eek"
16:10 camelia rakudo-moar 742573: OUTPUT: «IO::Handle is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in method new at src/RESTRICTED.setting line 32␤  in block <unit> at <tmp> line 1␤␤»
16:10 yadzi left #perl6
16:10 [Coke] note that they both complain about the class, but the first one also slips the warning out
16:12 [Coke] https://gist.github.com/coke/e9cc048b059a850a34f91314076b43ae has the full run including the code used to run passing tests; if you look for lines that aren't valid tap lines, those are the warnings that slip through.
16:12 [Coke] e.g. https://gist.github.com/coke/e9cc048b059a850a34f91314076b43ae#file-examples-compilation-out-L2014
16:14 raiph joined #perl6
16:15 IOninja [Coke]: yeah, because the warning is compile time, but you override $*ERR at runtime
16:15 IOninja m: BEGIN $*ERR=IO::Handle.new; my $fh; my $fh;
16:15 camelia rakudo-moar 742573: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤An exception occurred while evaluating a BEGIN␤at <tmp>:1␤Exception details:␤  IO::Handle is disallowed in restricted setting␤    in sub restricted at src/RESTRICTED.setting line 1␤    in method …»
16:15 IOninja s: (BEGIN $*ERR=IO::Handle.new; my $fh; my $fh; exit;)
16:15 SourceBaby IOninja, Something's wrong: ␤ERR: Potential difficulties:␤    Redeclaration of symbol '$fh'␤    at -e:6␤    ------> GIN $*ERR=IO::Handle.new; my $fh; my $fh<HERE>; exit;) )[1];␤
16:15 [Coke] ok, then:
16:15 IOninja hmmm
16:16 [Coke] https://github.com/perl6/doc/blob/master/xt/examples-compilation.t#L84
16:16 IOninja Yeah, it still complains even with BEGIN
16:16 [Coke] I'm EVAL'ing the code; the overriden has already happened before any EVAL code.
16:16 [Coke] ah. :)
16:16 [Coke] *override
16:17 [Coke] IOninja++
16:17 IOninja ?
16:17 [Coke] you verified my bug. :)
16:17 IOninja Ah :)
16:18 raiph .tell TimToady Imo it would work well if you provided a short answer to http://www.perlmonks.org/?node_id=3333;parent=1182520
16:18 yoleaux raiph: I'll pass your message to TimToady.
16:18 prlante joined #perl6
16:18 prlante I have a question!! http://stackoverflow.com/q/42391754/2774153 Can anyone help?
16:18 [Coke] doesn't have to be TimToady.
16:19 IOninja raiph: fwiw, you set the wrong link on announcement to this week's weekly. No one can comment or upvote it, 'cause it's archived.... unless you did it on purpose?
16:19 rurban joined #perl6
16:19 erdic joined #perl6
16:20 IOninja that's a pretty big range....
16:20 [Coke] prlante: you're eagerly generating that list; you probably want to lazily do it when dealing with so many elements.
16:20 IOninja but the code wants .sum
16:20 IOninja m: (1..1000000000).race.grep(* %% 5).sum.say
16:21 camelia rakudo-moar 742573: OUTPUT: «(signal XCPU)»
16:21 IOninja prlante: well, there's another way to skin this cat. Just generate a Seq of 5s
16:21 perlpilot prlante: use more math?
16:21 stmuk_ one for anyone who thinks our spokesbug isn't a nice logo
16:21 stmuk_ https://upspin.io/
16:21 IOninja m: say (5, 10 … 1000000000).sum
16:22 camelia rakudo-moar 742573: OUTPUT: «(timeout)»
16:22 [Coke] m: my $fives := (1...1000000000).lazy.grep(*%%5); say $fives[^100];
16:22 camelia rakudo-moar 742573: OUTPUT: «(5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200 205 210 215 220 225 230 235 240 245 250 255 260 265 270 275 280 285 290 295 300 305 310 315 320 325 330 335 340 3…»
16:22 IOninja stmuk_: that's just an ugly animal. Our logo is worse, design-wise
16:22 [Coke] m: my $fives := (1...1000000000).lazy.grep(*%%5); say $fives[^10];
16:22 camelia rakudo-moar 742573: OUTPUT: «(5 10 15 20 25 30 35 40 45 50)␤»
16:22 raiph I'm confused. I added a stickied (well, 'announcement') link to https://p6weekly.wordpress.com/ so it should always link to latest.
16:22 raiph IOninja: ^^
16:22 IOninja OK then
16:23 IOninja Whoever linked them in the past linked to the actual article, so you could see when the new one came out.
16:23 IOninja m: say 1000000000/5
16:23 camelia rakudo-moar 742573: OUTPUT: «200000000␤»
16:24 prlante IOninja Not working . Output is ".sum was unexpected at this time."
16:24 IOninja wat
16:24 IOninja prlante: which code did you run?
16:25 IOninja Never saw such errors...
16:26 IOninja This sounds like a job... for a 32-core VM! :)
16:26 prlante IOninja Now code is running but its already 5 mins, and still no output
16:26 [Coke] prlante: btw, %%5 is "is divisible by 5"
16:27 prlante Any use of concurrency here?
16:27 [Coke] prlante: look at my example above.
16:27 prlante I am running this: (5,10,15...1000000000).sum
16:27 [Coke] that lets you ask for results in chunks rather than trying to generate them all up front.
16:27 raiph IOninja: Sure. I've done most of them.
16:27 IOninja prlante: if that's your actual code, a math solution is more apt...
16:27 prlante In python it showed memory error and I am trying in Perl 6.
16:28 raiph IOninja: But when/if I see what happens if I don't it often ends up not being done by anyone for a week.
16:28 raiph IOninja: This way the top link is always pointing to the latest and says so.
16:28 raiph IOninja: (Fwiw I'd personally prefer to shut /r/perl6 down and focus on /r/perl.)
16:28 IOninja prlante: lemme see what happens on my 32-core box
16:29 prlante OK IOninja Thanks for your help.
16:29 IOninja raiph: heh, I'd prefer to stop pretending r/perl is for "both perls" and post Perl 6 stuff to just r/perl6
16:29 alphah Q: Is Enum type dynamic during compilation or runtime? for example can I add/delete elements to Enum after creating it?
16:29 IOninja raiph: any time I look at r/perl there's some drama post
16:30 raiph IOninja: Which is why I got /r/perl6 going again and have stuck with it
16:30 IOninja m: Bool.^methods.say
16:30 camelia rakudo-moar 742573: OUTPUT: «(<anon> <anon> Bool gist Str Numeric Int ACCEPTS pick roll perl pred succ enums Range asech perl truncate acosech sin ACCEPTS asinh floor abs asec cosec acotan ceiling acos acosec unpolar exp acotanh gist Num round DUMP asin log10 expmod msb FatRat isNaN…»
16:30 prlante raiph Lets make Perl 6 great language.
16:31 IOninja heh
16:31 prlante IOninja its 9 minutes , no output
16:32 IOninja prlante: well, in Perl 5 it too gives me out of memory :)
16:33 prlante IOninja in python3 also it gave me memory error
16:33 IOninja I think if we rotor the chunks, concurrently sum the chunks, and then sum the sums of chunks, we can get something
16:33 * IOninja tries
16:33 prlante IOninja Is there no way of solving it?
16:33 raiph prlante: Imo it already is. cf http://www.perlmonks.org/?node_id=1182509
16:33 dj_goku joined #perl6
16:33 IOninja Well, I can get up to 208GB of RAM on this box...
16:34 IOninja prlante: well, what exactly do you mean by "it"?
16:34 IOninja Finding the sum of all digits between 1 and 1000000000 that are divibislbe by 5? You can do it mathematically without reifying a gagillion elements
16:35 prlante http://www.perlmonks.org/?node_id=1182509 Yeah lets make perl 6 great.
16:35 prlante IOninja I mean solving this problem
16:36 coreutil joined #perl6
16:37 IOninja Well, I'm no mathematicial, but I'm sure the formula is easy.
16:37 prlante IOninja If you can find solution to my question will you please post it in stackoverflow. Computer is just getting heated but still no output after running " (5,10,15...1000000000).sum"
16:38 [Coke] IOninja: I think he means, pretend this isn't a trivial sum, and then how do we ||-ize it.
16:38 prlante IOninja Why the perl is throwing memory error? Does that mean I have to go to C++?
16:38 [Coke] prlante: if you really mean THIS specific problem, you're doing it the hard way.
16:38 IOninja well, rotoring is concurring is kinda useless since it's reification of the seq that's taking ages
16:38 [Coke] prlante: can you clarify?
16:38 IOninja prlante: because you're creating a ginourmous list.
16:39 IOninja m: say 1000000000/1024/1024/1024
16:39 camelia rakudo-moar 742573: OUTPUT: «0.93132257␤»
16:39 IOninja prlante: if you assume each element takes just one byte, you need almost a gig to store it, and it don't take one byte, it's probably a lot more
16:40 IOninja m: say 1000000000/5/1024/1024/1024
16:40 camelia rakudo-moar 742573: OUTPUT: «0.18626451␤»
16:40 IOninja Well, I guess smaller by 5, but still big
16:41 IOninja prlante: I don't get what your question is, so I'm unsure what answer I'd post.
16:41 timotimo m: my $a = 0; $a += $_ for 5, 10, 15 ... 1000000000; say $a
16:41 IOninja Oh, well, I see lizmat++ posted one already
16:41 IOninja timotimo: we tried that already
16:41 camelia rakudo-moar 742573: OUTPUT: «(timeout)»
16:42 IOninja reifying that seq alone takes ages
16:42 timotimo i wonder how to make it aware that it can throw the values away
16:42 IOninja Ah
16:42 IOninja In your version, it does, I think
16:43 IOninja m: say (5, 10 ... 1000)
16:43 camelia rakudo-moar 742573: OUTPUT: «(5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200 205 210 215 220 225 230 235 240 245 250 255 260 265 270 275 280 285 290 295 300 305 310 315 320 325 330 335 340 3…»
16:43 timotimo that seq will definitely give very bad gc performance
16:44 [Coke] m: my $upper = 1000000000; my $interval = 5; my $sum = (1+($upper/$interval))*($upper/$interval/2)*$interval; say $sum
16:44 camelia rakudo-moar 742573: OUTPUT: «100000000500000000␤»
16:44 [Coke] I mean, if you just want the numeric answer as fast as possible, I'm pretty sure that algorithm is slightly faster.
16:44 [Coke] (and potentially correct :)
16:44 timotimo "slightly" :)
16:44 sena_kun 4000000100000000?
16:44 IOninja m: say ((5, 10 … 100).sum, (5, 10 … 1000).sum, (5, 10 … 10000).sum … *)[^10]
16:44 camelia rakudo-moar 742573: OUTPUT: «Unable to deduce arithmetic or geometric sequence from 1050,100500,10005000 (or did you really mean '..'?)␤  in block <unit> at <tmp> line 1␤␤»
16:44 IOninja aww
16:45 timotimo hmm, that number is only 29 bits wide
16:45 timotimo maybe the sum fits into a 64bit int?
16:45 timotimo m: say 100000000500000000.msb
16:45 camelia rakudo-moar 742573: OUTPUT: «56␤»
16:45 [Coke] m: my $upper = 1000000000; my $interval = 5; my $sum = (1+$upper/$interval)*($upper/2); say $sum
16:45 camelia rakudo-moar 742573: OUTPUT: «100000000500000000␤»
16:45 timotimo yeah, it would
16:45 timotimo if we used native ints for that task, it'd make the gc problem disappear
16:46 IOninja wait a second...
16:46 IOninja m: .say for (5, 10 … 100).sum, (5, 10 … 1000).sum, (5, 10 … 10000).sum
16:46 camelia rakudo-moar 742573: OUTPUT: «1050␤100500␤10005000␤»
16:46 IOninja I was right on the money!
16:46 IOninja It's a stupid seq maker that can't figure it out
16:46 [Coke] IOninja: ah, sum is smart?
16:46 timotimo it is for simple sums
16:47 IOninja [Coke]: don't think so... There's a shortcut for Ranges
16:47 IOninja But I mean, there's a pattern in the sum
16:47 sena_kun https://math.stackexchange.com/questions/513846/find-the-sum-of-all-the-integers-between-1-and-1000-which-are-divisible-by-7 - just change the particular numbers according to the problem.
16:48 timotimo oh, haha
16:48 timotimo i got the wrong answer in my code because i used < instead of <=
16:48 timotimo 99999999500000000
16:48 IOninja m: say "The sum is 1$_5$_" given 0 x '1000000000'.chars-2
16:48 camelia rakudo-moar 742573: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$_5' is not declared␤at <tmp>:1␤------> 3say "The sum is 17⏏5$_5$_" given 0 x '1000000000'.chars-2␤»
16:48 IOninja m: say "The sum is 1{$_}5{$_}" given 0 x '1000000000'.chars-2
16:48 camelia rakudo-moar 742573: OUTPUT: «The sum is 100000000500000000␤»
16:48 IOninja prlante: ^ there's your answer.
16:49 perlpilot IOninja++
16:49 IOninja timotimo: how did you get your 100000000500000000 from?
16:49 perlpilot (even though it doesn't generalize, it's still a nice solution  :)
16:49 IOninja Oh, from [Coke]'s solution?
16:49 IOninja m: say "The sum is 1{$_}5{$_}" given 0 x '100000000000000000000000000000000000000000000000000000000000'.chars-2
16:49 camelia rakudo-moar 742573: OUTPUT: «The sum is 1000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000␤»
16:49 IOninja hehe :)
16:50 timotimo IOninja: perl6 -e 'my $a = 0; loop (my $_ = 0; $_ < 1000000000; $_+=5) { $a += $_ }; say $a'
16:50 timotimo currently running the same with native ints
16:51 IOninja Ah
16:51 timotimo i forgot to put "time" in front
16:51 IOninja I'm gonna try a concurrency solution...
16:51 timotimo but its memory doesn't grow, which isn't a surprise
16:51 timotimo hey, it finished
16:51 gregf_ joined #perl6
16:51 lizmat anyways, I'm about to commit a fix that will make %% about 14x as fast for moest cases
16:52 lizmat *most
16:52 IOninja Actually, gotta work. But I suspect it'd be something like, chunk up 1000000000, make ranges out of chunks and concurrently reify those ranges grep and sum 'em
16:52 timotimo whoa
16:52 IOninja lizmat: holy crap :o
16:52 lizmat just need to spectest it
16:52 perlpilot lizmat++  nice!
16:56 prlante IOninja Is 100000000500000000 the answer??
16:56 IOninja prlante: yeah
16:56 timotimo um, no, 42 is the answer
16:56 IOninja m: say WHY 'Life, the Universe and Everything':
16:56 camelia rakudo-moar 742573: OUTPUT: «42␤»
16:56 prlante how did you solve ? Where's the code?
16:57 IOninja m: say "The sum is 1{$_}5{$_}" given 0 x '1000000000'.chars-2
16:57 camelia rakudo-moar 742573: OUTPUT: «The sum is 100000000500000000␤»
16:57 timotimo 301.77user 0.28system 5:03.93elapsed 99%CPU (0avgtext+0avgdata 88640maxresident)k
16:57 timotimo 239.02user 7.73system 4:07.77elapsed 99%CPU (0avgtext+0avgdata 79568maxresident)k
16:57 IOninja prlante: also this link for generic mathy solution: https://math.stackexchange.com/questions/513846/find-the-sum-of-all-the-integers-between-1-and-1000-which-are-divisible-by-7
16:57 lizmat hmmm.... spectest failures  :-(   back to the drawing board
16:57 timotimo that's the Int version up above and the int version down below
16:57 IOninja not bad
16:57 timotimo oh
16:57 timotimo 2.00user 0.02system 0:02.05elapsed 98%CPU (0avgtext+0avgdata 67304maxresident)k
16:58 * perlpilot looks to see if SO came up with the same mathy thing he did ...
16:58 IOninja Which version is that?
16:58 timotimo that's what you get when you write $i = $i + 5 instead of $i += 5
16:58 Geth ¦ ecosystem: FCO++ created pull request #299: change meta name of my modules
16:58 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/299
16:58 IOninja wat
16:58 timotimo yes.
16:58 timotimo wat indeed
16:58 IOninja 100x faster for just that change :o
16:58 timotimo more than 100x
16:58 tony-o SmokeMachine: i'll take a look, i know that github was erroring out trying to pull some repos
16:59 timotimo m: say 239 / 2
16:59 camelia rakudo-moar 742573: OUTPUT: «119.5␤»
16:59 timotimo :P
16:59 Geth ¦ ecosystem: 146831fd53 | (Fernando Correa de Oliveira)++ | META.list
16:59 Geth ¦ ecosystem: change meta name of my modules (#299)
16:59 Geth ¦ ecosystem:
16:59 Geth ¦ ecosystem: * Adding DateTime::Extended to the ecosystem
16:59 Geth ¦ ecosystem: https://github.com/FCO/DateTime-Extended
16:59 Geth ¦ ecosystem:
16:59 Geth ¦ ecosystem: * change meta name of my modules
16:59 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/146831fd53
16:59 perlpilot timotimo: now all you need is a "+= considered slow" post to go with it  :)
16:59 timotimo all *i* need is a patch for the optimizer :)
16:59 IOninja \o/
16:59 tony-o SmokeMachine: what's your GH username?
16:59 lizmat that's what we all need  :-)
16:59 lizmat first dinner&
16:59 SmokeMachine tony-o: FCO
16:59 timotimo .o( what about second breakfast? )
17:00 SmokeMachine tony-o: I just changed my META names...
17:00 IOninja SmokeMachine: aren't you a membder of perl6 org?
17:00 SmokeMachine IOninja: do you mean on GH?
17:00 IOninja Yes
17:00 SmokeMachine IOninja: I am
17:01 IOninja So why PR and not just commit? :)
17:01 SmokeMachine IOninja: just to be sure... shouldn't I?
17:01 perlpilot SmokeMachine: forgiveness >>> permission
17:02 IOninja SmokeMachine: ¯\_(ツ)_/¯ seems easier to just commit
17:02 SmokeMachine perlpilot: ok, so... can I accept my MR?
17:02 IOninja revert feature works :)
17:02 SmokeMachine IOninja: ^^
17:02 IOninja You can.
17:02 SmokeMachine :)
17:02 IOninja But I meant don't do the PR and commit directly :)
17:03 pmurias joined #perl6
17:03 timotimo neat.
17:03 timotimo using $i = $i + 5 also makes the Int version a bunch faster
17:03 timotimo 139.15user 0.06system 2:20.39elapsed 99%CPU (0avgtext+0avgdata 88616maxresident)k
17:03 timotimo about 2x faster
17:04 SmokeMachine IOninja: ok... Ill do that next time... this time some one accepted before me...
17:05 IOninja Yeah, you can't beat the speed of a... NINJA!
17:06 SmokeMachine https://en.wikipedia.org/wiki/Masaaki_Hatsumi
17:06 SmokeMachine IOninja: thanks!
17:08 haxmeister joined #perl6
17:08 haxmeister hello perl6
17:08 IOninja \o
17:09 haxmeister wondering can someone direct me to info on how to extract a file name only from an IO::Path object
17:09 sena_kun haxmeister, .Str?
17:10 haxmeister for instance I get /sys/bus/pci/devices/0000:00:1b.0".IO and only want the file name out of that (preferrable without regex)
17:10 perlpilot File::Basename?
17:10 b2gills joined #perl6
17:10 haxmeister basename
17:10 ilmari .basename?
17:10 haxmeister that's prolly it thanks
17:10 perlpilot oh ... thought I was on #perl for a second
17:10 haxmeister \o/
17:12 RabidGravy joined #perl6
17:13 IOninja haxmeister: it can be handy to look at methods offered by the type...
17:14 IOninja m: "/sys/bus/pci/devices/0000:00:1b.0".IO.^name.say
17:14 camelia rakudo-moar 742573: OUTPUT: «IO::Path␤»
17:14 IOninja haxmeister: ^ so that's the type, that means you can visit https://docs.perl6.org/type/IO::Path and in the table of contents you can see all the methods you can call
17:14 IOninja m: "/sys/bus/pci/devices/0000:00:1b.0".IO.^methods».name.say
17:14 camelia rakudo-moar 742573: OUTPUT: «(BUILD new-from-absolute-path new abspath is-absolute is-relative parts volume dirname basename extension Numeric Bridge Int succ pred IO open pipe watch absolute relative cleanup resolve parent child chdir rename copy move chmod unlink symlink link mkdi…»
17:14 IOninja ^ or do that :)
17:15 * IOninja gives a sideways glance to new-from-absolute-path
17:16 st_elmo joined #perl6
17:16 IOninja perlpilot: so what was your mathy solution?
17:27 tony-o SmokeMachine: i'm still trying to find the problem in my cron jobs -
17:27 tony-o all of your repos are on my server
17:29 tony-o in the DB, even
17:30 SmokeMachine tony-o: strange: http://modules.zef.pm/search?terms=Fuzz should return the same of https://modules.perl6.org/?q=Fuzz shouldn't?
17:30 tony-o it should, in some cases, return more
17:30 tony-o i'm taking a look, there is definitely something not quite right
17:31 tony-o thank you for saying something about it, too SmokeMachine++
17:31 ggoebel joined #perl6
17:31 SmokeMachine tony-o: :)
17:32 wamba1 joined #perl6
17:34 * IOninja is mildly dissapointed  .map: *..* don't work :(
17:34 IOninja .map: {$^a..$^b} just doesn't have the same ring to it
17:35 perlpilot IOninja: essentially the same thing as what SO had.  sub mysum($n,$d) { my $f = floor($n/$d); (($f*$d + $d) *  $f) / 2 }   I didn't factor it on the fly
17:37 IOninja m: sub mysum($n,$d) { my $f = floor($n/$d); (($f*$d + $d) *  $f) / 2 }; say mysum 10000, 5
17:37 camelia rakudo-moar 742573: OUTPUT: «10005000␤»
17:37 IOninja m: sub mysum($n,$d) { my $f = floor($n/$d); (($f*$d + $d) *  $f) / 2 }; say mysum 10000000, 5
17:37 camelia rakudo-moar 742573: OUTPUT: «10000005000000␤»
17:37 IOninja perlpilot: which SO had?
17:37 Dunearhp joined #perl6
17:38 IOninja m: sub mysum($n,$d) { my $f = floor($n/$d); (($f*$d + $d) *  $f) / 2 }; say mysum 10000000, 3|5
17:38 camelia rakudo-moar 742573: OUTPUT: «any(16666668333333, 10000005000000)␤»
17:38 IOninja heh
17:38 SmokeMachine IOninja: perlpilot: what means SO on that context?
17:38 IOninja SmokeMachine: StackOverflow
17:38 IOninja the website
17:38 SmokeMachine IOninja: ok, thanks!
17:39 IOninja perlpilot: I'm cooking up a multi-core solution, for fun, pretty sexy one-liner
17:39 perlpilot cool
17:40 perlpilot IOninja: as for which SO ... the one where summing numbers divisible by 7 up to 1000
17:41 IOninja perlpilot: ah. I guess it went over my head. My code version of it took forever to run
17:42 IOninja m: https://gist.github.com/zoffixznet/fb635966fdafa9792b25a98e8e05d4f9
17:42 camelia rakudo-moar 742573: OUTPUT: «10005000␤»
17:42 IOninja I wish that uggo map was (*^..*) :)
17:42 sena_kun this was the first google link, I think, you can pretty easy find a solution for numbers divisible by 5.
17:43 agentzh joined #perl6
17:44 sena_kun *easily
17:47 * ilmari waves at timeless :)
17:47 timeless hi
17:48 timeless but didn't i agree w/ you on something else in postgres too?
17:48 timeless (my index is much weaker than your average database's ...)
17:49 dylanwh so stronger than mysql?
17:49 timeless i'm amazed at how the email and database people try to manage patches...
17:49 tony-o SmokeMachine: figured out the problem, now i need to figure out how to fix it :-)
17:49 timeless dylanwh: i lose data much faster than mysql
17:49 timeless :-)
17:50 Dunearhp joined #perl6
17:50 timotimo wow, that's concerning
17:50 * dylanwh mutters about "3-byte utf8"
17:50 * timeless has touched those
17:51 dylanwh I'm going to support HTML, but I'm not going to handle > or & symbols. I'll just silently truncate when I encounter them. </rant>
17:51 agentzh joined #perl6
17:51 ilmari timeless: are you a colleague of dylanwh's? (guessing purely based on the firefox/developer cloak)
17:52 RabidGravy ilmari!
17:52 ilmari RabidGravy: \o/
17:52 ilmari small world!
17:53 dylanwh timeless and I have never worked on the same thing at the same time, but I guess he's like bugzilla family as well as mozilla family. ;)
17:53 perlpilot .oO( How big did you think the Perl echo chamber was? )
17:53 timeless yes
17:53 dylanwh (I'm assuming he, sorry if that is wrong. bad me!)
17:53 timeless that's about right
17:53 timeless same me
17:53 timeless although dylanwh seems to be missing his cloak?
17:53 timeless or am i able to see through it since we're sharing a cloak?
17:54 * timeless hasn't really thought about freenode cloaks much
17:54 timeless dylanwh: btw, i was amused that bugzilla had better emoji support than jira
17:54 dylanwh I never bothered setting anything like that up
17:54 RabidGravy I've been working at the same place as ilmari since October and I only saw him for the first time last Friday
17:54 dylanwh 2600:3c03::f03c:91ff:fe33:4998 should resolve back to hardison.net but I think I broke that.
17:54 timeless dylanwh: historically reed could get you one
17:54 ilmari RabidGravy: well, same company, different office
17:55 timeless dylanwh: well, hardison.net forward resolves to it
17:55 dylanwh timeless: we have better performance too. And getting better. :-)
17:55 timeless dylanwh: and better ui imo
17:55 * timeless is biased
17:55 * timeless hates jira
17:55 dylanwh haha, that is debateable. I h ope to fix that a lot this year.
17:55 dylanwh somehow, with less resources.
17:56 timeless personally i don't like ajax (hrm, is that out of style?)
17:57 robertle joined #perl6
17:58 timeless and i really hate the way jira makes it so easy for people to create custom incomprehensible / unusable workflows
17:58 * ilmari got bit by that today
17:59 moritz I work with a jira with a rather good admin, and quite like it
17:59 ilmari I dragged a ticket from the "in review" column on the agile board to "done", and the state changed to "dropped" instead
17:59 ilmari moritz: a well-managed jira instace can be tolerable
17:59 ilmari and because the dropped state has no outbound transitions, it can't be fixed (even by an admin)
17:59 moritz there are some quirks (like not seeing the recipients of an email sent to an issue), but the UI is better than that of competing products, IMHO
18:00 andrzejku joined #perl6
18:00 moritz (and we only use it internally, not with customers having direct access)
18:00 IOninja perlpilot: I improved on it: d * sum 1..n div d;
18:03 SmokeMachine tony-o: \o/
18:05 tony-o SmokeMachine: apparently 'perl perl perl perl <scriptname>' is not an appropriate way to run a perl script - your stuff is showing up now eh
18:06 pyrimidine joined #perl6
18:06 tony-o looking at your comp of ?q=<str> - modules.perl6.org will return differently because it looks like it's doing a little fuzzy matching
18:08 timeless moritz: i'm the admin
18:09 timeless but ime, the admin is never the problem
18:09 timeless it's always the person who's "managing workflow"
18:09 moritz can non-admins manage workflow?
18:10 timeless it doesn't matter :)
18:10 moritz ah
18:10 timeless if the admin is asked to set up a stupid workflow
18:10 timeless do you blame the admin?
18:10 timeless (please don't!)
18:12 arnsholt JIRA is kind of like make, IME. Terrible, but all of the alternatives are worse
18:12 andrzejku joined #perl6
18:14 pyrimidine joined #perl6
18:14 IOninja Hm, why does .race's :degree default to measly 4?
18:15 IOninja no wonder I'm not getting any juice!
18:20 IOninja craaaao
18:20 IOninja *craaap
18:21 IOninja My brilliant code that uses 32 cores is...
18:21 IOninja m: say 19.549/5.143
18:21 camelia rakudo-moar 742573: OUTPUT: «3.801089␤»
18:21 IOninja is almost 4 times SLOWER than when not using any concurrency :/
18:21 IOninja Wonder if that's due to .race's bustitude
18:22 IOninja Unless I'm doing something wrong. here's the code: https://gist.github.com/zoffixznet/bcd5ebab9d3f913b70c5c7cde4205ae6
18:25 IOninja Nope, changing it to using Promises is slow as hell too
18:26 IOninja Even worse with promises...
18:27 IOninja m: say 0m28.052s/5.143
18:27 camelia rakudo-moar 742573: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3say 07⏏5m28.052s/5.143␤»
18:27 cale2 IOninja: Honestly I've noticed that concurrency can be slower even on erlang. It depends on the use case quite a bit I think
18:27 IOninja m: say 28.052/5.143
18:27 camelia rakudo-moar 742573: OUTPUT: «5.454404␤»
18:27 andrzejku joined #perl6
18:28 IOninja camelia: yeah, when all you got is 4 cores, not 32
18:28 cale2 There were a couple of modules in the ecosystem that used oauth1. I want to break that out into a separate thing module. can anyone point me to the modules I'm thinking of?
18:30 IOninja buggable: eco Twitter
18:30 buggable IOninja, Twitter 'Twitter API': https://github.com/zoffixznet/perl6-Twitter
18:30 IOninja that one has a OAuth1 module inside of it
18:30 IOninja *OAuth1-that's-enough-to-auth-to-Twitter module...
18:31 RabidGravy joined #perl6
18:31 cale2 Yep, thanks!
18:33 IOninja eh, screw it. I'm using a very low N and I'd guess the threading overhead just trumps the gains. Can't be bothered to wait on this thing for larger Ns
18:43 tony-o is oauth2 something sought after for p6?  i have a module partially written on the server side but i could make it work for client side first ..
18:44 IOninja Isn't oauth2 pretty widely in use? So I'd say, yes.
18:46 cale2 Should oauth1 and oauth2 both be in an Auth:: namespace?
18:46 cale2 Auth::Oauth1, Auth::Oauth2, Auth::SAML, etc
18:47 IOninja Why?
18:47 IOninja What's the point of making programmer type all this extra cruft.
18:47 cale2 How else would it be organized?
18:47 IOninja OAuth1, OAuth2 done
18:47 IOninja using tags in the metafile
18:48 cale2 I didn't know how that worked. On CPAN things seem to be organized under larger namespaces
18:48 IOninja http://design.perl6.org/S22.html#tags
18:48 cale2 almost like folders
18:49 IOninja Yeah, and the result is modules with giant names: https://metacpan.org/pod/POE::Component::IRC::Plugin::YouAreDoingItWrong
18:51 IOninja No one cares if your module begins with WWW:: or WebService:: anymore. They just search metacpan for stuff. The extra prefixes is just extra code you have to type each time you use the module.
18:51 RabidGravy joined #perl6
18:51 cale2 ncie
18:51 cale2 nice
18:59 Tonik joined #perl6
19:08 japhb joined #perl6
19:13 RabidGravy most unproductive day of working from home EVAH!
19:17 IOninja RabidGravy: get cracking!
19:17 * IOninja snaps the whip
19:25 RabidGravy I spent several hours trying to get the vagrant box working
19:25 IOninja heh
19:32 lizmat aaahh... spectest failures were caused by setting / roast mismatch
19:40 IOninja \o/
19:40 SmokeMachine tony-o: \o/ thanks!
19:40 SmokeMachine tony-o: does it get the documentation from pod?
19:51 hankache joined #perl6
19:51 cale2 tony-o: do you have a Server::Router that works with your Async server?
19:52 hankache hello #perl6
19:55 moritz \o
19:57 agentzh joined #perl6
19:58 RabidGravy cale2, he does bur I can't remember what it's called
19:58 espadrine joined #perl6
20:00 TimToady IOninja: yeah, a bit like having to say 'use Math', when math just exists
20:00 yoleaux 16:18Z <raiph> TimToady: Imo it would work well if you provided a short answer to http://www.perlmonks.org/?node_id=3333;parent=1182520
20:02 AlexDaniel joined #perl6
20:02 bjz joined #perl6
20:07 cale2 Does my soda machine metaphor hold up here: https://github.com/WildYorkies/peregrinations-in-perl6/blob/master/book/4-HowToWeb.md#class-iosocketinet-does-iosocket
20:07 cale2 and what about here: https://github.com/WildYorkies/peregrinations-in-perl6/blob/master/book/4-HowToWeb.md#class-iosocketasync
20:10 ttkp6 joined #perl6
20:14 Wanderer68 joined #perl6
20:18 agentzh joined #perl6
20:21 ggoebel joined #perl6
20:28 Technaton joined #perl6
20:30 SmokeMachine tony-o: here: http://modules.zef.pm/profile/Fernando%20Correa%20de%20Oliveira the last line (probably representing the DataTime::Extended) is empty...
20:39 mcmillhj joined #perl6
20:39 hankache joined #perl6
20:42 pyrimidine joined #perl6
20:58 awwaiid joined #perl6
21:01 labster joined #perl6
21:04 cdg joined #perl6
21:09 sufrostico joined #perl6
21:09 itaipu joined #perl6
21:09 robertle https://docs.perl6.org/language/modules says that "sub bar is export(:other) { ... }" is the same as "my package EXPORT::other { ... } "
21:10 robertle so what is the equivalent to "sub bar is export(:other, :another)" ??
21:10 robertle I want to use the my package trick, but want to put in "DEFAULT" and "oop"...
21:11 jnthn robertle: You'd have to assign the sub explicitly into the other package. That's why there's an `is export` trait to do this for you. ;-)
21:12 robertle right, "is export" looks nicer, but can I do that without a "unit" at the top?
21:13 robertle I am not sure what I want is the right thing to do, but I want a module that provides a role or a method, depending on whether you choose the oop part r the procedural
21:13 robertle now if my .pm6 has no "module" at the top, I can just put my role/class in it and if you "use" the moduleyou get the role
21:14 robertle if I have a "unit" at the top, it puts the class/role into that namespace...
21:14 * jnthn tiredly tries to figure it out :)
21:15 robertle not sure I explain it well
21:15 jnthn I guess you know about being able to do `my role Foo is export(:oop) { }`
21:15 jnthn Where Foo will only be exported via the tag?
21:15 robertle that's what I am trying to do
21:16 robertle but if that's in a file with "unit module Bar" at the top, it becomes available as "Bar::Foo", rather than "Foo", right?
21:16 robertle and without the "unit" at the top I don't seem to be able to do "is export", but I can do "my package..."
21:16 jnthn If you declare it with "my" it's a lexical class, and it will not be visible via the enclosing package
21:17 robertle right, so how do I make it available then. need some indirection...
21:18 jnthn m: module Foo { my class C is export(:oop) { } }; say Foo::<C>:exists; { import Foo :oop; say C };
21:18 camelia rakudo-moar 5ec251: OUTPUT: «False␤(C)␤»
21:18 jnthn m: module Foo { class C is export(:oop) { } }; say Foo::<C>:exists; { import Foo :oop; say C };
21:18 camelia rakudo-moar 5ec251: OUTPUT: «True␤(C)␤»
21:18 cdg_ joined #perl6
21:19 robertle perhaps the whole tag thing is a red herring, it's more about having a role and some procedural stuff in the same package. is that a bad idea?
21:20 bjz joined #perl6
21:20 robertle if I don't do "module" at the top of my Foo.pm6 containing a role Foo, then I can do "use Foo" and have the role Foo available.
21:20 jnthn Not automatically. I mean, I've got modules that have a class and some subs available... :)
21:20 robertle just as if I had a "unit role Foo"
21:20 robertle but the .pm6 is not a role, so I can also have procedural bits
21:21 robertle can you give me an example of such a module?
21:21 jnthn It's a class rather than a role, but https://github.com/jnthn/p6-concurrent-iterator/blob/master/lib/Concurrent/Iterator.pm6 comes to mind
21:22 robertle perfect example! so you want to be able to "use Concurrent::Iterator", right?
21:24 jnthn That's how you use it, yes
21:25 robertle how could you tag the class and the subs in that file? so that when you "use Concurrent::Iterator :oop", you only get the class, "use C::I :proc" gets you the procedures?
21:28 gensym joined #perl6
21:30 jnthn Had to try that to check ;)
21:30 robertle differnet take again: "unit role ofenrohr" is the same as "role ofenrohr is export {" plus a "}" at the end of the file, right?
21:31 robertle so is there a way to add a tag to the implicit export from the "unit" line?
21:31 jnthn Here's the trick, anyway: https://gist.github.com/jnthn/49bf86b9ece4ff9a943e813daafba020
21:31 robertle so is there a way to add a tag to the implicit export from the "unit" line?
21:31 robertle sorry
21:31 moritz robertle: you could try "also is export(:FOO)"
21:31 moritz dunno if that works
21:32 itcharlie1 left #perl6
21:32 jnthn moritz++
21:32 jnthn Yeah, you can't have "my unit module"
21:33 jnthn In general, though, I don't think having qualified names available "by default" is a particularly problematic thing.
21:35 robertle right, so I would have a "unit role" that also has a sub with "is export" in it. I get the role and the sub, no need to :oop or :proc
21:37 robertle https://docs.perl6.org/language/modules also talks about :ver and :auth on the unit line, is that really a good thing? given META6.json?
21:38 jnthn I tend to just put them in META6.json
21:39 cdg joined #perl6
21:45 sufrostico joined #perl6
21:45 robertle great, this stuff works now! thanks!
21:49 jnthn :)
21:51 alphah Hello Perl6
21:51 moritz \o
21:51 alphah say I have  # program.p6 takes 0 or more of  configs args set (conf1 param1, conf2 param2, conf3 is Bool), and 0 or 1  command of  commands set (command 1, command2,...). how to implement that in one MAIN function where I can run my program ass: $ program.p6  # all args are optional; program.p6 Command1 # config args not specified; program.p6 conf1 param1 conf2 param2 Command
21:52 moritz alphah: the usual way is to implement the different cases as multis
21:53 moritz alphah: multi sub MAIN(:$conf1, :$conf2, Bool :$conf3) { ... }; multi sub MAIN('command1') { }; etc
21:54 moritz alphah: https://perlgeek.de/blog-en/perl-6/2016-book-timestamp-converter.html has an example
21:56 alphah Thanks moritz, I will review these examples, I was checking if there are other way to do that, I will have to add a multi MAIN for each Command I add to the program and I will end up with many multis
21:57 moritz alphah: if that's impractical, you might want to investigate more traditional command line parsers (not the built-in MAIN stuff)
21:57 perlpilot alphah: If you didn't use multis you would end up with a "big switch" somewhere that maybe calls many subroutines.
21:57 moritz http://modules.perl6.org/#q=getopt
21:57 moritz actually, https://modules.perl6.org/#q=getopt # :-)
21:59 alphah Thanks for the quick response guys, I will definitely look at these options and choose what works best for me
22:00 jnthn In one of my larger Perl 6 apps, my mutli MAIN subs are all pretty tiny, and delegate off to an object that does the processing and shares lots of the commonalities
22:01 TEttinger joined #perl6
22:01 jnthn The the MAIN subs do little more than specify the CLI
22:01 jnthn *So the
22:04 IOninja buggable: eco getopt
22:04 buggable IOninja, Found 6 results: Getopt::Tiny, Getopt::Long, Getopt::Type, Getopt::Kinoko, Getopt::Std. See http://modules.perl6.org/#q=getopt
22:05 Actualeyes joined #perl6
22:06 buggable joined #perl6
22:06 IOninja buggable: eco getopt
22:06 buggable IOninja, Found 6 results: Getopt::Tiny, Getopt::Long, Getopt::Type, Getopt::Kinoko, Getopt::Std. See https://modules.perl6.org/#q=getopt
22:06 IOninja \o/
22:23 cdg joined #perl6
22:24 MasterDuke joined #perl6
22:33 mcmillhj joined #perl6
22:37 agentzh joined #perl6
22:41 Voldenet joined #perl6
22:41 Voldenet joined #perl6
22:58 mr_ron joined #perl6
23:12 dotness joined #perl6
23:12 tony-o cale2: HTTP::Router should work with HTTP::Server::Async
23:23 pyrimidine joined #perl6
23:33 imcsk8 joined #perl6
23:40 itcharlie1 joined #perl6
23:41 lep-delete joined #perl6
23:45 kyan joined #perl6
23:48 agentzh joined #perl6
23:58 labster joined #perl6

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

Perl 6 | Reference Documentation | Rakudo