»ö« 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.
hoelzro o/ #perl6 00:36
is there a way to get the type object from a ClassHOW?
hoelzro doesn't seem like it =/ 01:04
oh well, I found a workaround
[Coke] boingboing.net/2014/07/02/irs-says-...ore-315656 02:10
dalek ast/S26-WHY: 48bef03 | (Rob Hoelz)++ | S26-TODO:
Notes notes notes
02:13
japhb hoelzro: Which type object are you trying to retrieve? 02:31
hoelzro I was working on S26 02:32
so I was trying to fix Documenting's WHY to set WHEREFORE to its type object
but I ended up patching Mu.WHY to do the same thing
dalek ast/S26-WHY: aa0621b | (Rob Hoelz)++ | S26-documentation/why-leading.t:
Start checking $=pod for declarative comments
02:39
japhb is trying to understand. If you have a class object, it is its own type object; if you have an instance, $object.WHAT is the type object. You don't need to use the $object.HOW or $class.HOW at all .... Or are you saying that you only have a metaclass instance ($class.HOW), and want to get back to the class? 02:43
hoelzro I have the HOW 02:43
just the HOW
so, correct
japhb Ah, OK, I see what you mean
hoelzro I don't think it's possible
but it's ok, I managed to figure out a solution =)
the good news is that declarative docs are working, and the code to get them working isn't hideous \o/ 02:44
unfortunately, $=pod is still kinda busted
and there are a *lot* of corner cases I'd like to test
japhb m: my class Foo {}; my $foo-how = Foo.HOW; ::($foo-how.name(Mu)).WHAT.say 02:51
camelia rakudo-moar 333bce: OUTPUT«(Foo)␤»
japhb ... and there you go. :-)
hoelzro heh
japhb m: my class Foo {}; my $foo-how = Foo.HOW; my $foo = ::($foo-how.name(Mu)); $foo.say 02:51
camelia rakudo-moar 333bce: OUTPUT«(Foo)␤»
japhb Even clearer
hoelzro well done 02:52
japhb bows
I knew it had to be possible. :-)
hoelzro alright, enough work for tonight 02:54
later japhb
japhb o/
hoelzro++ # Getting actual work done
grondilu with a regex, how could I test for a permutation of a given set of characters? I mean, say I want my regex to match a permutation of a b c d, a naive attempt as < a b c d > ** 4 would fail as it would match for instance aaab and I don't want repetitions. 03:05
colomon grondilu: the first thing that jumps to mind is putting a bit of executable code in the regex. (I know it's possible, but don't know the syntax for it.) 03:07
Timbus mayeb fill an array with the permutations, and match against that?
using .permutations
colomon but then, the second thing that comes to mind is maybe this isn't that appropriate place to use a regex...
grondilu yeah I thought that might be complicated, but I want to put this in a grammar so I think I have to use a regex. 03:12
but I guess I can just pretend repetitions are OK
colomon grondilu: look for <?{ in S05 03:13
colomon the example they give is / (\d**1..3) { $0 < 256 or fail } / 03:14
sorry, wrong cut and paste 03:15
right one is / (\d**1..3) <?{ $0 < 256 }> /
afk # bedtime 03:16
japhb m: grammar Permutation { regex TOP { ^ <[abcd]> ** 4 { fail if $/.Str.comb.sort.join ne 'abcd' } $ } }; for < abcd aa aacd dacb > { say "$_: {so Permutation.parse($_) }" }
camelia rakudo-moar 333bce: OUTPUT«abcd: True␤aa: False␤aacd: False␤dacb: True␤»
japhb Seriously needs some cleanup, but it demonstrates method #1 from colomon
colomon japhb++
grondilu yeah I guess I'll have to add this kind of stuff eventually. 03:25
It's for github.com/grondilu/chess/blob/mas...ss/FEN.pm6 in case you're curious.
for instance for rank I'll have to verify that the number of pieces and the number of empty squares adds up to 8. 03:26
Can be interesting to implement.
grondilu having a PGN grammar that verifies the validity of moves would be impressive but that's maybe quite too ambitious. 03:29
lizmat carlin: re irclog.perlgeek.de/perl6/2014-07-21#i_9059080 : if rakudo's spectest is done on a DISTRO that is not in DISTROnames 05:36
it becomes a failing test
to fix the test, is to add the failing DISTRO name to DISTROnames 05:37
that way, we can know on which OS's rakudo is being spectested regularly
dalek kudo/nom: 2bc8f67 | (Elizabeth Mattijsen)++ | src/main.nqp:
Make sure we only execute END blocks once

Even if we call exit() inside an END block
05:41
sergot hi o/ 06:24
grondilu m: "foo".match: / . ** 1..5 /; say $/[0] 06:44
camelia rakudo-moar 2bc8f6: OUTPUT«(Any)␤»
grondilu expected "f"
sergot m: sub e(Bool :$bin) { say $bin if $bin } 06:50
camelia ( no output )
sergot m: sub e(Bool :$bin) { say $bin if $bin }; e();
camelia ( no output )
sergot m: sub e(Bool :$bin) { say $bin if $bin }; e(:bin);
camelia rakudo-moar 2bc8f6: OUTPUT«True␤»
masak morning, #perl6! 07:11
moritz \o masak, * 07:12
FROGGS[mobile] morning masak, moritz 07:12
masak ahoj moritz, FROGGS 07:17
masak IKEA & 07:30
FROGGS[mobile] lol 07:31
Ven m: "foo".match: / (.) ** 1..15 /; say $/[0][0] # grondilu 07:56
camelia rakudo-moar 2bc8f6: OUTPUT«「f」␤␤»
Ven watcha doing here, Ven_ ? somebody using my comp ? 07:59
ab5tract exit 08:08
eiro hello 09:07
tadzik hey hey
FROGGS[mobile] hi 09:08
eiro who's in charge of the rakudo* .msi ? 09:09
i wonder why there is no msi for the last release 09:10
also: does NativeCall work on windows ?
FROGGS[mobile] we all are in charge for the msi, and I'm planning to do one for 2014.07 09:21
and yes, NativeCall works on Windows
moritz 11:10 < eiro> i wonder why there is no msi for the last release 09:23
because nobody did one yet, that's why!
FROGGS[mobile] I did release candidates for r-m* 2014.05 and r-p* 2014.05 09:25
FROGGS[mobile] but they did not get released because there either was an issue or I had no testers 09:25
eiro ok then. i thought it was a buildbot :) 09:44
FROGGS[mobile] no, no bots involved in making any release :o) 09:44
we have daily smokers though 09:45
lelf b 09:58
moritz a build bot wouldn't be such a bad idea 10:58
then the release managed would only need to push a tag
and that would create the tarball automatically
and put it into the download dir 10:59
timotimo o/ 11:00
eiro o/
yes but i have no idea how to build rakudo on windows
afaik: i need to install visual studio 11:01
cognominal eiro: or wine? 11:19
not that I know anything about windows.
eiro cognominal, no. wine is a way to run windows binaries under linux. 11:20
cognominal my bad. 11:21
zengargoyle i would guess you'd build with cygwin
eiro cognominal: there is a unix environment under windows named cygwin
ahh
zengargoyle which you just might be able to use under wine... :P
FROGGS_ no, no cygwin 11:22
cognominal cygwin, that's the thing I had in mind. Sorry for the confusion
FROGGS_ you need activeperl+MSVC
zengargoyle thought cygwin was the standard OSS/gnu/unixy-like on windows solution.
eiro i seee you know that. the pb with cygwin tools is they poorly interact with windows (file hierachy for example comes the unix way) 11:23
zengargoyle actually, i thought activeperl used cygwin for building XS stuff.. 11:24
FROGGS_ no
zengargoyle maybe that's Strawberry
FROGGS_ no :o)
you mean mingw 11:25
zengargoyle ah, that's it.
zengargoyle shows how much i know about windoze. :P 11:25
zengargoyle i haven't been brave enough yet to try and build on Solaris using the Sun compiler... 11:26
carlin Parrot/Rakudo used to work on OpenSolaris with suncc a few years ago, not sure about moar nowdays though 11:27
zengargoyle sparc?
carlin x86 11:28
zengargoyle it's odd how back in the day, software worked on Solaris, and *maybe* BSD or *maybe* Linux with some hacking... 11:31
now it's just the opposite. works on Linux, *might* work on Solaris. :)
carlin there are still some things where that's true 11:32
zfs and dtrace for example
zengargoyle yeah, but those are vendor-ish things, not OSS miscellany 11:33
carlin true 11:34
zengargoyle it's possible that half of my Solaris angst is due more to our 30 year old+ organically grown environment vs a nice fresh and clean 5.10 or whatnot environment. 11:40
carlin m: class my {}; say my.new 12:00
camelia rakudo-moar 2bc8f6: OUTPUT«===SORRY!=== Error while compiling /tmp/RZjkRAj5i7␤Malformed my␤at /tmp/RZjkRAj5i7:1␤------> class my {}; say my⏏.new␤ expecting any of:␤ scoped declarator␤»
carlin
.oO( Doctor, doctor! It hurts when I do this... )
m: class my {}; my my $x .= new; say $x 12:01
camelia rakudo-moar 2bc8f6: OUTPUT«my.new()␤»
eiro gtk-simple doesn't work on windows. i'm pretty sure i saw jnthn running it. frustration 12:12
ohhh ... it was in a vm
FROGGS_ this stuff is easy on linux when the libs are in place 12:15
and not so on windows ... :/
Ven m: my @a = flat < a b; 1 > 2; 12:24
camelia rakudo-moar 2bc8f6: OUTPUT«===SORRY!=== Error while compiling /tmp/O56uxZKfR1␤Two terms in a row␤at /tmp/O56uxZKfR1:1␤------> my @a = flat < a b; 1 > ⏏2;␤ expecting any of:␤ postfix␤ infix stopper␤ infix or…»
Ven std: my @a = flat < a b; 1 > 2;
camelia std 0f2049c: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/2E35yIg0Zh line 1:␤------> my @a = flat < a b; 1 > ⏏2;␤ expecting any of:␤ feed_separator␤ infix or meta-infix␤ infixed function␤ statement modifier loop␤Parse faile…»
Ven mmh, I seem to remember something that STD parsed correctly pretty impressively, while rakudo failed to parse it 12:25
dalek ast/S26-WHY: 17a27b4 | (Rob Hoelz)++ | S26-documentation/multiline-leading.t:
Start on test for multiline declarative comments
12:26
Ven std: sub a($) {5}; my @a = flat < a(b); say 1 > 2; 12:27
camelia std 0f2049c: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/hrprN7JHoV line 1:␤------> a($) {5}; my @a = flat < a(b); say 1 > ⏏2;␤ expecting any of:␤ feed_separator␤ infix or meta-infix␤ infixed function␤ statement modifier lo…»
dalek ast: 1d4ff45 | coke++ | S02-lexical-conventions/unspace.t:
whoops, use standard RT #\d
12:35
Ven [coke]: how much rakudo NYI yet ? :p 12:45
(fudged, I mean.) 12:46
[Coke] m: my $s = join |<< <a x y z>; 12:50
camelia rakudo-moar 2bc8f6: OUTPUT«Type check failed in binding op; expected 'Any' but got 'Mu'␤ in sub METAOP_HYPER_PREFIX at src/gen/m-CORE.setting:17541␤ in block at /tmp/knCGO_WvV1:1␤␤»
[Coke] Ven: lots of fudging. NYI, unspecced, RTs... thena bunch of stuff that's hiding. 12:51
[Coke] m: my $s = ""; $s = join |<< <a x y z>; 12:51
camelia rakudo-moar 2bc8f6: OUTPUT«Type check failed in binding op; expected 'Any' but got 'Mu'␤ in sub METAOP_HYPER_PREFIX at src/gen/m-CORE.setting:17541␤ in block at /tmp/M10s3p9Yff:1␤␤»
dalek ast: 6da8671 | coke++ | S02-literals/listquote.t:
use specific NYI
13:05
ast: 911a4e8 | coke++ | S02-literals/listquote.t:
Fix expected type, unfudge test

  <1> generates something stringy, (2) is numeric
psch github.com/perl6/roast/commit/911a4e82f1 13:28
uhm
putty right clicks are wrong :)
also, hi #perl6 o/
tadzik not the worst thing to accidentally paste :P 13:30
moritz totally
better than private conversations, passwords, credit card numbers and other such stuff :-) 13:31
flussence has paste_verify_line_count=1 set in irssi, out of paranoia for that sort of thing 13:32
Ven Okay, I'm getting a bit of a weird segfault. 13:49
m: multi mordre(:$fort!) { "GRAOU!!!!!" }; multi mordre { "graou~" }; say mordre; say mordre(); 13:50
camelia rakudo-moar 2bc8f6: OUTPUT«graou~␤graou~␤»
Ven m: multi mordre(:$fort!) { "GRAOU!!!!!" }; multi mordre { "graou~" }; say mordre; say mordre(:fort);
camelia rakudo-moar 2bc8f6: OUTPUT«(signal )graou~␤»
[Coke] "failure is just success, rounded down, my friend!" (www.qwantz.com/index.php?comic=955) 13:53
timotimo is the php crowd mocking us? 13:58
Ven timotimo: where ? 13:59
flussence they're infighting over naming something "PHP 6", last I heard :) 14:00
nwc10 you mean they didn't think that adding "goto" was enough of a step change to justify a major version bump? 14:01
timotimo Ven: they are considering naming their next revision "PHP 7" instead of "PHP 6" 14:02
because there was already "a failed attempt at making a version 6 before and users could get confused"
the way Heise shortened the article for the rss feed omitted the word "PHP" before the 6
btyler timotimo: there was a planned PHP6 that never materialized. not a reference to perl6, I don't think 14:03
there were even PHP6 books written
timotimo well, there was also a perl6 book written, or something similar 14:04
involving parrot
btyler yep. I just mean there's probably no slight to be found there -- they have their own mild community trauma related to a version 6. 14:07
Ven they just decided to abandon it 14:08
well, I think it had pretty much as much changes as py3 14:09
btw, is the segfault I reported already known ?
hoelzro morning #perl6 14:20
dalek kudo/nom: 1009e54 | (Elizabeth Mattijsen)++ | docs/ChangeLog:
Mention END block / exit fix
14:29
lizmat r: END say 1; END exit 42; END say 2; END say 3 14:30
camelia rakudo-jvm 2bc8f6: OUTPUT«(timeout)»
..rakudo-{parrot,moar} 2bc8f6: OUTPUT«3␤2␤1␤»
lizmat hmmm... apparently JVM is not fixed yet... hhmmm 14:31
[Coke] ^^ is the say 1 supposed to fire? 14:32
lizmat yes 14:33
that was the whole point: exit() runs the END blocks
[Coke] O_o
lizmat Ven: segfault confirmed locally, please rakudobug it 14:34
[Coke] lizmat: oh, I thought that the exit wasn't exiting.
lizmat++
lizmat it wasn't because it started to run *all* END blocks again
before doing the actual exit
so it called itself again, and again, and again, and again...
Ven: please mention that you must call *both* candidates to get the segfault 14:35
*and* in the given order!
and that it doesn't seem to be related to spesh 14:36
Ven_ lizmat: what's the email address to send it to ? 14:37
lizmat [email@hidden.address] 14:37
dalek ecs: 04b44e7 | (Lucas Buchala)++ | S0 (2 files):
Typos
14:40
ecs: 16662af | (Lucas Buchala)++ | S03-operators.pod:
Remove "Perl 6" from synopsis title
ecs: 8a8859e | (Will Coleda)++ | S0 (2 files):
Merge pull request #67 from lucasbuchala/master

Small changes - lucasbuchala++
Ven_ lizmat: if you're saying it has to be in that order, with both calls, then .. I'm pretty unfortunate. 15:27
lizmat fortunate really: it doesn't happen often you can produce a segfault this simply 15:29
brrt or so directly 15:32
has anyone had the bright idea of running it through gdb yet? :-)
brrt i think 09000000001 is a weird number for an object poiner 15:38
pointer
ChoHag Where can I get a list of the special characters available in perl 6 regex? 15:42
timotimo that's clearly over nine thousand 15:44
TimToady std: my token gecos { <- [':']>* } 15:51
camelia std 0f2049c: OUTPUT«Potential difficulties:␤ Repeated character (') unexpectedly found in character class at /tmp/LTr4mabSOp line 1:␤------> my token gecos { <- [':']⏏>* }␤ok 00:01 124m␤»
TimToady m: my token gecos { <- [':']>* }
camelia ( no output )
TimToady someone should hack that warning into rakudo 15:52
FROGGS_ looks 15:53
TimToady m: my token gecos { [^:]* } 15:54
camelia ( no output )
TimToady std: my token gecos { [^:]* }
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/uJmzKunMHY line 1:␤------> my token gecos { [^:⏏]* }␤Potential difficulties:␤ [^:] appears to be an old-school character cl…»
TimToady not to mention that one
FROGGS_ do not trick me into more work :P 15:55
TimToady well, both the warning and the error
jnthn m: /^:/ 15:56
yoleaux 20 Jul 2014 14:08Z <FROGGS_> jnthn: Is that a valid patch about rooting? gist.github.com/FROGGS/534f320aa548e12f75c4
camelia ( no output )
yoleaux 21 Jul 2014 20:55Z <brrt> jnthn: is this normal? i suspect it's part of inlining: gist.github.com/bdw/e5b606499aa6435f7e72
brrt jnthn++ can't get a break
jnthn If I had to guess why that doesn't error, I think it's 'cus it is somehow accepting : as a backtrack control.
So if anyone fancies looking into it, that's where I might start. 15:57
TimToady std: / 'foo': /
camelia std 0f2049c: OUTPUT«ok 00:01 123m␤»
brrt ok, how does 'say' work in rakudo level?
TimToady std: / «: / 15:58
camelia std 0f2049c: OUTPUT«ok 00:00 122m␤»
jnthn std: / foo: /
camelia std 0f2049c: OUTPUT«ok 00:01 122m␤»
jnthn std: / <(: /
camelia std 0f2049c: OUTPUT«ok 00:01 122m␤»
jnthn std: / $: /
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unsupported use of $: variable; in Perl 6 please use Form module at /tmp/8dMj_5FHQb line 1:␤------> / $:⏏ /␤Parse failed␤FAILED 00:00 122m␤»
TimToady heh
jnthn std: / $ : /
camelia std 0f2049c: OUTPUT«ok 00:01 122m␤»
jnthn std: / ^ : /
camelia std 0f2049c: OUTPUT«ok 00:01 122m␤»
jnthn std: / ^: /
camelia std 0f2049c: OUTPUT«ok 00:01 122m␤»
TimToady o.( 15:59
jnthn std: / [^:] /
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/usSrae0oxs line 1:␤------> / [^:⏏] /␤Potential difficulties:␤ [^:] appears to be an old-school character class; please use …»
jnthn std: / [^ :] /
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/3GCRDnXVMu line 1:␤------> / [^ :⏏] /␤Potential difficulties:␤ [^ :] appears to be an old-school character class; please us…»
jnthn std: / [o:] /
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/S3OVcQVA_E line 1:␤------> / [o:⏏] /␤Potential difficulties:␤ [o:] appears to be an old-school character class; please use …»
jnthn std: / [o+:] /
camelia std 0f2049c: OUTPUT«ok 00:01 123m␤»
jnthn Hmmm. :)
TimToady std: / [<alpha>:] / 16:00
masak jnthn! \o/
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/ESul5HkBmW line 1:␤------> / [<alpha>:⏏] /␤Check failed␤FAILED 00:01 124m␤»
jnthn std: / <alpha>: / 16:01
camelia std 0f2049c: OUTPUT«ok 00:00 123m␤»
jnthn std: /<alpha>:/
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/uShMMHX3Tg line 1:␤------> /<alpha>:⏏/␤Check failed␤FAILED 00:00 123m␤»
jnthn Um. :
jnthn std: /[ <alpha>: ]/ 16:02
camelia std 0f2049c: OUTPUT«ok 00:01 123m␤»
jnthn std: /[ <alpha>:]/
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/nePEnAY_SA line 1:␤------> /[ <alpha>:⏏]/␤Check failed␤FAILED 00:01 124m␤»
jnthn std: /[<alpha>: ]/
camelia std 0f2049c: OUTPUT«ok 00:01 124m␤»
jnthn I'm...guessing there's something wrong here. :)
FROGGS_ what kind of magic is that?
TimToady looks like it was written by a half-blind maniac
TimToady actually, looks more like it requires a \s after the backtracking : 16:04
sigh: when is experimental at /home/larry/perl6/std/STD.pm line 67270. 16:05
FROGGS_ yeah :/ 16:06
TimToady std: / : /
camelia std 0f2049c: OUTPUT«===SORRY!===␤Backtrack control ':' does not seem to have a preceding atom to control at /tmp/f6q0yxlcek line 1:␤------> / :⏏ /␤Parse failed␤FAILED 00:00 122m␤»
TimToady std: /:/
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/kSZ0Q3pb5x line 1:␤------> /:⏏/␤Can't call method "from" on unblessed reference at STD.pm line 55290.␤FAILED 00:00 122m␤»
PerlJam The fix is just a "use experimental qw<smartmatch>;" away though 16:07
FROGGS_ until given/when will be removed entirely (in case they do that) 16:08
TimToady yeah, std requires \s after a bare : for it to be a backtracking control
PerlJam FROGGS_: I don't think that will happen.
FROGGS_ PerlJam: I hope so
TimToady std: / <foo>:<bar> /
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter : (must be quoted to match literally) at /tmp/vV6K7Y_CDg line 1:␤------> / <foo>:⏏<bar> /␤Unable to parse regex; couldn't find final '/' at /tmp/vV6K7Y_CDg line 1:␤------…»
TimToady std: / <foo>: <bar> /
camelia std 0f2049c: OUTPUT«ok 00:01 123m␤»
FROGGS_ j: say "o" ~~ /<:!Upper>*/; # RT #121365 16:09
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121365
FROGGS_ (wait for it)
camelia rakudo-jvm 1009e5: OUTPUT«(timeout)»
lizmat j: END exit 16:12
camelia ( no output )
lizmat ah?
j: END say 1; END exit 42; END say 2
camelia rakudo-jvm 1009e5: OUTPUT«2␤1␤» 16:13
dalek p: aca7c91 | (Tobias Leich)++ | src/vm/jvm/QAST/Compiler.nqp:
RT #121365 fail in uniprop when pos > eos
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121365
dalek kudo/nom: 72d5749 | (Tobias Leich)++ | tools/build/NQP_REVISION:
bump nqp/jvm rev for uniprop fix
16:13
lizmat it appears I'm going to give a lightning talk about Perl 6, and ho it's progressed the past year 16:17
*how
(at OSCON)
I'm thinking:
- MoarVM
- S17 related
- JIT on MoarVM 16:18
- many other optimizations 16:19
masak yeah, was gonna say.
speed is worth mentioning all on its own.
jnthn Well, JIT didn't get merged yet so it's more an "iminent". But MoarVM doing dynamic optimization stuff is wroth a metnion, as one contributor to the perf improvements.
Also a good one to mention is the material produced as part of the internals workshop
lizmat jnthn: good point :-) 16:20
jnthn As it shows we've made progress on on-ramps for contributing too :)
masak mention v5, perhaps.
[Coke] m: my $multi1 = [1, ['foo', 'bar', 'baz'], 5]; EVAL('$multi1[1;0]')
camelia rakudo-moar 1009e5: OUTPUT«WARNINGS:␤Useless use of constant integer 1 in sink context (line 1)␤»
TimToady well, you can't talk about everything in 5 minutes...
[Coke] m: my $multi1 = [1, ['foo', 'bar', 'baz'], 5]; say EVAL('$multi1[1;0]') 16:21
camelia rakudo-moar 1009e5: OUTPUT«WARNINGS:␤Useless use of constant integer 1 in sink context (line 1)␤1␤»
lizmat - v5 :-)
- uploading / downloading from CPAN
jnthn Was gonna say, something on module stuff, yeah.
sjn_roadie mention concurrency, and mention the words 'we are pursuing the following language features worth mentioning: ...' 16:22
jnthn But as TimToady++ mentions, can only do so much in 5 mins :)
TimToady tell 'em smartmatching is not experimental in P6 :)
lizmat hehe
ok, good points!
masak perf is what makes Perl 6 *as interesting* as other languages. S17 stuff is what puts it ahead of the crowd. 16:23
dalek ast: 0381d6a | coke++ | S02-types/multi_dimensional_array.t:
use standard "NYI"
16:23
lizmat the talk is going to be in about 33 hours, please mention more points if you have any :-)
masak I looked through the ChangeLog. didn't see anything prominent pop up besides what has already been mentioned. 16:24
jnthn Yeah. There's been doznes of smaller improvements along the way, of course. 16:25
rurban maybe that with moarvm it is now 2x faster than parrot, if people have tried it before. And compared to Moose it's even faster than perl5 16:26
TimToady m: say "lo⃞l".flip 16:28
camelia rakudo-moar 1009e5: OUTPUT«l⃞ol␤»
TimToady don't quite have NFG yet
jnthn TimToady: No, I didn't attempt that, just teased apart a few more things to enable it. 16:29
TimToady jnthn++ anyway 16:30
[Coke] m: my $a := 42; say $a++ 16:33
camelia rakudo-moar 1009e5: OUTPUT«Cannot assign to an immutable value␤ in sub postfix:<++> at src/gen/m-CORE.setting:4541␤ in block at /tmp/8x8zbflFEp:1␤␤»
[Coke] m: my $a := 42;
camelia ( no output )
TimToady message is a bit LTA
at least it mentions ++
lizmat off to OSCON& 16:34
[Coke] my $a; my $b = sub ($arg) { $a := $arg }; my $val = 42; $b($val); say $a; $val++; say $a;
[Coke] ^^ that's S03-binding/scalars.t 16:34
m: my $a; my $b = sub ($arg) { $a := $arg }; my $val = 42; $b($val); say $a; $val++; say $a;
camelia rakudo-moar 1009e5: OUTPUT«42␤42␤»
[Coke] the test is expecting 4243 16:35
timotimo i'm also a contributor to the perf improvements! :D
[Coke] marked as a "nom regression"
TimToady I don't think that can rightly assume that $arg represents something with a container 16:36
timotimo if there's no container, why not autovivify one around the passed value and make it propagate outwards? :D 16:37
TimToady sub args are officially readonly
you're sneakily violating that contract
[Coke] outer comment says "# Binding subroutine parameters" 16:38
TimToady m: my $a; my $b = sub (\arg) { $a := arg }; my $val = 42; $b($val); say $a; $val++; say $a;
camelia rakudo-moar 1009e5: OUTPUT«42␤43␤» 16:39
masak +1 to "sneakily violating contract"
I was surprised at that test's expectation.
TimToady if the parameter is not marked as referential, the binder is allowed to copy or otherwise deref it
it has never been required, for performance reasons, but the test is relying on expectations from undefined behavior 16:40
m: my $a; my $b = sub ($arg is rw) { $a := $arg }; my $val = 42; $b($val); say $a; $val++; say $a; 16:41
camelia rakudo-moar 1009e5: OUTPUT«42␤43␤»
TimToady that's the other way to do it correctly 16:42
jnthn Agree the test's expectations are off.
"\arg" or "is rw" keep the original container in place
TimToady m: my $a; my $b = sub ($arg) { $a := $arg }; my $val = 42; $b($val); say $a; $a++; say $a; 16:43
camelia rakudo-moar 1009e5: OUTPUT«42␤Cannot assign to a readonly variable or a value␤ in sub postfix:<++> at src/gen/m-CORE.setting:4541␤ in block at /tmp/Dd0n_eEeeg:1␤␤»
[Coke] ok, it gets worse: 16:44
jnthn Without those you either get (a) a decontainerized value if there's a type constraint that means it's not Iterable or Parcel, or (b) a readonly container around the thing otherwise to make sure we don't screw up flattening, but it certainly forbids assignment.
[Coke] (making it \arg fixes the 42/43 issue: then, we have:
github.com/perl6/roast/blob/master...ars.t#L105 16:45
which fails the last 2 tests in the block.
so, change to \arg, remove the last 2 tests? (they re both 23 with the \arg change, not 43)
(or change the test to verify they are mutable?) 16:46
er, sorry, the dies_ok also fails, that works just fine. 16:47
jnthn I think on balance I'd keep it as $arg, but change the test 'is $a, 43, "bound readonly sub param was bound correctly (2)";' 16:48
[Coke] I have a first pass, feel free to fix it after I push.
... ok, let me do that.
jnthn To correctly say we don't expect it to change
TimToady yes, I'd make that one test that $a is 42
[Coke] jnthn: you mean 42? 16:49
TimToady he was identifying the test to change, not giving the new version
[Coke] TimToady++ jnthn++ 16:50
jnthn What TimToady++ said
TimToady if it turns out that we can perform the decont with little performance penalty, I suppose we could spec that behavior rather than leaving it undefined (if my memory of undefinedness is accurate) 16:53
jnthn TimToady: Well, it can actually be a performance win 16:54
TimToady of course, long term the real spec is roast, not the synopses
[Coke] ok. the behavior here is that if you $val++, then val does in crease, but $a does not.
yesyes? 16:55
TimToady is fine
jnthn TimToady: If multiple things down the line would want the value inside the container, then we can decont once, not every time.
TimToady basically, 'is copy' semantics are fine
jnthn TimToady: Furthermore, spesh is pretty good at removing unrequired decont instructions these days.
TimToady and 'is readonly' is even bettr
so I hear :)
jnthn Well, "is copy" is different.
It creates a mutable container and copies the stuff 16:56
dalek ast: edef7d1 | coke++ | S03-binding/scalars.t:
refer to RT
ast: 55f0db9 | coke++ | S03-binding/scalars.t:
untodo nom regressions, fix expectations

  jnthn++ TimToady++
jnthn So you have a variable you can mutate inside of the routine
TimToady thinking more of the value semantics of C when I say that
jnthn Ah, ok :)
.oO( Always know which language you're speaking... :) )
TimToady catching the attempt to mutate is a different issue from allowing the mutation to propagate outward 16:57
but great if we can do both 16:58
(efficiently)
[Coke] gr00mstick 17:14
... I hate you, macbook air.
TimToady so much for that password... 17:15
jnthn ...great idea for a wedding prop, though... :P 17:15
TimToady that would be a cattle prod you give the bride, right? 17:16
[Coke] :) 17:24
vendethiel just realized he still needs to explain positionals vs named, and required, and ...
zjmarlow Is there any way to have two different enumerations that happen to have a key in common? S12 seems to say it's possible, but that the ambiguous name must be qualified... 17:32
timotimo m: enum Left <A B C>; enum Right <C D E>; say A; say E; say Left::C; say Right::C; 17:34
camelia rakudo-moar 1009e5: OUTPUT«A␤E␤C␤C␤»
TimToady the intended semantics are that the colliding names poison that name to produce an error if the unqualified form is used
timotimo m: enum Left <A B C>; enum Right <C D E>; say A; say E; say C.perl;
camelia rakudo-moar 1009e5: OUTPUT«A␤E␤Right::C␤»
TimToady (an idea from Ada, as it happens)
jnthn Rakudo apparently has the wrong semantics...
timotimo oh
jnthn TimToady: Is a Failure an ideal thing to install as the poision, ooc? 17:35
Or did you have something else (more static?) in mind?
TimToady I'd think a compile-time error would be more better
jnthn std: enum Left <A B C>; enum Right <C D E>; 17:35
camelia std 0f2049c: OUTPUT«===SORRY!===␤Illegal redeclaration of symbol 'C' (see line 1) at /tmp/L757e0f1rZ line 1:␤------> enum Left <A B C>; enum Right <C D E>⏏;␤Check failed␤FAILED 00:01 121m␤»
jnthn Darn, can't steal a solution from there :)
TimToady iirc, Ada only does that on import, not on your own declarations 17:36
jnthn OK, so we don't actually install anything in the lexpad per se, just keep track of it as compile state...
Though that may not wok out too well either
*work
TimToady but yeah, STD doesn't attempt it 17:37
TimToady but the idea is not to penalize a program for importing two colliding definitions unless they actually attempt to use the symbol in question 17:38
TimToady much like we don't penalize two roles for having the same method unless someone actually tries to compose them together 17:39
dalek ast: 046f212 | (Tobias Leich)++ | S05-mass/charsets.t:
RT #121365 match negated quatified character class
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121365
Ven did perl "steal" phasers from some other languages ? or did it "invent" it 17:41
TimToady well, BEGIN/END originally came from awk
Ven "All attributes in Perl 6 are private, and named $!foo" I think I'm gonna steal that explanations from jnthn++ =) 17:42
TimToady ...except for the ones that are names something other than "foo"... :P 17:43
*named
Ven TimToady: prove it
TimToady well, what about $!bar? 17:44
A $!foo walks into a $!bar and waits for the bartender to overflow his stack... 17:45
FROGGS_ > 17:46
>.<
Ven
.oO( Let me tell you my story )
TimToady
.oO( Let me tell you has story )
17:47
Ven Dammit, you got me. Well. On another note, module, role, class, grammar, enum and package ? that's the six model ?
TimToady subset
FROGGS_ [Coke]: remember the curlies in that parrot patch? they are needed! 17:48
perl -E 'say " 28" =~ /\x2028/' # pass
perl -E 'say " 28" =~ /\x{2028}/' # fail
Ven but then there's more than 6 :P. Unless package/module is only one
TimToady packages are not of great import 17:49
Ven Well, I still havn't understood the difference between module and package, and I'm not really sure where in the syns to look. 17:49
lizmat Ven: consider package the "base class" of module / class / grammar etc 17:51
masak groans at TimToady's "no great import"
Ven so, the lowest common denominator ? They're not (usually) to be used as declarative keywords?
FROGGS_ Ven: just because something it is the base for other things, it does not imply that you will never use it 17:53
lizmat package you probably would never use when developing with Perl 6
Ven FROGGS_: it doesn't. But it might very well imply there's less reasons to use it
lizmat as a core developer, you might
is at least my understanding of it :-)
FROGGS_ if you need to package up something and you won't export subs, then you could use it
Ven I'll leave the idea of a tutorial for a core developer for another time, though ;-)
FROGGS_: what do you package then ? 17:54
FROGGS_ Ven: you can still make subs available via the package
Foo::bar()
PerlJam still has p5 code that does that. 17:55
Ven Ah, indeed. Not to be imported in the main namespace. Though imho, that 's a decision that should be left to the user
PerlJam foregoing Exporter and its ilk
FROGGS_ but if the current style of Perl 6 would be to export sets of subs then yes, you would probably use modules
[Coke] FROGGS_: crazy perl 5 rules. thanks. 17:58
TimToady std: say DateTime:FormatMySQL("2014-07-09T13:24:00") # spot the error 18:01
camelia std 0f2049c: OUTPUT«===SORRY!===␤Undeclared name:␤ 'DateTime:FormatMySQL("2014-07-09T13:24:00")' used at line 1␤Check failed␤FAILED 00:01 124m␤»
TimToady m: say DateTime:FormatMySQL("2014-07-09T13:24:00") # spot the error 18:02
camelia rakudo-moar 72d574: OUTPUT«(DateTime)␤»
TimToady it's a parsing problem, not a named argument problem
re irclog.perlgeek.de/perl6/2014-07-09#i_8994482 18:03
TimToady FROGGS_, lizmat: ^^^ 18:03
FROGGS_ std: say DateTime:FormatMySQL("2014-07-09T13:24:00") # spot the error 18:04
camelia std 0f2049c: OUTPUT«===SORRY!===␤Undeclared name:␤ 'DateTime:FormatMySQL("2014-07-09T13:24:00")' used at line 1␤Check failed␤FAILED 00:01 124m␤»
TimToady STD generalizes the infix:sym<+> syntax to be any foo:bar 18:10
std: foo:bar
camelia std 0f2049c: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'foo:bar' used at line 1␤Check failed␤FAILED 00:00 121m␤»
TimToady and relies on messages like that to tell you when you screwed up 18:11
FROGGS_ hmmm
TimToady sounds like rakudo is parsing it that way but then throwing the extra info away
m: foo:bar 18:12
camelia rakudo-moar 72d574: OUTPUT«===SORRY!=== Error while compiling /tmp/wrgoxksjMM␤Undeclared routine:␤ foo:bar used at line 1␤␤»
TimToady well, not in that case
FROGGS_ m: foo:bar()
camelia rakudo-moar 72d574: OUTPUT«===SORRY!=== Error while compiling /tmp/O8EF3_XxhU␤Undeclared routine:␤ foo:bar() used at line 1␤␤»
FROGGS_ hmmm
TimToady maybe it's just on types 18:13
FROGGS_ m: int:bar
camelia ( no output )
FROGGS_ yeah
TimToady std: Int:bar()
PerlJam Hmm.
camelia std 0f2049c: OUTPUT«===SORRY!===␤Undeclared name:␤ 'Int:bar()' used at line 1␤Check failed␤FAILED 00:01 123m␤»
FROGGS_ TimToady: btw, can we drop :T ?
TimToady well, we haven't developed much of a use case for it 18:14
FROGGS_ I don't even understand the difference between how :U is meant to be and what :U is implemented like 18:15
PerlJam Placement of that whitespace is important: "foo: bar", "foo:bar" and "foo :bar" are all radically different.
FROGGS_ because for me a type object is the only undefined thing 18:15
TimToady m: say Failure.new.defined 18:16
camelia rakudo-moar 72d574: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in method new at src/gen/m-CORE.setting:12849␤ in block at /tmp/XR3sU9MtLN:1␤␤»
FROGGS_ okay, I've seen a test where it expects that method .defined is called on the argument, but that is, I dunno
TimToady m: say Failure.new("oops").defined
camelia rakudo-moar 72d574: OUTPUT«False␤»
FROGGS_ hmmm
TimToady the idea is to have interesting values of undef
that can tell you why it's undefined 18:17
Ven m: package Foo { subset A of Int; }; my Foo::A $a = 1;
camelia ( no output )
FROGGS_ is :U a superset of :T and things that lie via .defined?
TimToady well, :D isn't really .defined
it's .DEFINITE
m: say Failure.new("oops").DEFINITE 18:18
camelia rakudo-moar 72d574: OUTPUT«True␤»
FROGGS_ ohh such complex
TimToady you have to have primitives 18:19
FROGGS_ yeah...
TimToady funny how primitives turn out to look more complex...
FROGGS_ well, at least the current implementation is sort of easy to understand, that's worth something :o)
TimToady of course, that means the real opposite of :D should be :I 18:20
PerlJam nah, :U is for UNDEFINITE :) 18:21
TimToady :N for nondefinite
jnthn On packages, when you write class A::B { } and there's no A already, the A is actually a package.
jnthn It is the only kind of package-like thing you can redeclare as something else later. 18:22
TimToady yes, it has that stubbing funciton
jnthn m: class A::B { }; module A { }
camelia ( no output )
TimToady funciton should totally be a word
PerlJam TimToady: only if it's a particle of some sort. 18:23
TimToady waits for [particle] to wave
[particle] waves 18:23
PerlJam heh 18:24
[particle] waits for [wave] to particle
[Coke] r: { "a" ~~ /./ }; say $/.perl; 18:27
camelia rakudo-{parrot,moar} 72d574: OUTPUT«Match.new(orig => "a", from => 0, to => 1, ast => Any, list => ().list, hash => EnumMap.new())␤»
..rakudo-jvm 72d574: OUTPUT«Match.new(to => 1, hash => EnumMap.new(), ast => Any, list => ().list, orig => "a", from => 0)␤»
[Coke] $/ should be lexical, yes?
PerlJam [Coke]: so sayeth S05 18:28
[Coke] rakudobugs
jnthn No, it's per Routine.
Unless declared otherwise
Same as $!
PerlJam S05:64 18:29
synopsebot Link: perlcabal.org/syn/S05.html#line_64
PerlJam r: $/ = 5; 18:30
camelia ( no output )
jnthn PerlJam: perlcabal.org/syn/S05.html#Match_objects
[Coke] that line of S05 is from 2008-11-26
PerlJam r: $/ = 5; say $/;
camelia rakudo-{parrot,jvm,moar} 72d574: OUTPUT«5␤»
[Coke] and jnthn's line is from 2013-02-23 18:31
PerlJam then, clearly it's a fossil :)
[Coke] (first pmichaud, second timtoady)
TimToady yes, fossile, or at least imprecise
[Coke] ok. I'll remove the test.
TimToady it's lexically scoped to the subroutine :) 18:32
masak [Coke]++
PerlJam Also, how about assignment to $/? S05 also says it may not be assigned directly.
TimToady fossile should totally be a word...
[Coke] er, updated it to the opposite.
TimToady std: $/ = 5; 18:33
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/uXKfc8MvqW line 1:␤------> $/⏏ = 5;␤Parse failed␤FAILED 00:00 121m␤»
TimToady std: $/ := 5
camelia std 0f2049c: OUTPUT«ok 00:00 123m␤»
TimToady std: ($/) = 5
camelia std 0f2049c: OUTPUT«ok 00:01 126m␤»
TimToady that's what it means
PerlJam aye, but none of the implementations seem to complain. 18:34
jnthn Yeah, we're missing that check.
TimToady n: $/ = 5
camelia niecza v24-109-g48a8de3: OUTPUT«===SORRY!===␤␤Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/Z1QcG0gWbi line 1:␤------> $/⏏ = 5␤␤Parse failed␤␤»
TimToady PerlJam: guess again :)
PerlJam oops, sorry, none of the *rakudo* implementations seem to complain :)
TimToady pugs: $/ = 5 18:35
camelia ( no output )
TimToady aww
dalek ast: ebb14eb | coke++ | S05-match/blocks.t:
$/ is a dynamic lexical

remove "nom regression", fix test; jnthn++ TimToady++ PerlJam++
18:37
PerlJam r: sub foo { "a" ~~ /./ }; foo(); say $/; 18:39
camelia rakudo-{parrot,jvm,moar} 72d574: OUTPUT«Nil␤»
dalek ast: 1b92eeb | coke++ | S05-match/blocks.t:
Also, remove the other few identical tests.

  (once it's available in outer, we don't need to keep re-checking)
18:46
PerlJam Coke: but what if it suddenly becomes defined in an outer block 3 blocks into the test?!? :) 18:47
[Coke] then you can fix it.
TimToady Doctor, it hurts when I test this... 18:50
cognominal like if TimToady had not enough health problems... 19:04
dalek ast: 8b3795a | coke++ | S32-str/lines.t:
add a test for RT #115136
19:27
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=115136
[Coke] yay, actually closed a ticket. :) 19:28
Ven oh whoops, I still need to rakudobug that crash 19:30
Ven "error: 'perl6' doesn't contain any 'host' platform architectures: x86_64, i386" lldb might not be an option, uh... 19:34
Ven There doesn't seem to be any doc on which format should be used to send a rakudobug email 19:39
carlin Ven: github.com/rakudo/rakudo#reporting-bugs 19:54
Ven carlin: ah, I looked everywhere but at this obvious place. Should be on the website =). thanks 19:54
Actually, that seems to be a MoarVM bug. Just tried it with rakudo-j, worked fine. 19:56
(`multi mordre(:$fort!) { "GRAOU!!!!!" }; multi mordre { "graou~" }; say mordre; say mordre(:fort);` <- that I mean) 19:57
FROGGS_ Ven: look at #moarvm 19:58
FROGGS_ Ven: brrt++ pushed a fix a bit more than an hour ago 19:58
Ven FROGGS_: lizmat reported it ?
ooh, brrt++
FROGGS_ aye
Ven Well, I'm happy I found a real bug for once :P 19:59
FROGGS_ *g*
Ven Does this now need a test ?
FROGGS_ I'd be happy if that would finally stop happening :o)
Ven: yes, a test would be very helpful
Ven realizes he's not on #moarvm on this comp 20:05
FROGGS_ O.o 20:08
Ven FROGGS_: ? 20:09
FROGGS_ it is sacrilegious to not be on #moarvm 20:10
Ven
.oO( That's probably why I decided so in the first place )
psch :o 20:11
Ven `sub`s aren't `our` by default ? I thought they were 20:12
PerlJam Ven: they are lexical in P6 IIRC 20:13
FROGGS_ Ven: packagish things are our, the rest is not 20:14
FROGGS_ probably has a patch for RT #122285 20:15
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122285
Ven m: module A::B { sub b(Int $n = 0) { our sub b { ($n // 5) + 3 } } } 20:16
camelia ( no output )
FROGGS_ ohh noes 20:16
Ven m: module A::B { sub b(Int $n = 0) { our sub b { ($n // 5) + 3 } } }; A::B::b
camelia rakudo-moar 72d574: OUTPUT«Cannot call method 'defined' on a null object␤ in sub b at /tmp/AJzE3uR4Np:1␤ in block at /tmp/AJzE3uR4Np:1␤␤»
FROGGS_ I mean, you asked for trouble 20:16
Ven I admit I did.
FROGGS_ m: module A::B { sub b(Int $n = 0) { }; sub c() { our sub b { ($n // 5) + 3 } } } 20:17
camelia rakudo-moar 72d574: OUTPUT«===SORRY!=== Error while compiling /tmp/lilyidfZOC␤Variable '$n' is not declared␤at /tmp/lilyidfZOC:1␤------> t $n = 0) { }; sub c() { our sub b { ($n⏏ // 5) + 3 } } }␤ expecting any of:␤ postfix␤»
Ven
.oO( That's probably why I tried that in the first place ) # -- anarchy time, is it ?
FROGGS_ m: module A::B { sub b(Int $n = 0) { }; sub c(nt $n = 0) { our sub b { ($n // 5) + 3 } } }
camelia rakudo-moar 72d574: OUTPUT«===SORRY!=== Error while compiling /tmp/LI4co6qFFE␤Invalid typename 'nt' in parameter declaration.␤at /tmp/LI4co6qFFE:1␤------> e A::B { sub b(Int $n = 0) { }; sub c(nt⏏ $n = 0) { our sub b { ($n // 5) + 3 } }␤»
FROGGS_ m: module A::B { sub b(Int $n = 0) { }; sub c(Int $n = 0) { our sub b { ($n // 5) + 3 } } }
camelia ( no output )
FROGGS_ m: module A::B { sub b(Int $n = 0) { }; sub c(Int $n = 0) { our sub b { ($n // 5) + 3 } } }; A::B.c(42)
camelia rakudo-moar 72d574: OUTPUT«Cannot invoke this object (REPR: Null, cs = 0)␤ in block at /tmp/xvndhkiO1w:1␤␤»
Ven FROGGS_: I'll just follow the doctor's orders, though. 20:19
FROGGS_ yeah
Ven oh, you can't put a type constraint on an `our` variable ? 20:21
ChoHag How do you turn a string "foo" into a class foo?
psch m: ::("Str").WHAT.say 20:22
camelia rakudo-moar 72d574: OUTPUT«(Str)␤»
psch m: ::("Int").WHAT.say
camelia rakudo-moar 72d574: OUTPUT«(Int)␤»
psch ChoHag: like that
TimToady it's ugly on purpose 20:23
psch m: my $a = 'abc'; say $a ~~ s/a/b/; # github.com/rakudo/rakudo/pull/295 makes this "... but $/.Bool", cf RT #82108
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=82108
camelia rakudo-moar 72d574: OUTPUT«True␤»
ChoHag Thankyou.
FROGGS_ ChoHag: so if you want to do this when a type exists: unless ::("foo") ~~ Failure { ::("foo").new() } 20:24
psch i'm still not sure about s/// returning a Str but Bool, mainly because jnthn++ was so adamant about a class for the tr/// result... :)
ChoHag In a ?? !!, can the * magic take the conditional (or part of it) and us it in the then/else clause to say 'it', like: it=($foo) ~~ "something" ?? do(it) !! don't-do(it)? 20:27
ChoHag I don't know what else to call the * other than a magic. 20:27
psch m: *.WHAT.say
camelia rakudo-moar 72d574: OUTPUT«(Whatever)␤»
psch ...but you're not using Whatever there 20:28
m: { $^a ~~ "it" ?? say $a !! say "not it" }("it") 20:29
camelia rakudo-moar 72d574: OUTPUT«it␤»
psch ChoHag: that's the closest to what i think you mean that i can think of... :)
ChoHag Oh heh. It was just a thought.
psch m: { $^a ~~ "it" ?? say $a !! say "not it" }($_) for <it not_it something_else_entirely> 20:30
camelia rakudo-moar 72d574: OUTPUT«it␤not it␤not it␤»
jnthn psch: Yeah, I'm rather uncomfortable with that patch
psch jnthn: old talks of yours say you can imagine it to make sense, sometimes... but i'm more on the "not like this"-side of this myself 20:31
jnthn yeah, was just looking at the ticket 20:32
r: say "abc".subst(/\w/, 'b').WHAT 20:33
camelia rakudo-{parrot,jvm,moar} 72d574: OUTPUT«(Str)␤»
ChoHag Is there a way to pretty-print nested hashes?
hoelzro is perl6/ecosystem still the right place to submit modules?
I'm prepping something I've been working on and wanted to see if that assumption still held true 20:34
[Coke] ChoHag: panda install Data::Pretty ?
FROGGS_ ummm, I don't like it when tests test for opposite behaviour
ChoHag Are you asking or telling?
[Coke] suggesting. 20:35
star: use Data::Pretty;
camelia star-p 2014.04: OUTPUT«===SORRY!===␤Could not find Data::Pretty in any of: /home/p6eval/.perl6/2014.04/lib, /home/p6eval/star-2014.04/lib/parrot/6.1.0/languages/perl6/site/lib, /home/p6eval/star-2014.04/lib/parrot/6.1.0/languages/perl6/vendor/lib, /home/p6eval/star-2014.04/lib/par…»
..star-m 2014.04: OUTPUT«===SORRY!===␤Could not find Data::Pretty in any of: /home/p6eval/.perl6/2014.04/lib, /home/p6eval/star-2014.04/languages/perl6/site/lib, /home/p6eval/star-2014.04/languages/perl6/vendor/lib, /home/p6eval/star-2014.04/languages/perl6/lib␤»
[Coke] ah well.
jnthn hoelzro: yes, afaik 20:35
hoelzro excellent
jnthn We're not at the point of using PAUSE yet 20:36
ChoHag Or suggesting. 20:36
Oh bah I haven't set up modules on here...
jnthn psch: Did you see if the spec has any language on what it wants, ooc?
timotimo does the spec have any luggage? 20:38
psch jnthn: S05 doesn't mention explicitely what s/// should return, no
i haven't looked anywhere else, so i might have missed something 20:39
jnthn Well, it indirectly does
Any scalar assignment operator may be used; the substitution macro knows how to turn
$target ~~ s:g[pattern] op= expr
into something like:
$target.subst(rx[pattern], { $() op expr }, :g)
jnthn Which actually suggests "just return the string" 20:40
psch but that implies that any s/// is always true, which breaks "if s/// { }"
TimToady I believe it requires a Match return somewhere
psch "A successful match always returns a Match object [...]" might be that? 20:42
S05:2907 would that be 20:43
synopsebot Link: perlcabal.org/syn/S05.html#line_2907
jnthn TimToady: I can't find any mention of that in S05... 20:44
psch of course that's not explicitely for s///, but s/// has to match to substitute 20:44
jnthn Unless what psch just mentions covers it
In that case, what should .subst return?
Also, what goes s:g/// return? :) 20:45
FROGGS_ .oO( a Gatch? )
think of all the possibilities :o) 20:46
segomos m: say (s:g/'perl5'/'perl6'/).perl;
camelia rakudo-moar 72d574: OUTPUT«""␤»
[Coke] a Moustatch? 20:46
psch S05:4225
synopsebot Link: perlcabal.org/syn/S05.html#line_4225
Ven can I say that "state variables exist in one enclosing context" ? Not sure how to explain it correctly
psch still a single Match object :( 20:47
segomos m: say s:g/'perl5'/'perl6'/ eq Nil;
camelia rakudo-moar 72d574: OUTPUT«True␤»
segomos m: say s:g/'perl5'/'perl6'/.so;
camelia rakudo-moar 72d574: OUTPUT«False␤»
ChoHag What environment does perl 6 get its new @INC from? 20:49
FROGGS_ ChoHag: it takes PERL6LIB into account if you mean that 20:50
TimToady s:g/// must return a faked up Match (or Nil); otherwise OKness doesn't work in smartmatching 20:51
ChoHag It was. 20:53
Data::Pretty is nice, and it got me to install panda, but I meant something which will format nested hashes or arrays like Data::Dumper did. 20:54
masak heh; glad you like Data::Pretty. 20:55
ChoHag Hmm what about yaml?
masak I still hope that Perl 6 (spec) will make Data::Pretty redundant.
TimToady this is discussed somewhat in S03 under Smart matching 20:56
Ven broke the 700 lines! Still going for that 1k lines before publishing it "officially"
Probably next : grammars (since many friends of mine I've pointed to perl 6 have asked me to cover it)
vendethiel (do you people writing stuff keep some kind of to-do list of what you're going to talk about ?) 20:57
FROGGS_ I stub the headlines/chapters first, yes 20:58
and that's my todo
btyler around .gist output and Data::Pretty, I keep getting bit by trying to play with lazy structures in the REPL and throwing rakudo into counting up to Inf. is there an approved representation of lazy lists for gistification that keeps them lazy? 20:59
[Coke] if it's .gist, sure we can show the reified elements, and then a ... 21:00
(as oppposed to a .perl, which might be expected to roundtrip)
masak that sounds like a good idea in general. 21:02
if .gist is for presenting things to humans.
humans tend to like neither infinitely long outputs now infinitely long compute times.
dalek p: f0a3cf0 | (Tobias Leich)++ | src/HLL/Grammar.nqp:
RT #122285 splitting on words means splitting on non-nbsp
21:04
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122285
dalek p: 707e1cb | (Tobias Leich)++ | tools/build/MOAR_REVISION:
bump moar rev for multi cache fix
21:05
kudo/nom: 6504db0 | (Tobias Leich)++ | tools/build/NQP_REVISION:
bump nqp/moar rev for qw() and mmd fix
21:06
ast: 08f409e | (Tobias Leich)++ | S02-l (2 files):
RT #122285 tests for not breaking on nbsp
21:07
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122285
ChoHag What happened to s///? 21:08
FROGGS_ perl6-m -e 'say <a b c d>.perl' 21:09
("a", "b", "c d")
\o/
masak FROGGS++
ChoHag: can you be more specific?
[Coke] m: my $a="asdfasdfasdf"; $a.subst("sd","12",:g).say;
camelia rakudo-moar 72d574: OUTPUT«a12fa12fa12f␤»
[Coke] there's one way to write it, anyway.
masak m: $_ = "asdfasdfasdf" s:g/sd/12/; .say 21:10
camelia rakudo-moar 72d574: OUTPUT«===SORRY!=== Error while compiling /tmp/Pv6Um9OlMX␤Two terms in a row␤at /tmp/Pv6Um9OlMX:1␤------> $_ = "asdfasdfasdf" ⏏s:g/sd/12/; .say␤ expecting any of:␤ postfix␤ infix stopper␤ …»
masak m: $_ = "asdfasdfasdf"; s:g/sd/12/; .say
camelia rakudo-moar 72d574: OUTPUT«a12fa12fa12f␤»
masak there's another.
ChoHag How do I do $foo =~ s/foo/bar/gr?
masak if you are doing /r, you want .subst
FROGGS_ right, methods should usually return the modified thing and not modify the invocant 21:12
masak m: my $foo = "A man foo-walks into a foo"; say $foo.subst(/foo/, 'bar', :g) 21:13
camelia rakudo-moar 72d574: OUTPUT«A man bar-walks into a bar␤»
FROGGS_ if wanna use the method *and* modify you can do: $foo.=subst(...)
masak Perl 6 tends to have its methods not modify the invocant. the only exceptions I can think of are .chomp and .splice 21:14
oh wait, it's .=chomp, too, isn't it?
so just .splice
FROGGS_ also .push and friends 21:15
but these make clear that you do something on the object 21:16
masak ah, yes.
FROGGS_ std: / <[a-z]> / 21:18
camelia std 0f2049c: OUTPUT«===SORRY!===␤Unsupported use of - as character range; in Perl 6 please use .. (or \- if you mean a literal hyphen) at /tmp/sH_dDDrD3z line 1:␤------> / <[a-z⏏]> /␤Parse failed␤FAILED 00:01 123m␤»
masak m: sub fixp($s, &c) { my $c = &c($s); $s === $c ?? $s !! fixup($c, &c) }; sub balanced($s) { "" eq fixp($s, *.subst('[]', '')) }; say balanced "[[][]]"; say balanced "[]][[]" 21:37
camelia rakudo-moar 72d574: OUTPUT«===SORRY!=== Error while compiling /tmp/d0qbnlP5P6␤Undeclared routine:␤ fixup used at line 1. Did you mean 'fixp'?␤␤»
masak m: sub fixp($s, &c) { my $c = &c($s); $s === $c ?? $s !! fixp($c, &c) }; sub balanced($s) { "" eq fixp($s, *.subst('[]', '')) }; say balanced "[[][]]"; say balanced "[]][[]"
camelia rakudo-moar 72d574: OUTPUT«True␤False␤»
masak \o/
dalek p: 48afd2e | (Tobias Leich)++ | src/QRegex/P6Regex/Grammar.nqp:
warn for duplicates in cclasses, like std does
21:50
kudo/nom: 1aa3b20 | (Tobias Leich)++ | tools/build/NQP_REVISION:
bump nqp rev for cclass warning
21:51
FROGGS_ TimToady: there it is :o)
perl6-m -e '/<["a"]>/'
Potential difficulties:
Repeated character (") unexpectedly found in character class
masak FROGGS++ is on fire! :)
FROGGS_ at -e:1
------> /<⏏["a"]>/
PerlJam FROGGS++
FROGGS_ thanks :o)
though the other suggestion piece of work scares me a bit... (about single colons in identifiers) 21:52
psch m: $_ = 'abc'; say s/b/d/; # as a different perspective on RT #82108 22:01
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=82108
camelia rakudo-moar 6504db: OUTPUT«adc␤»
PerlJam std: / <[ a .. z d ]> /
camelia std 0f2049c: OUTPUT«ok 00:01 123m␤»
psch m: $_ = 'abc'; say "subst'd" if s/g/h/; 22:02
camelia rakudo-moar 6504db: OUTPUT«subst'd␤»
psch i didn't find any clarification in S03, but bare s/// is apparently always true, while smart-matched s/// is always "did we substitute?", which seems inconsistent 22:04
masak I think there's been some back-and-forth on the value of s/// 22:05
I remember Rakudo and Niecza settling on different return types, for example.
PerlJam sticks with s/// should always return a boolean "were substitutions made?" 22:06
masak the nice thing about that one is that it plays very well with `when` and ~~ 22:07
lizmat "did {s/foo/bar} changes" 22:09
psch lizmat: tr/// does that, so i'd be nice for consistency i guess 22:10
well, tr/// does it with coercion to Num
masak 'night, #perl6
psch night masak
lizmat night masak 22:11
psch m: $_ = 'abc'; say "did { +(tr/ac/df/) } changes"
camelia rakudo-moar 6504db: OUTPUT«did 2 changes␤»
psch i think a StrSubst (or somesuch) class probably also wants to keep $/ around? 22:12
dalek blets: c61043e | (Herbert Breunung)++ | docs/tablet-2-basic-syntax.txt:
more explanation on multi line comments
22:18
lichtkind moritz ? 22:30
can someone please help me change title of tablets project on github 22:31
timotimo if you just paste the new title you want into irc, someone who has the rights will do it for you 22:32
i'm going to bed instead right now
good night!
psch night timotimo
lichtkind goodnight 22:33
psch doesn't really know what rights he has with the perl6 github organisation
lichtkind please change the subheading from tabular Perl 6 documentation to hypertext Perl 6 documentation
timotimo the right to hug :3 22:34
lichtkind thank you very much
psch lichtkind: i don't have the neccessary rights, according to stackoverflow only owners can change the description 22:36
lichtkind greeting rurban
thanks psch 22:37
dalek blets: a00d083 | (Herbert Breunung)++ | docs/appendix-a-index.txt:
added unspace op
22:57
japhb .ask FROGGS_ Since you used a new perl6-bench test to show the advantage of your charrange changes, can you commit and push said new test please? :-) 23:26
yoleaux japhb: I'll pass your message to FROGGS_.
dalek ecs: eca5f2f | TimToady++ | S05-regex.pod:
Be clear about the return value of s/// et al.

The various m//, and s/// constructs must all work as expected when used as a smartmatcher, which means they always return either Match or Nil, even when that has to be emulated for :g reasons.
23:32
lizmat TimToady++ for clarity :-) 23:36
lizmat wishes she could backlog: all port 80 web traffic seems utterly congested at OSCON 23:37
TimToady we've discussed it several times on irc, but apparently never actually specced it except by S03 insinuations 23:38
psch the insinuation is that there's no special case for s/// in the table for smartmatches and the only one that fits is S03:3671? 23:43
synopsebot Link: perlcabal.org/syn/S03.html#line_3671
TimToady psch: yes 23:48
we should probably consider removing the Regex cases as well
psch TimToady++: thanks for both these clarifications
TimToady they feel like Too Much Magic these days, and I doubt anyone has used them in any existing P6 code 23:49
with the possible exception of TheDamian :)
holysword hello everybody... gentoo user here, and rakudo does not work after emerging... 23:51
Could not find Perl6::BOOTSTRAP in any of: ., blib, /var/tmp/portage/dev-lang/moarvm-2014.06/image/usr/languages/perl6/lib, /var/tmp/portage/dev-lang/moarvm-2014.06/image/usr/languages/nqp/lib
the path seems to be... very wrong...
I think the libs are in /usr/languages/ but the installer is setting it to the wrong path. Any chance to fix this or do I have to rewrite the ebuild? 23:52
TimToady is there any way to find out who did it before? 23:53
I don't think we have any gentoo folk handy at the moment
holysword as far as I can see, its not signed... I can report a bug in the bugzilla, but that's it
is there any way to change the LIBs path? 23:54
TimToady many of the people up on packaging are .eu and asleep, though lizmat++ is at OSCON currently 23:55
holysword yeps, its a known bug: bugs.gentoo.org/show_bug.cgi?id=510706 23:56
TimToady maybe just try an install to your local home directory instead?
holysword I can try that, but it involves not using the package manager
which makes it hard to update/keep track/uninstall 23:57
TimToady right, that's the downside to it :)
holysword just can't I tell perl where to find the libs? really, no chance to change this?
TimToady not that the system version of any interpreter is ever going to be quite the one you want :)
holysword usually you can addpath or something similar 23:58
TimToady there's probably a way to do it, but I've personally just done the local install, so am not terribly familiar with all the various Configure options
psch holysword: there is PERL6LIB as env var 23:59
but i couldn't say if it works for core libs
i suspect not