Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-12-22

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:16 vichib joined #perl6
00:22 mingdao joined #perl6
00:23 espadrine joined #perl6
00:29 Geth ¦ doc: bff42f80b1 | (Zoffix Znet)++ | 3 files
00:29 Geth ¦ doc: Rename `.parse-names` to `.uniparse`
00:29 Geth ¦ doc:
00:29 Geth ¦ doc: The original name existed only as a 6.d proposal and it was decided
00:29 Geth ¦ doc: to align its name with other `uni*` routines for actual 6.d. The
00:29 Geth ¦ doc: `.parse-names` method continues to exist in Rakudo impl. It'll
00:29 Geth ¦ doc: issue deprecation warning in 6.d and will be removed in 6.e
00:29 Geth ¦ doc:
00:29 Geth ¦ doc: Rakudo impl: https://github.com/rakudo/rakudo/commit/2a8287cf89
00:29 Geth ¦ doc: Spec:        https://github.com/perl6/roast/commit/3efe6cb8da
00:29 Geth ¦ doc: review: https://github.com/perl6/doc/commit/bff42f80b1
00:35 david_xd joined #perl6
00:39 Geth ¦ doc: cdeb6dc786 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Str.pod6
00:39 Geth ¦ doc: Reword
00:39 Geth ¦ doc:
00:39 Geth ¦ doc: - better explanation of "speculative 6.d"
00:39 Geth ¦ doc: - mention method exists only in Rakudo impl
00:39 synopsebot Link: https://doc.perl6.org/type/Str
00:39 Geth ¦ doc: review: https://github.com/perl6/doc/commit/cdeb6dc786
00:47 agwind joined #perl6
00:56 Geth ¦ doc: 6c5e0cad9c | (Zoffix Znet)++ | doc/Type/Str.pod6
00:56 Geth ¦ doc: Mention uniparse() does not do \c[] decimal magic
00:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6c5e0cad9c
00:56 synopsebot Link: https://doc.perl6.org/type/Str
00:57 tyil [eagerly awaiting the new perl 6 advent post]
01:02 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:22 titsuki_ hi #perl6. I have a question.
01:22 titsuki_ Are there any good examples or modules for handling wikipedia recent change api( https://www.mediawiki.org/wiki/API:Recent_changes_stream )?
01:23 titsuki_ I found EventSource::Server( https://github.com/jonathanstowe/EventSource-Server ) but couldn't find a Perl6 version of EventSource (e.g. https://codepen.io/ottomata/pen/VKNyEw/).
01:27 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 #perl6
01:28 Zoffix Plan to pop lizmat++'s post into today's spot in 32 minutes, unless [Coke] chimes in.
01:35 daemon joined #perl6
01:51 cdg joined #perl6
01:52 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]: https://github.com/perl6/roast/pull/92 Test more values in is-prime sub
01:53 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
02:01 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. https://perl6advent.wordpress.com/2017/12/22/day-22-features-of-perl-6-d/
02:01 yoleaux Zoffix: I'll pass your message to [Coke].
02:01 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. https://perl6advent.wordpress.com/2017/12/22/day-22-features-of-perl-6-d/
02:01 yoleaux Zoffix: I'll pass your message to lizmat.
02:04 lookatme o/
02:04 Zoffix \o
02:15 [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:15 yoleaux 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. https://perl6advent.wordpress.com/2017/12/22/day-22-features-of-perl-6-d/
02:15 tyil [Coke]: will read
02:16 [Coke] ... or that works. :)
02:16 [Coke] tyil: rewriting the very end right now, but here:
02:17 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 cpage_ joined #perl6
02:18 tyil [Coke]: "is that there is B implicit locking on shared variables", is that B intentional?
02:19 Geth ¦ doc: 13b934d2ff | (Zoffix Znet)++ | doc/Type/DateTime.pod6
02:19 Geth ¦ doc: Add to DateTime.later/.earlier
02:19 Geth ¦ doc:
02:19 Geth ¦ doc: - Note behaviour with leap seconds
02:19 Geth ¦ doc:     spec: https://github.com/perl6/roast/commit/66d29b7aa8
02:19 synopsebot Link: https://doc.perl6.org/type/DateTime
02:19 Geth ¦ doc: - Note negatives work with `earlier`
02:19 Geth ¦ doc: - Change links to work on routine-specific pages too, not just the
02:19 Geth ¦ doc:     type pages
02:19 Geth ¦ doc: review: https://github.com/perl6/doc/commit/13b934d2ff
02:20 Zoffix Ntive English speakers: "Negative offsets are allowed, though L<earlier> is more idiomatic for that."  <-- should that "though" be "although"?
02:20 Zoffix That's from the DateTime.later and DateTime.earlier docs
02:20 Zoffix *Native
02:20 [Coke] ... locking on shared variable?
02:20 [Coke] I think you're not reading mine.
02:21 [Coke] mine is https://gist.github.com/coke/692ab4dd8d75817e38a0083afe235882
02:22 [Coke] ... 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
02:23 geekosaur so it's a question of how formal/high-falutin' you want the docs to sound :p
02:24 Zoffix thanks :)
02:24 Zoffix I'll leave it be
02:24 tyil [Coke]: "If you want get a report of what has been", missing a "to" in that sentence?
02:24 tyil oh
02:24 tyil OH
02:24 tyil sorry
02:24 tyil I thought you did the one that just went live
02:25 Zoffix it's lizmat's
02:25 tyil this is for lizmat, no
02:25 tyil [Coke]: I dont have an account to the perl 6 advent blog, so I cant proofread yours :(
02:25 tyil lizmat: check some of the comments I just left for [Coke], since it was secretly your post all along
02:28 Zoffix tyil: <[Coke]> mine is https://gist.github.com/coke/692ab4dd8d75817e38a0083afe235882
02:28 tyil yeah
02:28 tyil just found it in between the other text
02:29 tyil [Coke]: enthusiasm is misspelled
02:30 [Coke] Updated with a closer.
02:31 [Coke] tyil: fixed
02:31 tyil "under two minutes; A step back", the a should be lowercase here I believe
02:31 [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.
02:31 tyil or the ; should be made a .
02:32 [Coke] tyil: fixed.
02:33 [Coke] (added the main lib file to the secret gist for folks to poke at.)
02:34 [Coke] 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:35 Zoffix Ah. I missed that :)
02:35 [Coke] it's all good.
02:35 tyil "private methods (noted with ", shouldn't this be "denoted with"?
02:36 geekosaur it's liek the 'though'/'although'; I mentioned earlier
02:37 tyil "so I added a gist method (which is called when an object is output with say.", missing a ) here
02:37 Zoffix left #perl6
02:37 tyil and the code block below that has a trailing ', which doesn't look correct to me
02:39 * tyil is done
02:45 [Coke] denoted is better, switched; fixed other stuff. Thanks!
02:53 [Coke] tyil++
02:55 ilbot3 joined #perl6
02:55 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
03:12 vichib joined #perl6
03:17 unicodable6 joined #perl6
03:17 benchable6 joined #perl6
03:17 squashable6 joined #perl6
03:17 reportable6 joined #perl6
03:26 cdg joined #perl6
03:33 TreyHarris m: say
03:33 evalable6 TreyHarris, rakudo-moar 1f99aa145: OUTPUT: «(exit code 1) ===SORRY!===␤Argument to "say" seems to be malformed␤at /t…»
03:33 evalable6 TreyHarris, Full output: https://gist.github.com/bf4c6cbf7865ab26bd1309a0d0514fee
03:33 TreyHarris m: note
03:33 evalable6 TreyHarris, rakudo-moar 1f99aa145: OUTPUT: «Noted␤»
03:33 TreyHarris why the difference?
03:34 TreyHarris m: for &say, &note { .signature.say }
03:34 evalable6 TreyHarris, rakudo-moar 1f99aa145: OUTPUT: «(| is raw)␤(| is raw)␤»
03:35 TreyHarris m: for 1..3 { .say }; for 1..3 { .note }
03:35 evalable6 TreyHarris, rakudo-moar 1f99aa145: OUTPUT: «1␤1␤2␤3␤2␤3␤»
03:35 TreyHarris m: for 1..3 { note } # unsurprising
03:35 evalable6 TreyHarris, rakudo-moar 1f99aa145: OUTPUT: «Noted␤Noted␤Noted␤»
03:46 geekosaur say is special cased in a number of ways
03:46 geekosaur I *think* that is left over from killing the dumb perl 5 warning that used to be on it?
03:47 TreyHarris ah
03:47 geekosaur (because perl 5 programmers would expect it to default to $_)
03:48 TreyHarris thanks
03:51 Morfent joined #perl6
03:53 Zoffix joined #perl6
03:57 Zoffix That looks a bug to me. Filed as R#1327
03:57 synopsebot R#1327 [open]: https://github.com/rakudo/rakudo/issues/1327 `say` in some case throws malformed arg instead of P5ism error
03:59 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 Zoffix https://github.com/rakudo/rakudo/blob/1f99aa145a1366b5ffe80914fe3864dae487a717/src/Perl6/Grammar.nqp#L3440-L3446
04:01 * Zoffix drops to bed
04:01 Zoffix left #perl6
04:03 geekosaur yes, I was implying as much. the warning was removed but nobody implemented the underlying behavior in place of the warning, basically
04:04 geekosaur 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:06 Cabanossi joined #perl6
04:18 buggable New CPAN upload: PDF-Font-Loader-0.1.5.tar.gz by WARRINGD https://cpan.metacpan.org/authors/id/W/WA/WARRINGD/Perl6/PDF-Font-Loader-0.1.5.tar.gz
04:19 piojo1 Do you think this is common enough to warrant an example in the docs, and would you say this is correct?:
04:19 piojo1 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:
04:19 piojo1 submethod TWEAK(:$!x) { }
04:24 gdonald joined #perl6
04:38 mingdao joined #perl6
04:46 piojo joined #perl6
04:58 lookatme m: say &note.candidates
04:58 evalable6 lookatme, rakudo-moar 1f99aa145: OUTPUT: «(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) ... })␤»
04:58 lookatme m: say &say.candidates
04:58 evalable6 lookatme, rakudo-moar 1f99aa145: OUTPUT: «(sub say () { #`(Sub|94521467668920) ... } sub say (Junction:D \j) { #`(Sub|94521467669072…»
04:58 evalable6 lookatme, Full output: https://gist.github.com/65d750003875dae9f00dd6bdfa9938f5
05:03 Cabanossi joined #perl6
05:30 R0b0t1` joined #perl6
05:33 Aceeri_ joined #perl6
05:34 someuser joined #perl6
06:03 someuser_ joined #perl6
06:07 cdg joined #perl6
06:11 poohman joined #perl6
06:12 poohman joined #perl6
06:26 kerframil joined #perl6
06:29 someuser joined #perl6
06:40 cog_ joined #perl6
06:53 astj joined #perl6
07:14 someuser_ joined #perl6
07:16 wamba joined #perl6
07:17 darutoko joined #perl6
07:22 piojo m: my Int @a; @a := my Int @b[2];
07:22 evalable6 piojo, rakudo-moar 1f99aa145: OUTPUT: «(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␤␤»
07:23 piojo Should one-dimensional shaped arrays [::T] be considered Positional[::T]? Or is that undesirable for other reasons?
07:31 Geth ¦ doc: 07b4c3f7cc | (Luca Ferrari)++ | doc/Language/5to6-nutshell.pod6
07:31 Geth ¦ doc: Use non breaking spaces.
07:31 Geth ¦ doc:
07:31 Geth ¦ doc: As reported by zoffixznet <https://github.com/perl6/doc/issues/1719>
07:31 Geth ¦ doc: it is better to use non-breaking spaces when dealing with Perl 5|6 to
07:31 synopsebot Link: https://doc.perl6.org/language/5to6-nutshell
07:31 Geth ¦ doc: ensure the version number does not wrapped onto a new line.
07:31 Geth ¦ doc:
07:31 Geth ¦ doc: Fixed also a missing whitespace between two words.
07:31 Geth ¦ doc: review: https://github.com/perl6/doc/commit/07b4c3f7cc
07:31 Geth ¦ doc: c72256a97e | (Luca Ferrari)++ | 4 files
07:31 Geth ¦ doc: Merge branch 'master' of github.com:perl6/doc
07:31 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c72256a97e
07:32 domidumont joined #perl6
07:35 lowbro joined #perl6
07:35 lowbro joined #perl6
07:38 domidumont joined #perl6
07:46 Geth ¦ doc: 5ff070e749 | (Luca Ferrari)++ | STYLEGUIDE.md
07:46 Geth ¦ doc: Add a section about non-breaking spaces.
07:46 Geth ¦ doc:
07:46 Geth ¦ doc: As pointed out in <https://github.com/perl6/doc/issues/1719>, it would be
07:46 Geth ¦ doc: better to use NBSP when dealing with 'Perl 5|6'.
07:46 Geth ¦ doc: I believe the STYLEGUIDE is the right place since it already references
07:46 Geth ¦ doc: some concepts related to Perl 5 (and 5to6) documents.
07:46 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5ff070e749
07:58 abraxxa joined #perl6
08:06 Ven`` joined #perl6
08:10 Ven`` joined #perl6
08:35 geospeck joined #perl6
08:47 poohman joined #perl6
08:49 Geth ¦ doc: 6b9d861d84 | (Luca Ferrari)++ | STYLEGUIDE.md
08:49 Geth ¦ doc: Reword about issue #1719.
08:49 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6b9d861d84
08:52 fluca1978 joined #perl6
08:55 astj joined #perl6
08:55 llfourn joined #perl6
09:00 konsolebox joined #perl6
09:07 scimon joined #perl6
09:13 Geth ¦ doc: 5a9d1cf8e5 | (Luca Ferrari)++ | doc/Language/faq.pod6
09:13 Geth ¦ doc: Remove double '.' at the end of a sentence.
09:13 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5a9d1cf8e5
09:13 synopsebot Link: https://doc.perl6.org/language/faq
09:39 dakkar joined #perl6
09:59 rindolf joined #perl6
10:01 [particle] joined #perl6
10:09 fluca1978 rakudo: say 3;
10:09 moritz m: say 3;
10:09 evalable6 moritz, rakudo-moar 1f99aa145: OUTPUT: «3␤»
10:10 wamba joined #perl6
10:10 moritz fluca1978: our usual evalbot has gone MIA :(
10:10 fluca1978 m: my $a = 'Foo'; my $b ::= $a; $b.say;
10:10 evalable6 fluca1978, rakudo-moar 1f99aa145: OUTPUT: «(exit code 1) ===SORRY!=== Error while compiling /tmp/UohlerQkVA␤"::=" not yet implemented. Sorry.␤at /tmp/UohlerQkVA:1␤------> my $a = 'Foo'; my $b ::= $a⏏; $b.say;␤»
10:11 fluca1978 ok, so ::= is not implemented yet, should we mention on  <https://docs.perl6.org/language/operators> ?
10:12 aborazmeh joined #perl6
10:12 aborazmeh joined #perl6
10:14 moritz either mention it's not yet implemented, or remove it from that page
10:16 fluca1978 ok, I'll fix.
10:16 moritz thanks!
10:18 Geth ¦ doc: ee0809f84e | (Luca Ferrari)++ | doc/Language/operators.pod6
10:18 Geth ¦ doc: State that ::= has not been implemented yet.
10:18 Geth ¦ doc:
10:18 Geth ¦ doc: See <https://irclog.perlgeek.de/perl6/2017-12-22#i_15611575>.
10:18 synopsebot Link: https://doc.perl6.org/language/operators
10:18 Geth ¦ doc: As of today, using the ::= read-only bind operator produces a compile time
10:18 Geth ¦ doc: error (even in rakudo 2017.11):
10:18 Geth ¦ doc:      "::=" not yet implemented. Sorry.
10:18 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ee0809f84e
10:22 moritz nine: it seems that networking is broken on camelia's VM
10:23 cdg joined #perl6
10:23 moritz nine: things I've tried and that hung: ping 8.8.8.8, curl https://api.ipify.org, ping irc.freenode.org
10:24 sena_kun joined #perl6
10:55 otokan joined #perl6
10:57 raschipi joined #perl6
10:57 astj joined #perl6
11:13 otokan Hi,  how can access object's attribute which name I have in a variable?
11:13 xcm joined #perl6
11:13 scimon Well the accessor is a method.
11:14 scimon So you should be able to do my $method = $object.find-name($variable); Then $object.$method.
11:15 timotimo no need to do it like that
11:16 timotimo you can also $object."$variable"()
11:17 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"() }
11:17 evalable6 timotimo, rakudo-moar 1f99aa145: OUTPUT: «23␤23␤42␤23␤42␤42␤42␤42␤23␤23␤»
11:17 piojo_ joined #perl6
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; my $method-object = $object.^find_method($which-to-use); say $object.$method-object() }
11:17 evalable6 timotimo, rakudo-moar 1f99aa145: OUTPUT: «23␤42␤42␤42␤42␤23␤23␤42␤42␤42␤»
11:18 otokan okay; thanks;
11:18 timotimo that second version lets you grab the method object from the class and invoke it on the object
11:18 fluca1978 class Foo{ has Int $.x }
11:18 fluca1978 my $obj = Foo.new( x => 10 );
11:18 fluca1978 my $method = 'x';
11:18 fluca1978 $obj."$method"().say;
11:19 nine moritz: yes, somehow the packages don't make it back onto the VM's bridge
11:19 scimon Yeah I couldn't remember the syntax.
11:19 astj joined #perl6
11:19 scimon But that's what I meant.
11:20 nine moritz: https://gist.github.com/niner/aad3f285fd297d3d61f987fdc3fbf661
11:20 nine moritz: https://gist.github.com/niner/1634cd292d39b9fad307fc227d83a478
11:21 scimon Just trying the $object."$method" version in Game::Sudoku::Solver see if it has an effect on speed.
11:22 Geth ¦ doc: e73332593b | (Zoffix Znet)++ (committed using GitHub Web editor) | STYLEGUIDE.md
11:22 Geth ¦ doc: List nbsp one liner directly in style guide
11:22 Geth ¦ doc:
11:22 Geth ¦ doc: Closes #1719
11:22 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e73332593b
11:23 scimon I'ts a smidgen slower (as it's not caching the method calls) still useful to know
11:27 raschipi m: say $*VM.name, $*VM.osname;
11:27 evalable6 raschipi, rakudo-moar 1f99aa145: OUTPUT: «moarlinux␤»
11:32 astj joined #perl6
11:43 astj joined #perl6
11:45 Zoffix joined #perl6
11:47 Zoffix piojo: it might be a bug. Note how its .^roles says it's Positional[TValue] instead of Positional[Int]. Would you report it? https://github.com/rakudo/rakudo/issues/new
11:47 Zoffix m: my Int @b; say @b.^roles
11:47 evalable6 Zoffix, rakudo-moar 1f99aa145: OUTPUT: «((Array::TypedArray[Int]) (Positional[TValue]) (Positional) (Iterable))␤»
11:48 Zoffix m: my Int @b; say @b ~~ Positional[Int]
11:48 evalable6 Zoffix, rakudo-moar 1f99aa145: OUTPUT: «True␤»
11:49 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:54 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:56 lizmat good *,#perl6
11:56 yoleaux 00:33Z <Zoffix> lizmat: .uninames added, if you wanted to mention it in your blog post: https://github.com/perl6/doc/commit/bff42f80b1   (.parse-names will still exist as deprecated until 6.e)
11:56 yoleaux 00:33Z <Zoffix> lizmat: I meant .uniparse :)
11:56 yoleaux 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. https://perl6advent.wordpress.com/2017/12/22/day-22-features-of-perl-6-d/
11:56 yoleaux 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!
11:56 yoleaux 02:54Z <[Coke]> lizmat: (er, midnight GMT)
11:56 konsolebox joined #perl6
11:57 lizmat Zoffix: thanks!
11:57 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  :-)
11:58 Zoffix Sounds good!
11:58 * Zoffix &
11:58 Zoffix left #perl6
12:06 Geth ¦ mu: 7f52b92f85 | lizmat++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule
12:06 Geth ¦ mu: Follow 22 <-> 24 exchange
12:06 Geth ¦ mu: review: https://github.com/perl6/mu/commit/7f52b92f85
12:11 Geth ¦ doc: 47ff32d566 | (Luca Ferrari)++ | doc/Language/faq.pod6
12:11 Geth ¦ doc: Small fixes in FAQ.
12:11 Geth ¦ doc:
12:11 Geth ¦ doc: Fix a capital letter in title.
12:11 Geth ¦ doc: Reword the immutable variable paragraph to avoid the double 'instead of'.
12:11 synopsebot Link: https://doc.perl6.org/language/faq
12:11 Geth ¦ doc: Better explained HTML chars in the string interpolation error when using
12:11 Geth ¦ doc: brackets for tags being seen as key access to hash.
12:11 Geth ¦ doc: review: https://github.com/perl6/doc/commit/47ff32d566
12:12 xcm joined #perl6
12:15 grumble joined #perl6
12:18 astj joined #perl6
12:21 raschipi m: say Bool ~~ Enumeration;
12:21 evalable6 raschipi, rakudo-moar 1f99aa145: OUTPUT: «False␤»
12:24 lizmat raschipi: yeah, that's a side effect of Bool needing to exist in the Bootstrap
12:24 lizmat afaik
12:25 raschipi Someone had interest on fixing it a few months ago, I was just testing to see if it went anywhere.
12:26 astj joined #perl6
12:28 someuser joined #perl6
12:38 lizmat joined #perl6
12:44 greppable6 joined #perl6
12:46 raschipi_ joined #perl6
12:53 david_xd joined #perl6
13:08 xinming joined #perl6
13:10 Ven`` joined #perl6
13:12 void1 joined #perl6
13:13 lizmat_ joined #perl6
13:14 xcm joined #perl6
13:18 timotimo fun: "cannot resolve caller _pack($((... multiple screens full of output ...)), none of these signatures match: ...
13:18 timotimo "
13:20 timotimo 42.13user 0.38system 0:42.71elapsed 99%CPU (0avgtext+0avgdata 1337632maxresident)k
13:20 timotimo that's funny
13:20 lizmat yeah, I think we're finding out why we didn't show that before
13:25 geospeck joined #perl6
13:27 timotimo cool, a nearly 200 megs big profile html file
13:27 Ven`` that should please angular :P.
13:28 masak AngularJS, even
13:29 itaipu joined #perl6
13:29 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 lizmat_ joined #perl6
13:33 * moritz is always glad when he can remove most of the code, no matter the language :-)
13:33 wamba joined #perl6
13:33 Ven`` .oO( I've suffered enough from it to drop the "js" :P )
13:34 moritz newer versions dropped the "js" anyway, no?
13:39 ilmari Angular 2 is just Angular, 1.x is AngularJS
13:39 ilmari angular.io and angularjs.org, respectively
13:54 xcm joined #perl6
13:56 R0b0t1` joined #perl6
14:30 Morfent joined #perl6
14:35 R0b0t1` joined #perl6
14:35 xcm joined #perl6
14:50 masak the mess and confusion around the naming reminds me of something else. can't think of what right now. :P
14:56 b2gills \say .oO(Pumpkin Perl 5)
14:56 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:57 masak I get that a lot
15:08 R0b0t1` joined #perl6
15:14 donaldh joined #perl6
15:18 donaldh How would you expect junctions to work when used as hash keys?
15:18 donaldh I was kind of hoping that just the matching key of a one junction would be returned.
15:19 donaldh :m my %a = a => 1, b => 2; %a{one('a', 'c')}
15:19 donaldh :p6 my %a = a => 1, b => 2; %a{one('a', 'c')}
15:20 donaldh p6: my %a = a => 1, b => 2; %a{one('a', 'c')}
15:20 donaldh bot?
15:21 Zoffix joined #perl6
15:21 Zoffix m: my %a = a => 1, b => 2; %a{one('a', 'c')}
15:21 evalable6 Zoffix, rakudo-moar 1f99aa145: OUTPUT: «»
15:21 Zoffix m: my %a = a => 1, b => 2; dd %a{one('a', 'c')}
15:21 evalable6 Zoffix, rakudo-moar 1f99aa145: OUTPUT: «one(1, Any)␤»
15:22 Zoffix donaldh: all Junctions autothread the same, the type one Junction (one, all, any, none) is used only to answer Bool questions
15:22 Zoffix m: my %a = a => 1, b => 2; dd %a{one('a', 'c')}:exists
15:22 evalable6 Zoffix, rakudo-moar 1f99aa145: OUTPUT: «one(Bool::True, Bool::False)␤»
15:22 Zoffix m: my %a = a => 1, b => 2; dd so %a{one('a', 'c')}:exists
15:22 evalable6 Zoffix, rakudo-moar 1f99aa145: OUTPUT: «Bool::True␤»
15:22 Zoffix m: my %a = a => 1, b => 2; dd so %a{one('a', 'b')}:exists
15:22 evalable6 Zoffix, rakudo-moar 1f99aa145: OUTPUT: «Bool::False␤»
15:22 Zoffix s/type one/type of/;
15:22 donaldh Okay, so only useful in boolean context.
15:22 Zoffix Yeah
15:25 Geth ¦ doc: 09c791b3ae | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Junction.pod6
15:25 Geth ¦ doc: s/Markdown syntax/POD6 syntax/
15:25 Geth ¦ doc: review: https://github.com/perl6/doc/commit/09c791b3ae
15:25 synopsebot Link: https://doc.perl6.org/type/Junction
15:26 donaldh So, to get the defined value, is there an idiomatic way that is better than this?
15:26 donaldh m: my %a = a => 1, b => 2; say %a{'a', 'c'}.grep: { .defined }
15:26 evalable6 donaldh, rakudo-moar 1f99aa145: OUTPUT: «(1)␤»
15:27 Zoffix m: my %a = a => 1, b => 2; say %a{'a', 'c'}:v
15:27 evalable6 Zoffix, rakudo-moar 1f99aa145: OUTPUT: «(1)␤»
15:27 Zoffix m: my %a = a => 1, b => 2; say %a{'a', 'c'}:v.head
15:27 evalable6 Zoffix, rakudo-moar 1f99aa145: OUTPUT: «1␤»
15:27 donaldh Yeh, that's better. Zoffix++
15:32 clarkema joined #perl6
15:32 clarkema left #perl6
15:32 Geth ¦ doc: 7322e0b4bb | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Junction.pod6
15:32 Geth ¦ doc: Clarify Junction type effects on autothreading
15:32 Geth ¦ doc:
15:32 Geth ¦ doc: Ref: https://irclog.perlgeek.de/perl6/2017-12-22#i_15612281
15:32 Geth ¦ doc: review: https://github.com/perl6/doc/commit/7322e0b4bb
15:33 clarkema joined #perl6
15:41 Geth ¦ doc: 1e10221801 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Junction.pod6
15:41 Geth ¦ doc: Use better code example
15:41 synopsebot Link: https://doc.perl6.org/type/Junction
15:41 Geth ¦ doc:
15:41 Geth ¦ doc: Since without :exists, we're relying on the boolified values of the
15:41 Geth ¦ doc: hash when collapsing the Junction. This way results are clearer.
15:41 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1e10221801
15:41 Zoffix left #perl6
15:46 clarkema joined #perl6
15:50 xcm joined #perl6
15:53 R0b0t1` joined #perl6
15:57 zakharyas joined #perl6
16:15 philomath_ joined #perl6
16:22 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:23 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 clarkema Current state is at https://gist.github.com/clarkema/ba2e80c2205f6989117811c83777cda3   is there anything I can do at the 'user' level to make this run faster?
16:26 rindolf joined #perl6
16:27 wamba joined #perl6
16:27 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:28 zakharyas joined #perl6
16:29 Spigell joined #perl6
16:34 Perlnew joined #perl6
16:35 vichib joined #perl6
16:36 TEttinger clarkema: from what I understand SBCL does more than just reasonable optimizations :)
16:37 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
16:38 TEttinger SBCL is a compiler though
16:38 geospeck joined #perl6
16:38 TEttinger oh, from the REPL you said?
16:39 TEttinger I think SBCL has some unusual case for how the REPL works alongside their compiler
16:40 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:43 TEttinger 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 joined #perl6
16:49 Zoffix joined #perl6
16:50 Zoffix clarkema: got any sample input for that code?
16:52 clarkema Zoffix: Sure: https://gist.github.com/clarkema/ba2e80c2205f6989117811c83777cda3
16:52 clarkema (updated the same gist)
16:55 raiph joined #perl6
17:00 Zoffix m: say 63/42
17:00 evalable6 Zoffix, rakudo-moar 1f99aa145: OUTPUT: «1.5␤»
17:01 Zoffix clarkema: this makes it ~1.5x faster. I these these are all the "street legal" optimizations I can think of: https://gist.github.com/zoffixznet/7a66bbbbae5aa70e5c657203c42205c5
17:01 * Zoffix tries nqp version
17:02 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 clarkema which gets me down to 23 sec
17:03 khw joined #perl6
17:04 xcm joined #perl6
17:04 clarkema what's the theory behind AT-POS being faster?
17:04 Zoffix m: &postcircumfix:<[ ]>.candidates.elems.say
17:04 evalable6 Zoffix, rakudo-moar 1f99aa145: OUTPUT: «WARNINGS for /tmp/WzSwM4fumi:␤65␤Useless use of constant value [ ] in sink context (lines 1, 1)␤»
17:05 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
17:05 clarkema makes sense
17:06 clarkema awesome
17:07 clarkema If I steal that and your change to prefix increment / decrement and merge with binding, we're beating python
17:07 clarkema https://gist.github.com/clarkema/9cf51e4a5f101dd29bc730b4a8bb1151
17:07 clarkema 15.2 sec
17:10 Zoffix so you *can* bind it like that. Weird, I tried that too, but it gave me some error
17:11 Zoffix Ah, wait no, it gave wrong result then. Gave 25238376 instead of 25347697
17:11 Zoffix You sure 15.2 sec version gives right result? :)
17:11 Zoffix holy shit. nqp version is 0m3.019s
17:12 setty1 joined #perl6
17:12 clarkema yup, result is correct -- still matching the python
17:12 * Zoffix makes changes file slurpage to nqp too to squeeze everything
17:16 xcm joined #perl6
17:16 clarkema I'm staggered that changing $index += $jump into $index = $index + $jump saves so much
17:17 clarkema You'd think they'd be equivalent, but very definitely not
17:19 Phi_mb joined #perl6
17:20 geekosaur joined #perl6
17:20 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 Zoffix Here, 3.027s version: https://gist.github.com/zoffixznet/74df6fb0e9478584e6721bfb5331ee84
17:21 Phi_mb joined #perl6
17:21 clarkema that has a decidedly lisp-y look to it
17:23 clarkema 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:24 Zoffix Filed it as R#1328 in case we can bring HLL version closer to nqp's speeds
17:24 synopsebot R#1328 [open]: https://github.com/rakudo/rakudo/issues/1328 [perf] [PERF] Large diff between HLL and nqp performance in code example
17:25 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
17:25 clarkema super interesting though, thanks :)
17:26 clarkema digging around and performance golfing is quite fun
17:26 geospeck joined #perl6
17:29 AlexDaniel xD street legal optimizations
17:30 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:33 Zoffix Filed as R#1329
17:33 synopsebot R#1329 [open]: https://github.com/rakudo/rakudo/issues/1329 [perf] my int $x; ( $x += 42 is slower than $x = $x + 42)
17:35 * Zoffix &
17:35 Zoffix left #perl6
17:46 domidumont joined #perl6
17:51 itaylor57 joined #perl6
18:01 geospeck joined #perl6
18:02 itaylor57 joined #perl6
18:03 philomath_ joined #perl6
18:04 Phi_mb joined #perl6
18:09 coverable6 joined #perl6
18:09 nativecallable6 joined #perl6
18:17 itaylor57 joined #perl6
18:26 domidumont joined #perl6
18:26 bartolin joined #perl6
18:30 xcm joined #perl6
18:45 eliasr joined #perl6
18:47 itaylor57 joined #perl6
18:53 natrys joined #perl6
18:56 itaipu joined #perl6
19:23 espadrine joined #perl6
19:26 clarkema joined #perl6
19:28 epony joined #perl6
19:30 epony joined #perl6
19:32 clarkema joined #perl6
19:52 xcm joined #perl6
20:23 bisectable6 joined #perl6
20:23 committable6 joined #perl6
20:23 bloatable6 joined #perl6
20:23 quotable6 joined #perl6
20:23 statisfiable6 joined #perl6
20:28 natrys joined #perl6
20:30 lizmat joined #perl6
20:44 clarkema joined #perl6
20:46 comborico1611 joined #perl6
20:51 b2gills left #perl6
20:51 raiph joined #perl6
20:54 Alikzus joined #perl6
20:58 releasable6 joined #perl6
20:58 evalable6 joined #perl6
21:01 mson joined #perl6
21:11 xcm joined #perl6
21:12 AlexDaniel joined #perl6
21:13 Alikzus joined #perl6
21:13 Geth ¦ doc: d25261ac88 | (Will "Coke" Coleda)++ | doc/Language/5to6-nutshell.pod6
21:13 synopsebot Link: https://doc.perl6.org/language/5to6-nutshell
21:13 Geth ¦ doc: mark p5 code, allow p6 code to compile
21:13 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d25261ac88
21:13 Geth ¦ doc: 82f8d569c4 | (Will "Coke" Coleda)++ | doc/Language/traps.pod6
21:13 Geth ¦ doc: nbsps
21:13 synopsebot Link: https://doc.perl6.org/language/traps
21:13 Geth ¦ doc: review: https://github.com/perl6/doc/commit/82f8d569c4
21:21 xcm joined #perl6
21:33 yqt joined #perl6
21:46 espadrine joined #perl6
22:09 comborico1611 joined #perl6
22:10 lancew joined #perl6
22:11 xcm joined #perl6
22:32 xcm joined #perl6
22:40 AlexDaniel oh wow, did flyspell-mode just highlight “the the” as an error? ♥♥♥
22:43 timotimo AlexDaniel: you'll be our advent author for the evening? :)
22:44 AlexDaniel Yeah. Whether you'll like it or not is a different question though :P
22:49 comborico1611 joined #perl6
22:53 troys joined #perl6
22:56 b2gills joined #perl6
22:59 Morfent joined #perl6
23:24 geospeck joined #perl6
23:30 Possum joined #perl6
23:33 itaipu joined #perl6
23:35 comborico1611 joined #perl6
23:39 Morfent joined #perl6
23:40 Geth ¦ doc: 63e5b13835 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/Int.pod6
23:40 Geth ¦ doc: I really need a space there.
23:40 Geth ¦ doc: review: https://github.com/perl6/doc/commit/63e5b13835
23:40 synopsebot Link: https://doc.perl6.org/type/Int
23:41 wamba joined #perl6

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

Perl 6 | Reference Documentation | Rakudo