Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2016-10-24

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

All times shown according to UTC.

Time Nick Message
00:42 arnsholt_ joined #perl6-dev
00:42 hoelzro_ joined #perl6-dev
00:42 ilmari_ joined #perl6-dev
00:50 Brock joined #perl6-dev
01:32 camelia joined #perl6-dev
01:32 literal joined #perl6-dev
01:33 tony-o joined #perl6-dev
01:33 gfldex joined #perl6-dev
01:37 samcv joined #perl6-dev
01:49 ilbot3 joined #perl6-dev
01:49 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today
01:59 FROGGS joined #perl6-dev
02:11 geekosaur joined #perl6-dev
05:48 RabidGravy joined #perl6-dev
07:38 FROGGS[mobile] joined #perl6-dev
07:52 [Tux] t/p5_to_p6.t .................. ok
07:52 [Tux] # Failed test 'at least one destructor ran'
07:52 [Tux] Inline::Perl5 failed
07:55 [Tux] This is Rakudo version 2016.10-40-g4fc17df built on MoarVM version 2016.10-15-g715e39a
07:55 [Tux] csv-ip5xs        3.312
07:55 [Tux] test            15.290
07:55 [Tux] test-t           7.098
07:55 [Tux] csv-parser      17.608
08:14 vendethiel joined #perl6-dev
09:42 lizmat joined #perl6-dev
09:49 hankache joined #perl6-dev
09:56 * lizmat drops a pin
09:56 yoleaux2 09:04Z <jnthn> lizmat: I suspect that shouldn't fail at all, but just end the iteration
09:56 DrForr yo.
09:57 lizmat odd... I don't see jnthn's .tell in https://irclog.perlgeek.de/perl6-dev/2016-10-24
09:57 lizmat moritz: ^^^
10:42 moritz lizmat: me meinther
10:42 moritz *neither
10:42 jnthn Oh
10:42 jnthn 'cus I .tell'd it in #moarvm :)
10:43 jnthn Which is where the bot relayed it to me :)
10:43 lizmat ah, that's the reason, *phew*  :-)
10:43 lizmat jnthn: was that about the :ov case ?
10:43 lizmat not sure what it referred to specifically
10:45 jnthn The thing I replied to was about :nth :)
11:08 lizmat ok, so :nth(Mu) is acceptable as a way to say :nth(Any) ?
11:08 pmurias joined #perl6-dev
11:09 brrt cross-talking bots :-o
11:09 dalek nqp: 0244a14 | (Pawel Murias)++ | t/serialization/02-types.t:
11:09 dalek nqp: Test serializing an object which has native attributes with default values.
11:09 dalek nqp: review: https://github.com/perl6/nqp/commit/0244a148b0
11:09 dalek nqp: 88df898 | (Pawel Murias)++ | src/vm/js/ (7 files):
11:09 dalek nqp: [js] Use a special value for nqp::null_s() instead of using the native javascript null.
11:10 dalek joined #perl6-dev
11:10 jnthn m: say 'omg'.match(/./, :nth(1|2))
11:10 camelia rakudo-moar 4fc17d: OUTPUT«any(「o」, 「m」)␤»
11:10 jnthn I'd assume it's accpeting Any
11:10 jnthn And that lets us auto-thread things like the above
11:11 lizmat m: say 'omg'.match(/./, :nth(Mu))
11:11 camelia rakudo-moar 4fc17d: OUTPUT«「o」␤»
11:11 jnthn o.O
11:11 lizmat this used to fail
11:11 jnthn That's fine by me
11:11 lizmat not failing now
11:11 jnthn Most things die if you give them a Mu
11:11 jnthn When they'd want an Any
11:11 jnthn Any is, after all, the default parameter type
11:12 jnthn Precisely so things auto-thread
11:12 jnthn lunch; bbiab
11:57 brrt joined #perl6-dev
12:02 AlexDaniel joined #perl6-dev
12:25 lizmat m: multi a(:$nth!) { dd $nth }; multi a(*%_) { dd "fallback" }; a(:nth(Mu))  # jnthn: do you consider this behaviour correct or is it a bug ?
12:25 camelia rakudo-moar 4fc17d: OUTPUT«"fallback"␤»
12:28 jnthn Looks correct to me
12:28 lizmat but the :nth has an !
12:28 lizmat yet that candidate is not selected
12:29 jnthn It doesn't type-match
12:29 jnthn m: multi a(Mu :$nth!) { dd $nth }; multi a(*%_) { dd "fallback" }; a(:nth(Mu))
12:29 camelia rakudo-moar 4fc17d: OUTPUT«Mu $nth = Mu␤»
12:29 lizmat ah, ok
12:29 jnthn The default parameter type is Any
12:30 lizmat gotcha
12:30 jnthn (This is what lets junction auto-threading work out)
12:30 lizmat yeah... but it was a bit of a WAT that it didn't select the candidate I thought it would
12:31 lizmat m: multi a(Mu :$nth!) { dd $nth }; multi a(*%_) { dd "fallback" }; a(:nth(1|2))
12:31 camelia rakudo-moar 4fc17d: OUTPUT«Junction $nth = any(1, 2)␤»
12:31 lizmat apparently the Mu doesn't stop it from being selected ?
12:31 lizmat ah, no
12:31 lizmat duh
12:32 lizmat m: multi a(:$nth!) { dd $nth }; multi a(*%_) { dd "fallback" }; a(:nth(1|2))
12:32 camelia rakudo-moar 4fc17d: OUTPUT«Int $nth = 1␤Int $nth = 2␤»
12:32 lizmat hmmm... how can I quickly determine if a value is Mu ?
12:32 jnthn Exactly Mu?
12:33 lizmat yup
12:33 jnthn ===
12:33 jnthn Or nqp::eqaddr if you need really fast
12:33 jnthn Since type objects don't exist in duplicate
12:34 ilmari m: Mu === Mu
12:34 camelia rakudo-moar 4fc17d: OUTPUT«WARNINGS for <tmp>:␤Useless use of "===" in expression "Mu === Mu" in sink context (line 1)␤Cannot resolve caller infix:<===>(Mu, Mu); none of these signatures match:␤    ($?)␤    (\a, \b)␤    (Int:D \a, Int:D \b)␤    (int $a, int $b)␤    (Nu…»
12:34 lizmat m: use nqp; sub a(Mu \a) { say nqp::eqaddr(\a,Mu) }; a Mu
12:34 camelia rakudo-moar 4fc17d: OUTPUT«0␤»
12:34 lizmat argh
12:34 lizmat m: use nqp; sub a(Mu \a) { say nqp::eqaddr(a,Mu) }; a Mu
12:34 camelia rakudo-moar 4fc17d: OUTPUT«1␤»
12:34 lizmat ok
12:35 jnthn Ah, right, === wants to auto-thread :)
12:35 jnthn m: say Mu =:= Mu
12:35 camelia rakudo-moar 4fc17d: OUTPUT«True␤»
12:35 jnthn That does it though
12:35 jnthn m: say Mu =:= Any
12:35 camelia rakudo-moar 4fc17d: OUTPUT«False␤»
12:35 dalek rakudo/nom: 46abb3b | lizmat++ | src/core/Cursor.pm:
12:35 dalek rakudo/nom: Streamline Cursor a bit + new features
12:35 dalek rakudo/nom:
12:35 dalek rakudo/nom: - streamline Bool using nqp only
12:35 dalek rakudo/nom: - move bulk of MATCH into !MATCH so that if the Cursor already has
12:35 dalek rakudo/nom:   a Match object, it can return quickly and be inlined
12:35 dalek rakudo/nom: - create STR method: return Str for cursor without need of Match object
12:35 dalek rakudo/nom: - create FROMLEN method: return Pair with from position and length
12:35 dalek rakudo/nom:   without the need of a Match object
12:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/46abb3b79e
12:36 nebuchad` joined #perl6-dev
12:37 lizmat jnthn: ok, so let me recap the situation:
12:38 lizmat in a bit  :-)
12:38 jnthn hehe ;)
12:38 * jnthn tries to use that bit to get $dayjob task done
12:39 Woodi joined #perl6-dev
12:39 lizmat - Str.match(/./, :nth() ) correctly autothreads
12:39 masak_ joined #perl6-dev
12:40 jdv79_ joined #perl6-dev
12:40 lizmat - Str.match( /./, :nth(Mu) ) doesn't die, but ignores the parameter as if it is an :U
12:40 Brock joined #perl6-dev
12:40 moritz_ joined #perl6-dev
12:41 lizmat the latter behaviour is tested against and the only error in roast atm
12:41 lizmat to be able to fix this, I would have to add quite a few nqp::eqaddr(,Mu) checks
12:42 lizmat which wouldn't be in hot code paths, but since we call Str.match so many times, would probably be noticeable anyway
12:42 lizmat so my feeling is to not fix this case
12:42 lizmat if the check is to see if it autothreads, it should check that, no?
12:43 jnthn We actaully test that you can pass :nth(Mu)?
12:44 lizmat dies-ok { "a" ~~ m:nth(Mu)/a/ }, ':nth does not accept Mu param';
12:44 lizmat in t/spec/S05-modifier/counted-match.t
12:45 lizmat we test that you can't pass Mu  :-)
12:45 lizmat at the moment you can
12:46 jnthn Oh
12:46 jnthn But that's fine, no?
12:46 jnthn I don't really understand what's wrong with leaving :$nth taking Any
12:46 jnthn uh, having Any as its type
12:47 jnthn And letting junction auto-threading fall out of the dispatch, as usual
12:47 jnthn I'm guessing the code is detecting Junction as a special case today?
12:47 lizmat no: it falls out of not selecting that candidate and then being caught by another candidate
12:48 lizmat and then being ignored because of using nqp::defined()
12:48 lizmat so, when you specify a junction on nth, it uses that candidate, and all is hunky dory
12:49 lizmat if you specify Mu, it falls to another candidate in *%_
12:49 lizmat and I'm using low level nqp on %_ for performance reasons
12:51 lizmat but that then gets ignored because type objects are ignored in the code, and Mu is a type object (aka nqp::defined check)
12:51 lizmat so the only thing wrong is that a hard :nth(Mu) doesn't die
12:52 ggoebel joined #perl6-dev
12:52 raydiak joined #perl6-dev
12:55 dalek rakudo/nom: 1b95636 | lizmat++ | src/core/Str.pm:
12:55 dalek rakudo/nom: Implement Str.match( :return(:r) )
12:55 dalek rakudo/nom:
12:55 dalek rakudo/nom: Not sure this should be documented as a public adverb, but it will be
12:55 dalek rakudo/nom: used internally for .comb and .subst so that we don't need to do a
12:55 dalek rakudo/nom: .map on the result of a Str.match.
12:55 dalek rakudo/nom:
12:55 dalek rakudo/nom: Possible values are:
12:55 dalek rakudo/nom: - :r(Match)     # default, return Match object(s)
12:55 dalek rakudo/nom: - :r(Str)       # return Str object(s)
12:55 dalek rakudo/nom: - :r(Pair)      # return Pair objects, where the key is the position
12:55 dalek rakudo/nom:                 # in the string, and the value is the number of chars
12:58 dalek rakudo/nom: f09b8b7 | lizmat++ | src/core/Str.pm:
12:58 dalek rakudo/nom: Decommission Str.simplematch
12:58 dalek rakudo/nom:
12:58 dalek rakudo/nom: Because the equivalent Str.match is 10% faster.
12:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f09b8b7b8a
13:19 travis-ci joined #perl6-dev
13:19 travis-ci Rakudo build passed. Elizabeth Mattijsen 'Streamline Cursor a bit + new features
13:19 travis-ci https://travis-ci.org/rakudo/rakudo/builds/170115815 https://github.com/rakudo/rakudo/compare/4fc17dfe1a66...46abb3b79ebf
13:19 travis-ci left #perl6-dev
13:27 dalek roast: 46147a0 | lizmat++ | S32-str/comb.t:
13:27 dalek roast: Fix faulty Str.comb(Regex,$limit) tests
13:27 dalek roast: review: https://github.com/perl6/roast/commit/46147a0584
13:29 dalek roast/6.c-errata: ea55ffe | lizmat++ | S32-str/comb.t:
13:29 dalek roast/6.c-errata: Fix faulty Str.comb(Regex,$limit) tests
13:29 dalek roast/6.c-errata: review: https://github.com/perl6/roast/commit/ea55ffeebe
13:30 dalek rakudo/nom: 1794328 | lizmat++ | src/core/Str.pm:
13:30 dalek rakudo/nom: Make Str.comb(Regex) about 7x faster
13:30 dalek rakudo/nom:
13:30 dalek rakudo/nom: Because we don't need to do an additional mapping from Match objects
13:30 dalek rakudo/nom: to Str anymore.
13:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1794328cfb
13:49 geekosaur joined #perl6-dev
13:52 dalek rakudo/nom: 1c67e3b | lizmat++ | src/core/Str.pm:
13:52 dalek rakudo/nom: Merge :global and :g in Str.subst
13:52 dalek rakudo/nom:
13:52 dalek rakudo/nom: Not sure why they were separated, but they needn't be now
13:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1c67e3bfd5
13:55 travis-ci joined #perl6-dev
13:55 travis-ci Rakudo build passed. Elizabeth Mattijsen 'Implement Str.match( :return(:r) )
13:56 travis-ci https://travis-ci.org/rakudo/rakudo/builds/170120977 https://github.com/rakudo/rakudo/compare/46abb3b79ebf...1b956369ab70
13:56 travis-ci left #perl6-dev
14:09 dalek rakudo/nom: c9a24d9 | lizmat++ | src/core/Str.pm:
14:09 dalek rakudo/nom: Replace :return(:$r) with :object(:$ob)
14:09 dalek rakudo/nom:
14:09 dalek rakudo/nom: To prevent confusion with the :ratchet(:$r) parameter
14:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c9a24d9d1d
14:25 lizmat jnthn TimToady: thoughts about adding the :object(:ob) to the list of allowable adverbs in m// ?
14:25 jnthn What does it do?
14:26 lizmat it determines the type of object returned
14:26 lizmat :object(Str) will give you strings
14:26 lizmat :object(Match) will give you Match objects (default)
14:26 lizmat :object(Pair) will give you Pairs with from/length info
14:27 lizmat :object(Str) is now internally used for .comb(Regex)
14:28 jnthn Was gonna say, isn't that form just called .comb... :)
14:28 lizmat not needing to do a .map *.Str made things quite a lot faster
14:29 lizmat https://github.com/rakudo/rakudo/commit/1794328cfb
14:29 jnthn I'm fairly sure TimToady won't be OK with the name :object... :)
14:29 cygx joined #perl6-dev
14:29 lizmat well, initially I had :return(:$r), but that conflicts with :ratchet(:$r)
14:30 jnthn Yeah
14:30 lizmat alternately :return(:$re) could be misconstrued as well
14:30 perlpilot_ lizmat: Maybe :type(:$t) ?
14:31 cygx if nothing else, it would come in handy when moving from p5 to p6
14:31 cygx cf https://gist.github.com/cygx/9c94eefdf6300f726bc698655555d73b#file-bench-pl-L25 vs https://gist.github.com/cygx/9c94eefdf6300f726bc698655555d73b#file-bench-p6-L21
14:32 lizmat yep
14:32 lizmat :type(:$t) could work for me
14:32 travis-ci joined #perl6-dev
14:32 lizmat doesn't seem to have any clashes
14:32 travis-ci Rakudo build errored. Elizabeth Mattijsen 'Decommission Str.simplematch
14:32 travis-ci https://travis-ci.org/rakudo/rakudo/builds/170121601 https://github.com/rakudo/rakudo/compare/1b956369ab70...f09b8b7b8a04
14:32 travis-ci left #perl6-dev
14:32 buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), or GitHub connectivity (0). All failures are on JVM only.
14:33 lizmat jnthn: do you think TimToady would be more inclined towards :type(:$t) ?
14:33 jnthn Well, it's less bad at least. :)
14:34 jnthn What's the use-case for the Pair?
14:34 lizmat some cases of subst
14:35 lizmat the cases that use $m.from and $m.pos
14:36 jnthn Are the pairs really much cheaper to construct that a Match?
14:36 jnthn I can believe strings are...
14:37 dalek rakudo/nom: e472420 | lizmat++ | src/core/Str.pm:
14:37 dalek rakudo/nom: Make my @a = Str.match(...) about 5% faster
14:37 dalek rakudo/nom:
14:37 dalek rakudo/nom: By supplying custom push-all methods in the iterators
14:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e472420702
14:37 jnthn (Asking 'cus otherwise it becomes an adverb tht's just about "give me strings")
14:38 lizmat well, that I don't know
14:38 lizmat there's code in Cursor.MATCH to create a Match object if there isn't one in the Cursor yet
14:39 lizmat I'm not sure when that code fires
14:39 lizmat but it is expensive
14:39 lizmat in simple cases, the Cursor appears to have a Match object already, so then it doesn't matter much
14:40 jnthn Ah, I guess it creates all the recursive matching structure
14:40 lizmat https://github.com/rakudo/rakudo/blob/nom/src/core/Cursor.pm#L50
14:40 jnthn Is this used in cases with a literal replacement?
14:40 lizmat jnthn: I didn't really get to the subst part yet
14:41 lizmat I've only done .match so far
14:42 cygx :as might work as another colour for this bikeshed: m:g:as(Str)/.../
14:42 cygx could return a Range as well...
14:43 lizmat cygx: thing is you can't plug that right into a nqp::substr
14:43 lizmat you can into a substr() but...  hmmmm
14:44 lizmat maybe Range should be another option then  :-)
14:44 lizmat would only be minor additional overhead
15:03 lizmat cygx: fwiw, I'm warming up to :as
15:16 cygx glad to be of service
15:16 * jnthn likes it more than type also, fwiw
15:18 perlpilot fwiw, I like :as too  :)
15:28 timotimo .o( and its long form, :ass )
15:43 lizmat jnthn: adding it as a adverb in m:as(Str)// would probably have to wait until 6.d , no?
15:44 perlpilot timotimo: :assign(:ass(:$as))  # that works  ;-)
15:46 timotimo :)
15:49 dalek rakudo/nom: aaec517 | lizmat++ | src/core/ (2 files):
15:49 dalek rakudo/nom: Bikeshed :ob to :as
15:49 dalek rakudo/nom:
15:49 dalek rakudo/nom: As discussed at https://irclog.perlgeek.de/perl6-dev/2016-10-24#i_13456755
15:49 dalek rakudo/nom: Also add support for :as(Range)
15:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aaec5177e2
15:49 cygx it's abviously short for :assemble
15:49 cygx nope, I did not just google a list of words starting in ass*, looing for one that might fit ;)
15:50 cygx *looking
15:57 perlpilot cygx: then clearly, :avg :ass is  "avengers assemble" and not any of the other myriad possibilities  :)
15:58 timotimo autobots assemble!
16:02 jdv79_ are there decepticons involved?
16:03 * lizmat wouldn't know how they look  :-)
16:08 dalek roast: 7dcf397 | lizmat++ | S05-modifier/counted-match.t:
16:08 dalek roast: Modify implicit check for support of junctions
16:08 dalek roast: review: https://github.com/perl6/roast/commit/7dcf397d18
16:10 dalek roast/6.c-errata: 711ff7e | lizmat++ | S05-modifier/counted-match.t:
16:10 dalek roast/6.c-errata: Modify implicit check for support of junctions
16:10 dalek roast/6.c-errata: review: https://github.com/perl6/roast/commit/711ff7e972
16:10 lizmat spectest should be error free again
16:33 lizmat afk&
16:41 * lizmat back again
16:41 gfldex lizmat: does Str.subst use the new .match code already?
16:42 lizmat gfldex: yes, it does, but no further optimizations yet
16:42 * gfldex stays tuned
16:42 lizmat gfldex: did you find a bug?  or is it a lot faster already?   :-)
16:43 gfldex the needle didn't move at all
16:43 lizmat :-(
16:43 lizmat but not surprising, looking at the overhead
16:50 lizmat cygx: how would you feel about some code changes in the Perl 6 version of the benchmark?
16:56 cygx lizmat: it would depend on the changes in question
16:56 cygx the p5 and p6 versions are supposed to stay close to each other
16:57 lizmat ok, if that's the idea
16:58 lizmat it's just that the "split on string" feels very p5ish
16:58 cygx if you have a version that is more idiomatic p6/performs significantly better, there's nothing stopping us from adding another variant
16:58 lizmat I probably would have written that as %words = $input.split("\t") or so
17:00 lizmat I probably would have written that as %words = $input.split(("\t","\n")) or so
17:01 gfldex m: 'a;b,c'.split("\t"|"\n").say
17:01 camelia rakudo-moar aaec51: OUTPUT«any((a;b,c), (a;b,c))␤»
17:01 lizmat no, not | but (,)
17:02 lizmat you can specify a list of Str needles
17:02 gfldex i would have guessed that to work. But then I don't understand Junction.
17:02 lizmat looks good to me
17:02 lizmat neither the \t or the \n matched, so it returned the whole string in either case of the junction
17:03 cygx X::Hash::Store::OddNumber ;)
17:03 gfldex m: 'a;b,c'.split(";"|",").say
17:03 camelia rakudo-moar aaec51: OUTPUT«any((a b,c), (a;b c))␤»
17:03 lizmat m: say "a:b,c".split(":"|",")
17:03 camelia rakudo-moar aaec51: OUTPUT«any((a b,c), (a:b c))␤»
17:03 lizmat m: dd "a:b,c".split(":"|",")
17:03 camelia rakudo-moar aaec51: OUTPUT«any(("a", "b,c"), ("a:b", "c"))␤»
17:05 gfldex i somehow feel that .split should collaps the Junction and DWIM.
17:05 lizmat m: my %h = "a:b,c:d".split(<: ,>); dd %h
17:05 camelia rakudo-moar aaec51: OUTPUT«Hash %h = {:a("b"), :c("d")}␤»
17:05 cygx lizmat: .split(("\t", "\n", :skip-empty) takes 6,25s on my machine
17:05 cygx *6.25s
17:07 lizmat as opposed to 7.56 before?
17:08 gfldex I expect somewhere in .split to be some operator that returns Bool to decide if a codepoint is a separator or not and thus swollows that Junction, resulting in DWIMiness.
17:09 cygx yes, 7.56s is the current value for the line-by-line addition to the hash using split
17:10 lizmat dinner&
17:11 gfldex Thinking about it a little longer the current behaviour makes sense too. "Either split by ',' or split by ';' and return the superposition.", would reflect the quantum-magic that is Junction.
17:12 gfldex I would like to query opinions tho, before I doc that.
17:13 lizmat if you do .split( a|b ), then you will get a junction of the result of .split(a) and .split(b)
17:13 lizmat if you do a .split(<a b>), you get the equivalent of .split( /a|b/ ), but faster
17:14 gfldex That leave the question what I can do with that Junction. Be design I wont get the two components out of it.
17:14 lizmat eating&
17:18 cygx m: say "abcd".match(/(.)(.)/, :g, :as(Str)).perl
17:18 camelia rakudo-moar aaec51: OUTPUT«("ab", "cd")␤»
17:18 gfldex m: dd ('a;b,c'.split(";"|",") (>=) ('a', 'b,c'))
17:18 camelia rakudo-moar aaec51: OUTPUT«any(Bool::True, Bool::False)␤»
17:18 gfldex m: dd so ('a;b,c'.split(";"|",") (>=) ('a', 'b,c'))
17:18 camelia rakudo-moar aaec51: OUTPUT«Bool::True␤»
17:18 cygx is there (or should there be) a way to get something like (("a", "b"), ("c", "d")) out of it?
17:19 cygx ie just the captures instead of the string corresponding to the whole match
17:20 gfldex m: dd ('a;b,c'.split(";"|",") eqv ('a', 'b,c'))
17:20 camelia rakudo-moar aaec51: OUTPUT«any(Bool::True, Bool::False)␤»
17:54 travis-ci joined #perl6-dev
17:54 travis-ci Rakudo build passed. Elizabeth Mattijsen 'Make my @a = Str.match(...) about 5% faster
17:54 travis-ci https://travis-ci.org/rakudo/rakudo/builds/170147598 https://github.com/rakudo/rakudo/compare/c9a24d9d1d71...e47242070252
17:54 travis-ci left #perl6-dev
18:18 RabidGravy joined #perl6-dev
18:28 FROGGS joined #perl6-dev
18:31 FROGGS o/
18:32 lizmat FROGGS \o
19:03 viki joined #perl6-dev
19:04 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2016/10/24/2016-43-shining-star/
19:06 lizmat fwiw, I didn't mention the :as functionality yet
19:14 lizmat m: say "1234567890".subst(/(.).(.)/, "xxx")  # captures are useless in this case, perhaps we should warn or throw for that ?
19:14 camelia rakudo-moar aaec51: OUTPUT«xxx4567890␤»
19:16 perlpilot Maybe someone wants to set $0 and $1 en passant of subst
19:17 * AlexDaniel looks at the graph. One axis is marked “seconds”, another is “months”. Hmmmm…
19:17 AlexDaniel But yeah, it is pretty cool. cygx++
19:18 lizmat perlpilot: yeah, good point  :-)
19:19 lizmat but that implies that .Match objects will always have to be made for .subst  :-(
19:20 lizmat m: say "1234567890".subst(/(.).(.)/, "xxx"); dd $0, $1
19:20 camelia rakudo-moar aaec51: OUTPUT«xxx4567890␤Match.new(ast => Any, list => (), hash => Map.new(()), orig => "1234567890", to => 1, from => 0)␤Match.new(ast => Any, list => (), hash => Map.new(()), orig => "1234567890", to => 3, from => 2)␤»
19:20 lizmat m: say "1234567890".subst(/(.).(.)/, "xxx"); say $0, $1
19:20 camelia rakudo-moar aaec51: OUTPUT«xxx4567890␤「1」「3」␤»
19:28 cygx AlexDaniel: fixed
19:30 AlexDaniel cygx: oh, wow! Did not expect that
19:30 AlexDaniel thanks
19:32 nine Lexical module loading does have its tricky corner cases. Like class Foo { use Foo::Bar; ... } Where the lexically imported package stub "Foo" shadows the class we're currently declaring.
19:33 nine Which means that merging the loaded module's globals is no longer a merge of one hash into another but has to take all the nested scopes into account when looking for existing symbols.
19:35 nine It also means that we are gonna leak: class Foo { { use Foo::Bar; } { #`( Foo::Bar will still be available here, as it's added to the same Foo we can still see) } }
19:35 nine A rather unfortunate consequence of nested names meaning real nested packages.
19:36 AlexDaniel cygx: perhaps I am hypersensitive to that kind of stuff. Just a few minutes ago stumbled upon this: http://www.incose.org/images/default-source/image_about/membership-evolution-since-1991.jpg
19:37 nine AlexDaniel: that is one strange (and presumably broken) graph
19:38 AlexDaniel nine: too bad the number of member is not around 2000
19:39 AlexDaniel s*
19:39 * lizmat goes to check out the lions in Amsterdam   # http://www.imdb.com/title/tt4291700/
19:40 * [Coke] assumes the bottom is supposed to be the year, up by-one, except they showed the y value instead of the x? (I'll let them slide on the weird choice of y values to call out on the axis)
19:40 nine AlexDaniel: ok, it's not broken :) Nevertheless strange
19:40 nine [Coke]: I think it's days
19:41 AlexDaniel days? What?
19:43 AlexDaniel surprisingly, the number of days since 1991 is pretty close to the number of members :D
19:44 nine But it's a bit too many to fit between 1991 and 2015-12
19:47 [Coke] nine: the numbers aren't monotonically increasing.
19:47 [Coke] also, the last number is the highlighted # of members.
19:49 cygx .oO( there's an xkcd for that: https://xkcd.com/833/ )
19:51 FROGGS AlexDaniel: the x axis is labeled with the number of members, and each column is one year
19:51 FROGGS so the labeling is just weird
19:51 FROGGS (it is 25 items on the x axis)
19:52 AlexDaniel it has been 15 minutes since I posted that link, why are we still discussing it? :D
19:52 FROGGS sorry, dunno :o)
19:52 cygx slow news day?
19:52 nine Beats trying to fix merge_globals_lexically ;)
19:53 FROGGS I'm compiling moar on qemu/mips... so I've got a loooooooooot of time right now
19:55 AlexDaniel it's also interesting that there is some room for negative numbers…
19:55 AlexDaniel hm, or maybe not. I'm not sure where is the bottom on that graph
19:57 AlexDaniel 0, 400, 1400, …, 9400, 10000. Interesting.
20:00 [Coke] yah, that is a super weird choice, but doesn't misrepresent anything.
20:34 nine ==> Successfully installed panda
20:34 nine On lexical_module_loading :)
20:34 dalek rakudo/lexical_module_load: 9ee5a77 | niner++ | src/Perl6/World.nqp:
20:34 dalek rakudo/lexical_module_load: Fix: use Foo::Bar; class Foo { my Foo::Bar $bar; } not finding Foo::Bar
20:34 dalek rakudo/lexical_module_load:
20:34 dalek rakudo/lexical_module_load: A lexically imported package stub was replaced instead of upgraded when
20:34 dalek rakudo/lexical_module_load: a class of the same name was declared.
20:34 dalek rakudo/lexical_module_load: review: https://github.com/rakudo/rakudo/commit/9ee5a77f62
20:36 dalek rakudo/lexical_module_load: 78621ec | niner++ | src/Perl6/ModuleLoader.nqp:
20:36 dalek rakudo/lexical_module_load: Fix: class Foo { use Foo::Bar; my Foo $foo; } not finding Foo
20:36 dalek rakudo/lexical_module_load:
20:36 dalek rakudo/lexical_module_load: The lexically imported "Foo" package stub containing "Bar" shadowed the
20:36 dalek rakudo/lexical_module_load: "Foo" class we're currently declaring. Fix by considering all scopes
20:36 dalek rakudo/lexical_module_load: when looking for existing symbols, not just the one we're importing
20:36 dalek rakudo/lexical_module_load: into.
20:36 dalek rakudo/lexical_module_load: review: https://github.com/rakudo/rakudo/commit/78621ecd29
20:43 cygx has it happened to anyone else that an object doesn't smatmatch against a role it does?
20:44 cygx nqp::eqaddr(nqp::decont($m.^roles[1]), Algebraic) is 1, but $m ~~ Algebraic is False
20:46 cygx there isn't really anything fancy going on, except that role and class are defined in different modules
21:12 cygx RT #129957
21:12 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129957
21:19 AlexDaniel cygx: just want to note that it has always been like this, it's not a regression
21:20 AlexDaniel (committable output: https://gist.github.com/Whateverable/c5570aff56c1c205da91f487525d5cb9 )
21:20 FROGGS m: say Str ~~ Stringy
21:20 camelia rakudo-moar aaec51: OUTPUT«True␤»
21:20 FROGGS m: say Int ~~ Stringy
21:20 camelia rakudo-moar aaec51: OUTPUT«False␤»
21:21 FROGGS m: say "foo" ~~ Stringy
21:21 camelia rakudo-moar aaec51: OUTPUT«True␤»
21:21 FROGGS strange
21:21 AlexDaniel FROGGS: why?
21:22 FROGGS that it does not work with use'd roles...
21:22 AlexDaniel but Int is not Stringy, isn't it?
21:24 FROGGS that's correct
21:25 FROGGS I was saying that rakudo thinks that '$m ~~ Algebraic' isnt true is weird
21:30 cygx the failure is present when using nqp::istype, which maps to MVM_6model_istype
21:30 cygx that's above my paygrade
21:31 timotimo hm, i think there's a type check cache somewhere. but why would that be faulty?
21:39 cygx just speculating, but if I read it correctly, the cache gets filled during deserialization
21:39 cygx then, simple pointer equality is used to lok for the type object
21:39 cygx can something go wrong there (ie the cache containing a stale pointer or something)
21:44 timotimo the cache should have all its pointers kept up to date through a gc_mark function
22:23 |Tux| joined #perl6-dev
22:24 cygx o/
22:32 |Tux| joined #perl6-dev
23:07 dalek roast: dfb9e21 | (Tom Browder)++ | README.md:
23:07 dalek roast: correct typo
23:07 dalek roast: review: https://github.com/perl6/roast/commit/dfb9e21a1c
23:11 timotimo tbrowder: did you see my stuff to make "write big file.p6" or what it's called a whole bunch faster?
23:12 tbrowder timotimo: no, on the repo? i'll go check...
23:13 dalek joined #perl6-dev
23:14 timotimo no, it was here on irc and i think i tried to .tell you? maybe i didn't, maybe i just highlighted you
23:14 tbrowder timotimo: where are yr comments?
23:14 timotimo give me a moment
23:15 committable6 joined #perl6-dev
23:15 timotimo can't find it in the irclog :o
23:16 tbrowder i have planned to try nativecall readline but haven't gotten there yet
23:16 timotimo there we have it. i'll grab a link now
23:16 tbrowder ok!
23:17 timotimo http://irclog.perlgeek.de/perl6/2016-10-22#i_13448046 - this line and like 20 lines later
23:17 timotimo why didn't this line show up when i searched for "nick: timotimo, text: tbrowder" >:(
23:22 tbrowder timotimo: i'll have to digest those comments, but my main concern had been the slow read times. to me, those are the real show stoppers, although i need to show the create times, too.
23:22 timotimo right
23:24 tbrowder btw, any ideas on direction for efforts on the iperl6 project?
23:24 timotimo "please oh god someone please just do something"? :)
23:26 tbrowder seems to me a good start would be to just translate the iperl5 efforts, except i haven't found the zero* api yet.
23:29 tbrowder i just think, since you started the project, putting public your thoughts on a plan would be good for us PR people to follow instead of blasting off into unknown territory.
23:31 timotimo oof
23:32 timotimo i really should write something out, shouldn't i ...
23:33 timotimo for now i'm really tired, let's hope tomorrow brings tuits
23:43 arnsholt joined #perl6-dev
23:43 gfldex_ joined #perl6-dev
23:47 ilbot3 joined #perl6-dev
23:47 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today
23:54 tbrowder i have some round ones to spare...

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