»ö« 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.
Geth doc: ffeddb16c7 | (JJ Merelo)++ | doc/Language/containers.pod6
Rewrites sentence on sigilless variable

Thanks to @jimav for the suggestion. Also rewrites some other things here and there. Refs #1784.
08:39
synopsebot Link: doc.perl6.org/language/containers
DrForr o/ 11:05
DrForr I'm thinking about pushing a CommonMark library binding to CPAN/m.p6.org - Can someone point me to a proper module that does linking/loading? 11:09
timotimo so, what kinds of "stage parse" times are you folks getting? 14:58
i'm wondering if i should look around for a better CPU in the near future or if i can wait another generation 14:59
right now i'm getting 65 seconds :(
sena_kun timotimo, for rakudo building? I stopped to use rakudobrew some time ago, but I can remember it to be around 50 seconds, like 50-51 or something like that. 15:02
timotimo that was probably before specter/meltdown made everything slower :S 15:03
sena_kun I am not really sure I have patches for that(yeah, I know, it really sucks) now, but yeah, before that. 15:04
sena_kun yet I have just a 7500U(note the "U"), I am sure some 7xxxHQ will grind it much faster. 15:11
sharksoft is it possible to have (List) squish return the count of each item it squishes? i.e. (a b b c c c).squish return something like (a 1 b 2 c 3) 15:13
timotimo mine's a i5-3570 15:21
sena_kun sharksoft, maybe you want something like Bag(docs.perl6.org/type/Bag)? 15:23
m: <a b b c c c>.Bag
camelia ( no output )
sena_kun m: say <a b b c c c>.Bag
camelia Bag(a, b(2), c(3))
timotimo not quite
they want RLE
sharksoft: examples.perl6.org/categories/99-problems.html - check out examples for problems 10, 11, 12, and 13 15:24
timotimo though i haven't looked at any of the code and can't tell you if they are idiomatic 15:24
sena_kun oh, we have 99 problems solved, nice.
Zoffix timotimo: on my home box it hovers around 80s (right now was 89s, but I have Fallout 4 running). On my 24core VM I usually get around upper 60s, lower 70s 15:26
50 is pretty damn good. Wait another gen :)
sena_kun o.0
I have ssd too, it can make a difference too. 15:27
Zoffix I have SSD on homebox.
sena_kun then never mind. :) 15:28
sharksoft timotimo: great, thanks!
timotimo i also have an ssd 15:29
timotimo --optimize=0 for moarvm makes that time balloon up past 100 seconds :( 15:52
MasterDuke timotimo: fwiw, i get 80-90s on both desktop and laptop (i7-860 and i5-4200U respectively). that's with MoarVM built with --debug=3 16:40
you should ask nine and dogbert17, i think they are getting much better numbers with their ryzens 16:41
timotimo well, adding more debug doesn't make things noticably slower
MasterDuke i think i see a difference, but very tiny, just a couple seconds 16:43
timotimo huh. 16:45
MasterDuke but my time are pretty variable on the laptop, it's very dependent on what sort of throttling is going on, so i could just be imaging it 16:46
DrForr o/ 18:01
dpk p6: say "Ⅻ" ~~ /:ignorecase XII/ 18:42
camelia Nil
AlexDaniel unidump: Ⅻ
unicodable6 AlexDaniel, gist.github.com/6fbf90351c4c8973b9...8a1d3a29db
AlexDaniel p6: say "Ⅻ" ~~ /:ignorecase ⅻ/ 18:43
camelia 5===SORRY!5=== Error while compiling <tmp>
Unrecognized regex metacharacter ⅻ (must be quoted to match literally)
at <tmp>:1
------> 3say "Ⅻ" ~~ /:ignorecase7⏏5 ⅻ/
expecting any of:
infix stopper
AlexDaniel p6: say "Ⅻ" ~~ /:ignorecase ‘ⅻ’/
camelia 「Ⅻ」
lelf could someone unpuzzle me perlpunks.de/paste/show/5a89c93e.706e.13
AlexDaniel dpk: so why do you think it should match? :) or what's the question? 18:44
lelf: could it be this? docs.perl6.org/language/traps#LEAV..._you_think 18:45
dpk i'm puzzled by what you did differently that time, other than spell xii in lowercase, which doesn't make it match when i do it 18:46
AlexDaniel dpk: in your case you have three letters X I I
dpk ah
aha
i don't expect it to match, i just expect the behaviour to be consistent. which it is :-) 18:47
Zoffix lelf: the unpuzzle is .map produces a Seq, which is evaluated lazily. You call `foo` with a code block that closes over the $out handle, foo() creates a Seq with a map call that calls that closure and returns it. MAIN then returns that Seq and it gets sunk somewhere and only *then* does the `fun($_)` stuff gets run, which is past the point of leaving MAIN and past the point of when the handle got closed. You 18:49
you prefix line #2 with `eager`, to force evaluation of the Seq right then and there: `eager <one two three>.map: { fun($_) };`
lelf AlexDaniel: but… it's defined in my case
Zoffix s/You you/You could/; 18:50
AlexDaniel: FWIW, I tested the `use Test; use Test` test covers the bug. I guess maybe the bot's setup just prevents exercising it (I think it doesn't precompile or something, right?) 18:51
lelf Zoffix: thanks. lazy I/O punches an unsuspecting haskeller in perl6! :D 18:56
Zoffix :D 18:59
APic 8===D 19:00
Zoffix Nice scissors...
APic *nod* 19:01
DrForr They look more like haemostats :)
AlexDaniel these are actually “meatball scissors” 19:07
APic *shrug*
Geth doc: 003d59bcbd | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
Clarify C<»> and C<map> interchangeability trap

  - Use simpler example
  - » uses both deepmap and nodemap
  - Clarify why execution order is not guaranteed
19:10
synopsebot Link: doc.perl6.org/language/traps
El_Che 8<
DrForr Which module should I look for in order to properly do NativeCall? 19:11
(the basic calls work, I just want to mae sure I'm addressing the native($value) call. 19:12
APic Good old Scissors. 19:14
AlexDaniel DrForr: I don't think I understand the question, but what about github.com/Skarsnik/gptrixie ?
DrForr No worries. 19:15
I've wrapped libcmark (CommonMark - Markdown with a proper spec) and wanted to make sure I'm selecting the library in a portable fashion. 19:16
I'm also tempted to make the library "switch over" to a pure-Perl version if it "can't find" the C library, but I'm not sure if that's the right thing to do. 19:17
Er, the module. 19:18
APic lol 19:19
DrForr Mm, not quite what I was after. 19:23
I have a 'sub cmark_render_xml(...) is native(...)' call, and I'm after a module that properly declares the library name. 19:24
At the moment I'm just doing "is native('cmark')" - I just want to make sure I'm DTRT. 19:25
timotimo youl'll usually want a version in there, too 19:26
DrForr Righto. 19:27
travis-ci Doc build failed. Zoffix Znet 'Clarify C<»> and C<map> interchangeability trap 19:29
travis-ci.org/perl6/doc/builds/343086590 github.com/perl6/doc/compare/ffedd...3d59bcbde3
Geth doc: 2940fb04e7 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
Fix pod error
19:33
synopsebot Link: doc.perl6.org/language/traps
travis-ci Doc build errored. Zoffix Znet 'Fix pod error' 19:35
travis-ci.org/perl6/doc/builds/343092037 github.com/perl6/doc/compare/003d5...40fb04e7ad
DrForr Ah, $*VM.config... 19:35
Voldenet m: "ąężźć".encode("ISO-8859-2").say 21:13
camelia Unknown string encoding 'ISO-8859-2'
in block <unit> at <tmp> line 1
Voldenet Is there any way to use custom encodings? The manual isn't so verbose about how would one register class doing role Encoding 21:17
as the possible encoding
geekosaur I think not currently; encodings depend on backend support (moarvm/jvm) 21:34
Voldenet ugh, so the best bet would be probably passing the Buf object to C and then iconv it from/to utf8 21:36
or, since I'm working with files, just qx iconv :) 21:37
jnthn You can write encodings at Perl 6 level 21:44
yoleaux 14:12Z <brrt> jnthn: I think when I split the if_o into istrue + if_i, I think i need to move at least some annotations onto the istrue, but possibly not all
jnthn Granted it's not well documented yet, but it's just a case of implementing some roles and registering it 21:45
Voldenet Hm, Encoding never requires implementing alternative-names (which is understandable) 21:57
Voldenet but the original method returns Empty, which isn't iterable, which gives... quite weird error 21:59
m: Encoding::Registry.register(class :: does Encoding { method name { return "test" }; method decoder {}; method encoder {}; }.new())
camelia ( no output )
Voldenet huh, nevermind 22:00
I'll update
comborico1611 Personal question, how many spaces do you use to ident code? 22:50
indent*
Voldenet 2
comborico1611 That's what I do, but I'm not thinking it is enough now. 22:50
Tab is a no-no, right?
Voldenet some people hate on tabs, but tabs also work 22:51
with added bonus that anyone can set them to their own preference
comborico1611 I didn't know that. 22:52
lizmat fwiw, I have a *string* preference for spaces vs tabs, and 4 spaces if you want a number :-)
comborico1611 lizmat: Is it because tabs can be different system-to-system or program to program? 22:53
4 spaces looks nice. But SO much work.
El_Che tab == 4 spaces for perl 5, 6, go ; tab == 2 for ruby, yaml and puppet
Voldenet comborico1611: good editor would take care of spaces anyway 22:54
El_Che comborico1611: fix your editor
comborico1611 Hmm. Interesting El_Che
Emacs is so complicated . . .
I love it, though.
Voldenet that's not how you write vim
El_Che comborico1611: I use vim and intellij
comborico1611 Thanks for the input, guys. 22:59
I knew I could count on you.
Ulti +1 for 4 space, also the argument for and against tabs is basically you dont want to mix them, and some indentation you will want to character rather than tabstop align 23:02
chaining .methods for examle
comborico1611 Is there any way we can know which kinds of identations character space rather than tab? 23:04
which kinds of identations are better with character space
Ulti yeah just look at what white space is the most frequent prefix of a line 23:05
most editors that aren't trash do that sort of thing
lizmat puts "# vim: ft=perl6 expandtab sw=4" at the end of each file :-)
Ulti yeah editor directives too ;)
comborico1611 Hmm. I'm not understanding. I'll just need to wait till it bites me in the butt.
Ulti well if you are typing spaces by hand its already biting you in the butt 23:06
comborico1611 Ignorance is bliss sort of thing.
Plus, I haven't been doing very much coding. 23:07
Ulti comborico1611: www.emacswiki.org/emacs/IndentationBasics
comborico1611 The book I learned from, Deitel, the author teaches to do three physical spaces. :-(
Ulti: Thanks!
Ulti: For better or worse, I have overridden the tab setting for all modes in .emacs file 23:08
Voldenet ugh, how comes I can use my custom encoding to encode a string
but can't use it to decode it 23:09
ix.io/Mi6
I understand this should give me some silly error, but it doesn't
comborico1611 El_Che: You program in all those? (Go, Ruby, . . . ) 23:12
Voldenet meh, I'm giving up on custom encodings for now, it sounds not very easy to implement, I'll just write a method to convert Blob into string 23:15
timotimo there's still weak spots in the implementation, for example the registry isn't used everywhere and some places still only accept strings and circumvent the registry and all that 23:16
Voldenet But who in the right mind would use custom encoding... ;) 23:20
timotimo it'd be cool if someone could champion that issue … 23:21
jnthn timotimo: Where isn't it used, ooc? 23:23
(I thought all the I/O handles used it, and the .encode and .decode methods too) 23:24
timotimo i'm not quite sure where i encountered it; i looked like 2 months ago maybe?
looks like i complained about Blob.encode 23:25
decode* 23:26
comborico1611 Thanks for the help guys. Bye! 23:32