Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-02-28

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:01 pnu joined #perl6
00:01 solarbunny joined #perl6
00:01 richi235 joined #perl6
00:01 ponbiki joined #perl6
00:04 rntz joined #perl6
00:04 clkao joined #perl6
00:07 bakedb joined #perl6
00:08 Praise joined #perl6
00:14 ribasushi joined #perl6
00:19 dalek joined #perl6
00:21 tadzik joined #perl6
00:23 kjs_ joined #perl6
00:23 secwang joined #perl6
00:26 susmus joined #perl6
00:28 sftp joined #perl6
00:29 yoleaux joined #perl6
00:32 abaugher joined #perl6
00:32 iloveunix joined #perl6
00:37 iloveunix joined #perl6
00:38 BenGoldberg joined #perl6
00:39 nebuchadnezzar joined #perl6
00:48 johndau joined #perl6
00:51 pierrot joined #perl6
01:18 MilkmanDan joined #perl6
01:22 bpmedley joined #perl6
01:29 agentzh joined #perl6
01:32 SmokeMachine____ hi there! I'm trying to find a documentation showing how to make a class that extends the Hash... do any one here know where can I find it?
01:37 kid51 What, specificially, do you mean by "extends"?
01:37 * kid51 notes that the string 'extend' is not found in either http://doc.perl6.org/type/Hash or http://doc.perl6.org/language/classtut
01:38 SmokeMachine____ "class Bla is Hash"
01:39 kid51 At the second of the two links above, search for subhead "Multiple inheritance"
01:41 khagan joined #perl6
01:43 timotimo you don't need multiple inheritance
01:44 sortiz SmokeMachine____, There are dozens of classes in Perl 6, I doubt there is specific documentation for any particular, If you need to create a hash like new class, I recommend you to read http://doc.perl6.org/language/subscripts#Custom_types
01:44 kid51 Also: http://perl6intro.com/#_multiple_inheritance
01:44 BenGoldberg joined #perl6
01:45 ugexe just use monkey typing for everything
01:46 ugexe augment all the classes
01:46 timotimo the custom types part of the subscripts document is excellent for what you need, SmokeMachine____
01:46 timotimo who wrote that? :)
01:52 BenGoldberg joined #perl6
01:54 sortiz SmokeMachine____, So if you need a hash like class, instead of inherit from Hash, you should implement the Associative role: "class Foo does Associative { ... }"
01:55 BenGoldberg joined #perl6
01:55 sortiz \o #perl6
01:56 timotimo that's probably a better idea, true
01:57 timotimo otherwise, you can have a class that "has %.storage handles <AT-KEY EXISTS-KEY DELETE-KEY BIND-KEY>"
01:58 sortiz That is a trivial example, yes.
02:00 salv0 joined #perl6
02:02 SmokeMachine____ thank you all
02:02 silug joined #perl6
02:07 sno joined #perl6
02:07 mtj_ joined #perl6
02:08 khw joined #perl6
02:14 labster joined #perl6
02:20 Ben_Goldberg joined #perl6
02:21 abaugher joined #perl6
02:23 notostraca joined #perl6
02:38 chansen_ joined #perl6
02:46 vendethiel joined #perl6
02:50 labster1 joined #perl6
02:52 silug_ joined #perl6
02:55 nebuchad` joined #perl6
02:57 johndau joined #perl6
03:00 salv0 joined #perl6
03:04 clkao joined #perl6
03:05 notostraca joined #perl6
03:08 rodarmor joined #perl6
03:08 BenGoldberg joined #perl6
03:10 adu joined #perl6
03:11 Spot__ joined #perl6
03:11 BenGoldberg_ joined #perl6
03:12 BenGoldberg_ m: my @a; my $x = 1; @a[0] := $x; ++$x; dd @a;
03:12 camelia rakudo-moar fb74ab: OUTPUT«Array @a = [2]␤»
03:12 rodarmor joined #perl6
03:16 rodarmor joined #perl6
03:17 Spot__ joined #perl6
03:18 parisba joined #perl6
03:19 BenGoldberg m: my @a; @a[*] = 'i like'; @a[*] = 'pie'; dd @a;
03:19 camelia rakudo-moar fb74ab: OUTPUT«Array @a = []␤»
03:19 BenGoldberg m: my @a; @a[*+0] = 'i like'; @a[*+0] = 'pie'; dd @a;
03:19 camelia rakudo-moar fb74ab: OUTPUT«Array @a = ["i like", "pie"]␤»
03:20 rodarmor joined #perl6
03:23 bakedb joined #perl6
03:26 rodarmor joined #perl6
03:28 rodarmor joined #perl6
03:30 Spot__ joined #perl6
03:33 telex joined #perl6
03:38 kaare_ joined #perl6
03:39 Herby__ joined #perl6
03:39 Herby__ Evening, everyone!
03:40 cdg joined #perl6
03:40 Herby__ \o
03:47 Sgeo joined #perl6
03:47 kaare_ joined #perl6
03:53 bjz joined #perl6
03:56 kaare_ joined #perl6
03:56 noganex_ joined #perl6
03:57 zpmorgan joined #perl6
03:57 kaare_ joined #perl6
03:59 BenGoldberg joined #perl6
04:00 skids joined #perl6
04:04 [Tux] joined #perl6
04:06 kaare_ joined #perl6
04:14 jnap joined #perl6
04:14 kaare_ joined #perl6
04:15 dustinm` joined #perl6
04:15 kaare__ joined #perl6
04:16 xnrand joined #perl6
04:17 riatre joined #perl6
04:17 Spot__ joined #perl6
04:17 ggherdov joined #perl6
04:17 sQuEE joined #perl6
04:18 dustinm` joined #perl6
04:20 jnap joined #perl6
04:21 kent\n joined #perl6
04:22 dalek joined #perl6
04:22 clkao_ joined #perl6
04:25 kaare__ joined #perl6
04:27 rodarmor joined #perl6
04:28 kaare__ joined #perl6
04:28 rodarmor joined #perl6
04:29 jsimonet1 joined #perl6
04:29 bitmap joined #perl6
04:31 jnap joined #perl6
04:32 rodarmor joined #perl6
04:34 polyfloyd joined #perl6
04:34 kaare_ joined #perl6
04:36 clkao joined #perl6
04:36 rodarmor joined #perl6
04:37 ggherdov joined #perl6
04:37 SmokeMachine____ joined #perl6
04:40 zpmorgan joined #perl6
04:53 revhippie left #perl6
04:54 dalek DBIish: 2a36f59 | (Salvador Ortiz)++ | lib/DBDish/mysql/ (3 files):
04:54 dalek DBIish: mysql: Post oracle merge repairs
04:54 dalek DBIish: review: https://github.com/perl6/DBIish/commit/2a36f59a74
04:57 labster joined #perl6
04:57 ggherdov joined #perl6
05:02 rodarmor joined #perl6
05:04 polyfloyd joined #perl6
05:05 Spot__ joined #perl6
05:06 vytas joined #perl6
05:12 ggherdov joined #perl6
05:16 telex joined #perl6
05:22 hoelzro joined #perl6
05:28 ggoebel17 joined #perl6
05:31 pierrot joined #perl6
05:33 rodarmor joined #perl6
05:35 rodarmor joined #perl6
05:36 dalek joined #perl6
05:41 tmch joined #perl6
05:42 ggherdov joined #perl6
05:49 Cabanossi joined #perl6
05:52 Spot__ joined #perl6
05:57 ggoebel17 joined #perl6
06:15 laz78 joined #perl6
06:16 ggherdov joined #perl6
06:24 aindilis joined #perl6
06:31 rodarmor joined #perl6
06:32 rodarmor joined #perl6
06:34 jnap joined #perl6
06:38 Spot__ joined #perl6
06:52 molaf joined #perl6
06:54 polyfloyd joined #perl6
06:55 jnap joined #perl6
06:59 CIAvash joined #perl6
07:04 boegel joined #perl6
07:04 ka joined #perl6
07:07 kent\n joined #perl6
07:24 darutoko joined #perl6
07:24 cxreg joined #perl6
07:30 clkao joined #perl6
07:32 Spot__ joined #perl6
07:35 BuildTheRobots joined #perl6
07:41 cxreg joined #perl6
07:50 BuildTheRobots joined #perl6
08:07 ilbot3 joined #perl6
08:07 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!
11:14 ilbot3 joined #perl6
11:14 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!
11:15 * moritz restarts ilbot
11:15 yoleaux 11:09Z <brrt> moritz: seems the logging bot doesn't work in #moarvm
11:15 ely-se p6: say ((0, 1) Xgcd (0, 1)) eqv ((0, 1) X|| (0, 1))
11:15 camelia rakudo-moar d74025: OUTPUT«True␤»
11:15 ely-se :)
11:15 ely-se lcm is && and gcd is ||
11:15 moritz .tell brrt ilbot fixed
11:15 yoleaux moritz: I'll pass your message to brrt.
11:18 nine_ RabidGravy: it means that users will no longer have to wait for precompilation on first run after installing a module. And that we will store much fewer files in ~/.perl6 or scattered around .precomp directories
11:19 BuildTheRobots joined #perl6
11:29 FROGGS joined #perl6
11:30 BuildTheRobots joined #perl6
11:30 FROGGS o/
11:31 lizmat FROGGS \o
11:34 psch \o
11:39 ilbot3 joined #perl6
11:39 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!
11:43 RabidGravy nine_, that is cool yes :)
11:43 Ven joined #perl6
11:45 dalek rakudo/nom: 50f2aaf | lizmat++ | src/core/Buf.pm:
11:45 dalek rakudo/nom: Make Buf.EXISTS-POS(1) 7x faster
11:45 dalek rakudo/nom:
11:45 dalek rakudo/nom: By letting rakudo take care of the unboxing itself, and not creating
11:45 dalek rakudo/nom: a variable: this probably allows it to be inlined better, even though
11:45 dalek rakudo/nom: the unboxing is now happening twice on the "in range" code path.
11:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/50f2aafffb
11:50 ilbot3 joined #perl6
11:50 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!
11:51 RabidGravy Perl6++ # so there I was in the shower and I suddenly had the horrible realisation that I couldn't deal with subsets, and it's so easy that it's already sorted
11:52 [Tux] joined #perl6
11:53 RabidGravy I do think however "subset Foo of Int;   Foo("10") '   should be made to work if the refinee can do that kind of coercion
11:54 RabidGravy there's probably a whole bunch of things I haven't considered but I'd say it wouldn't be that difficult to do
11:55 polyfloyd joined #perl6
11:56 dalek rakudo/jvminterop: 7e45d6b | peschwa++ | t/03-jvm/01-interop.t:
11:56 dalek rakudo/jvminterop: Correct two tests for multi candidate interop.
11:56 dalek rakudo/jvminterop:
11:56 dalek rakudo/jvminterop: Between the original creation of this test and now something changed wrt
11:56 dalek rakudo/jvminterop: iteration over utf8 object in Perl 6. The updated tests reflect this different
11:56 dalek rakudo/jvminterop: behavior.
11:56 dalek rakudo/jvminterop: review: https://github.com/rakudo/rakudo/commit/7e45d6b0b0
11:56 dalek rakudo/jvminterop: 7799dbf | peschwa++ | src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java:
11:56 dalek rakudo/jvminterop: Make name => CodeRef pairs show up in the Metamodel.
11:56 dalek rakudo/jvminterop: review: https://github.com/rakudo/rakudo/commit/7799dbf8e0
11:56 dalek rakudo/jvminterop: d4b71b7 | peschwa++ | src/vm/jvm/CompUnit/Repository/Java.pm:
11:56 dalek rakudo/jvminterop: Remove unused function.
11:56 dalek rakudo/jvminterop: review: https://github.com/rakudo/rakudo/commit/d4b71b7936
11:56 dalek rakudo/jvminterop: 45c205a | peschwa++ | src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java:
11:56 dalek rakudo/jvminterop: Clean up and correct JavaHOW field assignments.
11:56 dalek rakudo/jvminterop:
11:56 dalek rakudo/jvminterop: This adds Java class wrapper methods to .^methods and .^method_table while
11:56 dalek rakudo/jvminterop: leaving out generated helpers like e.g.
11:56 dalek rakudo/jvminterop: "method/mmd+update/([Ljava/lang/Object;)Ljava/lang/Object;".
11:56 dalek rakudo/jvminterop: review: https://github.com/rakudo/rakudo/commit/45c205ae6c
11:56 dalek rakudo/jvminterop: 6524d45 | peschwa++ | src/vm/jvm/Perl6/Metamodel/JavaHOW.nqp:
11:56 dalek rakudo/jvminterop: Provide JavaHOW.parents(), just so nothing complains.
11:56 dalek rakudo/jvminterop: review: https://github.com/rakudo/rakudo/commit/6524d45d6f
11:57 psch RabidGravy: subsets as coercers..?
11:57 * psch doesn't understand the intent
11:58 lizmat RabidGravy: doesn't really go towards a .COERCE method., like we have .ACCEPTS ?
11:59 lizmat so Foo(bar) would call Foo.COERCE(bar)
12:00 RabidGravy Well if one has some kind of parser that winds up with something like "sub parse-atom(Str $val, Real $type) { $type($val) }" then that will blow up if infact $type is a coercion
12:01 RabidGravy so you would have that and then "multi sub parse-atom(Str $val, $type where *.HOW ~~ Metamodel::SubsetHow) {  parse-atom($val, $type.^refinee }"
12:02 RabidGravy modulo the missing brackets
12:03 RabidGravy it would be easy-ish to make the latter step happen under the hood rather than blowing up with the useless "cannot invoke this object"
12:03 Spot__ joined #perl6
12:03 dalek joined #perl6
12:04 RabidGravy s/$type is a coercion/$type is a subset/ above
12:04 psch how would that deal with coercing values outside of the subset to the refinee?
12:05 RabidGravy sorry I'm not quite sure what you mean
12:05 RabidGravy ah, it would just blow up when it hits the subsetted target
12:05 rodarmor joined #perl6
12:05 RabidGravy as it would do anyway
12:06 Ven joined #perl6
12:06 psch ah, so something like < my Foo $x = parse-atom("10", Foo) > dying in the assignment, and not in parse-atom
12:06 RabidGravy yea
12:07 RabidGravy one could of course check the refinment in the sub but that's un-neccessary
12:08 psch hm, feels too late to me, fwiw.  as in, < Int("foo") > dies on it's own already, but < Foo("10") > wouldn't
12:08 psch but i guess that's mostly in how Subsets work in general
12:09 psch they do kind of work like where constraints on containers, don't they
12:09 psch which means coercion to something that should fit can only complain when it doesn't, and not when it can't be coerced..
12:09 psch well, it's consistent enough with my understanding at least vOv
12:10 RabidGravy yeah that would happen anyway with "subset Foo of Int where * < 99;  my Foo $a = Int("foo");"
12:10 psch right, that blows up in Int(), but replacing "foo" with "100" blows up in the assignment
12:14 RabidGravy right, so  "my Foo $a = Foo("100")" would blow up in the assignment too (rather than "cannot invoke this object")
12:15 psch yeah, i think i like that.  it frees up module users from knowing the subset refinee (or jumping through the MOP) to coerce
12:15 RabidGravy which (for what I'm doing right now,) seems like the right thing
12:18 BuildTheRobots joined #perl6
12:20 RabidGravy anyhoo, this came to me when I *thought* I had finished this module and was just making the documentation
12:20 RabidGravy this seems to be a recurring thing with this particular thing
12:24 musiKk_ joined #perl6
12:25 dalek rakudo/nom: 85c18aa | lizmat++ | src/core/Buf.pm:
12:25 dalek rakudo/nom: Make Buf.Numeric|Int a few percent faster
12:25 dalek rakudo/nom:
12:25 dalek rakudo/nom: By removing an additional layer of indirection
12:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/85c18aa4ab
12:26 Actualeyes joined #perl6
12:26 Woodi hi #perl6 :)
12:26 dalek rakudo/nom: 1e33bc5 | lizmat++ | src/core/Buf.pm:
12:27 dalek rakudo/nom: Make Buf.bytes about 13x faster
12:27 dalek rakudo/nom:
12:27 dalek rakudo/nom: By calculating the number of bytes per element at compose time, rather
12:27 dalek rakudo/nom: than every time we call .bytes
12:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1e33bc5b86
12:27 Woodi m: Real.max.rand; Int.max.rand;  # not usefull
12:27 camelia rakudo-moar 50f2aa: ( no output )
12:27 Woodi m: say Real.max.rand; say Int.max.rand;  # not usefull and visible
12:27 camelia rakudo-moar 50f2aa: OUTPUT«-Inf␤-Inf␤»
12:27 psch m: 5.rand.say
12:27 camelia rakudo-moar 50f2aa: OUTPUT«0.180473400462497␤»
12:27 lizmat Woodi: isn't that a matter of GIGO ?
12:27 Woodi lizmat: GIGO ?
12:28 lizmat m: dd int32.max.rand
12:28 camelia rakudo-moar 50f2aa: OUTPUT«-Inf␤»
12:28 lizmat now *that* is strange
12:28 psch m: say Real.max
12:28 camelia rakudo-moar 50f2aa: OUTPUT«-Inf␤»
12:28 psch that seems kinda wrong-ish..? :P
12:28 lizmat psch: no, that's correct
12:28 sjn \o
12:28 parisba_ joined #perl6
12:28 lizmat (been discussed at length before)
12:29 lizmat Woodi: Garbage In Garbage Out
12:29 psch lizmat: oh, right, .max is not MAX_VALUE, is it
12:29 psch ?
12:29 Woodi but .rand should find something in the range...
12:29 psch m: say (0..-Inf).elems
12:29 camelia rakudo-moar 50f2aa: OUTPUT«0␤»
12:29 lizmat m: dd int32.Range.max.rand   # must make it a range
12:29 camelia rakudo-moar 50f2aa: OUTPUT«928070625.042826e0␤»
12:29 lizmat m: dd int8.Range.max.rand   # must make it a range
12:29 camelia rakudo-moar 50f2aa: OUTPUT«20.7272851815008e0␤»
12:30 lizmat m: dd int8.Range.pick
12:30 camelia rakudo-moar 50f2aa: OUTPUT«-37␤»
12:30 lizmat m: dd int8.Range.pick
12:30 camelia rakudo-moar 50f2aa: OUTPUT«125␤»
12:30 lizmat m: dd uint8.Range.pick
12:30 camelia rakudo-moar 50f2aa: OUTPUT«217␤»
12:30 lizmat m: dd uint8.Range.pick
12:30 camelia rakudo-moar 50f2aa: OUTPUT«213␤»
12:31 Woodi ok, use Range...
12:31 lizmat which won't work for Int/Real, because they range from -Inf..Inf
12:31 lizmat m: Int.Range.rand
12:31 camelia rakudo-moar 50f2aa: OUTPUT«Cannot modify an immutable Bool␤  in block <unit> at /tmp/Lt49YFHhCm line 1␤␤»
12:31 lizmat m: dd Int.Range.rand
12:31 camelia rakudo-moar 50f2aa: OUTPUT«Cannot modify an immutable Bool␤  in block <unit> at /tmp/ONwLXBqOU0 line 1␤␤»
12:31 lizmat hmmm... LTA error
12:31 lizmat please someone RT that
12:31 * lizmat goes outside for a few hours...
12:32 Woodi how I can get long long int ? :)
12:32 psch that's int128?
12:32 Woodi possible...
12:32 Woodi thanx lizmat, psch
12:34 psch ah, wikipedia says long long int is at least 64 bits
12:35 psch so int64
12:35 psch which is probably better, 'cause we don't have int128 :)
12:35 Woodi not in one piece :)
12:37 keix joined #perl6
12:38 parisba_ joined #perl6
12:41 rodarmor joined #perl6
12:49 moritz not yet
12:51 lizmat_ joined #perl6
12:51 baest_ joined #perl6
12:51 RabidGravy lizmat, looks like I'm going to have to benchmark some of the Audio::* modules before and after these changes - there is a lot of Buf -> Array -> CArray shuffling (in vaious orders) going on :)
12:55 lnx joined #perl6
12:55 Woodi joined #perl6
12:55 domidumont joined #perl6
12:55 garu joined #perl6
12:55 mathw joined #perl6
12:55 ashleydev joined #perl6
12:55 rudi_s joined #perl6
12:55 gtodd joined #perl6
12:55 f3ew joined #perl6
12:56 ruoso joined #perl6
12:56 arnsholt joined #perl6
12:56 SHODAN joined #perl6
12:57 cdg joined #perl6
12:58 sjohnsen joined #perl6
12:59 espadrine joined #perl6
13:00 Fleurety joined #perl6
13:00 domidumont joined #perl6
13:00 kid51 joined #perl6
13:00 rvchangue joined #perl6
13:01 jnap joined #perl6
13:05 Amnez777 joined #perl6
13:06 anshin joined #perl6
13:07 frew joined #perl6
13:08 pederindi joined #perl6
13:08 orbus joined #perl6
13:09 gypsydave5 joined #perl6
13:09 xxpor joined #perl6
13:09 gregf__ joined #perl6
13:09 sortiz I'm going to push a somewhat massive cleanup in DBIish, but the only user visible change is that now the FooDriver.Version method returns a Version, not a Rat. Internally I remove the 'Role' word from the long-names of the roles.
13:10 BuildTheRobots joined #perl6
13:12 daxim joined #perl6
13:13 autarch joined #perl6
13:14 cdg joined #perl6
13:16 polyfloyd joined #perl6
13:16 [Tux] joined #perl6
13:16 jnap joined #perl6
13:16 dalek joined #perl6
13:16 lsm-desktop joined #perl6
13:16 rodarmor joined #perl6
13:18 SmokeMachine____ joined #perl6
13:19 boegel joined #perl6
13:19 RabidGravy sortiz++ # sounds great, and loving your enthusiasm for cleaning up DBIish :)
13:19 mindos joined #perl6
13:19 BuildTheRobots joined #perl6
13:20 Spot__ joined #perl6
13:21 sortiz RabidGravy, Pushed now, but dalek was dead, I'm waiting for travis-ci results. :)
13:21 hoelzro joined #perl6
13:22 Amnez777 joined #perl6
13:25 Amnez777 joined #perl6
13:25 Amnez777 joined #perl6
13:26 tadzik joined #perl6
13:26 parisba_ joined #perl6
13:33 timrs2991 joined #perl6
13:36 dalek perl6-most-wanted: 43a7d09 | (Tom Browder)++ | most-wanted/modules.md:
13:36 dalek perl6-most-wanted: add new module; correct WIP location of Geo::Ellipsoid
13:36 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/43a7d09e0d
13:36 dalek perl6-most-wanted: f6686bb | tbrowder++ | most-wanted/modules.md:
13:36 dalek perl6-most-wanted: Merge remote-tracking branch 'upstream/master'
13:36 dalek perl6-most-wanted:
13:36 dalek perl6-most-wanted: Conflicts:
13:36 dalek perl6-most-wanted: most-wanted/modules.md
13:36 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/f6686bbae3
13:36 dalek perl6-most-wanted: 7a74d61 | tbrowder++ | / (5 files):
13:36 dalek perl6-most-wanted: Merge remote-tracking branch 'upstream/master'
13:36 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/7a74d61421
13:36 dalek perl6-most-wanted: dd6ff6c | tbrowder++ | most-wanted/modules.md:
13:36 dalek perl6-most-wanted: add memoize wanted for core like Perl 5
13:36 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/dd6ff6ca62
13:36 dalek perl6-most-wanted: 0ce5428 | (Tom Browder)++ | most-wanted/modules.md:
13:36 dalek perl6-most-wanted: Merge pull request #20 from tbrowder/master
13:36 dalek perl6-most-wanted:
13:36 dalek perl6-most-wanted: Add memoize as most wanted (for core)
13:36 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/0ce5428c74
13:37 timotimo o/
13:37 sortiz \o timotimo
13:38 Actualeyes joined #perl6
13:39 Skarsnik joined #perl6
13:40 lucs m: class Foo { has $!n; method N { $!n }; }; my $foo = Foo.new(42); say $foo.N; # How do the 「new」 and/or 「BUILD」 methods need to be written for this to work?
13:40 camelia rakudo-moar 1e33bc: OUTPUT«Default constructor for 'Foo' only takes named arguments␤  in block <unit> at /tmp/nDbehF3wjV line 1␤␤»
13:45 tmch joined #perl6
13:47 burnersk joined #perl6
13:51 Psyche^_ joined #perl6
13:52 sortiz m: class Foo { has $!n; multi method new(Int $n) { self.new(:$n) }; submethod BUILD(:$!n) { }; method N { $!n }; }; my $foo = Foo.new(42); say $foo.N
13:52 camelia rakudo-moar 1e33bc: OUTPUT«42␤»
13:53 sortiz lucs, ^^^
13:53 timotimo lucs: you could also use https://github.com/LLFourn/p6-AttrX-InitArg
13:54 ugexe memoize like core? isnt that `cached` trait?
13:55 lucs timotimo: Oh, neat. Thanks!
13:55 timotimo the cached trait is experimental, because we couldn't find a design that doesn't suck :)
13:55 psch http://doc.perl6.org/language/objects#Object_Construction is the docs, which looks pretty good from here
13:56 lucs psch: I wasn't able to figure it out from reading that :/
13:56 psch oh right, your specific case is missing there...
13:56 psch it only says "please don't use the bless shortcut"
13:57 dalek joined #perl6
13:58 lucs sortiz: Er, thanks too! (misread who had supplied the first solution)
13:58 timotimo "don't use the bless shortcut", eh?
13:58 psch timotimo: well, paraphrase... :)
13:58 cfedde joined #perl6
13:59 psch as in, < self.bless(:$x, :$y) > is shorter than writing new with pos params and BUILD instead
13:59 timotimo ah
13:59 timotimo for subclassability
13:59 psch but that is documented to screw with... right
14:01 sftp joined #perl6
14:02 squain joined #perl6
14:05 musiKk_ joined #perl6
14:06 psch ttps://gist.github.com/anonymous/8a57e90a0499511f1ea8
14:06 psch hrm, no "h" :/
14:06 psch https://gist.github.com/anonymous/8a57e90a0499511f1ea8 # for the extra lazy vOv
14:07 timotimo i am extra lazy
14:07 psch that doesn't explain the need for BUILD with private Attributes though
14:07 psch i'll check if that's mentioned somewhere else...
14:10 sftp joined #perl6
14:10 psch well, no idea if that diff is actually factual.  as in, i don't know if redispatching to Any.new is actually *not* considered poor practice
14:10 timotimo well, redispatching to self.new is nice, because you also get "newer" new methods that way
14:12 brrt joined #perl6
14:12 brrt moritz: thanks :-)
14:12 yoleaux 11:15Z <moritz> brrt: ilbot fixed
14:12 xinming joined #perl6
14:14 psch docs are hard, lets write jvm bytecode /o\
14:15 buharin joined #perl6
14:16 * brrt has recoded 3/11 FOSDEM videos
14:16 brrt interestingly, making them much smaller
14:18 buharin hey
14:18 buharin I want to see video
14:18 buharin but it appears to be broken
14:18 buharin http://video.fosdem.org/2016/h2214/
14:20 timotimo yeah, it is :(
14:22 xinming joined #perl6
14:23 araujo joined #perl6
14:23 buharin greate
14:23 buharin ;s
14:23 timotimo this year we have an additional source for video recordings
14:23 timotimo i.e. we brought our own recording equipment in addition
14:25 Ven joined #perl6
14:26 sortiz joined #perl6
14:27 Skarsnik hm, there is no POSIX stuff in the core?
14:27 nine_ nope
14:27 buharin DrForr, hey are you here?
14:27 timotimo that'd be ... kind of bad :)
14:27 Skarsnik so I need a module to translate this: strftime "%A, %B %d at %H:%M", localtime($chapter{time});
14:27 Skarsnik ?
14:28 timotimo strftime isn't posix, is it? as in, other OSes ship that in their libc, too?
14:28 DrForr buharin: Yeah.
14:28 buharin DrForr, could you fix your blog?
14:28 RabidGravy it is part of the POSIX spec however
14:28 DrForr What's broken about it?
14:28 RabidGravy but yes you would need a module, I think there is one
14:29 RabidGravy but it would be relatively easy to make if there isn't
14:29 buharin DrForr, you should separate your code
14:29 BuildTheRobots joined #perl6
14:29 buharin it is unreadable
14:29 Skarsnik I mean, there is no equivalent in perl6 core with datetime?
14:30 cdg joined #perl6
14:30 RabidGravy isn't that what formatters are for?
14:30 buharin Skarsnik, hey
14:31 timotimo we really need that prancer blog thing :)
14:31 RabidGravy https://github.com/supernovus/perl6-datetime-format
14:31 timotimo it'll be the first blog software to do things the right way. finally!
14:31 Skarsnik ah thx
14:32 Skarsnik The localised month/week day name is important ^^
14:32 DrForr buharin: Do you have a plugin you can recommend? I tried a few but none seemed to work well.
14:32 buharin DrForr, no sorry
14:33 DrForr Also I added <code/> around the blocks but it didn't seem to do anything worthwhile.
14:34 RabidGravy does the old "stick it in github gist and use the embed" thing work in whatever you are using?
14:34 DrForr timotimo: Yeah, what I'm probably going to do once I get the core to work properly is refactor the h*ll ot of PearlBee and use that.
14:35 timotimo refactor pearlbee into perl6? ;)
14:36 DrForr RabidGravy: I've got a helluva lot of snippets, but I can try.
14:36 RabidGravy DrForr, before I forget I have two questions regarding prancer, a) is there scope for dispatch based on other than request path? (e.g. based on some authorisation?)
14:37 Skarsnik buharin, hello
14:37 RabidGravy and b) I'd like to plug in the websocket thingy, should that just work?
14:38 DrForr RabidGravy: Not at the moment, right now I need to work around some OO issues, once that's solved I do intend to tackle those issues.
14:38 Skarsnik did you write an async webscoket client RabidGravy ? x)
14:39 timotimo we have a websocket client and server in the ecosystem, btw
14:39 Skarsnik it's not async
14:39 timotimo OK
14:39 buharin Skarsnik, hi
14:39 RabidGravy the server is
14:40 Skarsnik hm, I can't have 2 whenever block in a react one?
14:40 timotimo of course
14:40 timotimo you can, i mean
14:42 RabidGravy yeah you can have as many as you want
14:43 DrForr OKay, found a formatter I'm happy with.
14:43 ugexe whats a suitable internal name for a an IO abstraction layer that works with IO::Paths, http urls, git urls, etc that does both write (.spurt, POST, push) and read? i just used `Fetch` before, but that doesnt work now that i want to add writes
14:43 timotimo virtual file system?
14:43 ugexe ah thats better
14:43 timotimo that's what gnome/glib calls it
14:44 ugexe that'll work. i didnt want to give the name to give the impression it followed the IO:: interfaces
14:44 timotimo mhm
14:45 RabidGravy m: react { whenever Supply.interval(1) {  say "one second"; if $_ == 5 { done; }}; whenever Supply.interval(2) { say "two second" }}
14:45 camelia rakudo-moar 1e33bc: OUTPUT«one second␤two second␤one second␤two second␤one second␤one second␤two second␤one second␤one second␤»
14:46 rindolf joined #perl6
14:47 Skarsnik Oh, nvm it's an error somewhere else
14:50 * DrForr goes through the last of his Kriek.
14:51 Gruber joined #perl6
14:53 RabidGravy Mmm Kriek
14:53 Praise joined #perl6
14:53 daxim joined #perl6
14:53 psch joined #perl6
14:53 sergot joined #perl6
14:54 Woodi joined #perl6
14:54 ranguard joined #perl6
14:54 cfloare joined #perl6
14:54 rudi_s Hi. Is this expected?
14:54 rudi_s m: "test".split("x", :bla);
14:54 camelia rakudo-moar 1e33bc: ( no output )
14:55 rudi_s I'd expect an error because :bla is not a valid parameter.
14:55 rudi_s (In my case I tried :split_empty which should've been :split-empty.)
14:56 psch rudi_s: https://design.perl6.org/S12.html#Interface_Consistency
14:56 Cabanossi joined #perl6
14:56 Sgeo joined #perl6
14:57 rudi_s That sounds awful.
14:57 rudi_s It makes calling methods totally unsafe with no safeguard against typos.
14:58 musca joined #perl6
14:58 huf joined #perl6
14:59 ugexe thats one reason why BUILD is promoted over new id imagine
14:59 ugexe but ive seen the typo thing happen in rakudo itself
15:00 gensym joined #perl6
15:00 rudi_s What makes it even worse IMHO is that for subs the check is performed which is inconsistent and causes false expectations.
15:00 rudi_s But I guess it's too late to fix that.
15:01 ugexe it  probably enables all sorts of other goodies though
15:02 DrForr RabidGravy: Only picked up two bottles on the way back from FOSDEM. Wanted to find Frambois actually but this is close enough.
15:02 rudi_s Well, the check works for subs.
15:03 timotimo aye, because subs don't have anything like subclassing going on
15:04 RabidGravy there are ways to check if you really are that worried about it, but as it has been re-hashed several times I'll leave it as an exercis
15:04 psch m: class A { method foo(:$h) { say ":h handled" } }; class B is A { method foo(:$u) { say ":u handled"; nextsame } }; B.foo(:u, :h) # this breaks without interface consistency
15:04 camelia rakudo-moar 1e33bc: OUTPUT«:u handled␤:h handled␤»
15:05 rudi_s Yeah. Still would've been nice to get this additional check.
15:05 DrForr buharin: Updated with the new formatter. Does this work better?
15:05 DrForr If so I'll go back and do the same with the previous posts.
15:06 DrForr And then figure out how to translate pod6 markup into that format so I don't have to wear out my fingers editing.
15:07 rudi_s RabidGravy: Was that for me?
15:07 RabidGravy yes
15:07 neilb_ joined #perl6
15:07 timotimo moritz: when trying to "submit a talk proposal" to GPW2016, i get a raw "Forbidden" error page; is that because i'm too late to submit?
15:08 rudi_s RabidGravy: Could you give me a pointer please.
15:08 tmch joined #perl6
15:09 DrForr Could a few of you hit http://theperlfisher.blogspot.ro/2016/02/from-regular-expressions-to-grammars-pt_28.html just to give feedback on the code blocks?
15:10 rudi_s RabidGravy: https://perl6advent.wordpress.com/2015/12/13/a-new-trait-for-old-methods/ <- this?
15:10 RabidGravy class Foo { method bar(:$f, *%f where *.keys.elems == 0) { say "f" };}; Foo.bar(:f); Foo.bar(:f, :b)
15:11 timotimo *punch*
15:11 timotimo DrForr: i find it annoying that the website layout is narrow, but the code blocks have horizontal scrolling
15:11 timotimo i'm in favor of narrow-ish website layouts, though
15:11 rudi_s RabidGravy: Thanks.
15:12 RabidGravy but that other thing would work fine too with some adjustment to taste
15:13 llfourn DrForr: I think you just try and move the archive from the right to the top so the content can take more space
15:13 llfourn (somehow :P)
15:14 DrForr Yeah, I hadn't actually tried the layout at a full window on my monitor, and simply (foolishly) assumed that the center column would take the remainder of thespace.
15:15 DrForr But I was mainly after the readability of the code blocks, as I've had at least one person comment on the blog about it being unreadable. Is that at least better to look at?
15:15 DrForr (I didn't have a problem with how the code looked before, but the readers are the arbiters of taste here, not me.)
15:15 * llfourn subscribes to DrForr's blog
15:16 llfourn they are more readable than your previous posts
15:16 llfourn but the extra space would make them even better
15:16 timotimo well, the code isn't colored, which makes it a bit more strenuous to look at, imo
15:17 llfourn yeah, I wonder if there is an easy way to color it
15:17 timotimo on the other hand, there's people who code completely without highlighting
15:17 llfourn is there a way to use GH markdown code block rendering on your own blog?
15:18 llfourn sleep &
15:19 vendethiel joined #perl6
15:19 DrForr Dunno. I'm going to reformat the rest of the postings this way and worry later, this appears to be an improvement. Little steps...
15:22 Skarsnik hm, what is the oposite of push for Array?
15:22 DrForr If it's not intuitively obvious I'm something of a novice at this.
15:22 DrForr pop()
15:23 Skarsnik I mean, that put at the head, not the tail
15:23 RabidGravy unshift
15:23 Skarsnik Oh, thx
15:23 RabidGravy or prepend
15:23 Skarsnik Na prepend is not the same than push
15:24 Skarsnik if you do @tab.prepend(%hash) it flat the hash
15:24 RabidGravy yes, like append
15:27 lucs What's the P6 equivalent of P5's  s/.../.../r ?
15:28 RabidGravy what does /r do?
15:28 QORRiE joined #perl6
15:28 geekosaur instead of modifying the string in place, the modified string is the return value of the s///r
15:29 RabidGravy yeah, got it
15:31 RabidGravy m: say do given "hshshshs" { S:g/h/g/ }
15:31 camelia rakudo-moar 1e33bc: OUTPUT«gsgsgsgs␤»
15:32 lucs Oh, capital S, eh. Nice.
15:33 RabidGravy or
15:33 RabidGravy m: my $a = "hshshshs"; say $a.subst(/h/, "g", :g); say $a
15:33 lucs Thanks.
15:33 camelia rakudo-moar 1e33bc: OUTPUT«gsgsgsgs␤hshshshs␤»
15:34 RabidGravy S/// only works on $_ though
15:34 lucs Ah, okay.
15:39 zakharyas joined #perl6
15:43 espadrine joined #perl6
15:44 DrForr Updated blog.
15:59 kjs_ joined #perl6
16:09 MilkmanDan joined #perl6
16:17 agentzh joined #perl6
16:22 espadrine_ joined #perl6
16:22 pierrot joined #perl6
16:23 buharin DrForr, work
16:26 DrForr Uh, how about tomorrow? :) Or, do you mean that works?
16:27 buharin DrForr, its working!!!
16:27 DrForr Aha, great.
16:29 _dolmen_ joined #perl6
16:39 khw joined #perl6
16:39 moritz timotimo: dunno; I'll have to ask the others
16:39 sno joined #perl6
16:40 moritz timotimo: have you signed up as a participant already?
16:40 timotimo moritz: is the submission deadline already over?
16:40 timotimo maybe i've missed the time for that, too? i can't find a button for that
16:41 moritz timotimo: yes, signup period is over
16:41 timotimo >_<
16:41 moritz and the venue is full
16:41 moritz "Registration is possible until February 17th 2016" is what the front page says
16:42 timotimo urgh
16:42 timotimo why do i procrastinate stuff so often? >_<
16:42 moritz :(
16:42 timotimo can i sneak in during the hackathon, though? :P
16:43 ugexe m: my $buf = Buf.new(1..5); my @arr = $buf.contents; say @arr[0..*-3]; say $buf.subbuf(0..2); say $buf.subbuf(0..*-3);
16:43 camelia rakudo-moar 1e33bc: OUTPUT«(1 2 3)␤Buf:0x<01 02 03>␤This type cannot unbox to a native integer␤  in block <unit> at /tmp/yv2cH96U7O line 1␤␤»
16:43 moritz timotimo: yes
16:44 timotimo cool! :)
16:44 timotimo i'll definitely do that, then
16:44 moritz \o/
16:47 dalek rakudo/nom: 95069c8 | lizmat++ | src/core/Buf.pm:
16:47 dalek rakudo/nom: Buf.push|unshift shouldn't take lists
16:47 dalek rakudo/nom:
16:47 dalek rakudo/nom: Because it doesn't work with int @arrays either, as should not be
16:47 dalek rakudo/nom: flattened, and they cannot be stored unflattened.  Please use
16:47 dalek rakudo/nom: .append (for push) or .prepend (for unshift) instead.
16:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/95069c8480
16:47 tadzik timotimo: I managed to register and sneak in just 3-4 days ago, try :)
16:47 tadzik there's a note somewhere to email the organizers and ask for a spot
16:47 neilb joined #perl6
16:48 tadzik procrastination's not that bad! :)
16:48 dalek doc: 0f11a13 | (Simon Ruderich)++ | doc/Language/subscripts.pod:
16:48 dalek doc: Language/subscripts: add "or" as alternative in :exists example
16:48 dalek doc: review: https://github.com/perl6/doc/commit/0f11a13258
16:48 dalek doc: 9f71be2 | (Simon Ruderich)++ | doc/Type/DateTime.pod:
16:48 dalek doc: DateTime: mention "epoch" in .posix
16:48 dalek doc: review: https://github.com/perl6/doc/commit/9f71be2852
16:48 timotimo what, really?
16:48 tadzik yep
16:48 timotimo you didn't happen to get a 2-person-room by accident? :P
16:48 tadzik I did, but not by accident :)
16:48 timotimo ah, you're already sharing, eh?
16:49 tadzik yea
16:49 timotimo OK, let's see ...
16:49 tadzik with sergot, who's also coming
16:49 timotimo cool!
16:49 kurahaupo joined #perl6
16:49 sjn hey, cool that you're coming, tadzik :)
16:49 tadzik yep :)
16:50 * sjn has finished reading the course material he borrowed from tadzik
16:50 tadzik haven't seen y'all Perl people a while
16:50 pmurias joined #perl6
16:50 sjn tadzik: how's the job situation? anything signed yet? :)
16:51 pmurias is there still a way to make <.foo> capture?
16:51 tadzik sjn: yep, stuff got signed recently :)
16:51 sjn tadzik: cool! grats! :D
16:51 pmurias tadzik: what event are you attending?
16:51 tadzik pmurias: GPW
16:51 tadzik in Nurmberg
16:51 timotimo pmurias: you can <bar=.foo>
16:52 * sjn is in Nürnberg now, actually
16:52 sjn it's a really nice city
16:52 tadzik hah, still living nearby upcoming Perl events? :)
16:52 sjn yeah :)
16:52 pmurias timotimo: there used to be a way to turn of capturing without changing the regex
16:52 sjn well, I'm missing quite a few too :-P
16:53 pmurias timotimo: AFAIR using a modifier
16:53 timotimo i don't remember that, sadly
16:53 * sjn has a small appartment just down the street from the GPW venue
16:56 * sjn should invite for some drinks here during GPW... hmmm
16:56 tadzik hmmm
16:56 * sjn is off to find a cafe in the city to work on his presentation
16:59 dalek roast: 0e4496a | lizmat++ | S03-operators/buf.t:
16:59 dalek roast: Fix tests wrt 95069c8480466ff25fbc78
16:59 dalek roast: review: https://github.com/perl6/roast/commit/0e4496a0ab
17:01 TreyHarr1 Need a doc pointer... I see a couple very complicated ways to go about it, but is there a straightforward way to to interrogate a compilation unit for its definitions? In other words, point at a p6 file and get back a list of module foo, class bar, sub MAIN?
17:02 Skarsnik hm
17:04 kjs_ good afternoon #perl6. So I’m doing data analysis on ~10,000 records, stored in JSON files, parsing them and storign them into an SQLite database. This works fine mostly, but after having processed about half of them, my script slows down significantly, and my only guess is that this is due to pressure on the memory allocation. Is this a known issue?
17:04 timotimo when you load the compunit, you get back the stashes that make up its symbols
17:04 timotimo that's the EXPORT:: business and such
17:04 TreyHarr1 I'm just writing a bunch of boilerplate for tests, and it would be nifty to refactor it so I don't repeat myself, but I need to write a scanner instead. If I can easily ask, "for each .pm file in dir, does it have a class matching this criteria? If so, run these tests against it"
17:04 TreyHarr1 timotimo: yup, that was the first way I found that looked complicated.
17:04 timotimo it's not so bad
17:04 TreyHarr1 the other was using the phasers
17:05 TreyHarr1 timotimo: k, i'll give it a shot. thanks.
17:08 Skarsnik kjs_, maybe, try to trace the memory print of the process?
17:08 rindolf joined #perl6
17:08 rudi_s I have a function which takes an array (sub foo (@x)) and I want to pass the combination of two arrays (e.g my @a = .., my @b = ...; my @c = |@a, |@b; foo(@c)). What is the idiomatic way to do that in perl6?
17:08 rudi_s (Without a third variable.)
17:09 TreyHarr1 hmm... running 'perl6' with no arguments is the way to start the REPL, right? It used to work, certainly since I installed this rakudo, but now it hangs forever. (Not even responsive to typing some code and EOF'ing, have to ^C to get out.)
17:09 Skarsnik foo((|@a, |@b)) does not work?
17:09 timotimo TreyHarr1: you may have a perl6 process in the background that potentially has the CompUnitRepo locked, so it can't try to load Linenoise or Readline?
17:09 timotimo just a guess
17:11 TreyHarr1 timotimo: a good one. lol, yes, a 'panda look' that I'd forgotten was a panda look and was treating as a normal shell :)
17:11 TreyHarr1 i was trying to run it inside itself, in fact.
17:12 rudi_s Skarsnik: It does, thanks. I was just curious in which ways this could be done and which is the shorted/best/recommended.
17:12 rudi_s (I didn't think about (..) and would've used foo([|@a, |@b]).)
17:15 kjs_ Skarsnik: ok. I suppose one would do that with valgrind? I’ve got 2 types of data: the first set is about 100 files each with 100 entries, and the second is 10000 files each with one entry. The second one seems to be easier to process than the 100 files with 100 entries each. But maybe that’s due to my perl scripts.
17:16 Skarsnik just look like at top
17:16 Skarsnik or with ps
17:16 llfourn joined #perl6
17:16 frew joined #perl6
17:16 hippie left #perl6
17:19 lizmat_ m: Buf.new; say now - INIT now   # wow, the first time we create a Buf is *very* expensive!
17:19 camelia rakudo-moar 95069c: OUTPUT«0.3498912␤»
17:19 Skarsnik duh
17:20 Skarsnik it's not just a 'simple' malloc?
17:20 timotimo m: say now - INIT now
17:20 camelia rakudo-moar 95069c: OUTPUT«0.0016866␤»
17:20 timotimo o_O
17:20 lizmat_ no, it isn't
17:20 lizmat it's punning the role into a class
17:20 lizmat after that, it's ok
17:20 timotimo oh
17:20 lizmat feels to me, this punning should probably be done during the setting already
17:20 timotimo what happens if we just ... yeah
17:20 lizmat *compiling the setting
17:21 * lizmat tries
17:22 Skarsnik m: role R {}; R.new; say now - INIT now
17:22 camelia rakudo-moar 95069c: OUTPUT«0.0023991␤»
17:23 lizmat Buf and Blob are no small roles
17:23 domidumont joined #perl6
17:24 timotimo i wonder what part actually takes all that time
17:24 Skarsnik why are they role and not class?
17:25 timotimo because Blob and Buf are parametric
17:25 japhb Skarsnik: Because they can parameterize on element size
17:25 japhb Skarsnik: e.g. buf8
17:25 lizmat timotimo: is there some punning method in the MOP that I could use ??
17:26 timotimo i think make_pun exists
17:29 TreyHarris joined #perl6
17:30 lizmat m: Buf.^make_pun; say now - INIT now  # the expensive part
17:30 camelia rakudo-moar 95069c: OUTPUT«0.3362993␤»
17:31 skids joined #perl6
17:33 timotimo i wonder how many parts that has
17:34 lizmat well, adding it to the mainline of the setting, makes compilation die in pretty mysterious ways
17:35 timotimo ohgen/moar/m-Metamodel.nqp:2586
17:35 timotimo hm. a profile of that shows it's spending about half-half in "specialize" and "apply", gen/moar/m-Metamodel.nqp:2586
17:35 timotimo ^- that's specialize
17:35 timotimo gen/moar/m-Metamodel.nqp:2734  -  this is apply
17:36 timotimo and most of compare_multi_sigs is actually spent inside "gistperl"
17:36 timotimo gen/moar/m-CORE.setting:19074 - gistperl
17:36 lizmat what's being gisted ???
17:36 timotimo when we make a pun, do we actually have to be comparison of multi functions?
17:37 lizmat timotimo: no idea...
17:37 lizmat my question is really: why isn't this done during core setting, so that we have ready to use punned roles after startup ?
17:38 timotimo you mean only for roles that have default values for all their parameters?
17:38 lizmat I can't imagine a punned role taking so much more space that it will slow down bare startup
17:38 lizmat well, I would argue all of the possibilities should probably be punned
17:39 lizmat but at least Buf or Blob
17:39 * timotimo hunts through the call graph
17:39 lizmat *and*
17:41 timotimo the eqv operator on Signature uses gistperl
17:41 lizmat this would at least shave 33 x .34 = 10 CPU seconds off the spectest
17:42 timotimo it may be a good idea in general to improve the eqv operator on Signature
17:42 lizmat timotimo: ok, will take that on first
17:43 vendethiel- joined #perl6
17:44 timotimo i'm not sure that's really correct, but apparently gistperl takes up 95.7% of the total time of Buf.^make_pun
17:44 timotimo it's potentially already easy enough to add a fast-fail for different arities, for example
17:44 lizmat yeah, ok
17:47 _dolmen_ joined #perl6
17:47 timotimo hm, no.
17:47 timotimo maybe all the invocations to eqv are actually coming out true
17:47 * timotimo checks that
17:50 lizmat looks like Signature.ACCEPTS(Signature) could use some speedup as well
17:50 timotimo oh my. they all come out False
17:52 colomon joined #perl6
17:57 timotimo so with a check for .count equality i can get 59 eqv's to abort early, and 127 still do the full check
17:58 zpmorgan joined #perl6
17:59 timotimo sadly that only takes the run time on my end from 0.46 to 0.33
17:59 timotimo so more work is clearly needed
18:00 ugexe however i handled bufs with net::http is nearly twice as slow with HEAD than 2015.12 :x
18:00 skids Coincidentally I was working on a patch for the metamodel signature comparator.
18:01 timotimo oh!
18:01 timotimo lizmat: ^- skids has something for us!
18:01 timotimo :P
18:01 skids Not for eqv.
18:01 skids The thing below it.
18:01 timotimo oh
18:01 guru joined #perl6
18:01 timotimo well, that just uses gistperl + eq + gistperl
18:02 timotimo so whatever you had in mind for eqv would likely also apply there
18:02 lizmat ugexe: are you saying Buf handling slowed down since 2015.12 ?
18:02 skids https://gist.github.com/skids/b7db42fc7d029e5c0f9e was the first, 6.c-compatible part of that.
18:03 timotimo how much faster is that for Buf.^make_pun?
18:05 skids Well, I don't have two rakudos to compare.
18:05 timotimo mhm, fair enough
18:05 timotimo how fast does Buf.^make_pun run on your machine?
18:05 skids eqv should probably do likewise but not use the :where thing
18:06 timotimo i find it strange that you have +sa.params over and over again
18:06 skids Yeah I was trying to avoid making that a Routine.
18:06 skids Though, I don't know why.
18:07 skids (Can't use return or last otherwise)
18:07 timotimo routine?
18:07 skids Or can't use return.  Was also trying to avoid last to avoid control exceptions.
18:07 timotimo yeah
18:08 timotimo but you misunderstand me
18:08 timotimo why is \sap and \sbp in the inner loop and why not +sap or even put the result of +sap into another variable?
18:09 mst joined #perl6
18:10 lizmat so what is exactly the function of set_multi_sig_comparator ?
18:10 lizmat is that the code that determines if two signatures are identical ?
18:10 timotimo it registers a comparison function that the metamodel can use
18:10 timotimo yeah, looks like
18:10 skids It is newer than most of the metamodel, hasn't been fully promulgated yet.
18:11 timotimo using your code makes Buf.^make_pun run in 0.21s
18:11 skids timotimo: yeah I hadn't PR'd that yet because it needed some massaging, just got it working, so probably could use some massage.
18:11 lizmat and how does this relate to Signature.ACCEPTS(Signature) ?
18:11 TreyHarris joined #perl6
18:12 skids timotimo: is that better, or worse (just logged in, haven't backlogged much)
18:12 timotimo Parameter.perl is now at 59.96% inclusive time
18:12 timotimo that's two times better than what we had in the beginning
18:13 timotimo i.e. takes half as long
18:14 espadrine_ joined #perl6
18:15 skids What I've been trying to psych myself up to do is extract the logic from is_narrower/sort_dispatchees_internal into that comparator.  But that will be 6.c-breaking.
18:15 timotimo inside Parameter.perl, 25% time is spent inside a/the calls to .map, 11.8% from .sink, 8.72% of time spent inside the curly block following the first # XXX
18:16 timotimo another 8.6% is spent inside .ACCEPTS of a Regex
18:16 Skarsnik really eqv just compare the gist?  xD
18:16 timotimo the curly block from the else-branch of "if $name" is next at 7.37%
18:17 timotimo after that is much smaller fish
18:17 lizmat timotimo: did you work on Parameter.perl already ?
18:17 skids Skarsnik: yes, which is a bit hacky and causes some issues, but you know, "first ake it work" :-)
18:17 timotimo no, just analyzing it so far
18:18 timotimo hm, so the most expensive part is the type captures part
18:19 timotimo rebuilding takes quite a little while on my laptop :|
18:19 skids One note is that in sort_dispatchees_internal a hash is built for each sig, mostly because not all the methods from Parameter.pm are available at that point, but it has the effect of caching results for future comparisons.
18:19 timotimo but i just guarded that for with a "if nqp::elems($!type_captures)", since type captures are rather rare
18:20 ugexe lizmat: in some cases, yes (at least i dont think another change is causing it). looking at --profile it seems to be twice as many allocations. lots of new calls to `perl`, `sink-all`, `new`, `sequential-map`, and `push-exactly`. or should i look at something else?
18:20 yoleaux joined #perl6
18:20 timotimo what question was that an answer to?
18:20 lizmat ugexe: ok, that's caused by the punning then: there are many more methods/candidates now for punning
18:21 timotimo ah, interesting
18:21 lizmat about the slowdown in net::http since 2015.12
18:21 timotimo so we'll be improving the performance of that code with this work right here
18:22 lizmat yes
18:22 timotimo i really wonder why the type_captures method boxes an Int for the index of the type captures
18:22 timotimo it's not like we support more than 2^64 type captures on a single parameter?
18:23 timotimo just got answer from the GPW admins; i'm too late for GPW this year ;(
18:23 TreyHarris is file glob just gone from Perl 6?
18:23 timotimo it's in the ecosystem
18:24 TreyHarris timotimo: thanks, didn't see it for some reason
18:24 timotimo :)
18:25 zakharyas joined #perl6
18:25 timotimo with that for loop guarded by an if, i'm down to 0.18s
18:28 RabidGravy woah, that's epic poddery, nearly half this module is POD now :-\
18:28 RabidGravy better get it out the door
18:28 timotimo i'm not entirely sure why the check for "Callable" looks like $type ~~ / ^^ Callable >> /, but i guarded it with a $type.starts-with
18:28 lizmat .oO( podding along )
18:28 lizmat timotimo: nqp::istype(,Callable) should be fine ?
18:28 timotimo i think the type is probably a string?
18:29 skids timotimo: for Callable[Int] etc I think.
18:29 lizmat ah, then starts-with should be ok  :)
18:29 TreyHarris how about fork/exec? I'm not finding it in ecosystem :)
18:29 dwarring joined #perl6
18:29 TreyHarris (it's probably there too, I'm just getting the wrong name...)
18:29 timotimo ah
18:29 mst TreyHarris: that's non-portable, you can get it from your OS via NativeCall
18:29 timotimo i can compare $!nominal_type instead
18:30 mst TreyHarris: however, the first question is, why do you -want- to fork?
18:30 mst perl6 already has concurrency, and it already has process running
18:30 Skarsnik Fork does not work great x)
18:30 vendethiel joined #perl6
18:30 TreyHarris mst: completeness. i'm trying to port one of my cpan modules and get it testing correctly before making it more p6-y
18:30 Skarsnik mst, I needed fork to run code that leak
18:30 timotimo m: "Callable[Foo]".index("[").say
18:30 camelia rakudo-moar 95069c: OUTPUT«8␤»
18:30 timotimo m: "CallableFoo".index("[").say
18:30 camelia rakudo-moar 95069c: OUTPUT«Nil␤»
18:31 mst I fully expect we'll end up with an exec() eventually, because that exists on win32 as well
18:31 mst but fork() is *n?x specific, so using NativeCall to get it from the OS is, if anything, more elegant design-wise than having it supported directly as such
18:31 TreyHarris mst: sorry, exec is what I need, I just said "fork/exec" because that's like one word to an old Unix hack like me :)
18:31 Skarsnik I mean what are the other way to start another process?
18:31 mst TreyHarris: what do you need exec for?
18:31 Skarsnik not just a thread
18:32 TreyHarris mst: "Perl, stop execution immediately and replace yourself with this other program"
18:32 mst TreyHarris: so, basically, at this point you do the moral equivalent of 'exit system(...)'
18:32 skids TreyHarris: maybe use NativeCall?
18:32 mst or try and NativeCall in exec(), which I'm probably going to end up doing at some point myself
18:33 TreyHarris mst: no, exec() is a specific thing, because it frees all resources the prior process is using. doing a system() postpones releasing those resources until the system() finishes, even if it's the last thing in the program.
18:34 mst TreyHarris: please don't treat me like an idiot when I'm trying to help you.
18:34 timotimo making the thing inside the check for [Foo] faster didn't matter at all, seems like.
18:34 mst I know what exec does. that's why I gave you both options.
18:35 skids .oO(exec might be kinda fugly from an evalserver-like setup)
18:35 mst skids: yes. but in the long run we need it anyway, because leaving an unnecessary extra process lying around is pretty gross
18:35 mst OTOH for the moment it *does* work, basically
18:36 buharin joined #perl6
18:36 timotimo skids: do you think we can figure out a nice fast-fail condition for the equivalence of parameters in our signature comparator?
18:37 TreyHarris mst: i'm sorry, i wasn't trying to, i've done enough coding interviews of supposed "system programmers" to know that the fork/exec process is surprisingly esoteric even to non-idiots. my apologies for misunderstanding and for implying you didn't understand.
18:37 timotimo skids: actually, Parameter has an ACCEPTS, is that potentially right for our use case?
18:38 skids timotimo: Both will be a bit tediuous, but harder for 6.c copatibility than not.  Haven't considered ACCEPTS.
18:38 timotimo hm
18:38 mst TreyHarris: yeah, so, NativeCall will totally let you get at the systemcall
18:38 skids For 6.c you basically have to go by what gistperl does.
18:38 timotimo anyway, anything that makes this faster would be helpful :)
18:39 lizmat Set($other.named_names) (<=) Set($.named_names)   # pretty bad, because it first builds to entire Sets
18:39 mst TreyHarris: while I was resisting the urge to try and set you on fire with my mind, I also came up with an alternative, which is to do an 'exit system()' of a program that forks, execs your real thing in the child, and exits the parent, but of course then you lose the exit code and have the usual other problems
18:39 timotimo perhaps we have to look at this from a higher vantage point. like, what exactly does the metamodel expect the comparator to consider equivalent and what not? does that have to be 1:1 the same as eqv on two Signature objects?
18:41 mst TreyHarris: also, sorry, I assumed since you had perl5 code you'd probably already know I tend to work on fairly low level stuff - I mean, I did do most of the design for e.g. http://p3rl.org/Daemon::Control - but I do understand that lots of people don't get it. saying "yes, but I want the exec() resource freeing behaviour" is what I'd do, then the people that know will go "yeah, I know" like I did, and if you get a blank look, ...
18:41 mst ... *then* you explain
18:41 timotimo lizmat: good point; also the eqv we've had so far wouldn't be just subsets, it'd require both to exactly match
18:41 ugexe fwiw its in the s29 design doc as `runinstead`
18:41 mst bah. I'm doing the "debug your communications protocol as well as your problem" thing again. hope it's clear I mean it constructively :D
18:41 skids timotimo: unless we want eqv to be True for tiebreakables, the two will have to be different.
18:41 TreyHarris mst: Yes, it is. Again, I really do apologize. To put it in context, I'd say that at Google, folks we brought in for onsite SRE interviews had a 50% hit rate on being able to explain fork/exec, and at that point 99% of applicants had already been weeded out. (I've learned that pretty much anything you'd think is a litmus test for a good system programmer, a bunch o good system programmers can't pass.)
18:43 skids timotimo: What needs to happen eventually is in sort_dispatchees_internal, obscured a bit by that fact it is bootstrap code.
18:43 skids (and sort_dispatchees_internal could probably use some improvements as well)
18:43 timotimo skids: tbh i don't feel up to wrangling the metamodel right now ... i'm trying to work up the courage to improve spesh by finding out what makes it not analyze my "white noise" example code properly
18:44 TreyHarris mst: Yes. Sorry, I didn't /whois you until now and I'm terrible with remembering initials. We were both in the kilt squad at YAPC CMU '09 and had several meals together.
18:44 mst I thought it was you, that was part of why I was so confused :P
18:45 skids timotimo: if I can manage to get my head clear enough today I'll try to PR something, no guarantees, I've been feeling down all week.
18:45 mst TreyHarris: anyway. those are your options for the moment. note that if you do get exec via NativeCall going I'd love to see the resulting code, because I'm going to be wanting to do that sometime soon myself
18:45 timotimo no worries, i appreciate any effort! :)
18:46 timotimo otherwise, you can let lizmat work on it instead/in addition
18:46 mst because currently the shim scripts that are used to invoke installed scripts via modules suffer from exactly the suckage you describe because they're doing 'exit system(...)'
18:46 mst so the path forwards seems to me to be 'get a cross-platform NC exec, use it in those for a bit to shake it out, then petition to add it for 6.d'
18:47 TreyHarris mst: i'll let you know but since it was a marginal feature to start with I only brought it up now because I was surprised I couldn't find an implementation. It just happened to be the next thing in the test file I was porting.
18:47 jnthn m: use NativeCall; sub execv(Str $path, CArray[Str] $args) is native returns int { * }; execv('/usr/bin/uname', CArray[Str].new('foo', Str)); say 'not here';
18:47 yoleaux 10:49Z <lizmat> jnthn: there's something strange with reading a 2.5MB file with slurp: with nqp::readallfh it takes about 80ms, with nqp::readfh with the size of the file as a buffer, it takes 350 msec (like 4x as long)
18:47 camelia rakudo-moar 95069c: OUTPUT«Linux␤»
18:47 yoleaux 10:49Z <lizmat> jnthn: I would expect the unicode handling to make things *slower*, but instead it's 4x faster than binary ?
18:47 jnthn That's how to call exec with NativeCall, btw
18:47 lizmat jnthn: I think we found out what that was: Buf.^make_pun
18:48 jnthn lizmat: OK. I'm headachey and sick today, so don't know I'll be figuring out much... :(
18:48 lizmat jnthn: we're figuring out many a things atm...
18:48 lizmat any suggestions would be welcome...
18:48 jnthn lizmat: Does the binary path copy all it gets into another buffer though?
18:49 lizmat jnthn: yeah, but the delay is in the first occurrence of Buf in a run
18:49 mst TreyHarris: well, sure, which is why I suggested you did 'exit system(...)'
18:49 mst TreyHarris: because I figured it was probably a marginal feature
18:49 lizmat m: Buf.^make_pun; say now - INIT now  # that's a lot of CPU there
18:49 camelia rakudo-moar 95069c: OUTPUT«0.3490704␤»
18:49 lizmat jnthn: ^^^
18:49 mst TreyHarris: I assumed the exec 101 lecture meant it was important :P
18:49 jnthn Sure, but it's amortized
18:49 timotimo ohey jnthn :)
18:49 jnthn m: Buf.^make_pun for ^10; say now - INIT now
18:49 camelia rakudo-moar 95069c: OUTPUT«2.9059790␤»
18:50 jnthn Uh...it should be, at least.
18:50 timotimo hah
18:50 timotimo well, .^make_pun probably doesn't cache the result
18:50 jnthn m: Buf[].^make_pun for ^10; say now - INIT now
18:50 camelia rakudo-moar 95069c: OUTPUT«2.89013790␤»
18:50 timotimo whereas whatever uses .^make_pun probably does
18:50 jnthn Oh, wait...
18:50 jnthn m: Buf[].^pun for ^10; say now - INIT now
18:50 camelia rakudo-moar 95069c: OUTPUT«0.334182␤»
18:50 jnthn Right :-)
18:50 jnthn That's the one that should be used :)
18:51 mst TreyHarris: also, damnit, I suppose that means I'll actually have to write the code myself at some point ;)
18:52 dalek rakudo/nom: 2098186 | lizmat++ | src/core/Buf.pm:
18:52 dalek rakudo/nom: Make Blob.AT-POS a few percent faster
18:52 dalek rakudo/nom:
18:52 dalek rakudo/nom: And hopefully better inlineable
18:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/20981863dd
18:52 dalek rakudo/nom: 4fbedcc | lizmat++ | src/core/Range.pm:
18:52 dalek rakudo/nom: Fix typo
18:52 dalek rakudo/nom:
18:52 dalek rakudo/nom: Found when doing Int.Range.rand.  Instead of generating an LTA error,
18:52 dalek rakudo/nom: this now hangs because it is building the infinite list.  This probably
18:52 dalek rakudo/nom: needs some extra attention  :-)
18:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4fbedcccb5
18:53 espadrine joined #perl6
18:53 TreyHarris mst: like I said, I was porting feature-for-feature, and I got to the one that used exec(). So it was important insofar as doing something other than exec() would no longer be porting feature-for-feature.
18:54 cdg joined #perl6
18:55 cdg joined #perl6
18:56 timotimo should we optimize .map on ().list ?
18:56 timotimo as in: special-case?
18:56 jnthn Don't think the code to do it is worth the bloat or, worse, slowing every other case down for.
18:57 timotimo 'k
18:57 chrstphrhrt joined #perl6
18:58 timotimo in this case, which is Parameter.perl, it's probably worth looking at nqp::elems() of $!type_captures
18:58 flussence was runinstead() removed from the spec? not sure why we need to wait for 6.d to fix it.
19:02 roryrjb joined #perl6
19:02 TreyHarris jnthn: thanks, that works. a stringifiable list-to-CArray[Str] wrapper is easy enough, but is the idiomatic way to do it by putting coercion logic in the sub exec (Str $path, *@args) which calls execv?
19:02 TreyHarris sorry, *conversion* logic. not *coercion*
19:02 TreyHarris thinko
19:03 TreyHarris b/c a coercion milti could work as well, no?
19:03 jnthn TreyHarris: If you stick it in a module then yeah, you could write a sub that does the coercion, named it exec, and export *that* rather than the native sub itself.
19:03 mst that was roughly what I was expecting to be the sensible approach
19:04 _dolmen_ joined #perl6
19:04 mst given perl6 being perl6 couldn't you put the 'sub execv is native' inside the 'sub exec' and not need a module?
19:04 jnthn mst: Yes
19:04 jnthn mst: But also subs are lexical anyway
19:04 jnthn mst: So hiding the native one from the outside world is as simple as not exporting it.
19:05 mst you're thinking the wrong way round
19:05 jnthn Oh, if you don't want a module at all, just to stick it in a script
19:05 mst I was thinking that I wouldn't want to have to wrap a block around the outside of the 'sub exec' definition to avoid leaking the execv out into the script
19:05 jnthn Yes, then it makes sense.
19:05 mst exactly. the words 'and not need a module' were a clue :P
19:06 jnthn What, I'm meant to read???
19:06 TreyHarris jnthn: but mst is right that I probably should just eliminate the feature, as I don't want to port a pure perl 5 module into an impure perl6 module.
19:07 mst TreyHarris: given the way NativeCall works, I would argue it isn't really impure as such
19:07 mst this is not like Inline::C or XS
19:08 TreyHarris mst: guess I need to look at exec's p5 implementation. i'm guessing it's not portable just by doing jnthn's incantation alone.
19:08 jnthn May not quite work out on Windows without a tweak
19:10 dalek ecosystem: 67735d7 | RabidGravy++ | META.list:
19:10 dalek ecosystem: Add XML::Class
19:10 dalek ecosystem:
19:10 dalek ecosystem: see https://github.com/jonathanstowe/XML-Class
19:10 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/67735d792b
19:10 jnthn grmbl, headache returns...bbl, or tomorrow
19:10 RabidGravy there, that took longer than anticipated but what larks
19:11 Skarsnik ah nice module
19:12 RabidGravy I wouldn't say it's perfect but it should get some tire kicking
19:20 dalek rakudo/nom: bc0070f | lizmat++ | src/core/Mu.pm:
19:20 dalek rakudo/nom: Make BUILDALL/BUILD_LEAST_DERIVED about 10% faster
19:20 dalek rakudo/nom:
19:20 dalek rakudo/nom: Benchmarked on a class with 3 public attributes not being initialized
19:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bc0070fa3e
19:20 TreyHarris whee... looking at p5. exec is defined separately for each OS. so i guess unless you already have an OS dependency, defining it inline would be a bad idea.
19:22 japhb lizmat: Do you have any of your benchmark code (that you used to time all these changes you've been making over the past weeks) laying around?  It would be nice to get them into perl6-bench ...
19:23 lizmat japhb: I basically used one liners, run them at least 3 times with 10 second intervals, run one "empty" loop for a baseline, and do the math
19:23 lizmat japhb: so, no, I don't really have code as such :-(
19:24 lizmat will keep that in mind in the future, though
19:24 lizmat $ 6 'class A { has $.a; has $.b; has $.c }; for ^10000 { my $a = A.new }
19:25 lizmat $ 6 'say (285 - 132) / (299 - 132)'
19:25 lizmat 0.916168
19:27 mst lizmat: turning that into a small shell script (or whatever) called 6bench would likely be pretty trivial
19:27 mst I mean, FVO trivial, but still
19:27 espadrine joined #perl6
19:28 vendethiel joined #perl6
19:30 vike joined #perl6
19:31 espadrine_ joined #perl6
19:45 azawawi joined #perl6
19:45 azawawi hi
19:46 RabidGravy rarr!
19:46 azawawi regarding "is cached" trait http://doc.perl6.org/routine/is%20cached , does it have a cache eviction strategy?
19:46 moritz nope
19:46 japhb lizmat: perl6-bench has a *lot* of one-liners, and handles empty loops, and can do any subset of the tests in the run, and does the "run N times" work, and ...  :-)
19:47 mst it's actually 'is memoized', but with a stupid name.
19:47 japhb mst: https://github.com/japhb/perl6-bench
19:47 mst but 'cached' is more familiar to people so
19:47 vike joined #perl6
19:47 azawawi moritz: we can override it right?
19:47 lizmat japhb: point taken  :-)
19:47 azawawi mst: yup https://en.wikipedia.org/wiki/Memoization
19:48 laz78 joined #perl6
19:48 lizmat azawawi: it's experimental as it is, anyways  :-)
19:49 mst azawawi: you can write your own trait with an eviction strategy, yes
19:49 azawawi mst: thanks
19:49 mst lizmat: actually, I sort of wonder if 'is cached' should take (a) an args mangler, the way memoize does, (b) a cache constructor
19:49 mst then it would both fit it's name and be configurable
19:50 lizmat mst: I implemented it as it was vaguely specced
19:50 azawawi lizmat: could you please link its design spec?
19:51 lizmat S06:2081
19:51 * azawawi thinks it will give him something to do it this evening :)
19:51 geraud joined #perl6
19:53 kid51 joined #perl6
19:53 autogen joined #perl6
19:54 azawawi lizmat: thanks ... http://design.perl6.org/S06.html#is_cached
19:54 mst lizmat: right. I've been tending to regard the synopses as "it must do the things they say, but there's no reason you can't do a few extra bits as well"
19:55 mst that's going to be completely necessary for CUR over time, certainly
19:55 mst but then again, in general I don't really write code where an unbounded cache is useful, and I can see a bunch of scripty uses where it would be
19:55 lizmat mst: the extra bits are what gives me the top position in most reverted   :-)
20:01 kjs__ joined #perl6
20:04 tharkun joined #perl6
20:07 nowan joined #perl6
20:08 japhb lizmat: Just shows you're taking a proper amount of risk taking ... and also that roast is a bit thin still.  :-)
20:08 japhb *you're doing
20:09 raiph joined #perl6
20:09 * japhb left his tea in the freezer to cool a little too long.  Yipes that's cold.
20:14 * lizmat just has a fresh cuppa (hot)
20:15 Hotkeys Just leave it in a bit longer and have a teasicle
20:16 vendethiel joined #perl6
20:18 [Sno] joined #perl6
20:18 zakharyas joined #perl6
20:19 notostraca joined #perl6
20:21 japhb Hotkeys: not entirely a bad idea ... except the part about needing the caffeine now.  :-)
20:22 musiKk_ joined #perl6
20:27 MadcapJake joined #perl6
20:33 lizmat japhb: I seem to have misplaced the benchmark repo...  what was it again?
20:35 mst 19:47 < japhb> mst: https://github.com/japhb/perl6-bench
20:35 lizmat mst++
20:37 TreyHarr1 joined #perl6
20:39 tmch joined #perl6
20:40 lizmat japhb: so, if I only have a P6 benchmark, I could just leave the perl5 tag empty ?
20:40 japhb lizmat: Yeah, exactly
20:41 japhb The perl5 and nqp entries are only there for when you want to do cross-language comparisons.
20:41 lizmat what does the "scale" parameter mean
20:41 lizmat ?
20:42 moritz lizmat: the harness tries to run each benchmark with a number the determines the amount of work to be done
20:42 moritz lizmat: that is, number of iterations, length of strings to be regexed, stuff like that
20:43 moritz lizmat: that's the scale
20:43 japhb lizmat: Just checked, you already have a commitbit, btw
20:43 moritz so that stuff like quadratic string concatenation becomes obvious
20:43 lizmat so 1<<7 means number of iterations to be done ?
20:44 japhb lizmat: That's the starting value.
20:44 japhb It will automatically ratchet it up until the runtime of the test is long enough to get out of the noise
20:44 japhb (plus a bit more to see the scaling effects)
20:45 japhb And I tended to do it in binary, because the default ratcheting behavior is to double the scale each run.
20:45 dalek rakudo/nom: add25c7 | lizmat++ | src/core/Parameter.pm:
20:45 dalek rakudo/nom: Make Parameter.sigil about 20x faster
20:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/add25c771c
20:45 japhb But there's nothing intrinsically correct about that scaling factor; it just seemed like it would be a good default.
20:46 lizmat so, the benchmark for this was: $ 6 'sub a(\) {}; my $p = &a.signature.params[0]; for ^100000 { my $a = $p.sigil }'
20:46 japhb (There's also a linear scaling mode for tests like man-or-boy or ackerman that have their own super-linear scaling based on an opaque parameter.)
20:47 vendethiel joined #perl6
20:47 lizmat japhb: how would you put that in microbenchmarks.pl ?
20:47 japhb hold on, lemme pull that
20:47 japhb up
20:48 raiph joined #perl6
20:52 japhb lizmat: something like https://gist.github.com/japhb/f15b1a9779d8e89ddf4c perhaps
20:53 RabidGravy gah, one more module and I will have made 40 - I may have to pause for a while before it gets embarassing
20:54 japhb I wonder if we should add tags for test authors so that people can see how much a particular person's favorite test cases were improving
20:55 japhb RabidGravy: s/embarassing/awesome/
20:56 lizmat japhb: are the tags that we don't use (like perl5 and nqp in this case) really necessary ?
20:56 japhb They were mostly there as a subtle reminder to people to make cross-language testing possible wherever it made sense.
20:57 japhb ISTR I fixed the bug where it would be unhappy if the key wasn't even there, but I'm not 100% positive.
20:57 lizmat perhaps it would make more sense if there were a separate file for perl6 benchmarks only ?
20:58 telex joined #perl6
21:00 japhb There is a set of autogenerated tags for tests, so you can choose tests via e.g. --tests-tagged=has-lang:perl6
21:00 japhb lizmat: For tests that are not one-liners, there are separate directories for each language.
21:01 yoleaux joined #perl6
21:01 japhb I collected these in one big file largely because I didn't want to repeat all the meta data, and because I wanted to reduce the chance of a refactoring making different language implementations no longer comparable.
21:01 japhb these == microbenchmarks
21:04 lizmat still not seeing how I would indicate the empty loop case
21:04 japhb To be clear, you may never see a case of `perl6 => undef,` in microbenchmarks.pl, because then what's the point?  There shouldn't be anything you can express in NQP that you can't just as easily express in Perl 6, and for Perl 5 only tests ... well, write a Perl 6 version.  :-)
21:04 lizmat in my example: $ 6 'sub a(\) {}; my $p = &a.signature.params[0]; for ^100000 { my $a }'
21:05 japhb test "empty"
21:05 japhb The compile and constant overhead times of your test will be checked with a special run of SCALE = 0.
21:05 japhb There's also a for_empty, IIRC
21:06 japhb yep
21:06 japhb Which is specifically an empty for loop
21:06 lizmat well, but in the above example, if the empty loop case takes 400 msecs, and the one with a payload does 450 msecs
21:07 lizmat and before my change, with payload did 500 msecs
21:07 japhb lizmat: After subtracting startup, compile time, and constant overhead?
21:07 lizmat you would see only a 20% improvement, rather than 2x
21:07 lizmat well, the amount it would take to do everything except the very thing you're benchmarking
21:08 japhb I'm saying, how much time does this take: 'sub a(\) {}; my $p = &a.signature.params[0]; for ^0 { my $a }'
21:08 Shozan joined #perl6
21:08 nowan_ joined #perl6
21:09 lizmat so you would include the overhead of the loop in the benchmark ?
21:09 japhb lizmat: So if (say) that took 200 ms, then perl6-bench would by default compare (400-200) = 200 versus (450-200) = 250ms
21:09 japhb But yes, that's why there are variants of tests as while, for, etc.
21:09 japhb Because whether for ^N {...} is super-optimized changes between Rakudo versions
21:09 xxpor joined #perl6
21:10 japhb At one point, it was wicked fast.
21:10 japhb (I haven't checked recently if it still was.)
21:10 japhb But I *do* see your point.
21:10 lizmat it is again, afaik
21:10 japhb The biggest remaining feature unimplemented in perl6-bench is being able to compare e.g. for_empty and for_foo_bar directly.
21:11 japhb I ran out of tuits to do that comparison (which would go in analyze, with options to enable it available in bench)
21:11 japhb But all the raw data you need should be in the timings files, which are ... verbose.
21:12 BenGoldberg joined #perl6
21:12 japhb Still, you're right that currently perl6-bench doesn't get allow you to easily claim "operation X is N times faster" but rather "operation X running in a for loop is M times faster"
21:13 lizmat atm I'm simply trying to quickly add more tests, without actually running perl6-bench myself
21:13 lizmat if that's ok with you
21:13 jnthn There are daily automated runs on perl6-bench at http://www.moarvm.org/measurements/perl6-bench/ fwiw
21:14 jnthn *of
21:14 japhb A legacy of it being used to compare the overall performance of compiler builds, rather than improvements to a single Callable in the setting.
21:14 japhb lizmat: It's more than OK.  I'm ecstatic!  :-)
21:14 japhb lizmat++
21:15 _dolmen_ joined #perl6
21:16 jnthn Though for some reason viewing the reports in whatever Chrome I currently have is incredibly slow...
21:16 timotimo jn is back :)
21:16 timotimo feeling a little better?
21:16 jnthn Well, I had some dinner, and the headache receded a bit...
21:17 jnthn Brane still feels like it's a big heap of mush.
21:17 japhb jnthn: The JS code got modified a few times since I last touched it, I think.  I haven't gone back and checked that it's being JS-compiler-friendly still.
21:17 dalek perl6-bench: 04d82d3 | lizmat++ | microbenchmarks.pl:
21:17 dalek perl6-bench: Add micro-benchmark for Parameter:D.sigil
21:17 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/04d82d3aef
21:17 krunen joined #perl6
21:17 jnthn At the moment, those daily runs I'm doing spit out a Perl5/NQP/Rakudo comparison
21:18 jnthn Any suggestions on a good no-maint-needed thing I can do for comparing Rakudo versions?
21:18 jnthn I guess I could run a Christmas release vs. today...
21:18 japhb jnthn: history mode?
21:19 jnthn japhb: Yeah, I guess that. :)
21:19 tinita joined #perl6
21:19 stmuk joined #perl6
21:19 jnthn japhb: I guess it has no smarts along the lines of "the last month's release"?
21:20 jnthn I can calculate that in whatever scripting I do though, I guess.
21:20 japhb Unfortunately, it only knows about things that can `git rev-parse`
21:20 jnthn OK
21:20 japhb You can certainly use a moving tag or something if you like.
21:21 jnthn Well or I can just plot Christmas, HEAD, and 20XX.XX by just talking the current year/month and subtracting one month.
21:22 jnthn It'll lag the actual monthly releases a little, but still be useful for comparing things before the next monthly :)
21:22 japhb We might also want to consider tagging a particular set of tests as "version 123 of the perl6-bench test suite", so that if you're watching the overall performance means, it doesn't change as the test list changes.
21:22 japhb Yeah, makes sense.
21:22 Celelibi joined #perl6
21:23 rvchangue joined #perl6
21:24 japhb If you use a particular rev of perl6-bench itself over time, then you don't have to rerun old tests, you can just keep checking out a new latest (by date) and creating more timings files for it.
21:24 japhb Analyze can handle a fair number of timings files, but again, don't know how the HTML will handle that much data.
21:24 breinbaas joined #perl6
21:29 jnthn japhb: Yeah. At the moment I have to manually git pull perl6-bench itself, but the rest is automated
21:29 guru joined #perl6
21:32 * japhb goes back to trying to decide whether it's time to just write a clean re-implementation of Evject etc., and if so, what exactly he wants to accomplish with that.
21:34 vendethiel Evject?
21:34 japhb vendethiel: https://gist.github.com/jnthn/da27ded3fbf06df7c54a
21:35 japhb (I have a local hacked up version)
21:36 Guest98765 I'm getting an odd error message from REPL about some code. Will I get flamed if I post the sequence?
21:36 japhb Oh, that reminds me: jnthn, I recently had to stop using OO::Monitors with InMemoryEventStore, because the wrapped methods weren't invokable during domain processing.
21:37 shadowpaste joined #perl6
21:37 japhb I don't know if you'd ever gone back and tried that old code (with s/use Monitor/use OO::Monitors/ of course) since Christmas.
21:37 japhb Guest98765: use a pastebin or gist.
21:37 Guest98765 OK
21:38 mst Guest98765: http://fpaste.scsys.co.uk/perl6
21:38 mst since shadowpaste just rejoined :D
21:39 japhb mst: Is there a way to make it prefill *both* the channel and nick?  So people can bookmark a personal variant?
21:39 RabidGravy right, in the interests of science it took 31 minutes to run all the tests of all my modules, now rebuild and see
21:40 japhb RabidGravy: You mean, "rebuild Rakudo"?
21:40 RabidGravy yes
21:40 mst japhb: I'm not actually sure, but what I'm running is http://p3rl.org/Bot::PasteBot
21:40 japhb metacpan fail
21:40 RabidGravy I'm hoping that some of lizmat++s recent changes will improve this
21:41 japhb mst: 'Bot::Pastebot' perhaps?
21:41 japhb RabidGravy: That would be awfully nice.  :-)
21:42 dalek rakudo/nom: b0b2fb0 | lizmat++ | src/core/Parameter.pm:
21:42 dalek rakudo/nom: Optimize Parameter.named_names a bit
21:42 dalek rakudo/nom:
21:42 dalek rakudo/nom: Not sure how to benchmark this, but allocating beforehand rather
21:42 dalek rakudo/nom: than pushing, should make things faster.  I'm not sure why this
21:42 dalek rakudo/nom: is actually needed, apparently something somewhere in the stack
21:42 dalek rakudo/nom: needs the strings to be boxed, rather than native strings.
21:42 Guest98765 Thanks, mst
21:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b0b2fb03f9
21:42 shadowpaste "Guest98765" at 217.168.150.38 pasted "Odd error message" (17 lines) at http://fpaste.scsys.co.uk/506406
21:43 mst japhb: oh, I *always* miscapitalise it
21:45 * jnthn tries to work out the incantation to give bench to get the history plots out of it
21:45 japhb Guest98765: It's because successive lines of REPL are treated as inner scopes, and when you said 'my @list[0]' you declared a new @list with a 0-length first dimension -- and that's what all future lines in that run saw.
21:46 japhb jnthn: See line 427 and following of bench
21:47 jnthn japhb: Seems like I just s/compare/history/ in the invocation
21:47 japhb 'bench --format=html_plot history ...
21:47 japhb yeah
21:47 jnthn Nice
21:48 * japhb wonders why JSON::Tiny no longer exists in his local Rakudo
21:50 japhb Ah!  Because panda now ships JSON::Fast instead of JSON::Tiny
21:50 breinbaas joined #perl6
21:52 * japhb fixes his update-rakudo script and uses this as an excuse to rebuild with lizmat++'s improvements
21:52 Guest98765 Thanks, japhb; I'm now trying to relate the message to your explanation.
21:52 Ben_Goldberg joined #perl6
21:52 timotimo dinner time \o/
21:53 yoleaux joined #perl6
21:53 jnthn timotimo: Enjoy :)
21:53 * flussence wonders (as a curious and totally incompetent observer) if it'd be possible to spesh away unnecessary lexical scopes, instead of manually removing them
21:53 japhb Guest98765: An N-long dimension has indices 0..(N-1).  In the degenerate N=0 case, you get the nonsense you paid for.  Mind you, that's LTA.
21:54 jnthn flussence: Yes
21:54 jnthn (On the todo list)
21:54 flussence that'll be fun to have :D
21:55 agent008 joined #perl6
21:56 jnthn japhb: ooc, is perl6-bench smart enough to not re-build tags?
21:56 jnthn I'll probably just cope with the wasted CPU for now if not, though :)
22:04 japhb jnthn: The build, time, and analyze phases are separate *specifically* so that you can avoid redoing work.  But the expectation is that the driving script does the work of preventing rebuilds -- if bench is told to do a rebuild, it will, because it assumes you had a reason to do that.
22:05 jameslenz joined #perl6
22:06 jnthn japhb: That's totally fair enough
22:06 jnthn japhb: Given the machine I'm running this on is pretty much idle otherwise at the time, I've little incentive to save some minutes of CPU time, though. ;)
22:07 jnthn Anyways, think I'll be able to add history plots to the measurements
22:07 japhb heh
22:07 japhb And cool!
22:07 jnthn Need to get the NQP leak check valgrinding in there too
22:19 dalek rakudo/nom: efed541 | lizmat++ | src/core/Parameter.pm:
22:19 dalek rakudo/nom: Round #1 of Parameter optimizations
22:19 dalek rakudo/nom:
22:19 dalek rakudo/nom: - add some more constants for clarity
22:19 dalek rakudo/nom: - create internal method for p6boxing strings (why is this needed??)
22:19 dalek rakudo/nom: - use ternaries where possible
22:19 dalek rakudo/nom: - use nqp:: ops where possible
22:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/efed541cfd
22:20 jnthn lizmat: Why indeed o.O
22:21 * lizmat doublechecks
22:21 jnthn lizmat: ooc, are you optimizing this because role composition is costly because it compares signatures which is currently implemented by .perl-ing them? :)
22:22 lizmat yes, and to get the lay of the land of that code area
22:23 jnthn *nod*
22:23 jnthn Then you perhaps already realized this, but there will be faster ways of doing the comparison :)
22:24 jnthn A short-circuit that checks if the number of things in the signature are different, or just checks nominal types, before doing The Full Thing will rule out lots of non-matches
22:24 lizmat oh, yes, I know
22:24 jnthn ok, coo
22:24 jnthn *cool
22:24 lizmat getting to that later...
22:24 jnthn :)
22:24 jnthn lizmat++
22:26 lizmat hmmm... apparently it just expects an Array back, rather than a List
22:27 lizmat but I guess we want to prevent action at a distance, so I can't just transplant the native attribute into an Array
22:30 RabidGravy I should optimise the order of my "all my modules smoke test" so that it does the ones with the most dependencies earlier
22:34 Skarsnik damn getting an error in a react block sucks :(
22:34 Skarsnik Odd number of elements found where hash initializer expected
22:34 Skarsnik in block <unit> at Ferrel.p6 line 36
22:35 Skarsnik line 36 is react { x)
22:36 RabidGravy yeah, I usually put additional taps on to see which is the offending supply
22:36 japhb sortiz: I'm getting a fail-to-install for DBIish; no such file for .../lib/DBDish/Role/Connection.pm6
22:37 dalek rakudo/nom: 9dc21a0 | lizmat++ | src/core/Parameter.pm:
22:37 dalek rakudo/nom: Turns out we need an Array only, no need to box
22:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9dc21a0ee2
22:37 Skarsnik The issue, it's maybe an error a module
22:37 Skarsnik is that LTA or it's just not possible to get the proper line in a react context?
22:37 jnthn Skarsnik: I think we should be able to do better
22:38 jnthn Please file it
22:38 jnthn Async error reporting is always a bit "fun"... :)
22:40 RabidGravy yeah, when I was fixing up Net::AMQP I think I actually took longer to remove all the debugging instrumentation than actually fixing it
22:40 Skarsnik hm, should $disc.send-message($qnb-channel, ) be catched at compile time?
22:41 Skarsnik the missing argument
22:46 btyler joined #perl6
22:49 RabidGravy so running the tests again as the first time was inconclusive due probably to module recompilations
22:51 timotimo Skarsnik: we can never catch missing arguments on method calls
22:51 timotimo earlier than runtime, i mean
22:51 Skarsnik I mean, it's not even a parse error here?
22:51 Skarsnik or it's see as a List ?
22:56 timotimo final comma is allowed
22:57 timotimo if only to make "one argument per line, every line ending in a comma" allowed
22:58 Skarsnik will that be possible to have pragmas that allow perl6 to check method/routine sig at compile time?
22:58 timotimo routine sig checking can and will happen at compile time already
22:59 kid511 joined #perl6
22:59 Skarsnik I get that the idea it's because with Meta programming it's not easy to be sure, but I am pretty sure in lot of code, there is no added/changed method
23:00 rburkholder joined #perl6
23:02 timotimo when we can mark classes as "closed", then we can perhaps do that, but we'll still have to make sure we don't miss any roles being mixed into instances
23:02 timotimo in any case, with objects, the receiving object is responsible for deciding how method calls are supposed to be treated
23:02 timotimo that goes back to the fundamental idea of method calls as "sending signals"
23:05 timotimo er
23:05 timotimo "sending messages", of course
23:08 jantore joined #perl6
23:08 dalek rakudo-star-daily: 4f7fef4 | coke++ | log/ (8 files):
23:08 dalek rakudo-star-daily: today (automated commit)
23:08 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/4f7fef488d
23:08 dalek rakudo-star-daily: d4acb8a | coke++ | log/ (8 files):
23:08 dalek rakudo-star-daily: today (automated commit)
23:08 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/d4acb8aab6
23:10 RabidGravy lizmat++ # totally unscientific this, but the second run of the modules test was 17 minutes
23:10 RabidGravy so more of that please
23:11 lizmat ah, so overall almost 2x as fast?  cool
23:11 neilb_ joined #perl6
23:11 timotimo "modules test", as in rakudo star?
23:11 RabidGravy as in my own modules
23:11 timotimo 17 minutes is super long; how many modules was that?
23:11 RabidGravy 52
23:12 RabidGravy er no
23:12 RabidGravy 44
23:13 RabidGravy there are quite a few very I/O intensive ones, some even with sleeps in
23:16 timotimo hm, ok
23:16 RabidGravy for reference the Audio::Encode::LameMP3 tests take approximately 1.75 minutes
23:16 Skarsnik I should h:p:x to see if there is any speed up since 4 months x)
23:16 timotimo how much time did it take before those changes?
23:16 timotimo how did lizmat get to "2x as fast"?
23:17 RabidGravy 31 minutes previously
23:17 RabidGravy or thirty something minutes
23:19 RabidGravy the LameMP3 test encodes a file completely ten times in different ways readiing it off the disk each time
23:20 RabidGravy so it really does benefit from faster Bufs
23:25 lizmat jnthn: nqp::existskey is documented to return non-0 on existence
23:25 lizmat but in practice, I've seen it always only return 0 or 1
23:26 lizmat could I depend on that behaviour, or do you see that changing at some point in the future ?
23:32 wwwbukolaycom joined #perl6
23:35 * lizmat sets off a spectest and goes to bed
23:35 lizmat good night, #perl5!
23:35 lizmat sigh
23:35 lizmat #perl6!
23:35 lizmat :-)
23:35 timotimo gnite lizmat, good work today!
23:36 kjs_ joined #perl6
23:37 jnthn lizmat: Probably OK to depend on it
23:40 RabidGravy erk
23:40 RabidGravy I should probably try *installing* my modules every once in a while too
23:45 timotimo they don't install fine any more? :(
23:45 RabidGravy a couple of dodgy Build.pm in there
23:46 timotimo mhm
23:47 dalek ecosystem: 6267dbf | RabidGravy++ | META.list:
23:47 dalek ecosystem: Switch to META6.json while I'm at it
23:47 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/6267dbf44b
23:50 jnthn Fingers crossed, there'll be a couple of extra files per day in the perl6-bench runs on moarvm.org now. We'll find out if I screwed it up in the morning, I guess... :-)
23:50 jnthn 'night o/
23:51 timotimo neato :)
23:51 timotimo good night, jnthn!
23:51 timotimo rest well, get well :)

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

Perl 6 | Reference Documentation | Rakudo