»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:00 AlexDaniel joined
huf www.youtube.com/watch?v=Qs8KNgT-kqo 00:08
tony-o what happened to just putting large tariffs on fun things like egg toys and automatic weapons 00:09
IOninja :D 00:10
00:10 eliasr left 00:11 cdg left, cdg joined 00:18 wamba1 left 00:21 perlpilot left, perlpilot joined
AlexDaniel IOninja: re ༳, if I recall correctly nobody knows if -0.5 is what this character actually means 00:32
but yes, it's nice to have something that produces a non-integer negative thingy just with one char :) 00:33
00:40 devmikey left
IOninja I recall it made good sense why it produced -0.5 00:42
half two is 1.5, half one is 0.5, half zero is -0.5, which why I like that char :) 00:43
'cause it includes negatives and zero :)
AlexDaniel IOninja: babelstone.blogspot.com.ee/2007/04/...-half.html 00:46
00:46 Woodi left
AlexDaniel huggable: ༳ :is: babelstone.blogspot.com.ee/2007/04/...-half.html 00:47
huggable AlexDaniel, Added ༳ as babelstone.blogspot.com.ee/2007/04/...-half.html
00:47 Woodi joined 00:50 rindolf left 00:53 aindilis` left 01:01 aindilis joined 01:07 cibs left 01:09 cibs joined 01:10 itcharlie joined 01:11 lukiramu left 01:12 pyrimidine joined
SmokeMachine tony-o: isn't everything from the ecosystem in modules.zef.pm? 01:15
01:16 Actualeyes joined 01:18 astj joined 01:24 broquaint left, broquaint joined
SmokeMachine tony-o: my modules aren't there... :( 01:29
01:31 itaipu left 01:35 ZzZombo joined 01:36 ZzZombo is now known as Guest35627, Guest35627 left, ZzZombo_ joined 01:40 itaipu joined 01:41 mcsnolte left 01:49 ugexe left 01:55 erdic left 01:59 labster left 02:04 eyck left 02:05 eyck joined 02:07 altLeCamarade left, LeCamarade joined, cdg left, cdg joined 02:08 ZzZombo__ joined, ZzZombo__ left, ZzZombo__ joined 02:09 ZzZombo___ joined 02:10 ZzZombo___ is now known as ZzZombo, ZzZombo left, ZzZombo joined, ZzZombo_ left 02:11 ZzZombo__ left 02:14 ZzZombo left 02:15 ZzZombo joined 02:16 ZzZombo left, ZzZombo joined
IOninja zzzzzz-zzzz-zzzzz-zzzzzooomboooo! 02:19
ZzZombo I luv u to
IOninja m: "\c[couple with heart: man man]".say 02:22
camelia 👨‍❤️‍👨
02:23 itaipu left 02:25 user__ joined
AlexDaniel renders nicely here! 02:28
02:29 kalkin- left, itcharlie left
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:30
ZzZombo :( 02:31
MasterDuke you don't like zombo.com? 02:32
02:32 pyrimidine left
ZzZombo Why would I? 02:32
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:36
user__ ohh i just noticed a bug source in perl6 syntax 02:43
02:43 user__ is now known as kalkin-
kalkin- m: say 2 ... 6 02:44
camelia (2 3 4 5 6)
kalkin- m: say [2 ... 6]
camelia [2 3 4 5 6]
kalkin- m: say [2...^6]
camelia [2 3 4 5]
kalkin- m: say [2 ... ^6]
camelia [2 1 0 1 2 3 4 5]
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:45
m: say [2 … ^6] 02:46
camelia [2 1 0 1 2 3 4 5]
IOninja ? what's the bug? 02:47
Ah
kalkin- It's not a bug but a source for bugs. You can't put space between ^ and … when doing 1…^6
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
IOninja m: &infix:<...>.candidates».signature.say 02:49
camelia ((\a, Mu \b) (|lol is raw))
02:49 agentzh left
IOninja m: &infix:<…>.candidates».signature.say 02:49
camelia ((|c is raw))
IOninja s: &SEQUENCE 02:50
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/80e0...rs.pm#L112
IOninja pretty big routine... prolly can complain when we get a Range `\right` 02:52
And avoid that issue
02:55 Undercover left, labster joined, labster left, labster joined, Undercover joined, ChanServ sets mode: +v Undercover
kalkin- m: say -4 ... ^5; say [-4 ... ^5] 02:56
IOninja e: say -4 ... ^5; say [-4 ... ^5]
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:56 Juerd left 02:57 Bucciarati left, camelia left
IOninja Amusing :) 02:57
kalkin- say -4 ... ^5; say [-4 ... ^5]
e: say -4 ... ^5; say [2 ... ^5]
evalable6 kalkin-, rakudo-moar 80e0bce: OUTPUT«(-4 -3 -2 -1 0 1 2 3 4)␤[2 1 0 1 2 3 4]»
kalkin- e: say 2 ... ^5; say [2 ... ^5]
evalable6 kalkin-, rakudo-moar 80e0bce: OUTPUT«(2 1 0 1 2 3 4)␤[2 1 0 1 2 3 4]»
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
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␤»
IOninja The first case just ends up producing "right" result because the flattened range is part of it.
SmokeMachine whats wrong?
IOninja the ones' with negatives
SmokeMachine: .send 02:59
kalkin- yes negative number handling is different
IOninja Channel.new.emit would send a CX::Emit (?) control exception and it don't take args
kalkin-: no, it's the same, as I see it
kalkin-: walks towards zero and the rest is the range 03:00
e: say -6, -4 … ^6
SmokeMachine m: Channel.new.send: 42
evalable6 IOninja, rakudo-moar 80e0bce: OUTPUT«(-6 -4 -2 0 1 2 3 4 5)»
SmokeMachine, rakudo-moar 80e0bce: OUTPUT«»
IOninja see?
e: say 6, 4 … ^6
kalkin- e: say 2 ... ^5; say [2 ... ^5]
evalable6 IOninja, rakudo-moar 80e0bce: OUTPUT«(6 4 2 0 1 2 3 4 5)»
kalkin-, rakudo-moar 80e0bce: OUTPUT«(2 1 0 1 2 3 4)␤[2 1 0 1 2 3 4]»
03:00 cyphase left
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]»
SmokeMachine IOninja: thanks!
IOninja m: supply { CONTROL { default { .^name.say } }; emit 42 } 03:01
evalable6 IOninja, rakudo-moar 80e0bce: OUTPUT«»
kalkin- the handling differs in the above to cases, or did i just miss the pattern?
IOninja kalkin-: Did you see my explanation and evals? 03:02
03:02 pierre joined
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:02
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
IOninja :) 03:04
03:04 camelia joined
IOninja e: CONTROL { default { .^name.say } }; emit 42 03:04
evalable6 IOninja, rakudo-moar 80e0bce: OUTPUT«CX::Emit»
IOninja yup, it's CX::Emit
03:05 cyphase joined
IOninja e: CONTROL { default { .^name.say } }; Channel.new.emit 03:05
evalable6 IOninja, rakudo-moar 80e0bce: OUTPUT«CX::Emit»
IOninja :)
IOninja & # bed
03:05 ChanServ sets mode: +v camelia
AlexDaniel throws some meat at evalable6 03:08
good bot
and yes, m: works too 03:10
03:11 Sgeo left 03:12 Sgeo joined 03:13 cale2 joined, ugexe joined
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
cale2 what is the perl6 version of `$promise.then(&function);` 03:17
I guess it's `await` :) nevermind 03:18
IOninja $promise.then: {function} 03:19
03:20 Actualeyes left 03:25 Khisanth left 03:28 noganex joined 03:30 cyphase left 03:31 noganex_ left 03:35 cyphase joined
ZzZombo The "array doesn't allow assoc. indexing" happens when I try to 03:36
say $_<key-value>,$_<section>
where $_ comes from
for $/.list -> $_ in a grammar action.
gist.github.com/ZzZombo/5caa51f9b2...556920a0d8
timotimo, it's what you told me to do :(
can I blame you for that one?
03:37 xtreak joined 03:38 kyan joined, Khisanth joined 03:44 cdg left 03:54 wamba1 joined 04:07 eady left 04:09 labster left 04:11 AlexDaniel left 04:12 cale2 left
LeCamarade join #xcp 04:23
BenGoldberg /
LeCamarade … ooops.
BenGoldberg :) 04:24
04:29 cibs left, llfourn left, pyrimidine joined 04:30 retupmoca joined 04:31 cibs joined 04:32 llfourn joined 04:34 retupmoca left 04:35 pyrimidine left 04:51 mr_ron left 04:56 Cabanoss- joined 04:59 labster joined 05:00 Cabanossi left, Cabanoss- is now known as Cabanossi, Actualeyes joined, gdonald left, gdonald joined 05:01 xtreak left 05:03 xtreak joined, CIAvash joined 05:07 wamba1 left 05:14 eroux joined 05:15 pierre left 05:17 pierre joined
Geth ecosystem: 8d54203e5b | (Andrew Egeler)++ | META.list
Add JSON::JWT
05:20
05:21 retupmoca joined 05:22 pierre left 05:23 telex left 05:25 pyrimidine joined 05:27 khw left
ZzZombo is it possible to parse directives like #include so it would be first go through a rule such as 05:30
# \w+
and only then a proto regex would branch to one of implemented directives?
05:30 pyrimidine left 05:31 telex joined 05:34 eady joined 05:41 bwisti left 05:43 curan joined 05:47 labster left 05:54 BenGoldberg left 05:55 kyan left, kyan joined 05:59 Tonik joined 06:00 rurban joined, rurban left 06:04 labster joined 06:11 pierre joined 06:13 pierre left 06:16 petercommand left, petercommand joined 06:20 agentzh left, abraxxa joined 06:26 agentzh joined, pierre_ joined 06:27 pyrimidine joined 06:30 labster left 06:31 wamba1 joined 06:33 pyrimidine left 06:38 dakkar joined 06:39 ZzZombo left 06:40 ZzZombo joined, ZzZombo left, ZzZombo joined 06:43 abraxxa left, agentzh left 06:44 faraco joined
faraco m: sub f(&g:($)) { 06:44
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3sub f(&g:($)) {7⏏5<EOL>
faraco g(2)
}
06:44 Tonik left 06:45 wamba1 left
faraco m: sub f(&g:($)) { g(2) } 06:45
camelia ( no output )
faraco m: sub f(&g:($)) { g (2)}; f(-> $n { say "Hi {$n}" }) 06:46
camelia Hi 2
faraco cool..the brackets looks like #{var} in ruby 06:47
but why its matter if you can just interpolate with barebone $var in strings? 06:48
06:48 RabidGravy joined
faraco is there any other use case that I did not yet found? 06:49
06:49 dakkar left 06:51 mr_ron joined
TimToady "Hi {$n + 1}" 06:51
faraco TimToady: Oh..I see thank you ^^ 06:52
06:53 ufobat_ joined 06:59 mr_ron left 07:00 abraxxa joined 07:04 movl joined 07:09 xtreak left 07:10 Sgeo left
andrzejku hello perl6!:) 07:10
faraco hi 07:11
07:11 Sgeo joined 07:12 xtreak joined 07:15 darutoko joined
abraxxa hi 07:16
07:17 mr-foobar left 07:20 mr-foobar joined 07:22 rurban joined
gfldex m: say Q:c⟨$a {1+2} $b⟩ 07:25
camelia $a 3 $b
RabidGravy boom
gfldex faraco: ^^^
07:25 mcmillhj joined
faraco yay...what is Q:c though 07:26
Some of Perl 6 operations looks like it uses a lot of smile yo me
moritz quoting that allows code block interpolation 07:28
faraco oh 07:29
m: my @tank = Q{hermit fish crab} 07:30
camelia ( no output )
gfldex Q is the general quote form from which all other quotes are derived
docs.perl6.org/language/quoting
jast that page doesn't mention :c, does it?
gfldex it does not
07:34 wamba1 joined 07:36 john51 left 07:38 mroy joined
gfldex m: dd Q:p⟨/dev/null⟩ 07:38
camelia 5===SORRY!5=== Error while compiling <tmp>
Unrecognized adverb: :p
at <tmp>:1
------> 3dd Q:p7⏏5⟨/dev/null⟩
faraco m: my @tank = Q{flamingo water tree}; say " Hi {@tank[0]} ";
camelia Hi flamingo water tree
gfldex m: dd Q:regex⟨.*⟩ 07:40
camelia ===SORRY!===
Cannot look up attributes in a Perl6::RegexGrammar type object
Geth doc: fb0bea5fde | (Wenzel P. P. Peppmeyer)++ | doc/Language/quoting.pod6
add Q adverb table
07:41
CIAvash gfldex++ 07:43
07:48 mcmillhj left 07:49 mroy left
faraco m: say "dog".split.?; say "dog".flip.? 07:58
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed postfix call
at <tmp>:1
------> 3say "dog".split.?7⏏5; say "dog".flip.?
faraco m: say "dog".?split; say "dog".?flip 08:00
camelia 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, *%_)
(…
faraco m: say "dog".?flip 08:01
camelia god
faraco so..the ? method..just return Empty object if the invocant methods not exist.. 08:03
RabidGravy it's not a method
gfldex it returns Nil
lizmat m: dd "foo".?bar
camelia Nil
faraco gfldex: I misread them, heh. 08:05
RabidGravy though I coulld see some virtue in it working in the can't find a matching multi candidate case 08:06
gfldex I believe I found a usecase for the .? operator exactly once in the last 2 years 08:08
RabidGravy I think I have used it in a module, it's difficult to search for :) 08:10
faraco m: dd "747484".Num 08:11
camelia 747484e0
08:14 faraco left
RabidGravy actually I've used it in three different modules 08:16
08:17 Resol joined 08:18 agentzh joined 08:19 labster joined 08:20 Resol_ left 08:22 pyrimidine joined, agentzh left 08:25 pierre_ left 08:26 rindolf joined 08:28 pyrimidi_ joined 08:31 pyrimidine left, ChoHag left 08:32 pyrimidi_ left 08:33 pierre_ joined 08:34 cpage_ left 08:37 xtreak left 08:40 zakharyas joined 08:47 mcmillhj joined
samcv use nqp; my int $BITS := nqp::iseq_i(0x1ffffffff,8589934591) ?? 64 !! 32; say $BITS 08:51
m: use nqp; my int $BITS := nqp::iseq_i(0x1ffffffff,8589934591) ?? 64 !! 32; say $BITS
camelia 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
samcv m: use nqp; my int $BITS = nqp::iseq_i(0x1ffffffff,8589934591) ?? 64 !! 32; say $BITS
camelia 64
samcv j: use nqp; my int $BITS = nqp::iseq_i(0x1ffffffff,8589934591) ?? 64 !! 32; say $BITS
camelia 64
08:52 mcmillhj left 08:53 wamba1 left 08:55 pyrimidine joined 08:58 wamba1 joined 09:00 pyrimidine left 09:02 gdonald left 09:03 gdonald joined, mcmillhj joined 09:04 jonas1 joined 09:08 mcmillhj left 09:17 Actualeyes left 09:19 mcmillhj joined, cpage_ joined 09:22 RabidGravy left 09:24 mcmillhj left 09:30 rurban left 09:31 xtreak joined 09:34 rurban joined, cibs left 09:35 RabidGravy joined, mcmillhj joined
Geth doc: 07af2a607f | (Wenzel P. P. Peppmeyer)++ | doc/Language/quoting.pod6
fix table layout
09:36
09:36 lukaramu joined
RabidGravy Not sure why I'm on "virginmediabusiness" now 09:36
09:36 cibs joined
RabidGravy I guess that's how the work VPN enters the internet 09:37
09:38 TEttinger left 09:39 mcmillhj left 09:43 wolfram left 09:45 xtreak left 09:47 xtreak joined, stmuk joined
gfldex RabidGravy: it's actually quite easy to search for: `find -iname '*.p6' -or -name '*.pm6' -or -name '*.pm' | xargs grep '\.?'` 09:48
seams to be quite popular with exceptions and nativacall
09:49 stmuk_ left 09:53 mr_ron joined
RabidGravy yeah I always forget what type of regular expressions the grep that I find myself using at any time might support 10:00
10:03 mr_ron left 10:09 pierre_ left
andrzejku yesterday my friend asked me if I join to Perlers witnesses 10:09
10:10 pierre_ joined 10:14 gregf_ left, pierre_ left
DrForr Never heard of 'em. 10:17
10:19 rurban left
lucs Could 'witnesses' be an English to Polish to English version of 'mongers'? 10:24
10:25 agentzh joined
lucs s/Polish/not quite sure what/ 10:25
10:25 rurban joined, pyrimidine joined 10:28 rurban left 10:29 agentzh left, stmuk_ joined 10:31 pyrimidine left 10:32 stmuk left 10:37 itaipu joined 10:40 cibs left, Wanderer68 joined 10:41 cibs joined 10:42 andrzeju_ joined, robertle joined 10:44 rurban joined
tadzik I think it's a joke about Jehovah's Witnesses 10:45
gfldex well, we do have a guru
10:45 andrzejku left
DrForr It's certainly a reference. But we're not going to find out for a little while. 10:46
10:47 andrzeju_ left, Wanderer68 left 10:54 rurban left 10:56 rurban joined 11:01 cibs left 11:03 cibs joined 11:05 john51 joined 11:09 rurban left 11:13 rurban joined 11:16 labster left 11:18 stmuk joined 11:20 stmuk_ left
Geth doc: f0ed86afd0 | (Tom Browder)++ | doc/Type/Proc.pod6
it's not a slurpy arg
11:21
11:22 stmuk_ joined 11:25 stmuk left 11:28 pyrimidine joined 11:30 stmuk joined
CIAvash Isn't that commit wrong? ↑ 11:30
11:30 stmuk_ left 11:31 bjz joined 11:33 pyrimidine left, agentzh joined 11:34 go|dfish joined 11:35 stmuk_ joined, stmuk left
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: github.com/rakudo/rakudo/blob/fb38...oc.pm#L142
Geth doc: 83bfabe929 | (Tom Browder)++ | doc/Type/Proc.pod6
add method run, correct shell signature
11:37
11:37 agentzh left
CIAvash tbrowder: It doesn't have to be the last arg 11:39
Geth doc: 47618c2c7b | (Tom Browder)++ | doc/Type/Proc.pod6
correct run signature
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 || ]/
camelia 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
IOninja m: say 'asd' ~~ /[ || s || a ]/ 11:42
camelia 「a」
IOninja m: say 'asd' ~~ /[ || s || a || '']/
camelia 「a」
ZzZombo m: say 'asd' ~~ /g:[ || s || a || ]/
camelia 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
ZzZombo m: say 'asd' ~~ /g:[ || s || a ]/
camelia Nil
11:42 bjz left
ZzZombo wtf is null regex 11:43
11:43 Geth left
IOninja one without stuff to match 11:43
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
11:46 bjz joined
IOninja github.com/rakudo/rakudo/blob/fb38...oc.pm#L102 11:48
Well, the whole sig is wrong. 11:49
11:51 abraxxa left 11:52 zakharyas left 11:54 rurban left 11:55 zakharyas joined 11:56 wamba1 left, RabidGravy left, buggable left, buggable joined, ChanServ sets mode: +v buggable 11:57 Geth joined, ChanServ sets mode: +v Geth
tbrowder okay, will try again. it helps to look at the code, doesn't it? 11:59
11:59 xtreak left 12:00 abraxxa joined 12:01 xtreak joined 12:07 RabidGravy joined
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:08
ZzZombo m: say 'asd' ~~ /:g[ || s || a ]/ 12:09
camelia 5===SORRY!5=== Error while compiling <tmp>
Unrecognized regex modifier :g
at <tmp>:1
------> 3say 'asd' ~~ /:7⏏5g[ || s || a ]/
expecting any of:
term
ZzZombo m: say 'asd' ~~ m:g/[ || s || a ]/ 12:10
camelia (「a」 「s」)
ZzZombo m: say 'asd' ~~ m:g/[ s || a ]/
camelia (「a」 「s」)
ZzZombo why [ || s ] doesn't match an empty string? 12:11
12:13 erdic joined 12:14 xtreak left
Geth doc: b379c9a3f8 | (Tom Browder)++ | doc/Type/Proc.pod6
run is not a method

correct signature of method shell
12:14
12:16 araraloren joined 12:19 rurban joined 12:22 wamba1 joined
[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:22
12:26 bjz_ joined 12:27 bjz left 12:28 rindolf left, Sqirrel joined
IOninja Yup, I too know it to be the case for the same reason. 12:29
12:29 pyrimidine joined
IOninja Null regex is not allowed. Quote an empty string if you meant nothing 12:30
But it being first alternative don't make much sense :)
arnsholt Or use <?> 12:31
12:34 pyrimidine left 12:37 peteretep left 12:38 avalenn left 12:39 avalenn joined, rindolf joined, peteretep joined 12:41 cibs left 12:42 cibs joined
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:45
12:47 mr-foobar left
jnthn ZzZombo: token does not, rule does 12:50
ZzZombo: In rules, significant whitespace is replaced with a call to <.ws> 12:51
The default one is something like <!ww> || \s+ 12:52
But you can write your own token ws to change that
araraloren m: grammar T { token digit { \d+ }; token string { \w+ }; rule TOP { <digit> <string> }; }; say T.parse("123\nwobla");
camelia 「123
wobla」
digit => 「123」
string => 「wobla」
araraloren m: grammar T { token digit { \d+ }; token string { \w+ }; token TOP { <digit> <string> }; }; say T.parse("123\nwobla"); 12:53
camelia Nil
12:56 cibs left 12:57 cibs joined 13:00 nhywyll joined, agentzh joined, bjz joined 13:01 bjz_ left 13:03 Stown joined 13:04 agentzh left
RabidGravy so much for the "working from home is easy with vagrant" - it just took me four hours to get this working :-\ 13:06
Woodi hallo today :) 13:08
ZzZombo token babble($l, @base_tweaks?) { 13:09
:my @extra_tweaks;
what is this? The grammar docs seem to miss much :/
Woodi jnthn: re rules: and what <!ww> is by default ? ! <ww> so ! \w ?
13:10 wamba1 left
ZzZombo <ww> means "within word". 13:10
Woodi pmurias++
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 github.com/ohmycloud/rakudo-and-nq...-course-zh
ZzZombo ugh, I-I am unable to read... that? 13:12
araraloren ...why ?
jnthn Woodi: Not between two \w chars
araraloren <ws> is white space , i think .
arnsholt <ws> is whitespace
Woodi pmurias: I found on Wiki link to paper that says CPS is bad and propose to replace it with something simpler: users.soe.ucsc.edu/~cormac/papers/pldi93.pdf 13:13
jnthn: that a bit madness ;)
...from baby user perspective :) 13:14
jnthn Woodi: It "does what you mean"
13:14 mr_ron joined
jnthn $a+$b # !ww is true between a and + so don't need whitespace there 13:14
araraloren The dot after **<** means non-captured, such as <.ws> 13:15
13:15 cale2 joined
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
*my 13:16
ZzZombo can you read this: "Тухайн мэдээлэлые өөршэлхэ, баяжуулха боломжо хүн бүридэ нээлтэтэй байдаг.", araraloren?
Geth doc: 0c421ace11 | (Tom Browder)++ | doc/Type/IO.pod6
neaten comments
13:16 Stown left
Woodi ZzZombo: no, but I see symbols :) 13:16
ZzZombo arnsholt: I know that, but I want to see what it looks like exactly. 13:17
see, same here, it's gibberish for me.
[Coke] github.com/perl6/nqp/blob/master/s...r.nqp#L102 13:18
araraloren ZzZombo, my mistake, this is the EN version: github.com/edumentab/rakudo-and-nq...als-course
ZzZombo huh, it somehow looks also for Perl comments? 13:19
[Coke] that's the simple nqp version. Rakudo's is more complicated: github.com/rakudo/rakudo/blob/nom/...r.nqp#L612
but yes, <ws> is used to skip whitespace and comments. 13:20
13:20 travis-ci joined
travis-ci Doc build errored. Tom Browder 'run is not a method 13:20
travis-ci.org/perl6/doc/builds/204170717 github.com/perl6/doc/compare/47618...79c9a3f8bf
13:20 travis-ci left
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?
We redefine <ws> in rakudo to include all sorts of stuff.
arnsholt ZzZombo: The default definition is in NQP, src/QRegex/Cursor.nqp
That's the definition you get in a plain grammar Foo {} 13:22
IOninja m: say '#Fooo' ~~ /<ws>/
camelia 「」
ws => 「」
IOninja See no comments
ZzZombo what repo is src/QRegex/Cursor.nqp in? 13:23
IOninja arnsholt: and what is it? In Cursor I only see a method.
ZzZombo: perl6/nqp
arnsholt IOninja: What is what? 13:24
IOninja arnsholt: what does <ws> match in plain grammar Foo {}
araraloren ZzZombo, here github.com/perl6/nqp/tree/master/src/QRegex
arnsholt What it says in the code O:)
IOninja OK
arnsholt If I read it correctly, anything with the whitespace property 13:25
(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.`
arnsholt So that you'll get a zero-length match in the middle of ")a" but not in "ab" 13:27
IOninja ah
m: say "ab" ~~ /a <ws> b/
camelia Nil
IOninja m: say "ab" ~~ /')' <ws> b/
camelia Nil
IOninja m: say ")b" ~~ /')' <ws> b/ 13:28
camelia 「)b」
ws => 「」
IOninja cool
arnsholt araraloren: What docs are that?
araraloren docs.perl6.org/language/grammars#index-entry-ws
IOninja araraloren: yeah, it's wrong. 13:29
And I bet I wrote it too...
IOninja fixes
araraloren Oh..
timotimo ZzZombo: please note that i later corrected myself that you actually need $/[0].list instead of $/.list
IOninja Yup, t'was me
13:29 TimToady left
arnsholt The *Perl 6* grammar includes that stuff in its <ws>, but the default is pretty bare-bones 13:30
13:31 TimToady joined, wamba joined, pyrimidine joined, lukiramu joined
IOninja Yup. The younger and dummer IOninja wrote that I meant :) 13:32
just wanna find what nqp::const::CCLASS_WHITESPACE matches
Geth doc: 5b1788c18f | (Tom Browder)++ | doc/Type/Proc.pod6
tweak grammar
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"
IOninja
.oO( sub use (|) { die "This isn't the compiler you're looking for" }
13:34
13:34 john51_ joined
IOninja ) 13:34
13:35 lukaramu left
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
m: sub circumfix:<? :> ($x) {}; ?42:
13:36 pyrimidine left
camelia ( no output ) 13:36
13:37 john51 left
IOninja m: m: sub infix:<?> ($, $) {}; sub infix:<:> ($, $) {}; 42 ? 42, 5 : 5 13:37
camelia 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
IOninja m: say
camelia 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…
IOninja m: :foo<STDIN>
camelia 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>
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
IOninja m: sub use (|) { say "test" }; use v6 13:39
camelia ( no output )
IOninja m: sub use (|) { say "test" }; use 6
camelia test
IOninja heh
13:40 nhywyll left
IOninja huh 13:40
m: use v5 13:41
camelia ===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
IOninja Interesting.
Sticking a matcher for [ '5.' <[\d.]>+ ] in here maybe? github.com/rakudo/rakudo/blob/nom/...1594-L1620 13:42
or as another alternative in that conditional 13:43
13:47 llfourn_ joined
cale2 Found this blog post again and cleared up my question: 6guts.wordpress.com/2016/11/25/per...ood-thing/ 13:47
13:47 llfourn left 13:48 bjz left
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
13:48 mcmillhj joined
IOninja default" to private attributes... 13:48
oh, I was meant to update the grammar doc! 13:49
13:53 telex left 13:54 telex joined
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:55
moritz you always get an array of matches when you use a quantifier 13:56
(foo)+ makes $0 an array
(I don't know the context, just spewing general knowledge here) 13:57
arnsholt Except the ? quantifier, no?
Or am I misremembering?
timotimo m: "hello" ~~ / (lol)? /; dd $/[0] 13:58
camelia Nil
timotimo m: "hello" ~~ / (lo)? /; dd $/[0]
camelia Nil
timotimo oh, right
13:58 dj_goku left
timotimo earliest match wins 13:58
m: "hello" ~~ / .*(lo)? /; dd $/[0]
camelia Nil
timotimo m: "hello" ~~ / hel(lo)? /; dd $/[0]
camelia Match.new(ast => Any, list => (), hash => Map.new(()), to => 5, orig => "hello", from => 3)
araraloren m: say "aaa" ~~ /(\w)+/; 13:59
camelia 「aaa」
0 => 「a」
0 => 「a」
0 => 「a」
Geth doc: c2060901d2 | (Zoffix Znet)++ | doc/Language/grammars.pod6
Correct erroneous info on default <ws> token
araraloren m: "aaa" ~~ /(\w)+/; dd $/[0] 14:00
camelia [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 =>…
cale2 IOninja: I'm just speaking of the better choice when given the option between $!foo and $.foo 14:01
design-wise
moritz arnsholt: yes, ? is special 14:03
araraloren m: "aaa" ~~ /(\w)+?/; say $/[0] 14:04
camelia [「a」]
timotimo you can always get a list there if you want by using ** 0..1 14:05
IOninja huh, I thought ? was greedy
moritz no, the opposite
well, ? is greed, +? is frugal
araraloren yeah, not greed
IOninja No, I meant ?
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
m: say "hello" ~~ / (lol)? /;
camelia 「」
araraloren ? is a quantifer, hm ?
IOninja moritz: then how come there's no capture ^ there?
moritz IOninja: the "left-most match first" wins over ? being greedy
it also wins over LTM, or any such rules 14:07
it's really the rule with highest precedence
IOninja m: say "hello" ~~ / (lo)? /;
camelia 「」
IOninja m: say "hello" ~~ / (ll)? . /;
camelia 「h」
IOninja m: say "hello" ~~ / . (ll)? . /;
camelia 「he」
araraloren m: say "hello" ~~ m:P5/ . (ll)? . /; 14:08
camelia False
IOninja m: say "hllo" ~~ / . (ll)? . /;
camelia 「hllo」
0 => 「ll」
IOninja OK, I think I get it. Thanks.
araraloren m: say "hello" ~~ m:P5/.(ll)?./;
camelia 「he」
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 14:12 curan left 14:15 yadzi joined, AlexDaniel joined
AlexDaniel \o/ 14:18
IOninja | 14:19
/\
araraloren -------- 14:20
14:21 retupmoca left
IOninja 🐛🐛 🐛 🐛 🐛 14:21
AlexDaniel 👾 👾 👾 14:22
14:22 pyrimidine joined
AlexDaniel wait… wrong way :P 14:22
u: ALIEN 14:24
unicodable6 AlexDaniel, U+1F47D EXTRATERRESTRIAL ALIEN [So] (👽)
AlexDaniel, U+1F47E ALIEN MONSTER [So] (👾) 14:25
AlexDaniel wonders when you should use one or another…
IOninja m: "42".comb: {} 14:26
camelia 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 = *, *%_…
IOninja m: "42".comb: {;}
camelia 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 = *, *%…
IOninja why do we have a test for this one.
Um... well, I guess infiniloop is bad. 14:27
AlexDaniel well, let's see!
c: all "42".comb: {;}
14:27 pyrimidi_ joined
IOninja AlexDaniel: it's RT #66340 14:27
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=66340
committable6 AlexDaniel, gist.github.com/ba0e2a6035a2bed33b...a8af796715
IOninja I'm just annoyed it's interfering with my fix :P
But then that means we got hangs in all the Cool capture forwarders... 14:28
AlexDaniel IOninja: well, welcome to the club!
IOninja m: ''.words: {;}
camelia Cannot resolve caller Numeric(Block: ); none of these signatures match:
(Mu:U \v: *%_)
in block <unit> at <tmp> line 1
14:28 itcharlie1 joined
IOninja AlexDaniel: what sort of club? 14:28
AlexDaniel IOninja: “I fixed something, but there's a stupid test”
IOninja heh 14:29
14:29 travis-ci joined
travis-ci Doc build errored. Tom Browder 'neaten comments' 14:29
travis-ci.org/perl6/doc/builds/204189050 github.com/perl6/doc/compare/b379c...421ace119e
14:29 travis-ci left, sena_kun joined
IOninja hm, the only reason .lines and .words don't hang is we accept any type... 14:30
m: ''.words: |<la la la>
Aha. Well, that's a hang
14:30 pyrimidine left
IOninja m: ''.lines: |<la la la> 14:30
that too 14:31
m: ''.subst: |<la la la>
That three
camelia (timeout)
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:31 pyrimidi_ left
IOninja Ahhh. I see. Duh. Don't make Cool method a proto 14:32
AlexDaniel IOninja: good that we had a test :D
IOninja hehe
I guess in the long run, yes :)
AlexDaniel huggable: TimToady 14:35
huggable AlexDaniel, nothing found
AlexDaniel huggable: TimToady :is: 👽
huggable AlexDaniel, Added TimToady as 👽
IOninja u: 👽 14:36
unicodable6 IOninja, U+1F47D EXTRATERRESTRIAL ALIEN [So] (👽)
IOninja heh, why?
AlexDaniel I just though we might want to have an entry for those who wonder who TimToady is 14:37
IOninja huggable: TimToady :is: 👦🐸
huggable IOninja, Added TimToady as 👦🐸
AlexDaniel that's not a very precise definition, I guess, but feel free to improve :)
huggable: TimToady :is: 👦‍🐸 14:39
huggable AlexDaniel, Added TimToady as 👦‍🐸
IOninja hehe :) That's more accurate :)
14:42 tharkun left, tharkun joined 14:44 lichtkind__ joined 14:45 girafe joined 14:47 cdg joined, lichtkind_ left, bwisti joined 14:48 wamba left 14:56 skids joined, wamba1 joined 14:57 travis-ci joined
travis-ci Doc build passed. Tom Browder 'tweak grammar' 14:58
travis-ci.org/perl6/doc/builds/204194315 github.com/perl6/doc/compare/0c421...1788c18fb2
14:58 travis-ci left 15:01 rurban left 15:05 mcsnolte joined, pyrimidine joined
sena_kun [Coke], github.com/perl6/doc/issues/1194#i...-281695160 15:06
15:14 cibs left 15:16 cibs joined 15:17 wamba1 left 15:21 cibs left 15:22 araraloren left 15:23 cibs joined, araraloren joined
Geth doc: 5fe17c8e1d | Altai-man++ | doc/Language/grammars.pod6
Fix examples
15:28
15:29 travis-ci joined
travis-ci Doc build passed. Zoffix Znet 'Correct erroneous info on default <ws> token' 15:29
travis-ci.org/perl6/doc/builds/204203357 github.com/perl6/doc/compare/5b178...060901d25d
15:29 travis-ci left
Geth doc: 854dc48757 | (Zoffix Znet)++ | doc/Language/grammars.pod6
Fix typo
15:31
15:36 khw joined 15:37 AlexDaniel left 15:41 mcmillhj_ joined 15:42 mcmillhj left 15:43 Actualeyes joined
Geth doc: 2a02ba23cb | (Will "Coke" Coleda)++ | xt/examples-compilation.t
Have walk return actual code
15:44
15:45 mcmillhj_ left 15:46 mcmillhj joined
[Coke] (docs) several of the samples in doc/Type/Sub.pod6 are dying with "write string requires an object with REPR MVMOSHandle" 15:48
sena_kun++
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.
IOninja that sounds like trying to call a method on a closed filehandle 15:50
and I saw IO::Handle.new used as a dummy, eh?
sena_kun IOninja, yep.
IOninja m: IO::Handle.new.lines
camelia 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
IOninja s: (IO::Handle.new.lines; exit)
SourceBaby IOninja, Something's wrong: ␤ERR:
IOninja s: (IO::Handle.new.get; exit) 15:51
oops
SourceBaby IOninja, Something's wrong: ␤ERR: readline requires an object with REPR MVMOSHandle␤ in block <unit> at -e line 6␤␤
IOninja Ah, no oops but yey :)
sena_kun [Coke], I'm closing the issue?
[Coke] IOninja, sena_kun: we need to put IO::String bakc.
IOninja [Coke]: which examples, OOC?
[Coke] That class handles this case, whereas the bare IO::Handle does not 15:52
IOninja: e.g. gist.github.com/coke/9f4df5c5b90b3...3cbbe98fb6
IOninja I guess it's the `say 'start'` that does it.. 15:53
Geth doc: 97f2eca0c1 | (Will "Coke" Coleda)++ | 2 files
Revert "remove dep on IO::String"

This reverts commit 8f1d849c82e042cd25497a6f1b7c4d2868860e3e.
Some of the more complex examples require this class.
[Coke] sena_kun++ for noticing I broke everything. :) 15:54
IOninja s: (class { ::?CLASS.^add_method: $_, -> | {} for IO::Handle.^methods».name }.new.get; exit) 15:55
SourceBaby IOninja, Something's wrong: ␤ERR:
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. :)
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
[Coke] I don't really have a problem with having a dep. 15:56
IOninja :)
15:58 rurban1 joined
[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:02 erdic left
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:03
[Coke] any code chunk is run as a free-standing bit of code, and isn't run so much as fake-compiled. 16:04
16:04 El_Che left
[Coke] (it's wrapped in an if False { } to avoid most things) 16:04
IOninja Ah
16:04 araraloren left 16:05 erdic joined
[Coke] tries another 'make xtest' to see if it fails again. 16:05
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
IOninja :o 16:06
m: $*OUT.close; say "meow"
camelia write string requires an object with REPR MVMOSHandle
in block <unit> at <tmp> line 1
16:06 pyrimidine left 16:07 pyrimidine joined
IOninja m: BEGIN $*OUT.close, $*ERR.close; 42 16:07
camelia ( no output )
IOninja m: BEGIN $*OUT.close, $*ERR.close; note "meow"
camelia ( no output )
IOninja Well, I would be interesting in seeing which examples. I guess this falls under IO stuff? :) 16:08
16:08 koki1 left
[Coke] well, i can see output like; 16:08
Useless use of constant integer 500000 in sink context (lines 2, 3)
Redeclaration of symbol '$fh'
so there's two big ones. :) 16:09
IOninja m: BEGIN $*OUT.close, $*ERR.close; my $fh; my $fh
camelia ( no output )
IOninja m: my $fh; my $fh
camelia Potential difficulties:
Redeclaration of symbol '$fh'
at <tmp>:1
------> 3my $fh; my $fh7⏏5<EOL>
IOninja Feels like it's a bug in your examples runner, at first glance.
[Coke] m: $*ERR=IO::Handle.new; my $fh; my $fh; 16:10
camelia 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…
[Coke] m: $*ERR=IO::Handle.new; note "eek"
camelia 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
[Coke] note that they both complain about the class, but the first one also slips the warning out 16:10
gist.github.com/coke/e9cc048b059a8...14076b43ae 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
e.g. gist.github.com/coke/e9cc048b059a8...-out-L2014
16:14 raiph joined
IOninja [Coke]: yeah, because the warning is compile time, but you override $*ERR at runtime 16:15
m: BEGIN $*ERR=IO::Handle.new; my $fh; my $fh;
camelia 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 …
IOninja s: (BEGIN $*ERR=IO::Handle.new; my $fh; my $fh; exit;)
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];␤
[Coke] ok, then:
IOninja hmmm
[Coke] github.com/perl6/doc/blob/master/x...tion.t#L84 16:16
IOninja Yeah, it still complains even with BEGIN
[Coke] I'm EVAL'ing the code; the overriden has already happened before any EVAL code.
ah. :)
*override
IOninja++ 16:17
IOninja ?
[Coke] you verified my bug. :)
IOninja Ah :)
raiph .tell TimToady Imo it would work well if you provided a short answer to www.perlmonks.org/?node_id=3333;parent=1182520 16:18
yoleaux raiph: I'll pass your message to TimToady.
16:18 prlante joined, rurban1 left
prlante I have a question!! stackoverflow.com/q/42391754/2774153 Can anyone help? 16:18
16:18 erdic left
[Coke] doesn't have to be TimToady. 16:18
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
16:19 rurban joined, erdic joined
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.
IOninja but the code wants .sum
m: (1..1000000000).race.grep(* %% 5).sum.say
camelia (signal XCPU) 16:21
IOninja prlante: well, there's another way to skin this cat. Just generate a Seq of 5s
perlpilot prlante: use more math?
stmuk_ one for anyone who thinks our spokesbug isn't a nice logo
upspin.io/
IOninja m: say (5, 10 … 1000000000).sum
camelia (timeout) 16:22
16:22 rurban left
[Coke] m: my $fives := (1...1000000000).lazy.grep(*%%5); say $fives[^100]; 16:22
camelia (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…
IOninja stmuk_: that's just an ugly animal. Our logo is worse, design-wise
[Coke] m: my $fives := (1...1000000000).lazy.grep(*%%5); say $fives[^10];
camelia (5 10 15 20 25 30 35 40 45 50)
raiph I'm confused. I added a stickied (well, 'announcement') link to p6weekly.wordpress.com/ so it should always link to latest.
IOninja: ^^
IOninja OK then
Whoever linked them in the past linked to the actual article, so you could see when the new one came out. 16:23
m: say 1000000000/5
camelia 200000000
prlante IOninja Not working . Output is ".sum was unexpected at this time." 16:24
IOninja wat
prlante: which code did you run?
Never saw such errors... 16:25
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
[Coke] prlante: btw, %%5 is "is divisible by 5" 16:27
prlante Any use of concurrency here?
[Coke] prlante: look at my example above.
prlante I am running this: (5,10,15...1000000000).sum
[Coke] that lets you ask for results in chunks rather than trying to generate them all up front.
raiph IOninja: Sure. I've done most of them.
IOninja prlante: if that's your actual code, a math solution is more apt...
prlante In python it showed memory error and I am trying in Perl 6.
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
IOninja: This way the top link is always pointing to the latest and says so.
IOninja: (Fwiw I'd personally prefer to shut /r/perl6 down and focus on /r/perl.)
IOninja prlante: lemme see what happens on my 32-core box
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
alphah Q: Is Enum type dynamic during compilation or runtime? for example can I add/delete elements to Enum after creating it?
IOninja raiph: any time I look at r/perl there's some drama post
raiph IOninja: Which is why I got /r/perl6 going again and have stuck with it 16:30
IOninja m: Bool.^methods.say
camelia (<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…
prlante raiph Lets make Perl 6 great language.
IOninja heh 16:31
prlante IOninja its 9 minutes , no output
IOninja prlante: well, in Perl 5 it too gives me out of memory :) 16:32
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
IOninja tries
prlante IOninja Is there no way of solving it?
raiph prlante: Imo it already is. cf www.perlmonks.org/?node_id=1182509
16:33 dj_goku joined
IOninja Well, I can get up to 208GB of RAM on this box... 16:33
prlante: well, what exactly do you mean by "it"? 16:34
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
prlante www.perlmonks.org/?node_id=1182509 Yeah lets make perl 6 great. 16:35
IOninja I mean solving this problem
16:36 coreutil joined, ggoebel left
IOninja Well, I'm no mathematicial, but I'm sure the formula is easy. 16:37
16:37 coreutil left
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:37
[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++?
[Coke] prlante: if you really mean THIS specific problem, you're doing it the hard way.
IOninja well, rotoring is concurring is kinda useless since it's reification of the seq that's taking ages
[Coke] prlante: can you clarify?
IOninja prlante: because you're creating a ginourmous list.
m: say 1000000000/1024/1024/1024 16:39
camelia 0.93132257
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
m: say 1000000000/5/1024/1024/1024 16:40
camelia 0.18626451
IOninja Well, I guess smaller by 5, but still big
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
IOninja Oh, well, I see lizmat++ posted one already
timotimo: we tried that already
camelia (timeout)
IOninja reifying that seq alone takes ages 16:42
timotimo i wonder how to make it aware that it can throw the values away
IOninja Ah
In your version, it does, I think 16:43
m: say (5, 10 ... 1000)
camelia (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…
timotimo that seq will definitely give very bad gc performance
[Coke] m: my $upper = 1000000000; my $interval = 5; my $sum = (1+($upper/$interval))*($upper/$interval/2)*$interval; say $sum 16:44
camelia 100000000500000000
[Coke] I mean, if you just want the numeric answer as fast as possible, I'm pretty sure that algorithm is slightly faster.
(and potentially correct :)
timotimo "slightly" :)
sena_kun 4000000100000000?
IOninja m: say ((5, 10 … 100).sum, (5, 10 … 1000).sum, (5, 10 … 10000).sum … *)[^10]
camelia Unable to deduce arithmetic or geometric sequence from 1050,100500,10005000 (or did you really mean '..'?)
in block <unit> at <tmp> line 1
IOninja aww
timotimo hmm, that number is only 29 bits wide 16:45
maybe the sum fits into a 64bit int?
m: say 100000000500000000.msb
camelia 56
[Coke] m: my $upper = 1000000000; my $interval = 5; my $sum = (1+$upper/$interval)*($upper/2); say $sum
camelia 100000000500000000
timotimo yeah, it would
if we used native ints for that task, it'd make the gc problem disappear
IOninja wait a second... 16:46
m: .say for (5, 10 … 100).sum, (5, 10 … 1000).sum, (5, 10 … 10000).sum
camelia 1050
100500
10005000
IOninja I was right on the money!
It's a stupid seq maker that can't figure it out
[Coke] IOninja: ah, sum is smart?
timotimo it is for simple sums
IOninja [Coke]: don't think so... There's a shortcut for Ranges 16:47
But I mean, there's a pattern in the sum
sena_kun math.stackexchange.com/questions/5...sible-by-7 - just change the particular numbers according to the problem.
timotimo oh, haha 16:48
i got the wrong answer in my code because i used < instead of <=
99999999500000000
IOninja m: say "The sum is 1$_5$_" given 0 x '1000000000'.chars-2
camelia 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
IOninja m: say "The sum is 1{$_}5{$_}" given 0 x '1000000000'.chars-2
camelia The sum is 100000000500000000
IOninja prlante: ^ there's your answer.
perlpilot IOninja++ 16:49
IOninja timotimo: how did you get your 100000000500000000 from?
perlpilot (even though it doesn't generalize, it's still a nice solution :)
IOninja Oh, from [Coke]'s solution?
m: say "The sum is 1{$_}5{$_}" given 0 x '100000000000000000000000000000000000000000000000000000000000'.chars-2
camelia The sum is 1000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000
IOninja hehe :)
timotimo IOninja: perl6 -e 'my $a = 0; loop (my $_ = 0; $_ < 1000000000; $_+=5) { $a += $_ }; say $a' 16:50
currently running the same with native ints
IOninja Ah 16:51
timotimo i forgot to put "time" in front
IOninja I'm gonna try a concurrency solution...
timotimo but its memory doesn't grow, which isn't a surprise
hey, it finished
16:51 gregf_ joined
lizmat anyways, I'm about to commit a fix that will make %% about 14x as fast for moest cases 16:51
*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
timotimo whoa
IOninja lizmat: holy crap :o
lizmat just need to spectest it
perlpilot lizmat++ nice!
prlante IOninja Is 100000000500000000 the answer?? 16:56
IOninja prlante: yeah
16:56 b2gills left
timotimo um, no, 42 is the answer 16:56
IOninja m: say WHY 'Life, the Universe and Everything':
camelia 42
prlante how did you solve ? Where's the code?
IOninja m: say "The sum is 1{$_}5{$_}" given 0 x '1000000000'.chars-2 16:57
camelia The sum is 100000000500000000
timotimo 301.77user 0.28system 5:03.93elapsed 99%CPU (0avgtext+0avgdata 88640maxresident)k
239.02user 7.73system 4:07.77elapsed 99%CPU (0avgtext+0avgdata 79568maxresident)k
IOninja prlante: also this link for generic mathy solution: math.stackexchange.com/questions/5...sible-by-7
lizmat hmmm.... spectest failures :-( back to the drawing board
timotimo that's the Int version up above and the int version down below
IOninja not bad
timotimo oh
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 ...
IOninja Which version is that?
timotimo that's what you get when you write $i = $i + 5 instead of $i += 5
Geth ecosystem: FCO++ created pull request #299:
change meta name of my modules
IOninja wat
timotimo yes.
wat indeed
IOninja 100x faster for just that change :o
timotimo more than 100x
tony-o SmokeMachine: i'll take a look, i know that github was erroring out trying to pull some repos
timotimo m: say 239 / 2 16:59
camelia 119.5
timotimo :P
Geth ecosystem: 146831fd53 | (Fernando Correa de Oliveira)++ | META.list
change meta name of my modules (#299)

  * Adding DateTime::Extended to the ecosystem
  github.com/FCO/DateTime-Extended
  * change meta name of my modules
16:59 RabidGravy left
perlpilot timotimo: now all you need is a "+= considered slow" post to go with it :)
timotimo all *i* need is a patch for the optimizer :)
IOninja \o/
tony-o SmokeMachine: what's your GH username?
lizmat that's what we all need :-)
first dinner&
SmokeMachine tony-o: FCO
timotimo .o( what about second breakfast? )
SmokeMachine tony-o: I just changed my META names... 17:00
IOninja SmokeMachine: aren't you a membder of perl6 org?
17:00 prlante left
SmokeMachine IOninja: do you mean on GH? 17:00
IOninja Yes
SmokeMachine IOninja: I am
IOninja So why PR and not just commit? :) 17:01
SmokeMachine IOninja: just to be sure... shouldn't I?
perlpilot SmokeMachine: forgiveness >>> permission
IOninja SmokeMachine: ¯\_(ツ)_/¯ seems easier to just commit 17:02
SmokeMachine perlpilot: ok, so... can I accept my MR?
IOninja revert feature works :)
SmokeMachine IOninja: ^^
IOninja You can.
SmokeMachine :)
IOninja But I meant don't do the PR and commit directly :)
17:03 pmurias joined
timotimo neat. 17:03
using $i = $i + 5 also makes the Int version a bunch faster
139.15user 0.06system 2:20.39elapsed 99%CPU (0avgtext+0avgdata 88616maxresident)k
about 2x faster
SmokeMachine IOninja: ok... Ill do that next time... this time some one accepted before me... 17:04
IOninja Yeah, you can't beat the speed of a... NINJA! 17:05
SmokeMachine en.wikipedia.org/wiki/Masaaki_Hatsumi 17:06
IOninja: thanks!
17:08 haxmeister joined
haxmeister hello perl6 17:08
IOninja \o
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?
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
17:10 robertle left
perlpilot File::Basename? 17:10
17:10 b2gills joined
haxmeister basename 17:10
ilmari .basename?
haxmeister that's prolly it thanks
perlpilot oh ... thought I was on #perl for a second
haxmeister \o/
17:12 RabidGravy joined
IOninja haxmeister: it can be handy to look at methods offered by the type... 17:13
m: "/sys/bus/pci/devices/0000:00:1b.0".IO.^name.say 17:14
camelia IO::Path
IOninja haxmeister: ^ so that's the type, that means you can visit docs.perl6.org/type/IO::Path and in the table of contents you can see all the methods you can call
m: "/sys/bus/pci/devices/0000:00:1b.0".IO.^methods».name.say
camelia (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…
IOninja ^ or do that :)
IOninja gives a sideways glance to new-from-absolute-path 17:15
17:16 st_elmo joined
IOninja perlpilot: so what was your mathy solution? 17:16
17:19 abraxxa left
tony-o SmokeMachine: i'm still trying to find the problem in my cron jobs - 17:27
all of your repos are on my server
in the DB, even 17:29
SmokeMachine tony-o: strange: modules.zef.pm/search?terms=Fuzz should return the same of modules.perl6.org/?q=Fuzz shouldn't? 17:30
tony-o it should, in some cases, return more
i'm taking a look, there is definitely something not quite right
thank you for saying something about it, too SmokeMachine++ 17:31
17:31 ggoebel joined
SmokeMachine tony-o: :) 17:31
17:32 wamba1 joined
IOninja is mildly dissapointed .map: *..* don't work :( 17:34
.map: {$^a..$^b} just doesn't have the same ring to it
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:35
IOninja m: sub mysum($n,$d) { my $f = floor($n/$d); (($f*$d + $d) * $f) / 2 }; say mysum 10000, 5 17:37
camelia 10005000
IOninja m: sub mysum($n,$d) { my $f = floor($n/$d); (($f*$d + $d) * $f) / 2 }; say mysum 10000000, 5
camelia 10000005000000
IOninja perlpilot: which SO had?
17:37 Dunearhp joined
IOninja m: sub mysum($n,$d) { my $f = floor($n/$d); (($f*$d + $d) * $f) / 2 }; say mysum 10000000, 3|5 17:38
camelia any(16666668333333, 10000005000000)
IOninja heh
SmokeMachine IOninja: perlpilot: what means SO on that context?
IOninja SmokeMachine: StackOverflow
the website
SmokeMachine IOninja: ok, thanks!
IOninja perlpilot: I'm cooking up a multi-core solution, for fun, pretty sexy one-liner 17:39
perlpilot cool
IOninja: as for which SO ... the one where summing numbers divisible by 7 up to 1000 17:40
IOninja perlpilot: ah. I guess it went over my head. My code version of it took forever to run 17:41
m: gist.github.com/zoffixznet/fb63596...8e8e05d4f9 17:42
camelia 10005000
IOninja I wish that uggo map was (*^..*) :)
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
sena_kun *easily 17:44
17:47 agentzh left
ilmari waves at timeless :) 17:47
timeless hi
but didn't i agree w/ you on something else in postgres too? 17:48
(my index is much weaker than your average database's ...)
dylanwh so stronger than mysql? 17:49
timeless i'm amazed at how the email and database people try to manage patches...
17:49 Dunearhp left
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:50 Dunearhp joined
timotimo wow, that's concerning 17:50
dylanwh mutters about "3-byte utf8"
timeless has touched those
17:50 jonas1 left
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
17:51 agentzh joined
ilmari timeless: are you a colleague of dylanwh's? (guessing purely based on the firefox/developer cloak) 17:51
RabidGravy ilmari! 17:52
ilmari RabidGravy: \o/
small world!
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? )
timeless yes
dylanwh (I'm assuming he, sorry if that is wrong. bad me!)
timeless that's about right
same me
although dylanwh seems to be missing his cloak?
or am i able to see through it since we're sharing a cloak?
timeless hasn't really thought about freenode cloaks much 17:54
dylanwh: btw, i was amused that bugzilla had better emoji support than jira
dylanwh I never bothered setting anything like that up
RabidGravy I've been working at the same place as ilmari since October and I only saw him for the first time last Friday
dylanwh 2600:3c03::f03c:91ff:fe33:4998 should resolve back to hardison.net but I think I broke that.
timeless dylanwh: historically reed could get you one
ilmari RabidGravy: well, same company, different office
timeless dylanwh: well, hardison.net forward resolves to it 17:55
dylanwh timeless: we have better performance too. And getting better. :-)
timeless dylanwh: and better ui imo
timeless is biased
timeless hates jira
dylanwh haha, that is debateable. I h ope to fix that a lot this year.
somehow, with less resources.
17:55 agentzh left
timeless personally i don't like ajax (hrm, is that out of style?) 17:56
17:57 robertle joined
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
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
moritz: a well-managed jira instace can be tolerable
and because the dropped state has no outbound transitions, it can't be fixed (even by an admin)
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
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;
SmokeMachine tony-o: \o/ 18:03
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:05
18:05 pyrimidine left 18:06 pyrimidine joined
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:06
timeless moritz: i'm the admin 18:08
but ime, the admin is never the problem 18:09
it's always the person who's "managing workflow"
moritz can non-admins manage workflow? 18:10
timeless it doesn't matter :)
moritz ah
timeless if the admin is asked to set up a stupid workflow
do you blame the admin?
(please don't!)
18:10 pyrimidine left 18:12 andrzejku left
arnsholt JIRA is kind of like make, IME. Terrible, but all of the alternatives are worse 18:12
18:12 andrzejku joined 18:14 pyrimidine joined
IOninja Hm, why does .race's :degree default to measly 4? 18:14
no wonder I'm not getting any juice! 18:15
18:16 andrzejku left 18:19 RabidGravy left
IOninja craaaao 18:20
*craaap
My brilliant code that uses 32 cores is... 18:21
m: say 19.549/5.143
camelia 3.801089
IOninja is almost 4 times SLOWER than when not using any concurrency :/
Wonder if that's due to .race's bustitude
18:22 st_elmo left
IOninja Unless I'm doing something wrong. here's the code: gist.github.com/zoffixznet/bcd5eba...cde4205ae6 18:22
Nope, changing it to using Promises is slow as hell too 18:25
Even worse with promises... 18:26
m: say 0m28.052s/5.143 18:27
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3say 07⏏5m28.052s/5.143
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
IOninja m: say 28.052/5.143
camelia 5.454404
18:27 andrzejku joined
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?
IOninja buggable: eco Twitter 18:30
buggable IOninja, Twitter 'Twitter API': github.com/zoffixznet/perl6-Twitter
IOninja that one has a OAuth1 module inside of it
*OAuth1-that's-enough-to-auth-to-Twitter module...
18:31 RabidGravy joined
cale2 Yep, thanks! 18:31
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:33
18:37 zakharyas left, RabidGravy left
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:43
IOninja Isn't oauth2 pretty widely in use? So I'd say, yes. 18:44
cale2 Should oauth1 and oauth2 both be in an Auth:: namespace? 18:46
Auth::Oauth1, Auth::Oauth2, Auth::SAML, etc
IOninja Why? 18:47
What's the point of making programmer type all this extra cruft.
cale2 How else would it be organized?
IOninja OAuth1, OAuth2 done
using tags in the metafile
cale2 I didn't know how that worked. On CPAN things seem to be organized under larger namespaces 18:48
IOninja design.perl6.org/S22.html#tags
cale2 almost like folders
IOninja Yeah, and the result is modules with giant names: metacpan.org/pod/POE::Component::I...ingItWrong 18:49
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
18:51 RabidGravy joined
cale2 ncie 18:51
nice
18:59 Tonik joined 19:01 japhb left 19:06 cdg left 19:08 japhb joined
RabidGravy most unproductive day of working from home EVAH! 19:13
IOninja RabidGravy: get cracking! 19:17
IOninja snaps the whip
19:24 gdonald left, darutoko left
RabidGravy I spent several hours trying to get the vagrant box working 19:25
IOninja heh
lizmat aaahh... spectest failures were caused by setting / roast mismatch 19:32
IOninja \o/ 19:40
SmokeMachine tony-o: \o/ thanks!
19:40 CIAvash left, Actualeyes left
SmokeMachine tony-o: does it get the documentation from pod? 19:40
19:42 awwaiid left 19:44 ggoebel left 19:51 hankache joined
cale2 tony-o: do you have a Server::Router that works with your Async server? 19:51
hankache hello #perl6 19:52
moritz \o 19:55
19:57 agentzh joined
RabidGravy cale2, he does bur I can't remember what it's called 19:58
19:58 espadrine joined 19:59 ttkp6 left
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 www.perlmonks.org/?node_id=3333;parent=1182520
20:01 agentzh left 20:02 AlexDaniel joined 20:03 bjz joined
cale2 Does my soda machine metaphor hold up here: github.com/WildYorkies/peregrinati...s-iosocket 20:07
and what about here: github.com/WildYorkies/peregrinati...ocketasync
20:10 ttkp6 joined 20:14 Wanderer68 joined, Wanderer68 left 20:18 agentzh joined 20:21 ggoebel joined 20:26 agentzh left, Technaton left 20:28 Technaton joined
SmokeMachine tony-o: here: modules.zef.pm/profile/Fernando%20C...20Oliveira the last line (probably representing the DataTime::Extended) is empty... 20:30
20:36 mcmillhj left 20:38 hankache left 20:39 mcmillhj joined, hankache joined 20:42 pyrimidine left, pyrimidine joined 20:45 mcmillhj left 20:47 pyrimidine left 20:48 mr_ron left 20:58 awwaiid joined 21:01 labster joined 21:02 bjz left 21:04 cdg joined 21:06 itaipu left 21:09 sufrostico joined, itaipu joined
robertle docs.perl6.org/language/modules says that "sub bar is export(:other) { ... }" is the same as "my package EXPORT::other { ... } " 21:09
so what is the equivalent to "sub bar is export(:other, :another)" ?? 21:10
I want to use the my package trick, but want to put in "DEFAULT" and "oop"...
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:11
robertle right, "is export" looks nicer, but can I do that without a "unit" at the top? 21:12
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
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
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
jnthn I guess you know about being able to do `my role Foo is export(:oop) { }`
Where Foo will only be exported via the tag?
robertle that's what I am trying to do
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
and without the "unit" at the top I don't seem to be able to do "is export", but I can do "my package..."
jnthn If you declare it with "my" it's a lexical class, and it will not be visible via the enclosing package
robertle right, so how do I make it available then. need some indirection... 21:17
jnthn m: module Foo { my class C is export(:oop) { } }; say Foo::<C>:exists; { import Foo :oop; say C }; 21:18
camelia False
(C)
jnthn m: module Foo { class C is export(:oop) { } }; say Foo::<C>:exists; { import Foo :oop; say C };
camelia True
(C)
21:18 cdg_ joined
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:19
21:20 bjz joined
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... :)
robertle just as if I had a "unit role Foo"
but the .pm6 is not a role, so I can also have procedural bits
can you give me an example of such a module? 21:21
jnthn It's a class rather than a role, but github.com/jnthn/p6-concurrent-ite...erator.pm6 comes to mind
21:22 cdg left
robertle perfect example! so you want to be able to "use Concurrent::Iterator", right? 21:22
jnthn That's how you use it, yes 21:24
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:25
21:28 gensym joined
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?
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: gist.github.com/jnthn/49bf86b9ece4...3daafba020
robertle so is there a way to add a tag to the implicit export from the "unit" line?
sorry
21:31 bjz left
moritz robertle: you could try "also is export(:FOO)" 21:31
dunno if that works
21:32 itcharlie1 left
jnthn moritz++ 21:32
Yeah, you can't have "my unit module"
In general, though, I don't think having qualified names available "by default" is a particularly problematic thing. 21:33
21:34 andrzejku left
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:35
21:35 sufrostico left
robertle 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:37
jnthn I tend to just put them in META6.json 21:38
21:38 hankache left 21:39 cdg joined 21:43 cdg_ left 21:45 sufrostico joined
robertle great, this stuff works now! thanks! 21:45
21:46 Tonik left, sufrostico left
jnthn :) 21:49
21:51 girafe left
alphah Hello Perl6 21:51
moritz \o
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 labster left
moritz alphah: the usual way is to implement the different cases as multis 21:52
alphah: multi sub MAIN(:$conf1, :$conf2, Bool :$conf3) { ... }; multi sub MAIN('command1') { }; etc 21:53
alphah: perlgeek.de/blog-en/perl-6/2016-bo...erter.html has an example 21:54
21:55 wamba1 left 21:56 itaipu left
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:56
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.
moritz modules.perl6.org/#q=getopt
actually, modules.perl6.org/#q=getopt # :-) 21:58
alphah Thanks for the quick response guys, I will definitely look at these options and choose what works best for me 21:59
21:59 sena_kun left
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:00
22:01 TEttinger joined
jnthn The the MAIN subs do little more than specify the CLI 22:01
*So the
IOninja buggable: eco getopt 22:04
buggable IOninja, Found 6 results: Getopt::Tiny, Getopt::Long, Getopt::Type, Getopt::Kinoko, Getopt::Std. See modules.perl6.org/#q=getopt
22:04 skids left 22:05 Actualeyes joined 22:06 buggable left, buggable joined, ChanServ sets mode: +v buggable
IOninja buggable: eco getopt 22:06
buggable IOninja, Found 6 results: Getopt::Tiny, Getopt::Long, Getopt::Type, Getopt::Kinoko, Getopt::Std. See modules.perl6.org/#q=getopt
IOninja \o/ 22:07
22:10 RabidGravy left 22:19 cdg left 22:23 cdg joined, MasterDuke left 22:24 MasterDuke joined 22:33 mcmillhj joined 22:37 Voldenet left, agentzh joined 22:41 kyan left, Voldenet joined, Voldenet left, Voldenet joined 22:42 rindolf left 22:48 agentzh left 22:52 mcmillhj left, Actualeyes left 22:58 mr_ron joined 22:59 haxmeister left 23:07 nowan left 23:12 dotness joined
tony-o cale2: HTTP::Router should work with HTTP::Server::Async 23:12
23:13 dotness left 23:18 lukiramu left 23:21 espadrine left 23:23 pyrimidine joined 23:31 pyrimidine left 23:33 imcsk8 left, imcsk8 joined 23:34 pmurias left 23:37 lep-delete left 23:40 itcharlie1 joined 23:41 lep-delete joined 23:45 kyan joined 23:48 agentzh joined 23:56 llfourn_ left 23:58 labster joined