»ö« 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:16 vichib joined 00:21 mingdao left 00:22 mingdao joined 00:23 espadrine joined
Geth doc: bff42f80b1 | (Zoffix Znet)++ | 3 files
Rename `.parse-names` to `.uniparse`

The original name existed only as a 6.d proposal and it was decided to align its name with other `uni*` routines for actual 6.d. The
  `.parse-names` method continues to exist in Rakudo impl. It'll
issue deprecation warning in 6.d and will be removed in 6.e
Rakudo impl: github.com/rakudo/rakudo/commit/2a8287cf89 Spec: github.com/perl6/roast/commit/3efe6cb8da
00:29
00:30 david_xd left, cdg left 00:35 david_xd joined 00:38 david_xd left
Geth doc: cdeb6dc786 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Str.pod6
Reword

  - better explanation of "speculative 6.d"
  - mention method exists only in Rakudo impl
00:39
synopsebot Link: doc.perl6.org/type/Str
00:43 cpage_ left 00:47 agwind joined 00:49 agwind left
Geth doc: 6c5e0cad9c | (Zoffix Znet)++ | doc/Type/Str.pod6
Mention uniparse() does not do \c[] decimal magic
00:56
synopsebot Link: doc.perl6.org/type/Str
tyil [eagerly awaiting the new perl 6 advent post] 00:57
01:00 rindolf left
Zoffix Don't see one scheduled. I know [Coke]++ was working on one and lizmat++ said [Coke]++ could swap hers to today's spot, if he needed more time. 01:02
titsuki_ hi #perl6. I have a question. 01:22
Are there any good examples or modules for handling wikipedia recent change api( www.mediawiki.org/wiki/API:Recent_...ges_stream )?
I found EventSource::Server( github.com/jonathanstowe/EventSource-Server ) but couldn't find a Perl6 version of EventSource (e.g. codepen.io/ottomata/pen/VKNyEw/). 01:23
01:26 troys is now known as troys_
Zoffix .seen [Coke] 01:27
yoleaux I saw [Coke] 21 Dec 2017 21:35Z in #perl6-dev: <[Coke]> If fosdem has no registration, how do organizers know if there's room?
01:27 pilne joined
Zoffix Plan to pop lizmat++'s post into today's spot in 32 minutes, unless [Coke] chimes in. 01:28
01:35 daemon joined 01:51 cdg joined
Zoffix Reviewing 6.d spec commits and stumbled onto my own PR from the time when I didn't even have a roast commit yet S#92 01:52
synopsebot S#92 [closed]: github.com/perl6/roast/pull/92 Test more values in is-prime sub
Zoffix Really weird feeling :} Pretty amazing how much a human brain can change in 2 years to be a total n00b and then be able to judge those commits later 01:53
01:55 cdg left
Zoffix .tell [Coke] we didn't see you around and with 2hr past post's due time, I went ahead and re-scheduled lizmat++'s post to be in your spot; so yours is 24th now. I hope that's OK. perl6advent.wordpress.com/2017/12/...-perl-6-d/ 02:01
yoleaux Zoffix: I'll pass your message to [Coke].
Zoffix .tell lizmat I didn't see [Coke] around for when his post was meant to go up, so I re-scheduled yours. Hope that's OK. perl6advent.wordpress.com/2017/12/...-perl-6-d/
yoleaux Zoffix: I'll pass your message to lizmat.
lookatme o/ 02:04
Zoffix \o
[Coke] tyil, Zoffix, just wrapping mine up now, could use some eyeballs. 02:15
yoleaux 00:05Z <lizmat> [Coke]: my blog post is ready for publication: if you need more time for yours, please feel free to swap mine for yours
02:01Z <Zoffix> [Coke]: we didn't see you around and with 2hr past post's due time, I went ahead and re-scheduled lizmat++'s post to be in your spot; so yours is 24th now. I hope that's OK. perl6advent.wordpress.com/2017/12/...-perl-6-d/
tyil [Coke]: will read
[Coke] ... or that works. :) 02:16
tyil: rewriting the very end right now, but here:
tyil [Coke]: the first sentence after Tweaking objects at creation has a comma which makes the sentence read a little weird to me 02:17
02:17 cpage_ joined
tyil [Coke]: "is that there is B implicit locking on shared variables", is that B intentional? 02:18
Geth doc: 13b934d2ff | (Zoffix Znet)++ | doc/Type/DateTime.pod6
Add to DateTime.later/.earlier

  - Note behaviour with leap seconds
   spec: github.com/perl6/roast/commit/66d29b7aa8
  - Note negatives work with `earlier`
  - Change links to work on routine-specific pages too, not just the
   type pages
02:19
synopsebot Link: doc.perl6.org/type/DateTime
Zoffix Ntive English speakers: "Negative offsets are allowed, though L<earlier> is more idiomatic for that." <-- should that "though" be "although"? 02:20
That's from the DateTime.later and DateTime.earlier docs
*Native
[Coke] ... locking on shared variable?
I think you're not reading mine.
mine is gist.github.com/coke/692ab4dd8d758...3afe235882 02:21
... Although I've written this to end with "I didn't finish because hard" (but still had an advent post out of it)... now I'm going to have to see if I can get further. :| 02:22
geekosaur Zoffix, technically 'although' is correct; colloquially, 'though' is often used
so it's a question of how formal/high-falutin' you want the docs to sound :p 02:23
Zoffix thanks :) 02:24
I'll leave it be
tyil [Coke]: "If you want get a report of what has been", missing a "to" in that sentence?
oh
OH
sorry
I thought you did the one that just went live
Zoffix it's lizmat's 02:25
tyil this is for lizmat, no
[Coke]: I dont have an account to the perl 6 advent blog, so I cant proofread yours :(
lizmat: check some of the comments I just left for [Coke], since it was secretly your post all along
Zoffix tyil: <[Coke]> mine is gist.github.com/coke/692ab4dd8d758...3afe235882 02:28
tyil yeah
just found it in between the other text
[Coke]: enthusiasm is misspelled 02:29
[Coke] Updated with a closer. 02:30
tyil: fixed 02:31
tyil "under two minutes; A step back", the a should be lowercase here I believe
[Coke] I haven't pushed the repo yet; if I don't have to go until the 24th, then I will take the opporunity to clean it up.
tyil or the ; should be made a .
[Coke] tyil: fixed. 02:32
(added the main lib file to the secret gist for folks to poke at.) 02:33
Zoffix: thanks for covering for me; I had mentioned earlier (perhaps elsewhere) that I was aiming for midnight local time; I'm happy for the extra 2 days, though, maybe I can finish the damn module. :| 02:34
Zoffix Ah. I missed that :) 02:35
[Coke] it's all good.
tyil "private methods (noted with ", shouldn't this be "denoted with"?
geekosaur it's liek the 'though'/'although'; I mentioned earlier 02:36
tyil "so I added a gist method (which is called when an object is output with say.", missing a ) here 02:37
02:37 Zoffix left
tyil and the code block below that has a trailing ', which doesn't look correct to me 02:37
tyil is done 02:39
02:45 pilne left
[Coke] denoted is better, switched; fixed other stuff. Thanks! 02:45
tyil++
02:49 ilbot3 left
tyil :> 02:50
glad to help~
02:54 eliasr left 02:55 ilbot3 joined, ChanServ sets mode: +v ilbot3 03:11 mingdao left 03:12 vichib left, vichib joined 03:17 unicodable6 left, squashable6 left, benchable6 left, reportable6 left, unicodable6 joined, benchable6 joined, ChanServ sets mode: +v benchable6, squashable6 joined, ChanServ sets mode: +v squashable6, reportable6 joined 03:26 cdg joined 03:31 cdg left
TreyHarris m: say 03:33
evalable6 (exit code 1) 04===SORRY!04===
Argument to "say" seems to be malformed
at /t…
TreyHarris, Full output: gist.github.com/bf4c6cbf7865ab26bd...a0d0514fee
TreyHarris m: note
evalable6 Noted
03:33 kerframil left
TreyHarris why the difference? 03:33
m: for &say, &note { .signature.say } 03:34
evalable6 (| is raw)
(| is raw)
TreyHarris m: for 1..3 { .say }; for 1..3 { .note } 03:35
evalable6 1
1
2
3
2
3
TreyHarris m: for 1..3 { note } # unsurprising
evalable6 Noted
Noted
Noted
geekosaur say is special cased in a number of ways 03:46
I *think* that is left over from killing the dumb perl 5 warning that used to be on it?
TreyHarris ah 03:47
geekosaur (because perl 5 programmers would expect it to default to $_)
TreyHarris thanks 03:48
03:51 Morfent joined 03:53 Zoffix joined 03:54 gdonald left
Zoffix That looks a bug to me. Filed as R#1327 03:57
synopsebot R#1327 [open]: github.com/rakudo/rakudo/issues/1327 `say` in some case throws malformed arg instead of P5ism error
Zoffix TreyHarris: these are basically us trying to spot usage of stuff that's very likely wrong because the user meant something else (like printing $_, like it happens in Perl 5). These are the routines we watch for. the "1" after name means it's a Perl-5-ism and "2" after the name means it's a Perl-6-ism: 03:59
github.com/rakudo/rakudo/blob/1f99...3440-L3446
Zoffix drops to bed 04:01
04:01 Zoffix left
geekosaur yes, I was implying as much. the warning was removed but nobody implemented the underlying behavior in place of the warning, basically 04:03
since it was considered 'nonsensical' the code just bailed in that case. but without he warning it should at least do something nicer than that error 04:04
04:05 Cabanossi left 04:06 Cabanossi joined 04:11 cpage_ left
buggable New CPAN upload: PDF-Font-Loader-0.1.5.tar.gz by WARRINGD cpan.metacpan.org/authors/id/W/WA/...1.5.tar.gz 04:18
piojo1 Do you think this is common enough to warrant an example in the docs, and would you say this is correct?: 04:19
To initialize a private attribute via the `new` method, adding that attribute to the TWEAK submethod signature will initialize it without interfering with other attributes' initialization. It is a better practice than using BUILD:
submethod TWEAK(:$!x) { }
04:24 gdonald joined 04:25 troys_ is now known as troys, troys is now known as troys_ 04:28 troys_ is now known as troys 04:38 mingdao joined 04:46 piojo joined 04:48 piojo1 left
lookatme m: say &note.candidates 04:58
evalable6 (sub note () { #`(Sub|94342156775592) ... } sub note (Junction:D \j) { #`(Sub|94342156775744) ... } sub note (Str:D \x) { #`(Sub|94342156775896) ... } sub note (**@args is raw) { #`(Sub|94342156776048) ... })
lookatme m: say &say.candidates
evalable6 (sub say () { #`(Sub|94521467668920) ... } sub say (Junction:D \j) { #`(Sub|94521467669072…
lookatme, Full output: gist.github.com/65d750003875dae9f0...bdfa9938f5
05:02 Cabanossi left 05:03 R0b0t1` left, Cabanossi joined 05:19 xinming_ left 05:22 khw left 05:30 R0b0t1` joined 05:33 Aceeri_ joined 05:34 someuser joined 05:36 someuser_ left 06:03 someuser_ joined 06:06 someuser left 06:07 cdg joined 06:11 poohman joined, troys is now known as troys_ 06:12 poohman left, poohman joined, cdg left 06:26 kerframil joined 06:29 someuser joined 06:31 someuser_ left 06:38 troys_ is now known as troys 06:40 cog_ joined 06:44 cognominal left 06:52 astj left 06:53 astj joined 07:14 someuser_ joined 07:16 wamba joined 07:17 someuser left, darutoko joined
piojo m: my Int @a; @a := my Int @b[2]; 07:22
evalable6 (exit code 1) Type check failed in binding; expected Positional[Int] but got Array[Int] (Array[Int].new(:shape...)
in block <unit> at /tmp/VB7H037Sn9 line 1
piojo Should one-dimensional shaped arrays [::T] be considered Positional[::T]? Or is that undesirable for other reasons? 07:23
07:24 raiph left 07:25 kerframil left 07:29 troys left
Geth doc: 07b4c3f7cc | (Luca Ferrari)++ | doc/Language/5to6-nutshell.pod6
Use non breaking spaces.

As reported by zoffixznet <github.com/perl6/doc/issues/1719> it is better to use non-breaking spaces when dealing with Perl 5|6 to ensure the version number does not wrapped onto a new line.
Fixed also a missing whitespace between two words.
07:31
synopsebot Link: doc.perl6.org/language/5to6-nutshell
doc: c72256a97e | (Luca Ferrari)++ | 4 files
Merge branch 'master' of github.com:perl6/doc
07:32 domidumont joined 07:35 lowbro joined, lowbro left, lowbro joined 07:37 domidumont left 07:38 domidumont joined
Geth doc: 5ff070e749 | (Luca Ferrari)++ | STYLEGUIDE.md
Add a section about non-breaking spaces.

As pointed out in <github.com/perl6/doc/issues/1719>, it would be better to use NBSP when dealing with 'Perl 5|6'. I believe the STYLEGUIDE is the right place since it already references some concepts related to Perl 5 (and 5to6) documents.
07:46
07:52 espadrine left 07:58 abraxxa joined 08:06 Ven`` joined 08:09 Ven`` left 08:10 Ven`` joined 08:25 Ven`` left 08:35 geospeck joined 08:47 poohman left, poohman joined
Geth doc: 6b9d861d84 | (Luca Ferrari)++ | STYLEGUIDE.md
Reword about issue #1719.
08:49
08:52 fluca1978 joined 08:54 llfourn left, astj left 08:55 astj joined, llfourn joined 08:59 konsolebox left 09:00 konsolebox joined 09:02 wamba left 09:07 scimon joined
Geth doc: 5a9d1cf8e5 | (Luca Ferrari)++ | doc/Language/faq.pod6
Remove double '.' at the end of a sentence.
09:13
synopsebot Link: doc.perl6.org/language/faq
09:31 poohman left 09:36 xcm left 09:39 dakkar joined 09:49 [particle] left 09:59 rindolf joined 10:01 [particle] joined
fluca1978 rakudo: say 3; 10:09
moritz m: say 3;
evalable6 3
10:10 wamba joined
moritz fluca1978: our usual evalbot has gone MIA :( 10:10
fluca1978 m: my $a = 'Foo'; my $b ::= $a; $b.say;
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/UohlerQkVA
"::=" not yet implemented. Sorry.
at /tmp/UohlerQkVA:1
------> 03my $a = 'Foo'; my $b ::= $a08⏏04; $b.say;
fluca1978 ok, so ::= is not implemented yet, should we mention on <docs.perl6.org/language/operators> ? 10:11
10:12 aborazmeh joined, aborazmeh left, aborazmeh joined
moritz either mention it's not yet implemented, or remove it from that page 10:14
fluca1978 ok, I'll fix. 10:16
moritz thanks!
Geth doc: ee0809f84e | (Luca Ferrari)++ | doc/Language/operators.pod6
State that ::= has not been implemented yet.

See <irclog.perlgeek.de/perl6/2017-12-2...11575>. As of today, using the ::= read-only bind operator produces a compile time error (even in rakudo 2017.11):
   "::=" not yet implemented. Sorry.
10:18
synopsebot Link: doc.perl6.org/language/operators
10:22 Aceeri_ left
moritz nine: it seems that networking is broken on camelia's VM 10:22
10:23 cdg joined
moritz nine: things I've tried and that hung: ping 8.8.8.8, curl api.ipify.org, ping irc.freenode.org 10:23
10:24 sena_kun joined 10:28 cdg left 10:55 otokan joined 10:56 astj left 10:57 raschipi joined, astj joined 11:05 geospeck left
otokan Hi, how can access object's attribute which name I have in a variable? 11:13
11:13 wamba left, xcm joined
scimon Well the accessor is a method. 11:13
So you should be able to do my $method = $object.find-name($variable); Then $object.$method. 11:14
timotimo no need to do it like that 11:15
you can also $object."$variable"() 11:16
scimon .... Ooooo 11:17
timotimo m: class Test { has $.a; has $.b }; my $object = Test.new(a => 42, b => 23); for ^10 { my $which-to-use = ("a", "b").pick; say $object."$which-to-use"() }
evalable6 23
23
42
23
42
42
42
42
23
23
11:17 piojo_ joined
timotimo m: class Test { has $.a; has $.b }; my $object = Test.new(a => 42, b => 23); for ^10 { my $which-to-use = ("a", "b").pick; my $method-object = $object.^find_method($which-to-use); say $object.$method-object() } 11:17
evalable6 23
42
42
42
42
23
23
42
42
42
otokan okay; thanks; 11:18
timotimo that second version lets you grab the method object from the class and invoke it on the object
fluca1978 class Foo{ has Int $.x }
my $obj = Foo.new( x => 10 );
my $method = 'x';
$obj."$method"().say;
nine moritz: yes, somehow the packages don't make it back onto the VM's bridge 11:19
11:19 astj left
scimon Yeah I couldn't remember the syntax. 11:19
11:19 astj joined
scimon But that's what I meant. 11:19
nine moritz: gist.github.com/niner/aad3f285fd29...fdc3fbf661 11:20
moritz: gist.github.com/niner/1634cd292d39...227d83a478
scimon Just trying the $object."$method" version in Game::Sudoku::Solver see if it has an effect on speed. 11:21
Geth doc: e73332593b | (Zoffix Znet)++ (committed using GitHub Web editor) | STYLEGUIDE.md
List nbsp one liner directly in style guide

Closes #1719
11:22
scimon I'ts a smidgen slower (as it's not caching the method calls) still useful to know 11:23
raschipi m: say $*VM.name, $*VM.osname; 11:27
evalable6 moarlinux
11:28 aborazmeh left 11:31 astj left 11:32 astj joined, cog_ left 11:36 astj left 11:43 astj joined 11:45 Zoffix joined
Zoffix piojo: it might be a bug. Note how its .^roles says it's Positional[TValue] instead of Positional[Int]. Would you report it? github.com/rakudo/rakudo/issues/new 11:47
m: my Int @b; say @b.^roles
evalable6 ((Array::TypedArray[Int]) (Positional[TValue]) (Positional) (Iterable))
Zoffix m: my Int @b; say @b ~~ Positional[Int] 11:48
evalable6 True
Zoffix piojo: oh, I guess that ain't it. No idea. lizmat++ worked a lot on shaped arrays. She'd know more about this. 11:49
11:49 someuser_ left 11:50 konsolebox left
Zoffix piojo: RE TWEAK stuff. Dunno if it's common enough to have a *private* attribute be semi-public by having it linked to public instantiation interface like that. But if there's no example of using TWEAK to bind to an attribute directly in the signature, then sure that could be added. 11:54
lizmat good *,#perl6 11:56
yoleaux 00:33Z <Zoffix> lizmat: .uninames added, if you wanted to mention it in your blog post: github.com/perl6/doc/commit/bff42f80b1 (.parse-names will still exist as deprecated until 6.e)
00:33Z <Zoffix> lizmat: I meant .uniparse :)
02:01Z <Zoffix> lizmat: I didn't see [Coke] around for when his post was meant to go up, so I re-scheduled yours. Hope that's OK. perl6advent.wordpress.com/2017/12/...-perl-6-d/
02:50Z <[Coke]> lizmat: thanks; I was >< close, but yours got published because I was not on IRC when midnight passed. Thank you for being ready ahead of time!
02:54Z <[Coke]> lizmat: (er, midnight GMT)
11:56 konsolebox joined
lizmat Zoffix: thanks! 11:57
11:57 astj left
Zoffix \o 11:57
lizmat re .uniparse: I decided to not change it for the reason you mentioned: .parse-names works now and will continue to work until 6.e :-)
Zoffix Sounds good! 11:58
Zoffix &
11:58 Zoffix left
Geth mu: 7f52b92f85 | lizmat++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule
Follow 22 <-> 24 exchange
12:06
12:10 xcm left
Geth doc: 47ff32d566 | (Luca Ferrari)++ | doc/Language/faq.pod6
Small fixes in FAQ.

Fix a capital letter in title. Reword the immutable variable paragraph to avoid the double 'instead of'. Better explained HTML chars in the string interpolation error when using brackets for tags being seen as key access to hash.
12:11
synopsebot Link: doc.perl6.org/language/faq
12:12 xcm joined 12:13 grumble left 12:15 grumble joined 12:18 astj joined
raschipi m: say Bool ~~ Enumeration; 12:21
evalable6 False
12:23 abraxxa left
lizmat raschipi: yeah, that's a side effect of Bool needing to exist in the Bootstrap 12:24
afaik
raschipi Someone had interest on fixing it a few months ago, I was just testing to see if it went anywhere. 12:25
12:25 astj left 12:26 astj joined 12:28 someuser joined 12:30 otokan left 12:31 lizmat left 12:34 vichib left 12:38 lizmat joined 12:44 greppable6 left, greppable6 joined, ChanServ sets mode: +v greppable6 12:46 raschipi_ joined 12:48 raschipi left 12:51 raschipi_ is now known as raschipi 12:53 david_xd joined 13:00 fluca1978 left, raschipi left 13:08 xinming joined 13:10 Ven`` joined 13:12 xcm left, void1 joined 13:13 void1 left, lizmat_ joined 13:14 xcm joined 13:15 lizmat left 13:16 lizmat_ is now known as lizmat
timotimo fun: "cannot resolve caller _pack($((... multiple screens full of output ...)), none of these signatures match: ... 13:18
"
42.13user 0.38system 0:42.71elapsed 99%CPU (0avgtext+0avgdata 1337632maxresident)k 13:20
that's funny
lizmat yeah, I think we're finding out why we didn't show that before
13:23 gregf_ left 13:25 geospeck joined
timotimo cool, a nearly 200 megs big profile html file 13:27
Ven`` that should please angular :P.
masak AngularJS, even 13:28
13:29 itaipu joined
masak reminds me of the quote "we took in a JavaScript expert. he optimized our site by removing most of the JavaScript." :P 13:29
13:29 lizmat_ joined 13:30 lizmat left
moritz is always glad when he can remove most of the code, no matter the language :-) 13:33
13:33 wamba joined
Ven``
.oO( I've suffered enough from it to drop the "js" :P )
13:33
moritz newer versions dropped the "js" anyway, no? 13:34
ilmari Angular 2 is just Angular, 1.x is AngularJS 13:39
angular.io and angularjs.org, respectively
13:42 R0b0t1` left, Ven`` left 13:49 wamba left 13:53 xcm left 13:54 xcm joined 13:56 R0b0t1` joined 14:01 Hotkeys left 14:02 R0b0t1` left 14:08 dakkar left 14:23 scimon left 14:29 Morfent left 14:30 Morfent joined 14:31 xcm left 14:35 R0b0t1` joined, xcm joined
masak the mess and confusion around the naming reminds me of something else. can't think of what right now. :P 14:50
b2gills \say .oO(Pumpkin Perl 5) 14:56
14:56 piojo_ left
perlpilot masak: I think you should change your name. It's too close "masa" which is a type of dough made from corn flour. ;-P 14:56
masak I get that a lot 14:57
15:04 aindilis left 15:06 R0b0t1` left 15:08 R0b0t1` joined 15:14 donaldh joined
donaldh How would you expect junctions to work when used as hash keys? 15:18
I was kind of hoping that just the matching key of a one junction would be returned.
:m my %a = a => 1, b => 2; %a{one('a', 'c')} 15:19
:p6 my %a = a => 1, b => 2; %a{one('a', 'c')}
p6: my %a = a => 1, b => 2; %a{one('a', 'c')} 15:20
bot?
15:21 Zoffix joined
Zoffix m: my %a = a => 1, b => 2; %a{one('a', 'c')} 15:21
evalable6
Zoffix m: my %a = a => 1, b => 2; dd %a{one('a', 'c')}
evalable6 one(1, Any)
Zoffix donaldh: all Junctions autothread the same, the type one Junction (one, all, any, none) is used only to answer Bool questions 15:22
m: my %a = a => 1, b => 2; dd %a{one('a', 'c')}:exists
evalable6 one(Bool::True, Bool::False)
Zoffix m: my %a = a => 1, b => 2; dd so %a{one('a', 'c')}:exists
evalable6 Bool::True
Zoffix m: my %a = a => 1, b => 2; dd so %a{one('a', 'b')}:exists
evalable6 Bool::False
Zoffix s/type one/type of/;
donaldh Okay, so only useful in boolean context.
Zoffix Yeah
Geth doc: 09c791b3ae | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Junction.pod6
s/Markdown syntax/POD6 syntax/
15:25
synopsebot Link: doc.perl6.org/type/Junction
donaldh So, to get the defined value, is there an idiomatic way that is better than this? 15:26
m: my %a = a => 1, b => 2; say %a{'a', 'c'}.grep: { .defined }
evalable6 (1)
Zoffix m: my %a = a => 1, b => 2; say %a{'a', 'c'}:v 15:27
evalable6 (1)
Zoffix m: my %a = a => 1, b => 2; say %a{'a', 'c'}:v.head
evalable6 1
donaldh Yeh, that's better. Zoffix++
15:32 clarkema joined, clarkema left
Geth doc: 7322e0b4bb | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Junction.pod6
Clarify Junction type effects on autothreading

Ref: irclog.perlgeek.de/perl6/2017-12-22#i_15612281
15:32
15:33 clarkema joined 15:37 R0b0t1` left
Geth doc: 1e10221801 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Junction.pod6
Use better code example

Since without :exists, we're relying on the boolified values of the hash when collapsing the Junction. This way results are clearer.
15:41
synopsebot Link: doc.perl6.org/type/Junction
15:41 Zoffix left 15:43 clarkema left 15:46 clarkema joined 15:48 xcm left 15:50 donaldh left, xcm joined 15:53 R0b0t1` joined 15:57 zakharyas joined 15:58 domidumont left, geospeck left 16:15 philomath_ joined 16:20 rindolf left
clarkema Hi all. I've revisiting some advent of code challenges from earlier this month to see if I can improve my solutions, and am currently looking at day 05. This is a tight loop jumping around an array based on the value of the contents until you jump beyond the bounds of the array after about 25 million iterations. 16:22
16:23 zakharyas left
clarkema I've played with different approaches, bringing the runtime down from about 1 minute 30 to around 45 seconds, but I'm wondering whether I'm missing any optimizations 16:23
Current state is at gist.github.com/clarkema/ba2e80c22...c83777cda3 is there anything I can do at the 'user' level to make this run faster?
16:26 rindolf joined 16:27 wamba joined
clarkema (As a couple of points of comparison, a rough Python 3 transliteration completes in about 17.5 seconds. Reasonably optimized Common Lisp (using SBCL) runs in 0.3 seconds from the REPL) 16:27
16:28 zakharyas joined 16:29 Spigell joined 16:30 Spigell left 16:31 lowbro left 16:34 Perlnew joined, Perlnew left 16:35 vichib joined
TEttinger clarkema: from what I understand SBCL does more than just reasonable optimizations :) 16:36
clarkema TEttinger: yeah, it's pretty speedy if you give it the right hints 16:37
TEttinger that's what my CL-using friends tell me... then my benchmarks can't back up the claim that it's as fast as C, though it is fairly good
SBCL is a compiler though 16:38
16:38 geospeck joined
TEttinger oh, from the REPL you said? 16:38
I think SBCL has some unusual case for how the REPL works alongside their compiler 16:39
16:40 wamba left
TEttinger I mean, perl 6 isn't really a fast language for tight loop stuff, it seems optimized for programmer time over CPU time 16:40
that looks like very clear code though 16:43
clarkema SBCL is still compiled from the REPL -- the difference is that I'm not paying compilation / VM-startup overhead in that timing, whereas I am with Python and P6
16:44 zakharyas left, zakharyas joined 16:49 Zoffix joined
Zoffix clarkema: got any sample input for that code? 16:50
16:50 geospeck left
clarkema Zoffix: Sure: gist.github.com/clarkema/ba2e80c22...c83777cda3 16:52
(updated the same gist)
16:55 raiph joined 16:56 zakharyas left 16:59 Actualeyes left
Zoffix m: say 63/42 17:00
evalable6 1.5
Zoffix clarkema: this makes it ~1.5x faster. I these these are all the "street legal" optimizations I can think of: gist.github.com/zoffixznet/7a66bbb...03c42205c5 17:01
Zoffix tries nqp version
17:02 xcm left
clarkema oh, interesting. I've just been looking through profile output and seen that the postcircumfix [] was taking about 33% of execution time, so tried binding @instructions[$index] 17:02
which gets me down to 23 sec
17:03 khw joined 17:04 xcm joined
clarkema what's the theory behind AT-POS being faster? 17:04
Zoffix m: &postcircumfix:<[ ]>.candidates.elems.say
evalable6 WARNINGS for /tmp/WzSwM4fumi:
65
Useless use of constant value [ ] in sink context (lines 1, 1)
Zoffix 65 candidates. Perhaps they don't get cached or whatever. By using .AT-POS you go directly to where [] would get you to 17:05
clarkema ah, so you're skipping the indirection / flexibility
makes sense
awesome 17:06
If I steal that and your change to prefix increment / decrement and merge with binding, we're beating python 17:07
gist.github.com/clarkema/9cf51e4a5...b4a8bb1151
15.2 sec
Zoffix so you *can* bind it like that. Weird, I tried that too, but it gave me some error 17:10
Ah, wait no, it gave wrong result then. Gave 25238376 instead of 25347697 17:11
You sure 15.2 sec version gives right result? :)
holy shit. nqp version is 0m3.019s
17:12 setty1 joined
clarkema yup, result is correct -- still matching the python 17:12
Zoffix makes changes file slurpage to nqp too to squeeze everything
17:13 geekosaur left 17:14 xcm left 17:16 xcm joined
clarkema I'm staggered that changing $index += $jump into $index = $index + $jump saves so much 17:16
You'd think they'd be equivalent, but very definitely not 17:17
17:19 Phi_mb joined 17:20 geekosaur joined
Zoffix bah, I give up. stuck with unboxing strings to ints and I don't think file hll slurping costs a lot in this case. 17:20
Here, 3.027s version: gist.github.com/zoffixznet/74df6fb...fb5331ee84
17:21 Phi_mb left, philomath_ left, Phi_mb joined
clarkema that has a decidedly lisp-y look to it 17:21
Zoffix: is it possible to, for example, just write the inner portion of a loop in NQP in the middle of a larger perl module? 17:23
Zoffix Filed it as R#1328 in case we can bring HLL version closer to nqp's speeds 17:24
synopsebot R#1328 [open]: github.com/rakudo/rakudo/issues/1328 [perf] [PERF] Large diff between HLL and nqp performance in code example
Zoffix clarkema: yeah, but there's no user support for nqp. The way it works can be changed at any time without notice, breaking your module. 17:25
clarkema fair enough
super interesting though, thanks :)
digging around and performance golfing is quite fun 17:26
17:26 geospeck joined
AlexDaniel xD street legal optimizations 17:29
Zoffix Looking at ASTs, looks like $index += $jump is slower than $index = $index + $jump is 'cause it misses rewrite of &infix:<+> to nqp::add_i 17:30
17:30 Phi_mb left
Zoffix Filed as R#1329 17:33
synopsebot R#1329 [open]: github.com/rakudo/rakudo/issues/1329 [perf] my int $x; ( $x += 42 is slower than $x = $x + 42)
Zoffix & 17:35
17:35 Zoffix left 17:36 itaylor57 left 17:46 domidumont joined 17:51 itaylor57 joined, itaylor57 left 17:52 geospeck left 18:01 geospeck joined 18:02 itaylor57 joined 18:03 philomath_ joined 18:04 Phi_mb joined 18:07 philomath_ left 18:08 Phi_mb left 18:09 coverable6 left, nativecallable6 left, coverable6 joined, ChanServ sets mode: +v coverable6, nativecallable6 joined, ChanServ sets mode: +v nativecallable6 18:10 itaylor57 left 18:15 bartolin left 18:17 itaylor57 joined, domidumont left 18:24 xcm left 18:26 domidumont joined, bartolin joined 18:30 xcm joined 18:35 itaylor57 left 18:45 eliasr joined 18:47 itaylor57 joined, clarkema left 18:50 itaipu left 18:53 natrys joined 18:56 itaipu joined 19:04 darutoko left 19:08 raiph left 19:12 domidumont left 19:16 epony left 19:22 cdc left 19:23 espadrine joined 19:26 clarkema joined 19:28 epony joined 19:29 epony left 19:30 clarkema left, epony joined 19:32 clarkema joined 19:51 xcm left 19:52 xcm joined 20:15 natrys left 20:23 bisectable6 left, committable6 left, bloatable6 left, bisectable6 joined, ChanServ sets mode: +v bisectable6, statisfiable6 left, quotable6 left, committable6 joined, bloatable6 joined, ChanServ sets mode: +v bloatable6, quotable6 joined, statisfiable6 joined 20:24 lizmat_ left 20:26 espadrine left 20:28 natrys joined 20:30 lizmat joined 20:35 rindolf left 20:43 clarkema left 20:44 clarkema joined 20:46 comborico1611 joined 20:47 Alikzus left 20:51 b2gills left, raiph joined 20:54 Alikzus joined 20:56 AlexDaniel left 20:58 evalable6 left, releasable6 left, releasable6 joined, ChanServ sets mode: +v releasable6, evalable6 joined 21:01 mson joined 21:03 Alikzus left 21:10 xcm left 21:11 xcm joined 21:12 AlexDaniel joined, comborico1611 left 21:13 Alikzus joined
Geth doc: d25261ac88 | (Will "Coke" Coleda)++ | doc/Language/5to6-nutshell.pod6
mark p5 code, allow p6 code to compile
21:13
synopsebot Link: doc.perl6.org/language/5to6-nutshell
doc: 82f8d569c4 | (Will "Coke" Coleda)++ | doc/Language/traps.pod6
nbsps
synopsebot Link: doc.perl6.org/language/traps
21:20 xcm is now known as Guest14914, Guest14914 left 21:21 xcm joined 21:33 yqt joined 21:43 yqt left 21:45 perlpilot left 21:46 david_xd left, espadrine joined 21:59 setty1 left 22:09 comborico1611 joined 22:10 lancew joined, xcm left 22:11 xcm joined 22:31 xcm left 22:32 xcm joined
AlexDaniel oh wow, did flyspell-mode just highlight “the the” as an error? ♥♥♥ 22:40
timotimo AlexDaniel: you'll be our advent author for the evening? :) 22:43
AlexDaniel Yeah. Whether you'll like it or not is a different question though :P 22:44
22:49 comborico1611 left, comborico1611 joined 22:53 troys joined 22:56 b2gills joined 22:59 lancew left, Morfent left, Morfent joined 23:01 itaipu left 23:18 yubimusubi left 23:19 espadrine left 23:23 clarkema left 23:24 geospeck left, geospeck joined, geospeck left 23:30 Possum joined 23:31 labster left 23:33 itaipu joined, comborico1611 left 23:35 comborico1611 joined 23:38 Morfent left 23:39 Morfent joined
Geth doc: 63e5b13835 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/Int.pod6
I really need a space there.
23:40
synopsebot Link: doc.perl6.org/type/Int
23:41 mson left, wamba joined