»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
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:00
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:05
TimToady well, *can* I put a null in it? is it UTF-8? is it even byte based? 00:07
what operations make sense on it? 00:08
if I get one from this VM, can I pass it to that VM?
diakopter TimToady: it's bit-addressed :) 00:09
TimToady if it's a blob, why don't we call it a blob?
should the name be moar::str or jvm::str or parrot::str or nqp::str?
can I get the length of it? 00:10
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
TimToady and what does "platform" mean? $*VM, $*OS, $*ARCH, $*DISTRO?
TimToady just hates on accidental genericity whenever he sees it these days... 00:12
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:13
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 :)
japhb I only care that it can do concatenation, substr, ord_at, etc.
TimToady the semantics of offsets may vary from platform to platform as well 00:16
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"?
japhb lue, because the interface is not the same.
TimToady if you do ord_at, are you getting the byte at that position, or codepoint at that position? 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
a blob does.
lue japhb: low-level C-style strings are a totally different beast from high-level Strs anyway
japhb lue, I know.
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
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:20
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 :)
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:22
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
japhb
.oO( It supports Subtract-and-Branch-if-Negative! )
TimToady NFG is naturally a kind of Blob[Int] or so 00:24
japhb That's how it acts, not what it is. ;-)
TimToady how do you know that's not what it is?
TimToady feels feisty today :)
japhb *necessarily
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:25
since NFG is a constant-width encoding, that maps quite nicely onto any kind of array of integers 00:26
and we unify subblob and substr at that level
(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"
TimToady ((assuming they're not global))
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.
r: say Q:PIR{}
camelia rakudo-jvm 9f0609: OUTPUT«===SORRY!===␤No such method 'jast' for invocant of type 'NQPMu'␤»
..rakudo-parrot 9f0609: OUTPUT«␤»
japhb TimToady, it's not leaking into Perl 6 -- it's leaking into Rakudo. :-) 00:29
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
they'll just call it something else
lue TimToady: I didn't make that wish on the basis of probability :)
(the actual point of the request is to free up past 0x10_FFFF from needless historical specification restriction) 00:31
.oO(our new standard, UTF-16-use-this-one-instead)
00:33
geekosaur uaf16, uxf16, uuf16, ??? 00:34
lue or utf+16 perhaps 00:35
BenGoldberg utf16++, perhaps? 00:37
tadzik wtf8
BenGoldberg . o O ( utf17 )
TimToady utf15 maybe
lue
.oO(If only we were able to use a more pragmatic name, in the vein of utf8 and utf32...)
00:39
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:41
Unicode just was driving too fast as a teenager, got into an accident, and has some permanent scars as a result 00:43
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.
BenGoldberg rn: my @a := gather { .take for 1..5; say 'oww' }; map { .say; last }, @a 00:45
camelia ( no output )
..rakudo-parrot 9f0609, rakudo-jvm 9f0609: OUTPUT«oww␤1␤»
TimToady lue: well, Perl 5 can go past 10ffff as long as you stick to "utf8"
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
p5eval TimToady: 100000001
TimToady *works
ooh a bug!
oh, no
lue r: say "\x[110000]"
TimToady that's just the 1 at the end
camelia rakudo-jvm 9f0609: OUTPUT«===SORRY!===␤Invalid code-point U+110000␤»
..rakudo-parrot 9f0609: OUTPUT«===SORRY!===␤Invalid character for UTF-8 encoding␤␤»
lue parrot is plainly incorrect there :P 00:47
TimToady p5eval: ord "\x{fffffff}"; 00:48
p5eval TimToady: 268435455
BenGoldberg nP: say "\x[110000]"
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/…»
BenGoldberg ?
TimToady n: say "\x10ffff".chars 00:51
camelia niecza v24-98-g473bd20: OUTPUT«2␤»
TimToady UTF-16 branedamage
hence no \x110000
we should probably translate incoming streams into NFG in a separate thread 00:53
ala the old IBM I/O "channels"
BenGoldberg p5eval: [map ord(chr(2**32+$_))-2**32, -3..+3 ] 00:55
p5eval BenGoldberg: [-3,-2,-1,-1,-1,-1,-1]
TimToady *à la
well, pardon my french... 01:12
hummeleB1 à la prochaine 01:28
dalek -pb: e5a32d3 | (Geoffrey Broadwell)++ | lib/Metamodel/Perlable.pm:
Add Metamodel::Perlable{Attribute,Class,ClassHOW}

Add roles and a class allowing runtime creation of classes that know how to serialize their own definitions back to Perl 6 source code.
For now only handles the class/is/does and attribute declarations, but is smart enough to serialize either a class type object or a defined object instantiated in that class. A defined object's serialized form gets default assignments for each of its attributes that match the actual current values in the object.
The roles attempt to do the right thing when handed unusual attributes, correctly handling even BOOTSTRAPATTRs, and providing a hook for serializing non-standard attribute traits.
02:03
-pb: c588de0 | (Geoffrey Broadwell)++ | t/perlable.t:
Add tests for Metamodel::Perlable*

Skips one test on rakudo-jvm to work around a known NPE bug.
lue TimToady: request for plural aliases for DateTime.new() arguments. I just got bit by that :/ 05:47
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…»
..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…»
..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) …»
lue ? 05:49
TimToady that would make more sense if you were talking about durations, not where the minute hand and second hand were 06:11
we could also use a way to warn on unused arguments (possibly with a "did you mean?) 06:15
lue TimToady: unless there was a *%, I'd like to be warned of unused adverbs. 06:26
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:28
dalek kudo-star-daily: 148338c | coke++ | log/ (5 files):
today (automated commit)
06:32
rl6-roast-data: 8439467 | coke++ | / (5 files):
today (automated commit)
[Coke] r: class JSON::Tiny::Actions 07:13
camelia rakudo-jvm 9f0609: OUTPUT«===SORRY!=== Error while compiling /tmp/qezjjXiJDi␤Unable to parse class definition␤at /tmp/qezjjXiJDi:1␤------> class JSON::Tiny::Actions⏏<EOL>␤ expecting any of:␤ statement list␤ prefix o…»
..rakudo-parrot 9f0609: OUTPUT«===SORRY!=== Error while compiling /tmp/Rmh32js3I8␤Unable to parse class definition␤at /tmp/Rmh32js3I8:1␤------> class JSON::Tiny::Actions⏏<EOL>␤ expecting any of:␤ statement list␤ prefi…»
[Coke] r: std JSON::Tiny::Actions
camelia rakudo-jvm 9f0609: OUTPUT«===SORRY!=== Error while compiling /tmp/DMzjxbwatP␤Undeclared routine:␤ std used at line 1␤␤»
..rakudo-parrot 9f0609: OUTPUT«===SORRY!=== Error while compiling /tmp/O413sBb65g␤Undeclared routine:␤ std used at line 1␤␤»
[Coke] std: JSON::Tiny::Actions
camelia std b469b42: OUTPUT«===SORRY!===␤Undeclared name:␤ 'JSON::Tiny::Actions' used at line 1␤Check failed␤FAILED 00:00 120m␤»
[Coke] std: class JSON::Tiny::Actions 07:14
camelia std b469b42: OUTPUT«===SORRY!===␤Unable to parse class definition at /tmp/ZK9nN7HKi4 line 1 (EOF):␤------> class JSON::Tiny::Actions⏏<EOL>␤Parse failed␤FAILED 00:00 120m␤»
dalek kudo/nom: 9e1d69b | (Elizabeth Mattijsen)++ | src/vm/jvm/core/Thread.pm:
Thread.join -> Thread.finish, as per spec
09:49
lizmat good *, #perl6! 09:51
hoelzro ahoy lizmat!
lizmat it seems ce1def97a34e87b214455096b190afade953ddd7 broke jakudo 09:52
src/Perl6/Optimizer.nqp
Method 'jast' not found for invocant of class 'NQPMu'
hmmm... guess I missed a NQP version update ?
and ahoy hoelzro ! 09:55
timotimo oh that is very possible
i also broke native str on jakudo when not giving an argument 09:56
or at least i did not implement it fully
previously it would have died differently
i may have to carefully bump nqp revision today
lizmat I'm thinking of reverting ce1def97a34e87b214455096b190afade953ddd7 so I can go on today 10:00
moritz_ lizmat: do it if it helps you work on rakudo 10:03
the patch can be re-applied together with a fix later 10:04
lizmat reverted locally, testing now
moritz_ ist still in bed, with a nasty flu 10:07
lizmat Gute Besserung!
moritz_ danke
dalek kudo/nom: 82269bd | (Elizabeth Mattijsen)++ | src/Perl6/Optimizer.nqp:
Revert "in sink context, ++foo is faster than foo++ by 10%"

We need an NQP revision update for this to work
10:16
FROGGS lizmat: btw, I am thinking about actually implementing S11 from now 10:28
lizmat FROGGS: so am I, but please don't let me stop you 10:36
I wish TimToady would chime in on S11, but he hasn't :-(
FROGGS lizmat: k, just wanted to let you know...
lizmat FROGGS: I'll let you know when I'm really beginning, and you'll let me know if you are? 10:37
FROGGS lizmat: well, I am going to make sketches today, and hope to start this weekend 10:38
:o)
lizmat ok!
fwiw, I was thinking that most of it should be implemented in Perl 6
if not all
FROGGS that sounds about right 10:39
lizmat the only problem I see is the "use Perl6::BOOTSTRAP" at the start of settings
I think that should be something else, possibly nqp
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
there is only 1 -use- statement in the core settings
and having that in the core settings, and as the first statement, implies it needs to exist *before* we start creating the setting 10:41
dalek ast: 21fb457 | (Elizabeth Mattijsen)++ | S17-concurrency/ (3 files):
Thread.join -> Thread.finish, as per new spec
10:43
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:46
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
FROGGS so, Perl6::BOOTSTRAP would always be search in the former paths, and would never appear as a proper module 10:47
lizmat seems too magical to me 10:48
and bound to cause confusion later on
and an attack vector
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
aka, remove the "use Perl6::BOOTSTRAP" from src/core/core_prologue
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
dalek kudo/nom: 7027cd9 | (Elizabeth Mattijsen)++ | src/vm/jvm/core/Channel.pm:
Implement Channel.list, as per new spec
10:53
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:41
it surprises me that the commit to the optimizer causes the jvm problem with NQPMu 11:45
lizmat timotimo: I've considered doing a map, but what would the map be iterating over ? 12:17
moritz 0 xx * 12:19
timotimo that was my thought as well 12:24
unless that, itself, is implemented with gather/take :P
i'd go with 0..* instead, i think
because i know rangeiter is fast
well, faster than using gather/take in any case (on the jvm) 12:25
lizmat agree
but it feels like a hack
timotimo all is fair in love and core.
lizmat feels like we need a listless map
map { };
implementing / testing suggestions 12:28
timotimo gotta commute to get at my code :| 12:44
poor day planning ftl
moritz can't we rewrite gather/take in terms of map? 12:49
colomon smoker rakudo build failed overnight. 12:50
lizmat colomon: timotimo's commit maybe ? 12:53
colomon dunno, I've pulled the latest and am trying to rebuild by hand
lizmat when I git pulled this morning, both builds failed
colomon that's probably it, then 12:54
lizmat I've reverted timotimo's commit 12:55
it should build now
FROGGS moritz: would it be lazy then?
lizmat has the sudden realization that winner() is currently implemented differently from spec :-( 13:11
dalek kudo/nom: 79bd6ad | (Elizabeth Mattijsen)++ | src/vm/jvm/core/Channel.pm:
Implement Channel.list as a "listless" map
13:41
diakopter lol; listless 13:42
dalek ast: 893e0df | (Elizabeth Mattijsen)++ | S17-concurrency/channel.t:
Add tests for Channel.list and @(Channel)
13:43
lizmat cycling&
[Coke] yawns. 14:22
FROGGS that is nice: 14:57
rp: BEGIN { class Perl6::ModuleLoader { method absolute_path($path) { say "hello $path" } }; nqp::bindhllsym('perl6', 'ModuleLoader', Perl6::ModuleLoader); }; use Foo
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…»
FROGGS this way you can implement your own module loader without touching rakudo
FROGGS damn, it is not that easy as it seems 15:01
it still calls into the old loader, from src/Perl6/World.nqp:331: method load_module 15:02
FROGGS I wonder why I can't use nqp::getcurhllsym('ModuleLoader') there 15:07
FROGGS tries nqp::usecompileehllconfig(); 15:10
FROGGS :o( 15:12
FROGGS cool, that does the trick: 15:21
- my $module := Perl6::ModuleLoader.load_module($module_name, %opts,
+ my $module := nqp::gethllsym('perl6', 'ModuleLoader').load_module($module_name, %opts,
atroxaper Happy friday #perl6 ! 15:22
FROGGS hi atroxaper!
atroxaper hi FROGGS!
colomon \o 15:24
FROGGS o/ 15:24
atroxaper o/ 15:30
dalek -pb: 9ae0b90 | (Geoffrey Broadwell)++ | t/official.t:
Switch from File::Spec to IO::Spec

Stop depending on external File::Spec, since IO::Spec is in the setting.
16:26
-pb: 80b165c | (Geoffrey Broadwell)++ | lib/PB/Actions.pm:
Fix octal 0 bug in PB::Actions
-pb: 992d5af | (Geoffrey Broadwell)++ | lib/PB/Message.pm:
Add a stub PB::Message to prepare for generation

Generated message classes will need a common superclass, so stub out a PB::Message for this purpose.
-pb: 491bbb9 | (Geoffrey Broadwell)++ | lib/PB/Model/Generator.pm:
WIP: Message class generation using Perlable*

Start generating message classes in PB::Model::Generator using the new Metamodel::Perlable* framework. Incomplete and will need some refactoring, but should be enough to start work on writing complete messages in PB::Binary::Writer. Some debug code still included for now.
TimToady japhb++ 16:27
japhb_ :-)
TimToady loves to see bridges being built to other cultures 16:29
japhb_ Ditto. So I figure, why not build one myself? :-) 16:30
FROGGS what is meant by other cultures btw? 16:31
TimToady well, protocol buffers are a google thing, in this case 16:32
FROGGS ahh 16:33
TimToady assumes that's what the "pb" stands for
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
then there was XML, and windows
and lots of other "cultures" 16:36
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:37
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
*they
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
FROGGS humm, `use lib` is not specced... 16:41
and I dont agree with the implementation...
TimToady you have to say what you disagree with :) 16:42
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:43
how do I get the path of myself if I'd be a script? 16:44
moritz something like $*PROGRAM_NAME.path.dir or so 16:57
FROGGS lizmat: if you are interested: github.com/FROGGS/p6-S11Versioning...it/771e10e (needs a rakudo path though, which is included in a pod block) 16:58
rp: say $*PROGRAM_NAME.path.dir
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…»
FROGGS rp: say $*PROGRAM_NAME.path.directory
camelia rakudo-parrot 79bd6a: OUTPUT«/tmp␤»
FROGGS \o/
moritz++
jnthn: I had to patch P6::W to wrap the ModuleLoader with my own... how bad it that patch? gist.github.com/FROGGS/1938e9ecf4c5b82b5437 17:00
s/it/is/ 17:01
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:06
FROGGS lizmat: btw, the rest of that repo is old, just the three added files are relevant 17:08
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:10
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
thanks to that it works with all the custom ++-s too
(good morning #perl6)
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:23
TimToady well, unless we go with a crypto as part of the identity, as github does 17:24
s/github/git/
dalek kudo-star-daily: 18ec1e7 | coke++ | log/ (5 files):
today (automated commit)
17:33
[Coke] is mildly annoyed at the diffs showing all the timings there.
FROGGS TimToady: wrt S11: you are talking about the unit-name discussion? 17:39
TimToady yup 17:40
FROGGS so a `unit Foo:auth<Bar>` statement is not a way to go? 17:42
(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
TimToady since I am required to go see Thor :) 17:44
FROGGS *g*
TimToady maybe doing so will revise my opinion of some of the heavy hammers in Perl 6 :)
FROGGS no hurry :o)
hehe
dalek ecs: bfb393d | util++ | S (7 files):
Fix typos in S02, S03, S21, S26, S29, S99, and S32/Exception.
18:07
FROGGS I love it:
$ perl6-p -Ilib -e 'use MyModuleLoader; use NoSuchModule:auth({ .substr(0,5) eq "cpan:"}):ver(v1.2.1..*);'
%opts.say: ("auth" => Block.new(), "ver" => Version.new('1.2.1')..Inf).hash
perl6 is sooo awesome!
[Coke] TimToady: looking forward to hobbit: DOS? 18:11
[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!
[Coke] I create a pull request: github.com/supernovus/perl6-http-status/pull/1 to kill one of the deprecation warnings in Star.
[Coke] *created 18:25
[Coke] Passing an object candidate to Mu.bless is deprecated in method bless at gen/parrot/CORE.setting:809 18:29
we should probably have our own core be deprecation free, aye?
(from github.com/coke/rakudo-star-daily/...dules.log)
moritz: you have a pull request also. 18:30
moritz [Coke]: merged, thank you 19:28
jnthn is home 19:34
nwc10 jnthn: yay! Drink beer to celebrate? 19:36
colomon \o/ 19:37
japhb_ (Giving 90 minute spontaneous talk on why Perl 6 is awesome)++ # Highly recommended, very invigorating. :-) 19:39
(Well, talk is a bit strong: explaining nearby curious folk)
timotimo did you mention it's slow, though? :P
japhb_ *explaining to
jnthn nwc10: Probably soon, though I'm kinda ill-ish... 19:41
FROGGS :/
nwc10 :-( 19:42
moritz jnthn: get well-ish soon! 19:46
jnthn *sigh* And a bunch of my Perl 6 tuits just got nabbed from next week. 19:52
lizmat we must put a stop to this! :-) 19:53
jnthn Maybe it's time for another round of life refactors...
FROGGS ohh, that sounds serious 19:54
nwc10 work, the practical alternative to meetings?
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". :/ 19:59
moritz sounds like a sales folks refactor is in order :-) 20:00
nwc10 how should this work out - sales folk don't sell courses when the necessary trainer isn't available? 20:00
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:01
particularly if your assessment or reward structure is based on how much you sell 20:02
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).
moritz and if not, it casts a bad light on the company
not a good dilemma to be in
jnthn nwc10: Turns out the "some idea" was just rather inaccurate this couple of months 20:04
It's nice to be wanted, but it'd be nice to not have my Perl 6 involvement decimated by it too...
diakopter (esp if your compensation is not also upwardly adjusted)
jnthn Anyway, I'll hopefully have some time this weekend at least... 20:05
And will see if I can get at least one day next week to do stuff.
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
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)
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
and how best to structure JS applications
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:10
FROGGS you'd need a masak or jnthn for that course 20:11
otherwise I fear that it really is just about notepad, if and while
moritz well, we've got an offer that included topics like "structuring applications", "best pratices", "unit tests" etc. 20:15
it seemed to written specifically in response to our demands, without just parroting the extra topics we asked for
which makes me hopeful :-)
lue hello world o/ 20:16
moritz I'll let you know how it works out :-)
FROGGS that would be great :o) 20:18
I'd like to have such a session too
timotimo moritz: if the course mentions "if-schleifen", bail out immediately :)
FROGGS ohh dear /o\ 20:19
yeah, just say nothing and leave the room :P
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:22
FROGGS nah, that doesn't count 20:23
the everything would be loopy, because you an goto to it 20:24
dalek kudo/nom: 51db3ff | (Elizabeth Mattijsen)++ | src/vm/jvm/core/Promise.pm:
Promise.sleep -> Promise.in, as per new spec
jnthn in++ 20:26
Nicer than sleep or alarm :)
dalek ast: 3bbc393 | (Elizabeth Mattijsen)++ | S17-concurrency/promise.t:
Promise.sleep -> Promise.in, as per new spec
20:28
lizmat unfortunately, for use with English as a 2nd language, "in" could also be construed as "inside" a location 20:31
*us
or even by people for which English us supposed to be their mother tongue :-)
*native 20:32
geekosaur us supposed? 20:33
:p
lizmat jnthn: looking at the implementation of winner() 20:34
don't you fear that the first contestant might be favoured by just looping over @contestants? 20:35
[Coke] I prefer ".after" over ".in"
lizmat
.oO( [Coke] may have a winner there )
[Coke] moritz++ thanks. 20:36
lizmat I propose to loop over @contestants.roll(*)
[Coke] anticipates the eventual addition of .cron()
diakopter (when method names are treated as keywords (by not allowing any overloading with different types in the core..))
[Coke] hides again.
lizmat [Coke] that's already there, called "every" 20:37
moritz sounds like 'in'/'after' and 'every' could be adverbs to the same scheduling method 20:39
timotimo has seemingly found the right combination of predicates that prevents the compilation to explode 20:40
i'm such a good programmer! 10x material!
moritz next step: understand it :-)
timotimo well, in compile_wval, i check if the $*LEXREG was set for lexical or local variables 20:41
then i check to see that it's in fact a $P register, because otherwise we'd have to coerce
and then i limit it even further so that $want is set, which i'm not entirely sure what that entails
i mean to only do that when $want was passed
interestingly, my change doesn't seem to happen at all in rakudo, only in nqp. huh. 20:42
a lot of these replacements were in QAST.nqp or P6Regex, so maybe there's some performance win for rakudo after all 20:44
yup, i think stage parse got a tiny speed improvement 20:46
timotimo hunts for more 20:47
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:50
lizmat jnthn: actually, that would be .roll(*) of course 20:51
grrr... .pick() *sigh* 20:52
r: 1.roll(*) 20:54
camelia rakudo-parrot 79bd6a, rakudo-jvm 79bd6a: OUTPUT«(timeout)»
lizmat actually, for jakudo it says: java.lang.StackOverflowError 20:55
parakudo just tries to eat all RAM, it seems
jnthn lizmat: Actually, I had it as deliberately picking the first possible one. That actually fits well with re-using the "when" keyword...
lizmat: Then tadzik++ updated it to have Go semantics (random pick)
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
So the randomization actully creates a race condition.
tadzik oops
jnthn Which makes me rather wary about it.
lizmat why would the randomization create a race condition?
if anything, it would create noise 20:57
jnthn I don't know the exact syntax so lemme write what it was... :)
lizmat and noise is good in the multi world
jnthn loop { select( $channel => { say "read $_" }, $channel.finished => { last });
}
tadzik Go randomizes because randomization apparently colver more problems than it creates
I don't remember what exactly
lizmat yes, we need randomization
jnthn Now, we don't do it that way idiomatically thanks to the .list thing 20:58
BUT
lizmat that's one of the things I learned at former $work :-)
jnthn Spot the race condition in what I wrote if you have random pick?
Oh, actually
No, it's not one, I think...
timotimo ah. my optimization produces an nqp that can't do anything. that's nice.
jnthn 'cus it only peeks...
lizmat I don't see it 20:59
jnthn Hmm...but that is one in itself.
lizmat anyway, it seems that List.pick and List.roll don't implement the Whatever sig, so I'll do that now :-)
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
but my suggestion was to change the order in which to check
jnthn lizmat: If we implement it by peeking the channel, then somebody else can receive the thing, which is a race.
lizmat I'm not suggesting that 21:01
am I ?
jnthn There's probably a third way :)
lizmat: No, I'm just pointing out that there's a couple of subtle ways to mess up here :)
lizmat ah, yes, indeed
been there, done that, and probably not all of the possible ways just yet :-)
my suggestion is to add .pick(*) to line 70 in asyncops 21:03
ah... hhmmm...
jnthn ;)
lizmat the code is already borked right now 21:04
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:07
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...
timotimo what do comments in pir look like?
diakopter ^ jnthn's suggestion is battar
moritz # like in p5
timotimo sounds good
can i just $ops.push("# this is my fancy, nondestructive comment")? 21:09
timotimo just tries 21:10
jnthn um...probably :)
timotimo nope, not at all :) 21:11
unexpected object in pirt tree
timotimo pretends its a pirop instead
nwc10 timotimo: can you use dumbbench as your harness to test the parser? 21:13
timotimo is that a perl5 thing? 21:14
jnthn timotimo: Try it with push_pirop
nwc10 yes, metacpan.org/release/Dumbbench
timotimo yes, that worked 21:15
nwc10: i don't know any perl5 at all
nwc10 timotimo: you don't need to. In that it installs a driver script dumbbench that can benchmark other command line applications
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
so, that might be a flaw in this plan
timotimo ah! the contextual was sticking around for too long, causing subsequent invocations of as_post(WVal) to overwrite an earlier register 21:17
now that's silly :)
dalek kudo/nom: a75d7fa | (Elizabeth Mattijsen)++ | src/vm/jvm/core/asyncops.pm:
Fix winner(), wrt loss of data from Channel
21:25
lizmat now onto fixing .pick(*) and .roll(*)
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 …»
FROGGS how can be a Hash and ishash returns false?
(should be a list with one element, a hash) 21:27
dalek p: e94d5f5 | (Timo Paulssen)++ | t/nqp/59-nqpop.t:
qlist has replaced list recently.
timotimo FROGGS: ishash probably returns 1 only for Hash.$!storage? 21:28
oh. hm.
wow. there's a whole bunch of test failures in the nqp test suite 21:29
when did that happen :(
FROGGS uhh
what fails? 21:30
jnthn lizmat: oh, clever.
lizmat: That approach should do it.
timotimo a lot of regex failures
FROGGS :/
timotimo bisects
it's probably my fault :P
FROGGS hehe, yeah, that was my guess too :o) 21:31
FROGGS jnthn: do you have I clue what I need to do about .locate_candidates ? 21:32
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
camelia rakudo-parrot 51db3f: OUTPUT«0␤0␤1␤»
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…»
jnthn FROGGS: Method call returns are automatically nqp::hllize'd
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.
jnthn FROGGS: You're probably running into that.
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])));
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…»
FROGGS jnthn: so they are hllize'd, but not recursively, right?
jnthn FROGGS: Note it's in a method gist there
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.
jnthn So...yeah, you got it. It's about deeper structure.
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 :)
lue :)
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:38
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
TimToady: "primitive" is a better word than "native" (and that's what 6model uses too, e.g. in ops like objprimspec)
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:40
timotimo is convinced his commits are cause of the test failures 21:42
TimToady jnthn: thanks, hadn't thought of the mixin/repr issue 21:48
TimToady can see the need for a "final" internal NFG repr 21:49
TimToady assumes the policy "you can mixin methods but not repr changes" applies here 21:50
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
though that should really have gotten the @EMPTY_LIST that's shared between all of the match objects
jnthn timotimo: Was gonna say, did you forget the empty list thing... :) 21:53
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
timotimo oh! haha :) 21:54
jnthn Not null
timotimo is null testing faster than definedness testing?
jnthn Marginally 21:55
As in, not worth worrying about
nqp::isconcrete($x) is fast.
timotimo this is really hot code, though ;)
should i use isconcrete instead then?
jnthn Yes, but we're probably arguing over one or two CPU instructions here :P
timotimo or just boolify the $list?
jnthn In fact on Parrot it's checking against PMCNULL
boolify is costlier :) 21:56
isconcrete *might* we faster on Parrot. isnull will be faster on JVM. So basically you can't win :P
tadzik what will be faster on moar? :) 21:57
timotimo hehe
jnthn tadzik: Once we fix null to not explode, probably break even or maybe isconcrete wins. 21:58
lizmat jnthn: I'm thinking of eradicating Promise.has_result 21:59
I see no point in it really, when you have .Bool
jnthn hah, I read that as extraditing :P
lizmat: I won't miss it terribly
lizmat if $promise { } seems to make sense to me
I'll take that as an ok then :-)
jnthn has_result is just way older 22:00
Boolification doing that was a recent thing
timotimo there we go.
dalek p: 3a4bb90 | (Timo Paulssen)++ | src/QRegex/Cursor.nqp:
fix EMPTY_LIST sharing for method MATCH.
jnthn timotimo: Did you not run the tests before pushing the original? ;-) 22:01
timotimo no :( 22:02
i've learned from that mistake, though
i do run the rakudo spectest suite quite often, though ;) 22:03
dalek ecs: 39ac0ca | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Eradicate Promise.has_result in favor of .Bool
dalek ast: 249d9ba | (Elizabeth Mattijsen)++ | S17-concurrency/promise.t:
Promise.has_result -> Promise.bool as per new spec
22:17
timotimo jnthn: fwiw, the $!from/$!to branch in MATCH is not taken a single time during the whole compilation of nqp :P 22:19
jnthn timotimo: It's there to support <( and )> 22:21
timotimo i thought as much, yeah
dalek p: 47a8311 | (Timo Paulssen)++ | t/nqp/59-nqpop.t:
correct the plan for 59-nqpop.
22:29
dalek kudo/nom: 5a4b72b | (Elizabeth Mattijsen)++ | src/vm/jvm/core/Promise.pm:
Eradicate Promise.has_result, as per new spec
22:36
timotimo nqp::defined($want) eq 'p', yeah, right. that'll totally work m) 22:42
jnthn timotimo: That's a long spelling of false :P 22:46
dalek kudo/nom: 8a00898 | (Elizabeth Mattijsen)++ | src/vm/jvm/core/asyncops.pm:
Oops, forgot one Promise.has_result
22:48
FROGGS rp: my $x = { $^a == 42 }; say 42 ~~ $x 22:52
camelia rakudo-parrot a75d7f: OUTPUT«True␤»
timotimo jnthn: can you estimate the performance impact of wasting P registers? 22:53
what about I registers?
jnthn timotimo: P is worse potentially as you might make things live longer
timotimo mhm
but do you think there's execution speed gains to be had from removing lots and lots of redundant set operations? 22:54
FROGGS TimToady++ # I just recognized that I just have to smartmatch against whatever is supplied in a :from or :auth 22:55
doesn't matter if it is a block, a regex, a literal or a range
it just works :o)
lizmat indeed... that was the plan :-)
jnthn timotimo: set is pretty cheap. Biggest overhad is the op dispatch... 22:57
timotimo mhm
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...
FROGGS jnthn: I don't consider it
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
so, we can have "the real one" in userland, and the cheap one in the setting
timotimo "implementorture". a good word?
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)
implementorturatation 23:01
diakopter implorture 23:04
lizmat
.oO( implementorturatation, because making the settings takes sooo long )
23:07
jnthn FROGGS: The "cheap" one can probably get cheaper too 23:14
FROGGS: Also, glad it was easy to substitute another one in. 23:15
FROGGS: Most bits of Rakudo can be shoved out of the way on demand... :)
FROGGS jnthn: well, there is one issue
jnthn: you must like that patch :P gist.github.com/FROGGS/1938e9ecf4c5b82b5437
jnthn omfg where's the slivovica... 23:16
...actually, the patch ain't that bad :)
I can see what it's doing. :)
FROGGS hehe, yeah, no doubt :o) 23:17
jnthn I dunno if we need a nicer API for that or something. 23:25
Anyway, I won't be too upset if that patch goes in for now.
FROGGS cool 23:26
dalek p: fd308ad | (Timo Paulssen)++ | src/vm/jvm/runtime/org/perl6/nqp/io/AsyncFileHandle.java:
remove accidentally committed debug output
23:34
p/lexreg_opt: 59fdf98 | (Timo Paulssen)++ | src/vm/parrot/QAST/Compiler.nqp:
save some redundant set operations
23:35
FROGGS it locates now the right file for e.g. `use Foo::Bar:ver(v1.0.2..*)` from MANIFEST files containing json... 23:47
github.com/FROGGS/p6-S11Versioning...manifest.t
jnthn ooh :)
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:49
FROGGS spectesting my one-line-patch now, just to be sure 23:50
lizmat FROGGS: remember there is an .install method in CompUnitRepo
panda should just call .install 23:51
FROGGS yes, I need to dive in deeper into the installation part
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 :)
FROGGS gnight jnthn
lizmat gnight jnthn 23:54
FROGGS lizmat: well, I'd at least skim through the spe again before attacking more :o)
lizmat ok. just let me know if I can help here...
FROGGS sure, I'll keep you updated and will ask 23:55
but good that I can ship my own ModuleLoader, I would go mad if I had to recompiler rakudo all the time 23:56
lizmat FWIW, my work on this so far, from last May: gist.github.com/lizmat/7493850 23:57