»ö« 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 mcmillhj left 00:11 mcmillhj joined 00:16 mcmillhj left 00:20 comborico1611 joined 00:24 ryn1x joined 00:28 mcmillhj joined, ryn1x left 00:33 mcmillhj left 00:35 pecastro joined 00:36 Cabanossi left 00:38 knight__ left, mcmillhj joined 00:39 Cabanossi joined 00:42 espadrine joined, ryn1x joined 00:44 mcmillhj left 00:47 ryn1x left 00:49 wamba joined 00:52 cdg left 00:53 cdg joined 00:55 mcmillhj joined 00:56 ryn1x joined 00:57 cdg left 00:59 mcmillhj left 01:00 MasterDuke left 01:05 ryn1x left 01:10 mcmillhj joined 01:16 mcmillhj left 01:17 nadim left 01:18 aborazmeh joined, aborazmeh left, aborazmeh joined 01:24 mcmillhj joined 01:28 mcmillhj left 01:30 ryn1x joined 01:35 ryn1x left, Aaronepower left, ryn1x joined 01:43 Aaronepower joined 01:44 ryn1x left, kalkin--- joined 01:45 nadim joined 01:48 kalkin-- left 01:54 cdg joined 01:56 mcmillhj joined, dogbert17 left
comborico1611 Pong 01:59
02:00 mcmillhj left 02:01 Cabanossi left 02:02 ryn1x joined 02:03 Cabanossi joined 02:09 mcmillhj joined 02:11 ryn1x left 02:12 kaare__ joined 02:14 mcmillhj left 02:15 kaare_ left 02:17 darkmorph is now known as kitsunenokenja
wander m: use MONKEY-SEE-NO-EVAL;say EVAL("=begin pod\n=item 42\n=end pod\n\$=pod"); 02:18
camelia [Pod::Block::Named{:name("pod")}
Pod::Item{:level("1")}
Pod::Block::Para
42
]
wander m: use MONKEY-SEE-NO-EVAL;say EVAL("=begin pod\n=head 42\n=end pod\n\$=pod");
camelia [Pod::Block::Named{:name("pod")}
Pod::Block::Named{:name("head")}
Pod::Block::Para
42
]
wander m: use MONKEY-SEE-NO-EVAL;say EVAL("=begin pod\n=head1 42\n=end pod\n\$=pod"); 02:19
camelia [Pod::Block::Named{:name("pod")}
Pod::Heading{:level("1")}
Pod::Block::Para
42
]
wander m: use MONKEY-SEE-NO-EVAL;say EVAL("=begin pod\n=code 42\n=end pod\n\$=pod");
camelia [Pod::Block::Named{:name("pod")}
Pod::Block::Code
42


]
wander why some of these guys' contents are 'Pod::Block::Para'?
02:20 mtj_ joined
wander when using `=headn` or `=item`, i want a one line head/item 02:21
02:21 Cabanossi left
wander especially, we provide classes `Pod::Heading` and `Pod::Item` for them 02:22
02:22 Cabanossi joined
wander however, we treat their contents as `Pod::Block::Para` 02:22
github.com/perl6/Pod-To-HTML/blob/...#L214-L239 02:26
that is why we have to use `:$inside-heading` to check if a Para is inside a Heading
too tricky
02:28 mcmillhj joined 02:33 mcmillhj left 02:34 redhands joined 02:38 ryn1x joined 02:39 Aaronepower left 02:42 mcmillhj joined 02:43 ryn1x left 02:45 cdg left 02:46 ilbot3 left 02:47 mcmillhj left, ryn1x joined
SmokeMachine is there a way to a macro create a dynamic var? 02:48
comborico1611 I'm sorry, I'm a beginner. 02:51
02:51 kitsunenokenja left 02:55 ilbot3 joined, ChanServ sets mode: +v ilbot3 02:57 mcmillhj joined
wander well, to recursively deal with pod-code, it's good to pack them into a Pod::Block::Sth 02:59
03:01 mcmillhj left 03:02 unicodable6 left, unicodable6 joined 03:03 Aaronepower joined 03:04 wamba left 03:07 Cabanossi left 03:09 Cabanossi joined 03:16 noganex joined 03:19 noganex_ left, nadim left
comborico1611 Goodnight, guys! 03:22
03:22 comborico1611 left 03:23 dj left 03:24 Cabanossi left, colomon left 03:25 mcmillhj joined 03:26 ufobat_ joined, Cabanossi joined 03:29 ufobat left 03:30 mcmillhj left 03:34 colomon joined, mr-fooba_ left 03:36 mr-foobar joined 03:40 mcmillhj joined 03:42 char_var[buffer] joined 03:44 mcmillhj left 03:47 cdg_ joined 03:52 cdg_ left 03:55 telex left 03:56 telex joined 03:59 mcmillhj joined 04:02 mson joined 04:03 mr-foobar left 04:04 mcmillhj left 04:07 mr-foobar joined 04:09 aborazmeh left 04:11 Cabanossi left 04:12 Cabanossi joined 04:18 mcmillhj joined 04:21 Actualeyes joined 04:22 mcmillhj left 04:29 mcmillhj joined 04:33 mr-foobar left 04:34 mcmillhj left 04:37 mr-foobar joined 04:38 HoboWithAShotgun left
ZzZombo Explain, please: 04:43
m: say (1,2).any > 0
camelia any(True, True)
ZzZombo m: say (1,2).any != 0
camelia True
04:47 mcmillhj joined 04:52 mcmillhj left
wander someone have talked about it 04:52
ZzZombo: (1,2).any != 0
equals
!((1,2).any == 0) 04:53
m: say !((1,2).any == 0)
camelia True
wander that's the problem
! is a metaop here
04:53 redhands left
wander m: [1,2,3,4,5,6].map(*.say) 04:54
camelia 1
2
3
4
5
6
wander timotimo: can i assume when `map` applies on an *Array*, it applies from left to right? 04:55
that is, by how Array iterates
05:02 mcmillhj joined 05:07 mcmillhj left 05:09 MasterDuke joined
AlexDaniel wander: yes, if you're convinced that it is an array 05:28
05:29 espadrine left
AlexDaniel wander: if there's a chance that it might be a HyperSeq then you can't assume that 05:29
m: sub foo($a) { say WHAT $a }; foo <a b c>.hyper
camelia (HyperSeq)
wander thank you
05:34 mr-foobar left, AlexDaniel left 05:35 mr-foobar joined, dugword joined 05:40 dugword left 05:52 cdg joined 05:55 Cabanossi left 05:57 Cabanossi joined, cdg left 06:01 troys_ is now known as troys 06:02 mr-fooba_ joined 06:05 mr-foobar left 06:20 mr-fooba_ left 06:21 dominix joined, khw left
dominix hi 06:21
may someone gime me a hint on "were and how does perl6 compile bytecode to ?" i didn't catch on rakudo.org. 06:23
06:23 mr-foobar joined
dominix perl5 compile source code to ast and then directly execute it. 06:24
went does perl6 compile ? every time ? or just one time ? were in the bytecode ? 06:25
06:33 piojo joined 06:39 wamba joined 06:50 mr-foobar left 06:51 mson left 06:53 mr-foobar joined 06:54 piojo left 06:56 Cabanossi left 06:57 char_var[buffer] left, Cabanossi joined 07:02 mcmillhj joined 07:03 geospeck joined 07:04 geospeck left 07:06 piojo joined 07:08 mcmillhj left 07:30 BenGoldberg left 07:31 troys left, darutoko joined 07:37 Cabanossi left, Cabanossi joined 07:41 dominix left 07:51 geospeck joined, Cabanossi left 07:54 llfourn joined 07:56 geospeck left 08:01 parv joined 08:02 geospeck joined 08:11 Cabanossi joined 08:13 nadim joined 08:19 mr-foobar left 08:22 geospeck left 08:23 mr-foobar joined 08:29 Cabanossi left
wander how to test if an object has a special method? 08:29
A.new.has-method("method-name")
something like ^^
08:31 Cabanossi joined
wander dd c[0].^find_method("config"); works(?) 08:31
moritz m: say Int.^can('sqrt') 08:32
camelia (sqrt sqrt)
moritz m: say so Int.^can('sqrt')
camelia True
moritz m: say so Int.^can('fasel')
camelia False
wander gotcha 08:36
08:38 setty1 joined 08:39 kekko joined
wander BTW, how `--doc=...` works? if i directly invoke `render`, render runs once; but by `--doc=...`, it runs some times. 08:39
kekko bn giorno
!list
08:39 darutoko left 08:40 kekko left 08:44 rindolf joined, cdg joined, darutoko joined 08:49 cdg left, mr-foobar left 08:52 wamba left 08:57 ryn1x left 09:03 mcmillhj joined, wamba joined 09:07 mcmillhj left
ZzZombo m: say 'asd'.((^100).pick >= 50 ?? "succ" !! "pred")() 09:13
camelia No such method 'CALL-ME' for invocant of type 'Str'
in block <unit> at <tmp> line 1
ZzZombo ??
09:14 itaylor57 left 09:15 itaylor57 joined 09:18 espadrine joined
parv ZzZombo, don't you have to define "succ|pred" method to be able to call? Or, am i missing something? 09:18
09:18 Cabanossi left
ZzZombo They are already defined. 09:18
parv ok
ZzZombo m: 'asd'.pred.say
camelia asc
09:20 parv left 09:21 Cabanossi joined, parv joined 09:25 japhb joined 09:27 yqt joined 09:28 rindolf left
wander ZzZombo: 09:31
m: say 'asd'."$_"() given ((^100).pick >= 50 ?? "succ" !! "pred")
camelia asc
ZzZombo great, thanks! Clever :) 09:32
wander anyway, it's not macro expanding, but parsing
s/anyway/after all/ 09:33
09:38 sena_kun joined 09:39 espadrine left 09:54 rindolf joined 09:56 ryn1x joined 10:01 ryn1x left 10:04 setty1 left 10:18 Cabanossi left 10:19 ChoHag left 10:21 Cabanossi joined 10:23 ShalokShalom_ joined 10:26 ShalokShalom left 10:28 Anthony_ joined
Anthony_ Hey folks, I tried to port a simple K (APL derivative) one-liner (`primes:{1+&2=+/~(1+!x)!\:/:1+!x}`) to Perl 6 and my P6 solution is much much slower (and more verbose). Do you know how I could fix any of this issues? `sub primes($n){grep {2 == [+] $_ <<%%<< (1..$n)}, 1..$n}` 10:29
moritz m: sub primes($n) { (2..$n).grep(*.is-prime) }; say primes(50) 10:30
camelia (2 3 5 7 11 13 17 19 23 29 31 37 41 43 47)
Anthony_ moritz. Yeah that would of course work with a very high probability 10:31
but I'm trying to transcribe the algorithm
there are waaaay better ways to calc primes
so it's really the procedure that matters for me
moritz I don't see anything obviously wrong with your Perl 6 translation 10:32
Anthony_ okay
I can understand why Perl6's performance is worse in this case
it is obviously not tuned for that style
but I thought there might be some fundamental issue with this
moritz and if you are chasing characters, you can replace << with « 10:33
Anthony_ the only real-world language with heavy use of unicode :)
I love it :D
moritz :-)
Anthony_ thank you :) 10:34
Do you know the X hyperop?
because I tried using it, but it always flats the result 10:35
m: (1..10) X+ (1..10)
camelia Potential difficulties:
Useless use of X+ in sink context
at <tmp>:1
------> 3(1..10) 7⏏5X+ (1..10)
Anthony_ ups
moritz m: say it, but it always flats the result
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routines:
always used at line 1
but used at line 1. Did you mean 'put'?
flats used at line 1. Did you mean 'flat', 'last'?
it used at line 1
result used at line …
moritz ups :-)
Anthony_ :D
moritz m: dd (1..10) X+ (1..10)
camelia (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 9, 10…
Anthony_ yeah 10:36
is there a way to get a list of lists out of that?
moritz m: dd (1..10) X, (1..10)
camelia ((1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9), (1, 10), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (2, 10), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (3, 10), (4, 1),…
Anthony_ m: dd (1..10) X (1..10)
camelia ((1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9), (1, 10), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (2, 10), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (3, 10), (4, 1),…
Anthony_ cool
moritz m: dd (1..10).map({ $_ X+ 1..10})
camelia ((2, 3, 4, 5, 6, 7, 8, 9, 10, 11).Seq, (3, 4, 5, 6, 7, 8, 9, 10, 11, 12).Seq, (4, 5, 6, 7, 8, 9, 10, 11, 12, 13).Seq, (5, 6, 7, 8, 9, 10, 11, 12, 13, 14).Seq, (6, 7, 8, 9, 10, 11, 12, 13, 14, 15).Seq, (7, 8, 9, 10, 11, 12, 13, 14, 15, 16).Seq, (8, 9, …
Anthony_ that's nice 10:37
moritz that's a way to get it non-flat
Anthony_ thanks
10:38 HoboWithAShotgun joined
Anthony_ honestly, I think Perl 6 brings TIMTOWTDI to a whole new level... 10:39
10:45 Anthony_ left 10:47 lizmat left 10:48 domidumont joined 10:49 ChoHag joined, lizmat joined 10:52 __anthony joined 10:53 __anthony left, domidumont left, __anthony joined 10:54 domidumont joined 10:58 darutoko left, domidumont left, domidumont joined 11:00 cdg joined 11:04 __anthony left 11:05 cdg left 11:14 ryn1x joined 11:17 redhands joined, piojo left 11:19 ryn1x left, Cabanossi left 11:20 dct joined, Cabanossi joined 11:21 cdg joined 11:24 ryn1x joined 11:26 cdg left 11:29 ryn1x left 11:33 llfourn left 11:40 robertle joined 11:41 redhands left 11:50 Cabanossi left, Cabanossi joined 11:51 setty1 joined 12:03 setty1 left 12:04 Aaronepower left 12:07 darutoko joined 12:13 ryn1x joined 12:14 piojo joined 12:19 Cabanossi left 12:20 Cabanossi joined 12:22 ryn1x left 12:41 kitsunenokenja joined 12:42 cdg joined 12:45 Aaronepower joined 12:46 cdg left 12:50 Cabanossi left, Cabanossi joined 12:53 ryn1x joined 12:57 cdg joined 12:58 ryn1x left 13:08 Aaronepower left 13:10 Aaronepower joined 13:13 cdg left 13:15 dct left 13:19 domidumont left, Cabanossi left 13:20 AlexDaniel joined, Cabanossi joined
HoboWithAShotgun stackoverflow.com/questions/472483...-a-grammar good|bad|incomplete advice? 13:21
13:23 philomath joined 13:29 ryn1x joined 13:34 ryn1x left 13:37 Aaronepower left 13:47 Cabanossi left 13:48 cdg joined 13:50 Cabanossi joined
HoboWithAShotgun gets naked and roams around the channel, as nobody is looking anyway 13:54
moritz added an answer with a slightly different perspective 14:02
14:03 parv left
MasterDuke moritz: the syntax highlighting in your answer got messed up 14:07
moritz seems somebody fixed it already 14:09
piojo sorry :) 14:11
moritz no reason to apologize 14:12
piojo++
piojo moritz: And thanks for the thorough answer. I could have told how to access the data in that method, but I couldn't have eloquently explained why the approach was wrong.
masak moritz++ # eloquent 14:15
moritz piojo: you're welcome 14:17
btw, last week I attened a three-day workshop on software architecture from Neal Ford (one of the technical leaders at ThoughtWorks) 14:18
it was quite good, I can really recommend that course 14:19
sddconf.com/software_architecture_fundamentals/
14:19 llfourn joined 14:41 eliasr joined, imcsk8_ left, ryn1x joined 14:46 ryn1x left 14:48 Cabanossi left 14:50 imcsk8 joined, Cabanossi joined
piojo Is the <name>++ thing a competition of who helps the most people? 14:51
14:55 dugword joined
moritz not a competition, more a show of appreciation 14:55
we used to track "karma" from the ++ mentions too, but the bot died long ago 14:56
15:03 lizmat left, pecastro left 15:04 pecastro joined
piojo moritz: I see, then it's a slang from an old tradition 15:08
rather, a slang that is an old tradition
15:12 tangible6 left 15:13 tangible6 joined, ChanServ sets mode: +v tangible6, kitsunenokenja left 15:14 araraloren left 15:17 ryn1x joined 15:20 lizmat joined 15:22 ryn1x left 15:30 pecastro left 15:34 cdg left 15:35 khw joined, cdg joined 15:37 setty1 joined 15:40 cdg left 15:45 philomath left 15:51 Actualeyes left 15:52 Actualeyes joined 15:57 domidumont joined 15:58 Actualeyes left, Actualeyes joined, kitsunenokenja joined 16:00 Actualeyes left, Actualeyes joined 16:04 Cabanossi left 16:05 Cabanossi joined 16:11 zakharyas joined 16:18 Actualeyes left, Actualeyes joined 16:20 Actualeyes left, Actualeyes joined
moritz annoyed by Apress 16:33
for example, I present two expressions to demonstrate the usage :g
16:33 mson joined
moritz m: say '1 2 3'.subst(:g, /\s+/) 16:34
camelia Cannot resolve caller subst(Str: Regex, :g); none of these signatures match:
(Str:D $: Str:D $original, Str:D $final, *%options)
(Str:D $: $matcher, $replacement, *%options)
in block <unit> at <tmp> line 1
16:34 ryn1x joined
moritz m: say '1 2 3'.subst(:g, /\s+/, '') 16:34
camelia 123
moritz m: say '1 2 3'.subst( /\s+/, '')
camelia 12 3
moritz and they simply remove the whitespace from the second example output
and they screw up the vertical alignment of curly braces in some of the examples 16:35
16:35 cdg joined
moritz and earlier, I briefly mention the difference between "doit(1, 2, 3)" and "doit (1, 2, 3)", except that they also remove the blank before the parenthesis list in the second example 16:36
rendering the whole sentence meaningless
I'll self-publish my next book, should there be one. I prefer correct & medicore typesetting over wrong & beautiful typesetting 16:37
16:38 ryn1x left
AlexDaniel \o/ 16:39
16:41 pecastro joined 16:48 Cabanossi left 16:50 Cabanossi joined
jdv79 AlexDaniel: how long does it take for repro for you? 16:52
i ran it for 10mins with no issues
AlexDaniel jdv79: about 10 seconds 16:53
you sure the output is still changing after 10 minutes?
jdv79: fwiw it wasn't just one commit that addressed the issue, there were many changes done by lizmat++
the situation improved *a lot*
but it is still not fully resolved 16:54
jdv79 yeah, it was changing. i was running it next to a heavy conc app for load.
weird. my original real world code that indirectly spawned that ticket is resolved... 16:55
probably cause they aren't the same. I thought the golf used for gh1202 wasn't the same as my issue
ok, i got it to break by running more load 17:02
17:02 MasterDuke left 17:07 kitsunenokenja left
Geth doc: ea1a64a6ab | (Will "Coke" Coleda)++ | doc/Language/regexes.pod6
nbsp
17:07
doc: 5dae820a29 | (Will "Coke" Coleda)++ | type-graph.txt
remove class that requires "use"
synopsebot Link: doc.perl6.org/language/regexes
17:08 MasterDuke joined 17:12 ryn1x joined 17:16 ryn1x left 17:17 ryn1x joined 17:18 Cabanossi left 17:20 Cabanossi joined 17:22 ryn1x left 17:29 nadim left 17:33 pecastro left 17:47 pecastro joined 17:48 geospeck joined
Geth doc/master: 5 commits pushed by (Will "Coke" Coleda)++ 17:51
17:52 pecastro left 17:55 geospeck left 18:02 pecastro joined 18:11 rindolf left 18:13 rindolf joined 18:14 pecastro left 18:15 nadim joined 18:18 geospeck joined 18:20 pecastro joined 18:26 ryn1x joined 18:28 piojo left 18:31 napo1eon joined, ryn1x left 18:33 Cabanossi left 18:35 Cabanossi joined 18:45 Aaronepower joined 18:50 darutoko left 18:56 espadrine joined 18:59 zakharyas left 19:03 mingdao left 19:04 mingdao joined, nadim left 19:15 konsolebox left, zakharyas joined 19:17 dogbert17 joined 19:20 konsolebox joined 19:30 comborico1611 joined 19:34 ryn1x joined 19:37 setty1 left 19:38 pmurias joined 19:39 ryn1x left
AlexDaniel is there any way to .round a FatRat without getting a Num back? I'm trying to keep FatRats reasonably fast 19:50
19:58 robertle left, kitsunenokenja joined
HoboWithAShotgun i don't think so. but maybe ask in #math? 19:59
moritz should be possible with simple arithmetic and coercing to Int 20:03
if you want to round to 1e-9, you have to do FatRat.new(($number * 1_000_000_000).Int, 1_000_000_000) 20:04
20:08 domidumont left 20:11 kitsunenokenja left 20:12 pecastro left 20:15 tobor joined 20:19 tobor left 20:20 pecastro joined 20:26 pecastro left 20:31 pecastro joined 20:34 Cabanossi left 20:35 Cabanossi joined 20:38 ryn1x joined 22:44 evalable6 joined 22:49 Cabanossi left 22:50 Rawriful joined, Cabanossi joined 23:01 cdg joined 23:06 cdg left 23:07 nadim left 23:20 rindolf left 23:36 MasterDuke joined 23:37 char_var[buffer] joined 23:40 MasterDuke_ joined 23:43 MasterDuke left 23:47 MasterDuke_ left 23:48 margeas left, Cabanossi left 23:51 Cabanossi joined