Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-11-15

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:00 japhb I think any non-platform-specific implementation of Perl 6 (Rakudo just being a prime example) is going to have to have some way to refer to "internal types".  Given that we want to implement Perl 6 with as much Perl 6 as possible, how do you propose we refer to an "internal type", if not the way that Rakudo does?
00:05 japhb OK, I'll turn this around.  Other than "We don't guarantee it's a null-terminated C string, and we don't want people to assume it is" is there any other real objection to str?
00:07 TimToady well, *can* I put a null in it?  is it UTF-8?  is it even byte based?
00:08 TimToady what operations make sense on it?
00:08 TimToady if I get one from this VM, can I pass it to that VM?
00:09 diakopter TimToady: it's bit-addressed :)
00:09 TimToady if it's a blob, why don't we call it a blob?
00:09 TimToady should the name be moar::str or jvm::str or parrot::str or nqp::str?
00:10 TimToady can I get the length of it?
00:11 TimToady is it gonna be UTF-16 on a Windows machine?
00:11 diakopter TimToady: its length is given to you in a 129-bit float
00:11 TimToady and what does "platform" mean?  $*VM, $*OS, $*ARCH, $*DISTRO?
00:12 * TimToady just hates on accidental genericity whenever he sees it these days...
00:13 rurban1 joined #perl6
00:13 pdurbin joined #perl6
00:13 japhb TimToady, sure, I see where you're going with that.  But the use case I'm talking about is "I'm going to treat this stringlike object as internally opaque, but presenting a known set of interfaces/operations that make sense on it."
00:14 japhb So jvm::str doesn't make sense, because I really don't care if it's the jvm on the backend.
00:15 TimToady it's the 'known' business that seems to be suspect here :)
00:15 japhb I only care that it can do concatenation, substr, ord_at, etc.
00:16 TimToady the semantics of offsets may vary from platform to platform as well
00:17 TimToady does the str expect to handle variable-width encodings itself, or expect you to?
00:17 lue TimToady, japhb: why can't buf/blob work for the purposes of "low-level/native(ish) Str"?
00:17 japhb lue, because the interface is not the same.
00:18 TimToady if you do ord_at, are you getting the byte at that position, or codepoint at that position?
00:18 Psyche^ joined #perl6
00:18 japhb TimToady, I'm not sure I buy that.  A str thing doesn't expose encoding any more than a Str does.
00:18 japhb a blob does.
00:18 lue japhb: low-level C-style strings are a totally different beast from high-level Strs anyway
00:18 japhb lue, I know.
00:19 * lue would *prefer* the byte-based operations of bufs and blobs if he had to go low-level on strings. Then again he isn't very low-level-phobic
00:19 * TimToady still has no clue what the semantics of a str are
00:20 japhb I blob/buf is something you use for I/O, whether that be talking to a network port, a file, or a GPU.
00:21 TimToady that is what you use them for, not what they are :)
00:21 lue japhb: of course, but they moonlight as generic contiguous arrays :)
00:22 japhb TimToady, in the context of a Rakudo-like multi-level architecture, I'd say "A str is the thing used at the second (NQP-like) layer that handles all ops necessary to build the top (Perl 6 Str) layer"
00:23 japhb But yes, I concede the Turing tarpit here.
00:23 * lue feels it would be particularly onerous to suggest bufs/blobs as the underlying structure of Str :P
00:23 TimToady not at all
00:23 japhb .oO( It supports Subtract-and-Branch-if-Negative! )
00:24 TimToady NFG is naturally a kind of Blob[Int] or so
00:24 japhb That's how it acts, not what it is.  ;-)
00:24 TimToady how do you know that's not what it is?
00:24 * TimToady feels feisty today :)
00:24 japhb *necessarily
00:24 japhb I can tell!
00:25 * TimToady has been considering implementing it as a kind of Blob for quite a while now, though perhaps something ropier would be more suitable
00:26 TimToady since NFG is a constant-width encoding, that maps quite nicely onto any kind of array of integers
00:26 TimToady and we unify subblob and substr at that level
00:27 TimToady (except, of course, you have to account for carrying forward synthetic character definitions somehow for NFG)
00:27 japhb OK, so at this point we're left with "Perl 6 refuses to consider the concept of a 'VM string', but Rakudo needs to refer to that concept, and str is the defacto current choice.  But like much of Rakudo's internals, it's not *pure* Perl 6"
00:27 TimToady ((assuming they're not global))
00:28 * TimToady doesn't like to see the (lack of) abstraction leaking into Perl 6 :)
00:28 lue japhb: we have low-level and high-level string variants. VM-specific stuff is, well, VM-specific.
00:28 lue r: say Q:PIR{}
00:28 camelia rakudo-jvm 9f0609: OUTPUT«===SORRY!===␤No such method 'jast' for invocant of type 'NQPMu'␤»
00:28 camelia ..rakudo-parrot 9f0609: OUTPUT«␤»
00:28 japhb TimToady, it's not leaking into Perl 6 -- it's leaking into Rakudo.  :-)
00:30 lue (on a barely-related note, I'd love it for the Unicode consortium to rewrite UTF-16 to be just like UTF-8 (relegate old -16 to be only called UCS-2 or something), and give us the 0x11_0000 .. 0xFF_FFFF range back.)
00:30 TimToady I doubt that can ever happen
00:30 TimToady they'll just call it something else
00:30 lue TimToady: I didn't make that wish on the basis of probability :)
00:31 lue (the actual point of the request is to free up past 0x10_FFFF from needless historical specification restriction)
00:33 lue .oO(our new standard, UTF-16-use-this-one-instead)
00:34 geekosaur uaf16, uxf16, uuf16, ???
00:35 lue or utf+16 perhaps
00:36 BenGoldberg utf16++, perhaps?
00:37 tadzik wtf8
00:37 BenGoldberg . o O ( utf17 )
00:37 TimToady utf15 maybe
00:39 lue .oO(If only we were able to use a more pragmatic name, in the vein of utf8 and utf32...)
00:41 TimToady well, ASCII survived a good long time with lots of wasted characters below U+20, so I suspect Unicode will similarly survive the wasted characters in the surrogate range
00:43 TimToady Unicode just was driving too fast as a teenager, got into an accident, and has some permanent scars as a result
00:44 lue meh. I don't think I'll ever be able to look at "we won't go past 10_FFFF because history" without feeling at least a hint of disapproval.
00:44 TimToady Java was contributing to the delinquincy of a minor.
00:45 BenGoldberg rn: my @a := gather { .take for 1..5; say 'oww' }; map { .say; last }, @a
00:45 camelia niecza v24-98-g473bd20: ( no output )
00:45 camelia ..rakudo-parrot 9f0609, rakudo-jvm 9f0609: OUTPUT«oww␤1␤»
00:45 TimToady lue: well, Perl 5 can go past 10ffff as long as you stick to "utf8"
00:46 lue TimToady: yeah, but the official unicode collection of characters won't :)
00:46 TimToady p5eval: say ord(chr(10000000)); # see if it still words
00:46 p5eval TimToady: 100000001
00:46 TimToady *works
00:46 TimToady ooh a bug!
00:46 TimToady oh, no
00:46 lue r: say "\x[110000]"
00:46 TimToady that's just the 1 at the end
00:46 camelia rakudo-jvm 9f0609: OUTPUT«===SORRY!===␤Invalid code-point U+110000␤»
00:46 camelia ..rakudo-parrot 9f0609: OUTPUT«===SORRY!===␤Invalid character for UTF-8 encoding␤␤»
00:47 lue parrot is plainly incorrect there :P
00:47 hummeleB1 joined #perl6
00:48 TimToady p5eval: ord "\x{fffffff}";
00:48 p5eval TimToady: 268435455
00:48 BenGoldberg nP: say "\x[110000]"
00:49 BenGoldberg n: say "\x[110000]"
00:49 camelia niecza v24-98-g473bd20: OUTPUT«Use of uninitialized value in string context␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1355 (warn @ 5) ␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 266 (Mu.Str @ 15) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/…»
00:49 BenGoldberg ?
00:50 bobkare joined #perl6
00:51 TimToady n: say "\x10ffff".chars
00:51 camelia niecza v24-98-g473bd20: OUTPUT«2␤»
00:51 TimToady UTF-16 branedamage
00:51 TimToady hence no \x110000
00:53 TimToady we should probably translate incoming streams into NFG in a separate thread
00:53 TimToady ala the old IBM I/O "channels"
00:55 BenGoldberg p5eval: [map ord(chr(2**32+$_))-2**32, -3..+3 ]
00:55 p5eval BenGoldberg: [-3,-2,-1,-1,-1,-1,-1]
00:55 TimToady *à la
01:12 TimToady well, pardon my french...
01:28 hummeleB1 à la prochaine
02:03 dalek p6-pb: e5a32d3 | (Geoffrey Broadwell)++ | lib/Metamodel/Perlable.pm:
02:03 dalek p6-pb: Add Metamodel::Perlable{Attribute,Class,ClassHOW}
02:03 dalek p6-pb:
02:03 dalek p6-pb: Add roles and a class allowing runtime creation of classes that know
02:03 dalek p6-pb: how to serialize their own definitions back to Perl 6 source code.
02:03 dalek p6-pb:
02:03 dalek p6-pb: For now only handles the class/is/does and attribute declarations, but
02:03 dalek p6-pb: is smart enough to serialize either a class type object or a defined
02:03 dalek p6-pb: object instantiated in that class.  A defined object's serialized form
02:03 dalek p6-pb: gets default assignments for each of its attributes that match the
02:03 dalek p6-pb: actual current values in the object.
02:03 dalek p6-pb:
02:03 dalek p6-pb: The roles attempt to do the right thing when handed unusual attributes,
02:03 dalek p6-pb: correctly handling even BOOTSTRAPATTRs, and providing a hook for
02:03 dalek p6-pb: serializing non-standard attribute traits.
02:03 dalek p6-pb: review: https://github.com/samuraisam/p6-pb/commit/e5a32d3bbb
02:03 dalek p6-pb: c588de0 | (Geoffrey Broadwell)++ | t/perlable.t:
02:03 dalek p6-pb: Add tests for Metamodel::Perlable*
02:03 dalek p6-pb:
02:03 dalek p6-pb: Skips one test on rakudo-jvm to work around a known NPE bug.
02:03 dalek p6-pb: review: https://github.com/samuraisam/p6-pb/commit/c588de01ae
02:06 daveec joined #perl6
02:15 btyler joined #perl6
03:06 rurban1 joined #perl6
03:31 sizz_ joined #perl6
03:42 lizmat joined #perl6
03:47 kshannon joined #perl6
03:47 mtk0 joined #perl6
03:47 scottp joined #perl6
03:48 [Sno]_ joined #perl6
03:50 moritz_ joined #perl6
03:51 sizz joined #perl6
04:03 cotto joined #perl6
04:03 Vlavv` joined #perl6
04:03 nebuchadnezzar joined #perl6
04:06 flussence joined #perl6
04:17 preflex joined #perl6
05:01 sftp joined #perl6
05:04 SamuraiJack joined #perl6
05:36 qwebirc98057 joined #perl6
05:43 pernatiy joined #perl6
05:47 lue TimToady: request for plural aliases for DateTime.new() arguments. I just got bit by that :/
05:48 lue rn: say DateTime.new(:minute(12), :second(21))
05:48 camelia rakudo-parrot 9f0609: OUTPUT«Must provide arguments to DateTime.new()␤  in method gist at gen/parrot/CORE.setting:12001␤  in method gist at gen/parrot/CORE.setting:1014␤  in sub say at gen/parrot/CORE.setting:12901␤  in block  at /tmp/SRvmUN6t0Z:1␤  in any  at /tmp/SRvmUN6…»
05:48 camelia ..rakudo-jvm 9f0609: OUTPUT«Must provide arguments to DateTime.new()␤  in block  at /tmp/0jji3_tqGp:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage2/NQPHLL.nqp:1196␤  in any command…»
05:48 camelia ..niecza v24-98-g473bd20: OUTPUT«Unhandled exception: No value for parameter '$now' in 'DateTime.new'␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (DateTime.new @ 1) ␤  at /tmp/2tUvC2dNwQ line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4583 (ANON @ 3) …»
05:49 lue ?
06:11 kaleem joined #perl6
06:11 TimToady that would make more sense if you were talking about durations, not where the minute hand and second hand were
06:15 TimToady we could also use a way to warn on unused arguments (possibly with a "did you mean?)
06:26 lue TimToady: unless there was a *%, I'd like to be warned of unused adverbs.
06:28 lue TimToady: I wasn't working with durations (merely trying to generate one), but it wasn't dealing with clock time, so I was thinking "16 minutes and 12 seconds" instead of "minute 16 and second 12"
06:31 [Sno] joined #perl6
06:32 cognominal joined #perl6
06:32 dalek rakudo-star-daily: 148338c | coke++ | log/ (5 files):
06:32 dalek rakudo-star-daily: today (automated commit)
06:32 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/148338c12a
06:32 dalek perl6-roast-data: 8439467 | coke++ | / (5 files):
06:32 dalek perl6-roast-data: today (automated commit)
06:32 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/84394670c7
06:33 rurban1 joined #perl6
07:13 [Coke] r: class JSON::Tiny::Actions
07:13 camelia rakudo-jvm 9f0609: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/qezjjXiJDiâ�¤Unable to parse class definitionâ�¤at /tmp/qezjjXiJDi:1â�¤------> [32mclass JSON::Tiny::Actions[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix o…»
07:13 camelia ..rakudo-parrot 9f0609: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Rmh32js3I8â�¤Unable to parse class definitionâ�¤at /tmp/Rmh32js3I8:1â�¤------> [32mclass JSON::Tiny::Actions[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefi…»
07:13 [Coke] r: std JSON::Tiny::Actions
07:13 camelia rakudo-jvm 9f0609: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/DMzjxbwatPâ�¤Undeclared routine:â�¤    std used at line 1â�¤â�¤Â»
07:13 camelia ..rakudo-parrot 9f0609: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/O413sBb65gâ�¤Undeclared routine:â�¤    std used at line 1â�¤â�¤Â»
07:13 [Coke] std: JSON::Tiny::Actions
07:13 camelia std b469b42: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared name:â�¤    'JSON::Tiny::Actions' used at line 1â�¤Check failedâ�¤FAILED 00:00 120mâ�¤Â»
07:14 [Coke] std: class JSON::Tiny::Actions
07:14 camelia std b469b42: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse class definition at /tmp/ZK9nN7HKi4 line 1 (EOF):�------> [32mclass JSON::Tiny::Actions[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 120m�»
07:15 FROGGS joined #perl6
07:16 ssutch joined #perl6
07:20 awwaiid joined #perl6
07:42 awwaiid joined #perl6
07:45 denis_boyun joined #perl6
07:52 denis_boyun__ joined #perl6
07:54 Guest2496 joined #perl6
07:57 iSlug joined #perl6
08:02 berekuk joined #perl6
08:10 brrt joined #perl6
08:15 baest joined #perl6
08:28 kurahaupo joined #perl6
08:31 kurahaupo_ joined #perl6
08:33 berekuk joined #perl6
08:35 bobkare left #perl6
08:38 nnunley joined #perl6
08:52 woosley left #perl6
09:03 itz joined #perl6
09:13 odoacre_ joined #perl6
09:19 nnunley joined #perl6
09:24 kurahaupo joined #perl6
09:36 preflex joined #perl6
09:37 kurahaupo_ joined #perl6
09:49 dalek rakudo/nom: 9e1d69b | (Elizabeth Mattijsen)++ | src/vm/jvm/core/Thread.pm:
09:49 dalek rakudo/nom: Thread.join -> Thread.finish, as per spec
09:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9e1d69bbe5
09:51 lizmat joined #perl6
09:51 brrt left #perl6
09:51 lizmat good *, #perl6!
09:51 hoelzro ahoy lizmat!
09:52 lizmat it seems ce1def97a34e87b214455096b190afade953ddd7 broke jakudo
09:52 lizmat src/Perl6/Optimizer.nqp
09:52 lizmat Method 'jast' not found for invocant of class 'NQPMu'
09:52 lizmat hmmm... guess I missed a NQP version update ?
09:55 lizmat and ahoy hoelzro !
09:55 timotimo oh that is very possible
09:56 timotimo i also broke native str on jakudo when not giving an argument
09:56 timotimo or at least i did not implement it fully
09:56 timotimo previously it would have died differently
09:56 timotimo i may have to carefully bump nqp revision today
10:00 lizmat I'm thinking of reverting ce1def97a34e87b214455096b190afade953ddd7 so I can go on today
10:03 moritz_ lizmat: do it if it helps you work on rakudo
10:04 moritz_ the patch can be re-applied together with a fix later
10:04 lizmat reverted locally, testing now
10:07 kurahaupo joined #perl6
10:07 * moritz_ ist still in bed, with a nasty flu
10:07 lizmat Gute Besserung!
10:07 moritz_ danke
10:16 fhelmberger joined #perl6
10:16 kurahaupo_ joined #perl6
10:16 dalek rakudo/nom: 82269bd | (Elizabeth Mattijsen)++ | src/Perl6/Optimizer.nqp:
10:16 dalek rakudo/nom: Revert "in sink context, ++foo is faster than foo++ by 10%"
10:16 dalek rakudo/nom:
10:16 dalek rakudo/nom: We need an NQP revision update for this to work
10:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/82269bd8ec
10:16 dmol joined #perl6
10:22 kurahaupo joined #perl6
10:25 kurahaupo_ joined #perl6
10:27 kurahaupo joined #perl6
10:28 FROGGS lizmat: btw, I am thinking about actually implementing S11 from now
10:31 kurahaupo joined #perl6
10:36 lizmat FROGGS: so am I, but please don't let me stop you
10:36 lizmat I wish TimToady would chime in on S11, but he hasn't  :-(
10:36 FROGGS lizmat: k, just wanted to let you know...
10:37 lizmat FROGGS: I'll let you know when I'm really beginning, and you'll let me know if you are?
10:38 FROGGS lizmat: well, I am going to make sketches today, and hope to start this weekend
10:38 FROGGS :o)
10:38 lizmat ok!
10:38 lizmat fwiw, I was thinking that most of it should be implemented in Perl 6
10:38 lizmat if not all
10:39 FROGGS that sounds about right
10:39 lizmat the only problem I see is the "use Perl6::BOOTSTRAP" at the start of settings
10:39 lizmat I think that should be something else, possibly nqp
10:40 FROGGS I think that compiler internal module use-age should not be affected
10:40 lizmat so that Perl6's  "use" can be built up in setttings
10:40 lizmat there is only 1 -use- statement in the core settings
10:41 lizmat and having that in the core settings, and as the first statement, implies it needs to exist *before* we start creating the setting
10:43 dalek roast: 21fb457 | (Elizabeth Mattijsen)++ | S17-concurrency/ (3 files):
10:43 dalek roast: Thread.join -> Thread.finish, as per new spec
10:43 dalek roast: review: https://github.com/perl6/roast/commit/21fb45720b
10:45 dmol joined #perl6
10:46 FROGGS I think we can simply make it that way: you have search paths that ignore :auth and :ver, which will always be considers before the paths that take that into account
10:47 FROGGS our nqp/install/lib or what it is called is one of these, and so are the development library paths one would add
10:47 rurban1 joined #perl6
10:47 FROGGS so, Perl6::BOOTSTRAP would always be search in the former paths, and would never appear as a proper module
10:48 lizmat seems too magical to me
10:48 lizmat and bound to cause confusion later on
10:48 lizmat and an attack vector
10:49 FROGGS I don't see it that way
10:49 lizmat I'd rather see the code that concats the core setting, hard code the path into some special code that loads the Perl6::BOOTSTRAP
10:49 lizmat aka, remove the "use Perl6::BOOTSTRAP" from src/core/core_prologue
10:50 lizmat and prefix the necessary nqp:: code before concatting the rest of core settings after that
10:50 FROGGS that might work too... let's handle that when I have code to show :o)
10:50 kurahaupo joined #perl6
10:53 dalek rakudo/nom: 7027cd9 | (Elizabeth Mattijsen)++ | src/vm/jvm/core/Channel.pm:
10:53 dalek rakudo/nom: Implement Channel.list, as per new spec
10:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7027cd9988
11:05 kurahaupo_ joined #perl6
11:11 tgt joined #perl6
11:14 kurahaupo joined #perl6
11:16 kurahaupo_ joined #perl6
11:18 tgt joined #perl6
11:19 kurahaupo joined #perl6
11:41 timotimo lizmat: that Channel.list could just as well have used map, no? since gather/take is so horribly bad on jvm at the moment
11:45 timotimo it surprises me that the commit to the optimizer causes the jvm problem with NQPMu
11:51 kurahaupo_ joined #perl6
11:54 kurahaupo joined #perl6
11:56 kurahaupo_ joined #perl6
11:58 rurban1 joined #perl6
12:04 xinming_ joined #perl6
12:07 denisboyun joined #perl6
12:15 denis_boyun__ joined #perl6
12:17 lizmat timotimo: I've considered doing a map, but what would the map be iterating over ?
12:19 moritz 0 xx *
12:24 timotimo that was my thought as well
12:24 timotimo unless that, itself, is implemented with gather/take :P
12:24 timotimo i'd go with 0..* instead, i think
12:24 timotimo because i know rangeiter is fast
12:25 timotimo well, faster than using gather/take in any case (on the jvm)
12:25 lizmat agree
12:25 lizmat but it feels like a hack
12:25 timotimo all is fair in love and core.
12:25 lizmat feels like we need a listless map
12:25 lizmat map {  };
12:28 lizmat implementing / testing suggestions
12:31 raiph joined #perl6
12:33 rindolf joined #perl6
12:36 pjcj joined #perl6
12:44 timotimo gotta commute to get at my code :|
12:44 timotimo poor day planning ftl
12:48 zakharyas joined #perl6
12:49 moritz can't we rewrite gather/take in terms of map?
12:50 colomon smoker rakudo build failed overnight.
12:53 lizmat colomon: timotimo's commit maybe ?
12:53 colomon dunno, I've pulled the latest and am trying to rebuild by hand
12:53 lizmat when I git pulled this morning, both builds failed
12:54 colomon that's probably it, then
12:55 lizmat I've reverted timotimo's commit
12:55 lizmat it should build now
12:55 FROGGS moritz: would it be lazy then?
13:00 berekuk joined #perl6
13:10 PacoAir joined #perl6
13:10 mtk joined #perl6
13:11 * lizmat has the sudden realization that winner() is currently implemented differently from spec  :-(
13:14 brrt joined #perl6
13:25 pdurbin left #perl6
13:26 PZt joined #perl6
13:41 dalek rakudo/nom: 79bd6ad | (Elizabeth Mattijsen)++ | src/vm/jvm/core/Channel.pm:
13:41 dalek rakudo/nom: Implement Channel.list as a "listless" map
13:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/79bd6addf6
13:42 diakopter lol; listless
13:43 dalek roast: 893e0df | (Elizabeth Mattijsen)++ | S17-concurrency/channel.t:
13:43 dalek roast: Add tests for Channel.list and @(Channel)
13:43 dalek roast: review: https://github.com/perl6/roast/commit/893e0dff7a
13:43 lizmat cycling&
13:45 berekuk joined #perl6
13:46 btyler joined #perl6
13:55 kurahaupo joined #perl6
14:05 slavik joined #perl6
14:17 kurahaupo joined #perl6
14:20 jnap joined #perl6
14:22 * [Coke] yawns.
14:25 raiph joined #perl6
14:26 qwebirc63802 joined #perl6
14:30 lowpro30 joined #perl6
14:34 kurahaupo joined #perl6
14:38 kurahaupo joined #perl6
14:45 fhelmberger_ joined #perl6
14:46 rindolf joined #perl6
14:47 kurahaupo joined #perl6
14:55 denis_boyun joined #perl6
14:57 FROGGS that is nice:
14:57 FROGGS rp: BEGIN { class Perl6::ModuleLoader { method absolute_path($path) { say "hello $path" } }; nqp::bindhllsym('perl6', 'ModuleLoader', Perl6::ModuleLoader); }; use Foo
14:57 camelia rakudo-parrot 79bd6a: OUTPUT«hello /home/p6eval/rakudo-inst-2/lib/parrot/5.9.0-devel/languages/perl6/site/lib␤hello /home/p6eval/rakudo-inst-2/lib/parrot/5.9.0-devel/languages/perl6/vendor/lib␤hello /home/p6eval/rakudo-inst-2/lib/parrot/5.9.0-devel/languages/perl6/lib␤hello /h…»
14:57 FROGGS this way you can implement your own module loader without touching rakudo
14:58 lowpro30_ joined #perl6
15:01 FROGGS damn, it is not that easy as it seems
15:02 FROGGS it still calls into the old loader, from src/Perl6/World.nqp:331: method load_module
15:02 denis_boyun joined #perl6
15:07 FROGGS I wonder why I can't use nqp::getcurhllsym('ModuleLoader') there
15:10 * FROGGS tries nqp::usecompileehllconfig();
15:12 stevan_ joined #perl6
15:12 FROGGS :o(
15:21 FROGGS cool, that does the trick:
15:21 FROGGS -        my $module := Perl6::ModuleLoader.load_module($module_name, %opts,
15:21 FROGGS +        my $module := nqp::gethllsym('perl6', 'ModuleLoader').load_module($module_name, %opts,
15:21 thou joined #perl6
15:21 atroxaper joined #perl6
15:22 atroxaper Happy friday #perl6 !
15:22 FROGGS hi atroxaper!
15:22 atroxaper hi FROGGS!
15:24 colomon \o
15:24 FROGGS o/
15:30 atroxaper o/
15:35 kurahaupo joined #perl6
15:38 lowpro30 joined #perl6
15:48 denis_boyun__ joined #perl6
15:52 kurahaupo_ joined #perl6
15:53 rurban1 joined #perl6
15:56 raiph joined #perl6
15:56 denis_boyun_ joined #perl6
15:57 thou joined #perl6
15:57 rurban1 joined #perl6
16:00 denis_boyun joined #perl6
16:05 lowpro30_ joined #perl6
16:09 denis_boyun joined #perl6
16:09 xinming joined #perl6
16:13 mbcd joined #perl6
16:15 kurahaupo joined #perl6
16:18 ggoebel17 joined #perl6
16:20 lowpro30 joined #perl6
16:23 denisboyun joined #perl6
16:23 kurahaupo joined #perl6
16:26 dalek p6-pb: 9ae0b90 | (Geoffrey Broadwell)++ | t/official.t:
16:26 dalek p6-pb: Switch from File::Spec to IO::Spec
16:26 dalek p6-pb:
16:26 dalek p6-pb: Stop depending on external File::Spec, since IO::Spec is in the setting.
16:26 dalek p6-pb: review: https://github.com/samuraisam/p6-pb/commit/9ae0b9044b
16:26 dalek p6-pb: 80b165c | (Geoffrey Broadwell)++ | lib/PB/Actions.pm:
16:26 dalek p6-pb: Fix octal 0 bug in PB::Actions
16:26 dalek p6-pb: review: https://github.com/samuraisam/p6-pb/commit/80b165cdcc
16:26 dalek p6-pb: 992d5af | (Geoffrey Broadwell)++ | lib/PB/Message.pm:
16:26 dalek p6-pb: Add a stub PB::Message to prepare for generation
16:26 dalek p6-pb:
16:26 dalek p6-pb: Generated message classes will need a common superclass, so stub out a
16:26 dalek p6-pb: PB::Message for this purpose.
16:26 dalek p6-pb: review: https://github.com/samuraisam/p6-pb/commit/992d5aff41
16:26 dalek p6-pb: 491bbb9 | (Geoffrey Broadwell)++ | lib/PB/Model/Generator.pm:
16:26 dalek p6-pb: WIP: Message class generation using Perlable*
16:26 dalek p6-pb:
16:26 dalek p6-pb: Start generating message classes in PB::Model::Generator using the new
16:26 dalek p6-pb: Metamodel::Perlable* framework.  Incomplete and will need some refactoring,
16:26 dalek p6-pb: but should be enough to start work on writing complete messages in
16:26 dalek p6-pb: PB::Binary::Writer.  Some debug code still included for now.
16:26 dalek p6-pb: review: https://github.com/samuraisam/p6-pb/commit/491bbb9ea8
16:26 FROGGS joined #perl6
16:27 TimToady japhb++
16:27 japhb_ :-)
16:29 * TimToady loves to see bridges being built to other cultures
16:29 ssutch joined #perl6
16:30 japhb_ Ditto.  So I figure, why not build one myself?  :-)
16:30 kurahaupo_ joined #perl6
16:31 FROGGS what is meant by other cultures btw?
16:32 TimToady well, protocol buffers are a google thing, in this case
16:33 FROGGS ahh
16:33 * TimToady assumes that's what the "pb" stands for
16:34 FROGGS yes, according to the README
16:34 TimToady but the concept of Perl as a glue language stretches way back to when Unix and databases were the "other" cultures we were bridging to
16:34 TimToady then there was XML, and windows
16:36 TimToady and lots of other "cultures"
16:37 * japhb_ would be very happy to eventually talk to all the Google systems and services from Perl 6, but it's going to take a while.  This is just a necessary first step.
16:39 * TimToady points out that these cultural bridges usually work both directions; then not only let Perl 6 programmers get to the other culture, but they bring people in from the other culture to use Perl 6.
16:39 TimToady *they
16:41 TimToady Our culture has some full-time residents who never wander, and some part-time residents who serve as merchants.  We value both.  We are not isolationists.
16:41 dave1c joined #perl6
16:41 FROGGS humm, `use lib` is not specced...
16:41 FROGGS and I dont agree with the implementation...
16:42 kaleem joined #perl6
16:42 TimToady you have to say what you disagree with :)
16:43 FROGGS if I have a script several dirs away, and there is a `use lib 'lib'` in it, is it supposed to add my current cwd/lib ?
16:44 FROGGS how do I get the path of myself if I'd be a script?
16:57 moritz something like $*PROGRAM_NAME.path.dir or so
16:58 FROGGS lizmat: if you are interested: https://github.com/FROGGS/p6-S11Versioning/commit/771e10e (needs a rakudo path though, which is included in a pod block)
16:58 FROGGS rp: say $*PROGRAM_NAME.path.dir
16:58 camelia rakudo-parrot 79bd6a: OUTPUT«IO::Path.dir is deprecated in favor of .directory␤  in method dir at gen/parrot/CORE.setting:13208␤  in block  at /tmp/3Nqj6vYVfD:1␤  in any  at /tmp/3Nqj6vYVfD:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage2…»
16:58 FROGGS rp: say $*PROGRAM_NAME.path.directory
16:58 camelia rakudo-parrot 79bd6a: OUTPUT«/tmp␤»
16:58 FROGGS \o/
16:58 FROGGS moritz++
17:00 FROGGS jnthn: I had to patch P6::W to wrap the ModuleLoader with my own... how bad it that patch? https://gist.github.com/FROGGS/1938e9ecf4c5b82b5437
17:01 FROGGS s/it/is/
17:06 TimToady lizmat: I'm not sure that winner has quite the right syntax yet; as specced it can't handle an array of channels, for instance
17:08 FROGGS lizmat: btw, the rest of that repo is old, just the three added files are relevant
17:08 dmol joined #perl6
17:10 TimToady on S11, I think putting the official name into Pod makes p6 modules look more like COBOL--though if we can be half as successful as COBOL, I'd put up with an IDENTIFICATTION DIVISION lookalike :)
17:16 tadzik fwiw, the way gcc (-O3) optimizes x++ in "sink context" in C++ is that it inlines the operator method and then removes unnecessary statements (in this case temparary variable)
17:16 tadzik thanks to that it works with all the custom ++-s too
17:16 tadzik (good morning #perl6)
17:23 TimToady otoh if we make it too onorous to graduate a module from unofficial to official, people will just develop a black market for unofficial modules that work but come with no guarantees of immutability
17:24 TimToady well, unless we go with a crypto as part of the identity, as github does
17:24 TimToady s/github/git/
17:28 telex joined #perl6
17:31 lowpro30 joined #perl6
17:33 dalek rakudo-star-daily: 18ec1e7 | coke++ | log/ (5 files):
17:33 dalek rakudo-star-daily: today (automated commit)
17:33 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/18ec1e71a7
17:33 * [Coke] is mildly annoyed at the diffs showing all the timings there.
17:39 kurahaupo joined #perl6
17:39 FROGGS TimToady: wrt S11: you are talking about the unit-name discussion?
17:40 TimToady yup
17:42 FROGGS so a `unit Foo:auth<Bar>` statement is not a way to go?
17:43 FROGGS (where a semicolon form of a package declaration could be a shorthand for it)
17:43 TimToady it's been a while since I've thought about it; I'd have to get back into it, but don't have time this morning
17:43 [Sno] joined #perl6
17:44 TimToady since I am required to go see Thor  :)
17:44 FROGGS *g*
17:44 TimToady maybe doing so will revise my opinion of some of the heavy hammers in Perl 6 :)
17:44 FROGGS no hurry :o)
17:44 FROGGS hehe
17:53 kurahaupo_ joined #perl6
18:07 dalek specs: bfb393d | util++ | S (7 files):
18:07 dalek specs: Fix typos in S02, S03, S21, S26, S29, S99, and S32/Exception.
18:07 dalek specs: review: https://github.com/perl6/specs/commit/bfb393dc9b
18:07 FROGGS I love it:
18:07 FROGGS $ perl6-p -Ilib -e 'use MyModuleLoader; use NoSuchModule:auth({ .substr(0,5) eq "cpan:"}):ver(v1.2.1..*);'
18:07 FROGGS %opts.say: ("auth" => Block.new(), "ver" => Version.new('1.2.1')..Inf).hash
18:07 FROGGS perl6 is sooo awesome!
18:11 [Coke] TimToady: looking forward to hobbit: DOS?
18:11 SamuraiJack joined #perl6
18:17 berekuk joined #perl6
18:22 [Coke] preflex: seen supernovus?
18:22 preflex supernovus was last seen on #perl6 87 days, 21 hours, 2 minutes and 5 seconds ago, saying: night masak!
18:22 [Coke] I create a pull request: https://github.com/supernovus/perl6-http-status/pull/1 to kill one of the deprecation warnings in Star.
18:22 ssutch joined #perl6
18:22 sizz_ joined #perl6
18:25 [Coke] *created
18:28 kurahaupo joined #perl6
18:29 [Coke] Passing an object candidate to Mu.bless is deprecated  in method bless at gen/parrot/CORE.setting:809
18:29 [Coke] we should probably have our own core be deprecation free, aye?
18:29 [Coke] (from https://github.com/coke/rakudo-star-daily/blob/master/log/test-modules.log)
18:29 [Coke] moritz: you have a pull request also.
18:30 kurahaupo_ joined #perl6
18:33 kurahaupo__ joined #perl6
18:36 kurahaupo_ joined #perl6
18:37 kurahaupo joined #perl6
18:37 iSlug joined #perl6
18:38 nwc10 joined #perl6
18:38 felher joined #perl6
18:40 jferrero joined #perl6
18:40 lowpro30_ joined #perl6
18:49 xenoterracide joined #perl6
19:13 baest joined #perl6
19:20 berekuk joined #perl6
19:25 cognominal joined #perl6
19:27 stevan_ joined #perl6
19:28 moritz [Coke]: merged, thank you
19:34 * jnthn is home
19:36 nwc10 jnthn: yay! Drink beer to celebrate?
19:37 colomon \o/
19:37 Util joined #perl6
19:37 raiph joined #perl6
19:37 Psyche^ joined #perl6
19:37 eternaleye joined #perl6
19:38 salv0 joined #perl6
19:38 lestrrat joined #perl6
19:39 japhb_ (Giving 90 minute spontaneous talk on why Perl 6 is awesome)++  #  Highly recommended, very invigorating.  :-)
19:39 japhb_ (Well, talk is a bit strong: explaining nearby curious folk)
19:39 timotimo did you mention it's slow, though? :P
19:39 japhb_ *explaining to
19:41 jnthn nwc10: Probably soon, though I'm kinda ill-ish...
19:41 FROGGS :/
19:42 nwc10 :-(
19:42 sergot joined #perl6
19:43 [Sno] joined #perl6
19:43 PZt joined #perl6
19:46 moritz jnthn: get well-ish soon!
19:48 japhb_ joined #perl6
19:50 kivutar joined #perl6
19:52 jnthn *sigh* And a bunch of my Perl 6 tuits just got nabbed from next week.
19:53 lizmat we must put a stop to this!  :-)
19:53 jnthn Maybe it's time for another round of life refactors...
19:54 FROGGS ohh, that sounds serious
19:54 nwc10 work, the practical alternative to meetings?
19:59 jnthn To be fair, it's not really anybody's fault that two of the days I've lost from next week are to stand in at last minute for somebody who's got urgent non-work stuff they must do. But the rest is just over-zealous sales folks deliberately creating scheduling conflicts that will "resolve themselves". :/
20:00 moritz sounds like a sales folks refactor is in order :-)
20:00 SHODAN joined #perl6
20:00 nwc10 how should this work out - sales folk don't sell courses when the necessary trainer isn't available?
20:01 diakopter SALES SALES
20:01 nwc10 because if so, that sounds like a risk of "no sale", which, um, is no sale. Which, I guess, if you're a sales person is a "bad thing" and something you don't like
20:02 nwc10 particularly if your assessment or reward structure is based on how much you sell
20:03 moritz well, if the trainer does make himselv available nontheless, he rewards the sales folks for their behavior
20:03 jnthn nwc10: For most of the courses, more than one of us can do 'em. Also, they have some idea how many times something scheduled will actually happen (e.g. get bookings).
20:03 moritz and if not, it casts a bad light on the company
20:03 moritz not a good dilemma to be in
20:04 jnthn nwc10: Turns out the "some idea" was just rather inaccurate this couple of months
20:04 jnthn It's nice to be wanted, but it'd be nice to not have my Perl 6 involvement decimated by it too...
20:04 diakopter (esp if your compensation is not also upwardly adjusted)
20:05 jnthn Anyway, I'll hopefully have some time this weekend at least...
20:05 jnthn And will see if I can get at least one day next week to do stuff.
20:05 moritz speaking of course, I've initiated some internal discussion at $work that leads to us getting a 3 days "advanced javascript" course in January
20:06 jnthn :)
20:06 moritz (where "us" are the 3.25 developers of the company, plus another former developer and now head of department who is rumored to want to stop heading the department and program again)
20:09 moritz all of use know a bit JS and jquery, enough to do small UI improvements etc, but none of use know how to write good, reusable JS code that interacts with the DOM
20:09 moritz and how best to structure JS applications
20:10 moritz so I hope it's going to be a fairly interesting course, not the standard "here is how write an if-branch in js. Next you'll learn the while-loop"
20:11 FROGGS you'd need a masak or jnthn for that course
20:11 FROGGS otherwise I fear that it really is just about notepad, if and while
20:13 lowpro30_ joined #perl6
20:15 moritz well, we've got an offer that included topics like "structuring applications", "best pratices", "unit tests" etc.
20:15 moritz it seemed to written specifically in response to our demands, without just parroting the extra topics we asked for
20:15 moritz which makes me hopeful :-)
20:15 lue hello world o/
20:16 moritz I'll let you know how it works out :-)
20:18 FROGGS that would be great :o)
20:18 FROGGS I'd like to have such a session too
20:18 timotimo moritz: if the course mentions "if-schleifen", bail out immediately :)
20:19 FROGGS ohh dear /o\
20:19 FROGGS yeah, just say nothing and leave the room :P
20:22 timotimo in perl6, it should be able to retry an if, so that we can be the first language to feature actual "if-loops"
20:23 FROGGS nah, that doesn't count
20:24 FROGGS the everything would be loopy, because you an goto to it
20:24 dalek rakudo/nom: 51db3ff | (Elizabeth Mattijsen)++ | src/vm/jvm/core/Promise.pm:
20:24 dalek rakudo/nom: Promise.sleep -> Promise.in, as per new spec
20:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/51db3ff44b
20:26 jnthn in++
20:26 jnthn Nicer than sleep or alarm :)
20:28 dalek roast: 3bbc393 | (Elizabeth Mattijsen)++ | S17-concurrency/promise.t:
20:28 dalek roast: Promise.sleep -> Promise.in, as per new spec
20:28 dalek roast: review: https://github.com/perl6/roast/commit/3bbc393c1e
20:29 PZt joined #perl6
20:30 lizmat unfortunately, for use with English as a 2nd language, "in" could also be construed as "inside" a location
20:31 lizmat *us
20:31 lizmat or even by people for which English us supposed to be their mother tongue  :-)
20:32 lizmat *native
20:33 geekosaur us supposed?
20:33 geekosaur :p
20:34 lizmat jnthn: looking at the implementation of winner()
20:35 lizmat don't you fear that the first contestant might be favoured by just looping over @contestants?
20:35 [Coke] I prefer ".after" over ".in"
20:35 lizmat .oO( [Coke] may have a winner there )
20:35 [Coke] moritz++ thanks.
20:36 lizmat I propose to loop over @contestants.roll(*)
20:36 * [Coke] anticipates the eventual addition of .cron()
20:36 diakopter (when method names are treated as keywords (by not allowing any overloading with different types in the core..))
20:36 * [Coke] hides again.
20:37 lizmat [Coke] that's already there, called "every"
20:39 moritz sounds like 'in'/'after' and 'every' could be adverbs to the same scheduling method
20:40 * timotimo has seemingly found the right combination of predicates that prevents the compilation to explode
20:40 timotimo i'm such a good programmer! 10x material!
20:40 moritz next step: understand it :-)
20:41 timotimo well, in compile_wval, i check if the $*LEXREG was set for lexical or local variables
20:41 timotimo then i check to see that it's in fact a $P register, because otherwise we'd have to coerce
20:41 timotimo and then i limit it even further so that $want is set, which i'm not entirely sure what that entails
20:41 timotimo i mean to only do that when $want was passed
20:42 timotimo interestingly, my change doesn't seem to happen at all in rakudo, only in nqp. huh.
20:44 timotimo a lot of these replacements were in QAST.nqp or P6Regex, so maybe there's some performance win for rakudo after all
20:46 timotimo yup, i think stage parse got a tiny speed improvement
20:47 * timotimo hunts for more
20:50 timotimo i should build a quick script to time the rakudo parse stage with and without my changes multiple times and statistically evaluates it so that i don't have to do it manually
20:51 lizmat jnthn: actually, that would be .roll(*) of course
20:52 lizmat grrr...  .pick() *sigh*
20:54 lizmat r: 1.roll(*)
20:54 camelia rakudo-parrot 79bd6a, rakudo-jvm 79bd6a: OUTPUT«(timeout)»
20:55 lizmat actually, for jakudo it says: java.lang.StackOverflowError
20:55 lizmat parakudo just tries to eat all RAM, it seems
20:55 jnthn lizmat: Actually, I had it as deliberately picking the first possible one. That actually fits well with re-using the "when" keyword...
20:55 jnthn lizmat: Then tadzik++ updated it to have Go semantics (random pick)
20:56 jnthn What I was a bit slow to realize is that my channel examples actually depend on the ordering I had in the first place.
20:56 jnthn So the randomization actully creates a race condition.
20:56 tadzik oops
20:56 jnthn Which makes me rather wary about it.
20:56 lizmat why would the randomization create a race condition?
20:57 lizmat if anything, it would create noise
20:57 jnthn I don't know the exact syntax so lemme write what it was... :)
20:57 lizmat and noise is good in the multi world
20:57 jnthn loop { select( $channel => { say "read $_" }, $channel.finished => { last });
20:57 jnthn }
20:57 tadzik Go randomizes because randomization apparently colver more problems than it creates
20:57 tadzik I don't remember what exactly
20:57 lizmat yes, we need randomization
20:58 jnthn Now, we don't do it that way idiomatically thanks to the .list thing
20:58 jnthn BUT
20:58 lizmat that's one of the things I learned at former $work  :-)
20:58 jnthn Spot the race condition in what I wrote if you have random pick?
20:58 jnthn Oh, actually
20:58 jnthn No, it's not one, I think...
20:58 timotimo ah. my optimization produces an nqp that can't do anything. that's nice.
20:58 jnthn 'cus it only peeks...
20:59 lizmat I don't see it
20:59 jnthn Hmm...but that is one in itself.
20:59 lizmat anyway, it seems that List.pick and List.roll don't implement the Whatever sig, so I'll do that now  :-)
21:00 jnthn lizmat: If we pick the $channel read in there, and it does .poll, then we actually must go with that as we pulled a value out of the channel.
21:00 lizmat yes, we must
21:00 lizmat but my suggestion was to change the order in which to check
21:00 jnthn lizmat: If we implement it by peeking the channel, then somebody else can receive the thing, which is a race.
21:01 lizmat I'm not suggesting that
21:01 lizmat am I ?
21:01 jnthn There's probably a third way :)
21:01 jnthn lizmat: No, I'm just pointing out that there's a couple of subtle ways to mess up here :)
21:01 lizmat ah, yes, indeed
21:01 lizmat been there, done that, and probably not all of the possible ways just yet  :-)
21:03 lizmat my suggestion is to add .pick(*) to line 70 in asyncops
21:03 lizmat ah... hhmmm...
21:03 jnthn ;)
21:04 lizmat the code is already borked right now
21:07 timotimo can i push some pirop that doesn't change behavior, but can have some debug output in its source, so that i can see in the .pir file what my code was thinking at that exact place?
21:08 diakopter timotimo: I've done that with concat strings to some dummy var
21:08 jnthn timotimo: I think you might be able to use inline to emit a comment, even...
21:08 timotimo what do comments in pir look like?
21:08 diakopter ^ jnthn's suggestion is battar
21:08 moritz # like in p5
21:08 timotimo sounds good
21:09 timotimo can i just $ops.push("# this is my fancy, nondestructive comment")?
21:10 * timotimo just tries
21:10 jnthn um...probably :)
21:11 timotimo nope, not at all :)
21:11 timotimo unexpected object in pirt tree
21:11 * timotimo pretends its a pirop instead
21:13 nwc10 timotimo: can you use dumbbench as your harness to test the parser?
21:14 timotimo is that a perl5 thing?
21:14 jnthn timotimo: Try it with push_pirop
21:14 nwc10 yes, https://metacpan.org/release/Dumbbench
21:15 timotimo yes, that worked
21:15 timotimo nwc10: i don't know any perl5 at all
21:15 nwc10 timotimo: you don't need to. In that it installs a driver script dumbbench that can benchmark other command line applications
21:16 timotimo can it use the output of the commandline application as its timing data instead of the actual time it takes?
21:16 nwc10 no, I don't think so
21:16 nwc10 so, that might be a flaw in this plan
21:17 timotimo ah! the contextual was sticking around for too long, causing subsequent invocations of as_post(WVal) to overwrite an earlier register
21:17 timotimo now that's silly :)
21:25 dalek rakudo/nom: a75d7fa | (Elizabeth Mattijsen)++ | src/vm/jvm/core/asyncops.pm:
21:25 dalek rakudo/nom: Fix winner(), wrt loss of data from Channel
21:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a75d7fa79f
21:25 lizmat now onto fixing .pick(*) and .roll(*)
21:26 logie joined #perl6
21:26 FROGGS rp: my Mu $x := nqp::gethllsym('perl6', 'ModuleLoader').locate_candidates('Test', nqp::p6listitems(nqp::decont([@*INC]))); say nqp::islist($x); say nqp::ishash($x); say $x
21:26 camelia rakudo-parrot 79bd6a: OUTPUT«0␤0␤No such method 'gist' for invocant of type 'Hash'␤  in method gist at gen/parrot/CORE.setting:6766␤  in method gist at gen/parrot/CORE.setting:1014␤  in sub say at gen/parrot/CORE.setting:12901␤  in block  at /tmp/MLiLPyfyFb:1␤  in any …»
21:26 FROGGS how can be a Hash and ishash returns false?
21:27 FROGGS (should be a list with one element, a hash)
21:27 dalek nqp: e94d5f5 | (Timo Paulssen)++ | t/nqp/59-nqpop.t:
21:27 dalek nqp: qlist has replaced list recently.
21:27 dalek nqp: review: https://github.com/perl6/nqp/commit/e94d5f59ff
21:28 timotimo FROGGS: ishash probably returns 1 only for Hash.$!storage?
21:28 timotimo oh. hm.
21:29 timotimo wow. there's a whole bunch of test failures in the nqp test suite
21:29 timotimo when did that happen :(
21:29 FROGGS uhh
21:30 FROGGS what fails?
21:30 jnthn lizmat: oh, clever.
21:30 jnthn lizmat: That approach should do it.
21:30 timotimo a lot of regex failures
21:30 FROGGS :/
21:30 * timotimo bisects
21:30 timotimo it's probably my fault :P
21:31 FROGGS hehe, yeah, that was my guess too :o)
21:32 FROGGS jnthn: do you have I clue what I need to do about .locate_candidates ?
21:32 FROGGS rp: my Mu $x := nqp::gethllsym('perl6', 'ModuleLoader').locate_candidates('Test', nqp::p6listitems(nqp::decont([@*INC]))); say nqp::islist($x); say nqp::ishash($x); say 1 for $x
21:32 camelia rakudo-parrot 51db3f: OUTPUT«0␤0␤1␤»
21:33 FROGGS rp: my Mu $x := nqp::gethllsym('perl6', 'ModuleLoader').locate_candidates('Test', nqp::p6listitems(nqp::decont([@*INC]))); say nqp::islist($x); say nqp::ishash($x); say $x[0]
21:33 camelia rakudo-parrot 51db3f: OUTPUT«0␤0␤("key" => "/home/p6eval/rakudo-inst-2/lib/parrot/5.9.0-devel/languages/perl6/lib/Test.pm", "pm" => "/home/p6eval/rakudo-inst-2/lib/parrot/5.9.0-devel/languages/perl6/lib/Test.pm", "load" => "/home/p6eval/rakudo-inst-2/lib/parrot/5.9.0-devel/langu…»
21:33 jnthn FROGGS: Method call returns are automatically nqp::hllize'd
21:33 lue jnthn: about that import-style vs. setting-style thing yesterday, are there any examples you know of off-hand for import-style? I couldn't get anything I tried working yesterday.
21:33 jnthn FROGGS: You're probably running into that.
21:34 jnthn lue: Not that I know of, short of looking through how NQP module loading and import/export works
21:34 FROGGS rp: say nqp::gethllsym('perl6', 'ModuleLoader').locate_candidates('Test', nqp::p6listitems(nqp::decont([@*INC])));
21:34 camelia rakudo-parrot 51db3f: OUTPUT«No such method 'gist' for invocant of type 'Hash'␤  in method gist at gen/parrot/CORE.setting:6766␤  in method gist at gen/parrot/CORE.setting:1014␤  in sub say at gen/parrot/CORE.setting:12901␤  in block  at /tmp/liaWobFYM3:1␤  in any  at /tmp…»
21:34 FROGGS jnthn: so they are hllize'd, but not recursively, right?
21:34 jnthn FROGGS: Note it's in a method gist there
21:34 lue (it'd be worth just setting up setting-style, but import- would seem faster to do :P) I'll look into that though, jnthn.
21:34 jnthn So...yeah, you got it. It's about deeper structure.
21:35 FROGGS k, thanks
21:35 jnthn lue: It may be but otoh there's some infrastructure to help along the way with setting style too :)
21:35 lue :)
21:38 jnthn TimToady: on str, it's there because Str is actually a P6opaque, 'cus you need to be able to mix in to it. So we need some way of talking an actual unboxed thing. str is the type of the actual string storage in Str. There's a (not exposed) P6bigint type that is the type of Int's storage too. The str one is exposed 'cus it's useful to have in the setting.
21:39 jnthn TimToady: Thus, it's semantics are like Str, that is, on a comformant Perl 6 impl, supposing it existed, it would be NFG.
21:39 jnthn TimToady: "primitive" is a better word than "native" (and that's what 6model uses too, e.g. in ops like objprimspec)
21:40 jnthn TimToady: When I say "we need" I mean "in bootstrap / setting". We could call it Rakudo::str too. I'm just not sure how much we win by doing that.
21:42 * timotimo is convinced his commits are cause of the test failures
21:43 tgt joined #perl6
21:48 TimToady jnthn: thanks, hadn't thought of the mixin/repr issue
21:49 Pzter33 joined #perl6
21:49 * TimToady can see the need for a "final" internal NFG repr
21:50 * TimToady assumes the policy "you can mixin methods but not repr changes" applies here
21:53 timotimo the test failures seem to stem from trying to get the positionals of a match that didn't do any positional captures
21:53 timotimo though that should really have gotten the @EMPTY_LIST that's shared between all of the match objects
21:53 jnthn timotimo: Was gonna say, did you forget the empty list thing... :)
21:54 timotimo nqp::bindattr($match, NQPCapture, '@!array', nqp::ifnull($list, @EMPTY_LIST));  -  is this wrong?
21:54 jnthn timotimo: Yeah, 'cus $foo in NQP starts out as NQPMu
21:54 xenoterracide joined #perl6
21:54 timotimo oh! haha :)
21:54 jnthn Not null
21:54 timotimo is null testing faster than definedness testing?
21:55 jnthn Marginally
21:55 jnthn As in, not worth worrying about
21:55 jnthn nqp::isconcrete($x) is fast.
21:55 timotimo this is really hot code, though ;)
21:55 timotimo should i use isconcrete instead then?
21:55 jnthn Yes, but we're probably arguing over one or two CPU instructions here :P
21:55 timotimo or just boolify the $list?
21:55 jnthn In fact on Parrot it's checking against PMCNULL
21:56 jnthn boolify is costlier :)
21:56 jnthn isconcrete *might* we faster on Parrot. isnull will be faster on JVM. So basically you can't win :P
21:57 tadzik what will be faster on moar? :)
21:57 timotimo hehe
21:58 jnthn tadzik: Once we fix null to not explode, probably break even or maybe isconcrete wins.
21:59 lizmat jnthn: I'm thinking of eradicating Promise.has_result
21:59 lizmat I see no point in it really, when you have .Bool
21:59 jnthn hah, I read that as extraditing :P
21:59 jnthn lizmat: I won't miss it terribly
21:59 lizmat if $promise { } seems to make sense to me
21:59 lizmat I'll take that as an ok then  :-)
22:00 jnthn has_result is just way older
22:00 jnthn Boolification doing that was a recent thing
22:00 timotimo there we go.
22:00 dalek nqp: 3a4bb90 | (Timo Paulssen)++ | src/QRegex/Cursor.nqp:
22:00 dalek nqp: fix EMPTY_LIST sharing for method MATCH.
22:00 dalek nqp: review: https://github.com/perl6/nqp/commit/3a4bb90585
22:01 jnthn timotimo: Did you not run the tests before pushing the original? ;-)
22:02 timotimo no :(
22:02 timotimo i've learned from that mistake, though
22:03 timotimo i do run the rakudo spectest suite quite often, though ;)
22:03 dalek specs: 39ac0ca | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
22:03 dalek specs: Eradicate Promise.has_result in favor of .Bool
22:03 dalek specs: review: https://github.com/perl6/specs/commit/39ac0cab60
22:17 dalek roast: 249d9ba | (Elizabeth Mattijsen)++ | S17-concurrency/promise.t:
22:17 dalek roast: Promise.has_result -> Promise.bool as per new spec
22:17 dalek roast: review: https://github.com/perl6/roast/commit/249d9baeed
22:19 timotimo jnthn: fwiw, the $!from/$!to branch in MATCH is not taken a single time during the whole compilation of nqp :P
22:21 jnthn timotimo: It's there to support <( and )>
22:21 timotimo i thought as much, yeah
22:25 berekuk joined #perl6
22:29 dalek nqp: 47a8311 | (Timo Paulssen)++ | t/nqp/59-nqpop.t:
22:29 dalek nqp: correct the plan for 59-nqpop.
22:29 dalek nqp: review: https://github.com/perl6/nqp/commit/47a83115c0
22:32 salv0 joined #perl6
22:35 dalek rakudo/nom: 5a4b72b | (Elizabeth Mattijsen)++ | src/vm/jvm/core/Promise.pm:
22:35 dalek rakudo/nom: Eradicate Promise.has_result, as per new spec
22:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5a4b72b308
22:42 timotimo nqp::defined($want) eq 'p', yeah, right. that'll totally work m)
22:42 bloonix joined #perl6
22:46 jnthn timotimo: That's a long spelling of false :P
22:48 dalek rakudo/nom: 8a00898 | (Elizabeth Mattijsen)++ | src/vm/jvm/core/asyncops.pm:
22:48 dalek rakudo/nom: Oops, forgot one Promise.has_result
22:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8a00898cce
22:52 M_o_C joined #perl6
22:52 FROGGS rp: my $x = { $^a == 42 }; say 42 ~~ $x
22:52 camelia rakudo-parrot a75d7f: OUTPUT«True␤»
22:52 timotimo jnthn: can you estimate the performance impact of wasting P registers?
22:53 timotimo what about I registers?
22:53 jnthn timotimo: P is worse potentially as you might make things live longer
22:53 timotimo mhm
22:54 timotimo but do you think there's execution speed gains to be had from removing lots and lots of redundant set operations?
22:54 stevan_ joined #perl6
22:54 salv0 joined #perl6
22:55 FROGGS TimToady++ # I just recognized that I just have to smartmatch against whatever is supplied in a :from or :auth
22:55 FROGGS doesn't matter if it is a block, a regex, a literal or a range
22:55 FROGGS it just works :o)
22:55 lizmat indeed... that was the plan  :-)
22:57 jnthn timotimo: set is pretty cheap. Biggest overhad is the op dispatch...
22:57 timotimo mhm
22:58 jnthn lizmat, FROGGS: Are you still pondering removing the "use" from the start of CORE.setting?
22:58 * jnthn doesn't quite know what to replace it with, 'cus until we pull in those types we can do, uh, nothing...
22:58 FROGGS jnthn: I don't consider it
22:59 lizmat I'm pondering, not sure what FROGGS ideas are
22:59 jnthn lizmat: My gut feeling is "leave it, just install a very simple stub 'use' implementation that CORE.setting replaces with the Real Thing once it's defined" or so
22:59 FROGGS jnthn: I am able to replace the ModuleLoader with an 'enhanced' one already (only a one-line patch needed)
23:00 FROGGS so, we can have "the real one" in userland, and the cheap one in the setting
23:00 timotimo "implementorture". a good word?
23:00 lizmat that would be fine with me too.  At the time, I just didn't see how (and only vaguely know how to possibly do this now)
23:01 lizmat implementorturatation
23:03 Rotwang joined #perl6
23:04 BenGoldberg joined #perl6
23:04 diakopter implorture
23:07 lizmat .oO( implementorturatation, because making the settings takes sooo long )
23:14 salv0 joined #perl6
23:14 jnthn FROGGS: The "cheap" one can probably get cheaper too
23:15 jnthn FROGGS: Also, glad it was easy to substitute another one in.
23:15 jnthn FROGGS: Most bits of Rakudo can be shoved out of the way on demand... :)
23:15 FROGGS jnthn: well, there is one issue
23:15 FROGGS jnthn: you must like that patch :P  https://gist.github.com/FROGGS/1938e9ecf4c5b82b5437
23:16 jnthn omfg where's the slivovica...
23:16 jnthn ...actually, the patch ain't that bad :)
23:16 jnthn I can see what it's doing. :)
23:17 FROGGS hehe, yeah, no doubt :o)
23:25 jnthn I dunno if we need a nicer API for that or something.
23:25 jnthn Anyway, I won't be too upset if that patch goes in for now.
23:26 FROGGS cool
23:27 lizmat joined #perl6
23:34 woolfy joined #perl6
23:34 dalek nqp: fd308ad | (Timo Paulssen)++ | src/vm/jvm/runtime/org/perl6/nqp/io/AsyncFileHandle.java:
23:34 dalek nqp: remove accidentally committed debug output
23:34 dalek nqp: review: https://github.com/perl6/nqp/commit/fd308ada33
23:35 dalek nqp/lexreg_opt: 59fdf98 | (Timo Paulssen)++ | src/vm/parrot/QAST/Compiler.nqp:
23:35 dalek nqp/lexreg_opt: save some redundant set operations
23:35 dalek nqp/lexreg_opt: review: https://github.com/perl6/nqp/commit/59fdf985a5
23:45 pernatiy joined #perl6
23:47 FROGGS it locates now the right file for e.g. `use Foo::Bar:ver(v1.0.2..*)` from MANIFEST files containing json...
23:47 FROGGS https://github.com/FROGGS/p6-S11Versioning/blob/master/t/02-manifest.t
23:47 jnthn ooh :)
23:49 FROGGS so, if the dists had better META.info files, and if panda would merge them into library collections, then it would already work... well almost :o)
23:50 FROGGS spectesting my one-line-patch now, just to be sure
23:50 lizmat FROGGS: remember there is an .install method in CompUnitRepo
23:51 lizmat panda should just call .install
23:51 FROGGS yes, I need to dive in deeper into the installation part
23:53 lizmat would it be an idea to have you do the basic functionality and me work out the adherence to the API as described in the spec ?
23:53 * jnthn -> sleep, hopefully :)
23:53 FROGGS gnight jnthn
23:54 lizmat gnight jnthn
23:54 FROGGS lizmat: well, I'd at least skim through the spe again before attacking more :o)
23:54 lizmat ok.  just let me know if I can help here...
23:55 FROGGS sure, I'll keep you updated and will ask
23:56 FROGGS but good that I can ship my own ModuleLoader, I would go mad if I had to recompiler rakudo all the time
23:57 lizmat FWIW, my work on this so far, from last May: https://gist.github.com/lizmat/7493850

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

Perl 6 | Reference Documentation | Rakudo