»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
felher night folks 00:42
tadzik 'night 00:45
colomon o/ 00:52
sorear good * #perl6 01:01
tadzik hello sorear 01:02
[Coke] (cookies) I can sell any of you fine folks girl scout cookies on behalf of my daughters! 01:11
colomon oooo, Tagalongs..... drool.... 01:20
sorear ? 01:22
[Coke] kind of girl scout cookie. chocolate shell, peanut butter filling 01:23
only <mumble> dollars a box! 01:24
colomon it's not the dollars that get you, it's the calories...
[Coke] it's worse when your wife is the cookie mom. We're drowning in boxes here. 01:26
[Coke] accidentally opens up a box of samoas. 01:32
japhb fsvo "accidentally" 01:39
sorear peanut butter does not generally agree with me.
japhb: o/
japhb o/ 01:40
japhb "accidentally" eats the last Trefoil
I wish I had some more Irish soda bread to accidentally eat .... 01:42
colomon .... oooo, that's good stuff too! 01:57
diakopter Mew 04:34
sorear \o/ diakopter !!! 04:36
diakopter niecza: say ^&$1^&$1 04:38
p6eval niecza v15-4-g1f35f89: OUTPUT«Use of uninitialized value in numeric context␤ at /home/p6eval/niecza/lib/CORE.setting line 1222 (warn @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 257 (Any.Numeric @ 6) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.se…
diakopter niecza: say 1^^1 04:41
p6eval niecza v15-4-g1f35f89: OUTPUT«Unhandled exception: System.Exception: Unable to find lexical &infix:<^^> in mainline␤ at Niecza.CLRBackend.NamProcessor.ResolveLex (System.String name, Boolean upf, System.Int32& uplevel, Boolean core) [0x00000] in <filename unknown>:0 ␤ at Niecza.CLRBac…
diakopter that might should say &infix:<^^> NYI
sorear: hi 04:42
pugs: say 1^^2 04:44
p6eval pugs b927740: OUTPUT«␤»
diakopter niecza: say ^4^4..4 04:45
p6eval niecza v15-4-g1f35f89: OUTPUT«one(0..^4..4, 4..4)␤»
diakopter hee
diakopter niecza: say 1..^^4 04:50
p6eval niecza v15-4-g1f35f89: OUTPUT«1..^4␤»
sorear diakopter: was "hi" a ping or a pong? 04:52
diakopter pong
niecza: say (@4-@4)/(@4*@4) 04:54
p6eval niecza v15-4-g1f35f89: OUTPUT«0␤»
diakopter niecza: say %2 05:02
p6eval niecza v15-4-g1f35f89: OUTPUT«Unhandled exception: Unmatched key in Hash.LISTSTORE␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (Any.hash @ 1) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /tmp/YSprTZMAtf line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3838 (A…
diakopter eh
diakopter niecza: say 1 05:12
p6eval niecza v15-4-g1f35f89: OUTPUT«1␤»
Teratogen I didn't hit her, it's not true, it's bullshit I did not hit her, i did NOT! Oh, hi, TimToady. 05:57
sorear calm down. hi. 06:05
moritz good morning 07:05
sorear good morning moritz 07:17
Teratogen hi sorear.
sorear hugs Teratogen 07:18
this time, I won't do that ironic thing where I forget you have a memory problem and harrass you away 07:19
TimToady moritz: hugme didn't add someone earlier to perl6, and we're suspecting it needs to reverify its public key or some such 07:20
moritz TimToady: whom?
sorear hi TimToady
moritz oh, find it in the backlog 07:23
seems I need to debug hugme a bit :/
TimToady ranguard
I added him on the web page 07:24
moritz didn't find him in the team
TimToady: I usually just add people to the 'perl6' team, which gives them commit bit to nearly all perl6 repos. Less administrative overhead that way. 07:25
TimToady that's what I did
he looks there to me 07:26
moritz didn't look there to me before I added him too :-) 07:28
thought maybe I'm just too sleepy
TimToady well he was sufficiently added earlier to check something in :)
Teratogen TimToady, do you think Linus Torvalds is a fascist!?
TimToady at irclog.perlgeek.de/perl6/2012-03-13#i_5287837 was his checkin 07:29
sorear non sequiter. 07:31
moritz TimToady: right :-) 07:33
\o/ dev.perl.org/perl6/ going away
it was a hassle to keep updated, and I did a very poor job at it 07:34
sorear out. 07:40
jnthn Hm. It's morning again already...
Though, also last day of work for a while :) 07:41
moritz \o/ 07:47
moritz the more I use twitter, the less I'm amazed by it 08:28
I got a reply to one of my tweets, and got a reply rather quickly, and was notified by email. And five minutes later it still can't be found on the web page 08:29
</rant> 08:31
DrEeevil eventually consistent distributed systems :) 08:33
moritz eventually. 08:34
huf the system is consistent when complaints sstop 08:35
moritz :-) 08:36
huf i wonder what this phenomenon is called by serious people 08:37
DrEeevil gmail has the same issues, I've seen lag of ~2h reported from people I sent a mail, but the mailserver and header timestamps claim "immediate" arrival 08:41
moritz well, email never claimed to be synchronous 08:42
I don't know if twitter evered claimed that, but somehow I thought it was
DrEeevil no, I mean server takes email at time now, but the webui shows it at now +2h 08:44
so people get really annoyed because it's "missing"
moritz yes, I know
DrEeevil doesn't use gmail :)
tadzik good morning 09:37
moritz \o tadzik 09:43
eiro hello all 09:46
tadzik, want to be added to the thread about fpw (and perl6 course) ? 09:47
tadzik eiro: sure
bbkr good morning 10:02
masak good prenoon, #perl6 10:07
tadzik hey hey 10:08
masak nom: .say for 'hey' Zxx 1..3 10:10
p6eval rakudo fee891: OUTPUT«hey␤»
masak nom: .say for 'hey' <<xx<< 1..3
p6eval rakudo fee891: ( no output )
masak nom: .say for 'hey' >>xx>> (1..3)
p6eval rakudo fee891: OUTPUT«hey␤»
masak nom: .say for 'hey' <<xx<< (1..3) 10:11
p6eval rakudo fee891: OUTPUT«hey␤hey␤hey␤hey␤hey␤hey␤»
masak nom: .say for ('hey' <<xx<< (1..3)).fmt
p6eval rakudo fee891: OUTPUT«hey hey hey hey hey hey␤»
masak :P
nom: .say 'hey' xx $_ for 1..3 10:12
p6eval rakudo fee891: OUTPUT«===SORRY!===␤Confused␤at /tmp/Z0E6Yte45f:1␤»
masak nom: say 'hey' xx $_ for 1..3
p6eval rakudo fee891: OUTPUT«hey␤hey hey␤hey hey hey␤»
masak \o/
moritz nom: say 'hex' Zxx (1..3) 10:23
p6eval rakudo fee891: OUTPUT«hex␤»
moritz nom: say 'hex' Xxx (1..3) 10:24
p6eval rakudo fee891: OUTPUT«hex hex hex hex hex hex␤»
moritz nom: say 'hex' Xxx 1..3
p6eval rakudo fee891: OUTPUT«hex hex hex hex hex hex␤»
moritz nom: say ('hex' Xxx 1..3).tree>>.fmt 10:24
p6eval rakudo fee891: OUTPUT«hex hex hex hex hex hex␤»
moritz nom: say ('hex' Xxx 1..3).tree>>.join('|')
p6eval rakudo fee891: OUTPUT«hex hex hex hex hex hex␤»
moritz nom: say ('hex' Xxx 1..3).tree.perl 10:25
p6eval rakudo fee891: OUTPUT«("hex", "hex", "hex", "hex", "hex", "hex").list␤»
moritz nom: say ('hex' Xxx 1..3).lol.perl
p6eval rakudo fee891: OUTPUT«Method 'lol' not found for invocant of class 'List'␤ in block <anon> at /tmp/AeSf0zHxtE:1␤␤»
moritz nom: say ('hex' Xxx 1..3).LoL.perl
p6eval rakudo fee891: OUTPUT«Method 'LoL' not found for invocant of class 'List'␤ in block <anon> at /tmp/FKecir5gOc:1␤␤»
masak sorear: it's "non sequitur" with a "u". "sequor" is one of them "deponent" verbs in Latin, that is, actives looking like passives. 10:37
arnsholt Deponens being "put down", since the verbs don't have active forms at all 10:46
arnsholt The verbs having put down the active system, as it were 10:47
masak ooh, that's why they're called that. 10:49
it reminds me of cognominal's "dépotoir" clarifications yesterday. 10:50
timotimo colomon: you replied to my gist (fibonacci with memoization), have you created a forked gist or something? i can't seem to find your code anywhere besides the email i got 10:57
colomon timotimo: sorry, I replied to yours, then discovered the comment formatting was awful, deleted the comment and made another gist: gist.github.com/2026007 10:58
note that the code in question is not actually tested, but the theory involved in both examples is sound. :) 10:59
timotimo oh, okay, that would explain it
timotimo i'll try some git magic to merge your stuff into my gist, see if that works 11:01
colomon well, I guess my second example could use a better error message when passed negative numbers. ;) 11:04
timotimo heh. good thing in perl array access with negative numbers doesn't count from the end ;) 11:05
moritz perl6: say <a b c>[$_ % *] for -2 .. 8 11:22
p6eval rakudo fee891, niecza v15-4-g1f35f89: OUTPUT«b␤c␤a␤b␤c␤a␤b␤c␤a␤b␤c␤»
..pugs b927740: OUTPUT«a␤a␤a␤a␤a␤a␤a␤a␤a␤a␤a␤»
moritz loves that feature 11:23
masak std: my @a; say @a[ -2 ] 11:34
p6eval std 1ad3292: OUTPUT«===SORRY!===␤Unsupported use of [-2] subscript to access from end of array; in Perl 6 please use [*-2] at /tmp/ZH65NJtx8A line 1:␤------> my @a; say @a[ -2 ]⏏<EOL>␤Parse failed␤FAILED 00:01 111m␤»
masak I will expect that [-2] subscript to be OK for arrays declared with :map
though... hm. 11:35
difficult to determine in the general case, I guess.
as arrays start flying around a program, whether a variable contains something with a :map is probably not knowable at compile time. 11:36
[Coke] quick, do we have a batarang operator? 12:50
moritz batarang? 12:51
moritz hm, I'm not aware of one 12:52
masak suddenly I want one, thought. what is it?
Teratogen quick, to the batcave!
masak holy batarang operator, Batman.
masak oh. 12:59
"batarang" is a portmanteau of "bat" and "boomerang".
so I guess infix:<^^> would be the closest in shape.
timotimo there may even be a unicode for it 13:00
gfldex batarangs are illegal in europe. Please don't make perl 6 illegal in europe :(
masak gfldex: this is news to me. how come a fictional throwing weapon is made illegal? 13:01
mikec perl 6 is illegal in europe? 13:02
:(
gfldex because they are basicly shuricans
and shuricans are a throwing weapon that can penetrate the human skill
don't kill humans plox
mikec that sounds dangerous
moritz so our bricks
gfldex weapons regulation don't follow logic 13:03
mikec imagines a raid on the p6 hackathon
moritz good that Norway isn't in the EU :-)
mikec "drop the batarangs and put your hands in the air"
timotimo colomon: you know what'd be even better in my opinion?
putting the @fib as a state into the sub
gfldex that might be the reason why norway got a bit of a shooter problem last summer
colomon timotimo: :) 13:04
mikec moritz: that explains the location! 13:04
timotimo colomon: gist.github.com/1932925 like this 13:05
what's the name for those lists that have a block, "..." and an end value in them?
colomon timotimo: does that work? I would think it would need to be @fib_list :=
moritz timotimo: sequence
infix ... is the sequence operator 13:06
timotimo thanks
colomon: it seems to work in rakudo, so yeah, i guess?
colomon weird
[Coke] moritz: infix isnt' a sequence operator. 13:07
colomon niecza goes into an infinite loop if I use the code as you gave it
timotimo perl6: sub fib(Int $x) { state @fib_l = 0, 1, * + * ... *; say @fib_l[$x]; } fib(0); fib(1000)
p6eval pugs b927740: OUTPUT«*** ␤ Unexpected "@fib_l"␤ expecting "=", context, ":" or "("␤ at /tmp/wAta0CcnIc line 1, column 25␤»
..rakudo fee891: OUTPUT«===SORRY!===␤Confused␤at /tmp/HTB_CM48Fw:1␤»
..niecza v15-4-g1f35f89: OUTPUT«===SORRY!===␤␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/YvMH5vn8Na line 1:␤------> l = 0, 1, * + * ... *; say @fib_l[$x]; }⏏ fib(0); fib(1000)␤␤Parse failed␤␤»
colomon but state @fib_list := 0, 1, * + * ... *; gets an error: Cannot use bind operator with this LHS
moritz just use a constant 13:08
constant @fib_list := 0, 1, * + * ... *;
that should work with both rakudo and niecza
masak moritz: Norway may not be in the EU, but it's in Europe, the Council of Europe, and the European Economic Area. en.wikipedia.org/wiki/Template:Supr...ean_Bodies 13:09
timotimo perl6: sub fib(Int $x) { state @fib_l = 0, 1, * + * ... *; say @fib_l[$x]; }; fib(0); fib(1000);
that's better
p6eval niecza v15-4-g1f35f89: OUTPUT«(timeout)»
..rakudo fee891: OUTPUT«0␤43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected "@fib_l"␤ expecting "=", context, ":" or "("␤ at /tmp/QI4XDUllFH line 1, column 25␤»
moritz masak: *nod*
masak nom: constant fib = 0, 1, * + * ... *; say fib[10]
p6eval rakudo fee891: OUTPUT«55␤»
masak timotimo: even better :)
timotimo right, constant makes more sense but still carries the same "initialise only once" thing as state does 13:12
masak I don't know why, but I really like that constant lazy lists grab some of the ecological niche that memoizing subs previously occupied. 13:15
moritz the only problem being that you can't limit the cache size
timotimo well, if the block you use in there is side-effect free (and how am i supposed to find out, huh?) the cache could always be cleared and data could be re-evaluated 13:21
masak lazy lookahead: that seems to turn up over and over again as a limitation and a problem.
timotimo if the blocks have side-effects and execution order has some kind of guarantee, then enh.
masak what was the advantage again?
moritz timotimo: the optimizer might determine purity in some cases 13:23
Teratogen [] is an operator 13:38
it magically turns something into an array and returns a reference
I guess it is an "outfix" operator?
or circumfix, I guess
colomon niecza: constant fib = 0, 1, * + * ... *; say fib[10]
p6eval niecza v15-4-g1f35f89: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object␤ at Niecza.Kernel.ToComposable (Niecza.STable arg, Niecza.STable cls) [0x00000] in <filename unknown>:0 ␤ at Niecza.Kernel.ApplyRoleToClass (Niecza.ST…
colomon Teratogen: postcircumfix, I believe is what TimToady++ uses. 13:39
moritz well, [] can be both postcircumfix and circumfix
say [1, 2] # circumfix
colomon niecza: constant @fib = 0, 1, * + * ... *; say @fib[10]
p6eval niecza v15-4-g1f35f89: OUTPUT«===SORRY!===␤␤Bogus term at /tmp/navcNhXZ5N line 1:␤------> constant @fib = 0, 1, * + * ...⏏ *; say @fib[10]␤␤Parse failed␤␤»
Teratogen well I am talking abouit things like [ /(foo)/ ]
about
*
moritz niecza: constant @fib = 0, 1, * + * ... *; say @fib[10]
p6eval niecza v15-4-g1f35f89: OUTPUT«55␤»
moritz colomon: you had an odd character in there 13:40
colomon moritz: ah
I knew it was working locally. :)
moritz it was printed as a backslash in invereted colors here :-) 13:42
colomon It looks perfectly normal here. :( 13:43
moritz the IR clogs haven't captured it either :/ 13:44
masak nom: sub pluralize($_) { when /x$/ { $_ ~ "es" }; when /^(.+?)y$/ { $0 ~ "ies" }; default { $_ ~ "s" } }; say .&pluralize for <pencil box baby> 14:26
p6eval rakudo fee891: OUTPUT«pencils␤boxes␤babies␤»
masak \o/
tadzik nice 14:43
timotimo nom: sub pluralize($_) { when /x$/ { $_ ~ "es" }; when /^(.+?)y$/ { $0 ~ "ies" }; default { $_ ~ "s" } }; say .&pluralize for <octopus> 14:44
p6eval rakudo fee891: OUTPUT«octopuss␤»
timotimo but it should be octopi!!!!!!!!kkκκ
masak nom: sub pluralize($_) { when /[x|s]$/ { $_ ~ "es" }; when /^(.+?)y$/ { $0 ~ "ies" }; default { $_ ~ "s" } }; say .&pluralize for <octopus>
p6eval rakudo fee891: OUTPUT«octopuses␤»
masak :)
.u κ 14:45
phenny U+03BA GREEK SMALL LETTER KAPPA (κ)
timotimo masak: in case you're wondering, i'm typing neo2, which has the ! on the k key (and κ is on the k key as well), so that's my equivalent of !!!!!!!!1111oneone 15:48
masak interesting. 15:49
what's neo2?
timotimo neo-layout.org is their website, they have a interactive graphic on the front page
TimToady yanqk? 15:50
arnsholt timotimo: octopodes is acceptable as well =) 15:58
TimToady we need a Zop variant that goes the length of the longest list rather than the shortest, and supplies the identity value of op for missing values 16:00
rosettacode.org/wiki/Balanced_ternary#Perl_6 has a couple places that would be simplified with that, especially in infix:<+> where we don't even know which set of coefficients is longer, so have to order them before applying Z+ and 0 xx * 16:04
masak nom: sub zip-longest(@a, @b, &c) { gather { while @a || @b { take &c(@a.shift // 0, @b.shift // 0) } } }; zip-longest [1, 2, 3], [10, 20, 30, 40, 50], *+*
p6eval rakudo fee891: ( no output )
masak nom: sub zip-longest(@a, @b, &c) { gather { while @a || @b { take &c(@a.shift // 0, @b.shift // 0) } } }; .say for zip-longest [1, 2, 3], [10, 20, 30, 40, 50], *+*
p6eval rakudo fee891: OUTPUT«11␤22␤33␤40␤50␤»
masak feels almost like it could be an adverb on Z+ 16:05
adverbs were all the rage back in 2003, but we don't use them a lot on operators.
TimToady or we could resurrect Yop as something that is almost a Z 16:06
the "Yes, we can!" op :)
TimToady except, of course, that it's backwards, since Y comes before Z, and so should return something shorter :) 16:07
masak ZZ+ 16:07
TimToady except it looks like Z[Zop], which is currently legal, if non-sensical (?) 16:08
masak then we can make ZZ top puns.
benabik ZZop is about having the longest list?
TimToady it seems a shame to know op's identity value and not provide a way to assume it 16:09
benabik And ZZ Top is about about having the longest beards.
felher "Identity values"? So (1,2,3) Y+ (1,2,3,4) would be (1,2,3,0) Z+ (1,2,3,4)?
benabik r: say infix:<+>()
p6eval rakudo fee891: OUTPUT«0␤»
TimToady yes, just as [*]() returns 1
perl6: say [*]()
p6eval pugs b927740, rakudo fee891: OUTPUT«1␤»
..niecza v15-4-g1f35f89: OUTPUT«0␤»
TimToady so Z* would assume 1 16:10
benabik Except in niecza, apparently.
felher Okay. What about user-defined operators? 16:11
masak std" say [*]()
std: say [*]()
p6eval std 1ad3292: OUTPUT«ok 00:01 109m␤»
masak felher: you provide default values for your user-defined operators. 16:12
benabik Rakudo uses zero-arg versions of the operators for identity. I don't know if that's spec or just convenience.
colomon errr.... wasn't the old way to do that something like making the shorter list 1, 2, 3, * ?
masak felher: otherwise they will fail when you try to reduce them, etc.
TimToady S03:4481
felher masak: i see. Sounds nice :) 16:12
masak oh, it's nice :) 16:13
benabik ponders switching to a IRC client where I could have a custom filter for spec links like the logs do.
felher TimToady: thansk :)
benabik n: say infix:<*>()
p6eval niecza v15-4-g1f35f89: OUTPUT«Unhandled exception: No value for parameter '$l' in 'infix:<*>'␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (infix:<*> @ 1) ␤ at /tmp/Rng6J6KEtb line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3838 (ANON @ 3) ␤ at /home/p6eval/n…
benabik Ah. I guess that's why [*]() behaves as it does. 16:14
TimToady n: say infix:<[*]>()
p6eval niecza v15-4-g1f35f89: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'infix:<[*]>' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1362 (die @ 3) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 33) ␤ a…
TimToady n: say prefix:<[*]>()
p6eval niecza v15-4-g1f35f89: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'prefix:<[*]>' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1362 (die @ 3) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 33) ␤ …
TimToady oh, I was reading n as nom :/ 16:16
TimToady goes searching for more caffiene
benabik TimToady: I'm glad I'm not the only one. But I eventually adapted because I couldn't spell niecza reliably. :-D
daxim journal.dedasys.com/2010/03/30/wher...went-wrong # reading that, I'm glad that p5p's decisions turned out more good than bad 16:17
colomon was recently pondering an infix Q metaop (casts both arguments to FatRat before executing op) 16:18
benabik Q? 16:18
felher benabik: en.wikipedia.org/wiki/Rational_number 16:20
benabik Oh.
Haven't run across that before. Interesting.
nwc10 so, if I understand it correctly, q-regex is what's used for user space regexs, er "rules", and it's git://github.com/perl6/nqp.git and it's written in NQP 16:21
colomon benabik: Rop is already taken, and people seemed to frown on F for FatRat. :) 16:22
nwc10 what's the name of the regex engine used (currently) for Rakduo parsing Perl 6 code? The one written in PIR that jnthn is working on retiring?
sorear isn't qregex used for everything now (in Rakudo)?
benabik I don't think QRegex is used to parse NQP yet. There were some bootstrapping issues, IIRC
sorear I don't think it has a name.
colomon hmmm... though would Qop interfere with quote operators?
nwc10 sorear: somewhere in 6guts.wordpress.com/ it says "Most immediately, that will be getting QRegex to be the engine we use to parse NQP and Perl 6 code (currently, we use QRegex for compiling the regexes and grammars you write in your Perl 6 programs, but still use the previous generation engine for parsing Perl 6 source)." 16:23
anyway, is the old nameless one the code at git://github.com/perl6/nqp-rx ?
moritz no, git://github.com/perl6/nqp 16:24
sorear yes, in PAST::Compiler::Regex
modulo moritz
masak QRegex hasn't taken over the Rakudo world yet.
moritz well
sorear o/ MASAK
masak sorear! \o/
moritz QRegex has taken over rakudo userspace
masak right. but not the compiler parsing.
moritz but QRegex isn't yet used to parse Perl 6 code
nwc10 so qregex is in which git respository?
masak which is an odd order of things, in a way :)
moritz nwc10: it's also in git://github.com/perl6/nqp
nwc10 aha. :-) 16:25
masak I'm now blocking on QAST, so I'll likely be investigating that in the coming weeks.
moritz two regex engines in one repo!
sorear nwc10: I haven't been folowing the rakudo world closely, but remember that things are changing quickly and blog posts are often dated
moritz buy one, get one free!
arnsholt colomon: I think Qop could work
masak as far as I understand, QAST exists for regexes, but needs to be extended to all of Perl 6.
nwc10 sorear: that one's dated March 9th :-)
sorear Maybe it's not too old then. :-)
arnsholt Qop would be in operator places and Q quotes in term places, so they should be able to coexist 16:26
arnsholt OTOH, it might make syntax highlighting and possibly people unhappy 16:27
sorear arnsholt: what if colomon wants Q[prefix]? 16:27
masak arnsholt: the introduction of Qop won't make Perl 6 syntax highlighting more intractable than it already is. 16:28
nwc10 thanks. things make more sense now.
nwc10 hopes that Qregex and QAST both arrive soon
arnsholt masak: That's true =)
nwc10 and sorry, I'm not in a position to help with making that happen.
moritz masak: how are you blocking on QAST? 16:29
masak moritz: the AST format we emit needs a new type to handle quasi placeholders. no sense in adding it to PAST since it's going away. 16:30
well, I could, I guess. 16:31
just for fun.
but I'd rather work on getting QAST to where we can use it.
TimToady hmm, with a P metaop that 'pads' the shorter list, we could then have ZP+, and maybe XP+ would then guarantee a "square" result 16:39
timotimo perl6: sub test($a is rw) { $a += 5; POST { $a > 0 } }; my $test = 9; test($test); say $test; 16:40
p6eval rakudo fee891: OUTPUT«===SORRY!===␤POST phaser not yet implemented. Sorry. ␤at /tmp/cFG82m_ioC:1␤»
..pugs b927740, niecza v15-4-g1f35f89: OUTPUT«14␤»
timotimo perl6: sub test($a is rw) { $a += 5; POST { $a > 0 } }; my $test = -9; test($test); say $test; 16:41
p6eval rakudo fee891: OUTPUT«===SORRY!===␤POST phaser not yet implemented. Sorry. ␤at /tmp/xpNAUvxv5K:1␤»
..pugs b927740: OUTPUT«*** POST assertion failed: "&test"␤ at /tmp/594g9mlzak line 1, column 65-76␤»
..niecza v15-4-g1f35f89: OUTPUT«Unhandled exception: Post-constraint failed for test␤ at /tmp/I18fXZA3p_ line 0 (test @ 1) ␤ at /tmp/I18fXZA3p_ line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3838 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3839 (mod…
timotimo cool, that pugs does it already :p 16:41
masak TimToady: that feels like a not very general metaop at all. 16:45
TimToady: OTOH, if you can supply it in a script with one line of code, then everyone wins :) 16:46
TimToady refrains from mentioning non-term macros 16:47
masak :) 16:51
sorear There's no reason metaops have to be one character. 16:53
TimToady or we could just make P the "pairwise" form of Z that believes in pairs so much that it will turn a singleton into a pair 16:55
moritz let's call it PKZIP ;-) 16:56
TimToady let's call colomon's fatratter QAST :)
masak I'm not against non-term macros. I just haven't seen a sane spec for them yet. 16:57
(and I'm rather disinclined to replace the current macro spec with one with implementability issues) 16:58
Teratogen Gone are the good old days of the simple but powerful C text preprocessor 17:01
*sigh*
moritz C text processors still exist 17:02
doy looking back on the c preprocessor with fondness indicates to me that you never really used c seriously
Teratogen They took -P out of Perl 5 =/ 17:03
masak Teratogen: simple, yes. powerful, no. lots of well-known and well-understood problems, weaknesses, and issues: oh yes. 17:05
Teratogen: anything that p5p decide to do that ultimately makes Perl 5 less of a pain to manage has my immediate approval. 17:06
if you want to pre-process your Perl code, write a script that preprocesses your Perl code.
TimToady by that argument, p5p should just abandon Perl 5 :P
doy hey now d:
masak that... wasn't what I meant. :P 17:07
also, I don't actually know whether that's true.
something abandoned can be quite a pain to manage.
masak decommutes 17:08
Teratogen Why was -P added to Perl 5 in the first place. Does anyone know?
Well, maybe it was in Perl 4 too!
TimToady it seemed like a good way to trick C programmers into using Perl 17:15
but users are what ultimately cause languages like Tcl and Perl(5) to ossify and not keep up with the modern world 17:17
so we're trying not to have any users yet for Perl 6 :)
LoRe what's that -P you're talking about? 17:19
daxim text preprocessor, see above 17:20
benabik There's a cartoon on my sysadmin's wall. "I fixed the system." "By unplugging the network cable?" "It runs so much faster without all those users on it." 17:21
sorear sounds like something from old UserFriendly 17:22
daxim remember when UF was good? 17:23
sorear I stopped paying attention before it turned bad 17:24
TimToady UF⃠
sorear checks colomon's blog 17:25
so, this z function 17:26
I can't help but notice that it's related to the modular group
arnsholt sorear: It's practically a snowclone, I think 17:27
Working in retail is nice, if it weren't for all the customers; academia/students, and so on 17:28
sorear snowclone?
arnsholt Idiom with replaceable parts (en.wikipedia.org/wiki/Snowclone) 17:29
Like X is the new Y 17:30
sorear has, unrelatedly, been reading a lot about modular forms lately; wonders if there is a connection with continued fractions
TimToady modular forms are the new catalan numbers :) 17:31
moritz :-)
sorear o/ fglock 17:35
fglock o/ 17:38
masak I understand Catalan numbers, but I don't grok modular forms. I do love complex analysis, though, and they seem related. 19:20
TimToady Catalan numbers are so, like, two days ago... 19:21
masak .oO( halp, TimToady is peer-pressuring me into liking the New Math! ) 19:24
TimToady it is, of course, completely hypocritical on my part, but the world would not work without hypocrisy 19:25
[Coke] yawns. 19:26
TimToady Snowclones are so, like, two hours ago. 19:27
masak autopuns, however, are very in. 19:28
it's been said that the eskimos have over 4000 words for "snowclone".
TimToady Autopuns are always in, except when they're not.
masak I think there's a strong correlation between people of the #perl6 persuasion and people with a need to make autopuns. 19:30
and not just because we've started pointing them out, I mean, but generally. 19:31
TimToady well, that's just because with something like Perl you can also have manual puns
masak what, like &eval? 19:32
"yo dawg, I know you like to run code..." 19:33
timotimo so, when i have a block that i want to run at compile time (like FIRST, i think?), can i put a block into that that i want to have run at the time when that time gets compiled, before it gets run? :) 19:34
tadzik nom: eval "eval\"eval'say 5'\""
p6eval rakudo fee891: OUTPUT«===SORRY!===␤Confused␤at eval_0:1␤»
tadzik nom: eval "eval \"eval 'say 5'\""
p6eval rakudo fee891: OUTPUT«5␤»
tadzik dawg
TimToady timotimo: that would be a BEGIN block, and yes, you may nest 'em 19:35
masak nom: BEGIN { BEGIN { say "yo dawg" } }
p6eval rakudo fee891: OUTPUT«yo dawg␤»
timotimo hah, great :)
masak nom: BEGIN { END { say "hm" }; say "when do" }; say "things run?" 19:36
p6eval rakudo fee891: OUTPUT«when do␤things run?␤hm␤»
masak fair enuf.
nom: BEGIN { my $a = 42; END { say $a } }
p6eval rakudo fee891: OUTPUT«Any()␤»
TimToady nom: BEGIN { say "dawg"; BEGIN { say "yo" } } 19:37
p6eval rakudo fee891: OUTPUT«yo␤dawg␤»
masak submits rakudobug
nom: my $a = 42; END { say $a }
p6eval rakudo fee891: OUTPUT«42␤»
masak both should work, IMNSHO.
it's like PRE and POST ;)
timotimo i can see how, yes
jnthn evneing, #perl6 19:38
masak jnthn! \o/
fsergot jnthn \o/
:)
jnthn masak: What exaclty did you just submit a Rakudo bug about?
oh, the END not seeing the $a... 19:39
Yeah, that's probably wrong.
TimToady This sentence no autopun. 19:40
timotimo not sure why the END block inside the BEGIN block gets run after the outer block, but i suppose that's all right? what do i know?
jnthn END gets run as late as possible
TimToady you'd want a LEAVE for that
timotimo ah, ok
jnthn Rakudo takes this to include END statements that show up inside eval.
The spectests disagree, though. 19:41
TimToady nom: BEGIN { LEAVE { say "dawg" }; BEGIN { say "yo" } }
p6eval rakudo fee891: OUTPUT«yo␤dawg␤»
timotimo oh? i think that sound okay. if it's "as late as possible" and you can do it later than the spec says, well ...
don't follow the letter, follow the spirit, yes?
jnthn (That is, END blocks in evals don't run after the eval, then run at program exit).
timotimo: The spec doesn't say anything on this afaik 19:42
spectests != spec ;)
TimToady ALAP means just that
timotimo well, okay, but the synopsis says ALAP, doesn't it?
jnthn Right, so Rakudo is right in this case :)
jnthn will correct the tests when he gets a round tuit. Or somebody else can beat him to it. :)
.oO( beat him tuit... )
TimToady hands jnthn a tuit-shaped cookie 19:43
TimToady or was that a cookie-shaped tuit... 19:43
masak mmm, tuits.
tadzik hello jnthn 19:44
jnthn o/ tadzik
Tene masak: I don't recall if I followed up... is gist.github.com/1955491 sufficiently golfed for a bug report? 19:44
felher tadzik: if i do 'nom --doc lib/Pod/To/HTML.pm' i get >>>Nominal type check failed for parameter '$name'; expected Str but got Block instead<<< . Do i need to use something different from current nom or am i just on the wrong track? 19:47
tadzik felher: let me see 19:48
tadzik felher: yeah, reproduced. Let me take a look 19:49
felher tadzik: kk :) 19:50
masak Tene: looks like. kudos. 19:54
Tene If you remove the actions, it parses fine.
masak submits rakudobug
Tene Looks like it fails with a different error in newer rakudo. 19:54
libertyprime Hey. I was just wondering what kind of things the perl 6 grammars will be used for. Just extending the language, or for parsing general purpose files etc 19:55
tadzik felher: it'd seem that --doc is just broken in Rakudo recently 19:56
due to phasers stuff
masak n: grammar Foo { token e { 'a' <e> { make 'a' ~ $<e>.ast | ';' { make ';' } } }; my $m = Foo.parse("aaaa;", :rule('e')); say $m.gist; say $m.ast
p6eval niecza v15-4-g1f35f89: OUTPUT«===SORRY!===␤␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/rBSJdVaXIF line 1:␤------> e { 'a' <e> { make 'a' ~ $<e>.ast | ';' ⏏{ make ';' } } }; my $m = Foo.parse(…
tadzik there must be no spectest for --doc
masak r: grammar Foo { token e { 'a' <e> { make 'a' ~ $<e>.ast } | ';' { make ';' } } }; my $m = Foo.parse("aaaa;", :rule('e')); say $m.gist; say $m.ast
p6eval rakudo fee891: OUTPUT«Method 'message' not found for invocant of class 'Any'␤»
masak r: grammar Foo { token e { 'a' <e> | ';' } }; my $m = Foo.parse("aaaa;", :rule('e')); say $m.gist; say $m.ast 19:57
p6eval rakudo fee891: OUTPUT«=> <aaaa;>␤ e => <aaa;>␤ e => <aa;>␤ e => <a;>␤ e => <;>␤␤Any()␤»
Tene Huh; wonder why I didn't try it in a single rule.
masak this is your gist, just with 'element' renamed 'e'.
felher tadzik: I see. Thanks :)
Tene Oh man, reading is hard. 19:58
masak ;)
Tene I also ran into a separate bug with naming a rule 'kv'.
I don't quite remember what it was, though. 19:59
tadzik jnthn: pingy
jnthn tadzik: pongy
jnthn ...er, that wasn't a description :) 20:00
tadzik jnthn: can you think of anything that'd magically break DOC phasers after your recent changes?
jnthn tadzik: I don't remember touching those...
...though maybe that is the issue ;-)
tadzik :) 20:01
jnthn I can't think of anything right off. What sort of magic breakage have we got?
tadzik $ cat dupa.pl && perl6 --doc dupa.pl
DOC INIT { say "foobar" }
===SORRY!===
Nominal type check failed for parameter '$name'; expected Str but got Block instead
sorry for the tiny paste
jnthn It prolly is my fault. --ll-exception says it's inside add_phaser, which I did meddle with of late. 20:03
masak Tene: if you find it again, it may merit a distinct ticket.
Tene: there are clear problems with using some already taken methods names, though.
jnthn tadzik: yeah, I'm to blame 20:04
I changed the argument order in add_phaser to make it saner.
And missed updating DOC
tadzik I see
shall I fix this? 20:05
jnthn method statement_prefix:sym<DOC>($/) {
- $*W.add_phaser($/, ($<blorst>.ast)<code_object>, ~$<phase>)
+ $*W.add_phaser($/, ~$<phase>, ($<blorst>.ast)<code_object>)
if %*COMPILING<%?OPTIONS><doc>;
Try that patch
(or I can in a little bit)
tadzik I will, and I'll think about a spectest for that 20:06
jnthn tadzik++ 20:07
tadzik heh, I'm mostly maintaining Pod these days
I started thinking about this year's GSoC 20:11
one idea is the full-blown module infrastructure, with all of PAUSE6, CPAN6 and CPAN6.pm workalikes
tadzik the second is a full blown web framework, along with docs, examples, propaganda etc. Something along "look, one can do useful stuff now" 20:12
colomon +2
or rather, +1 +1
tadzik now what if you had to choose one? 20:14
I think there's no need (yet) for a proper module infrastructure; or rather: we can live without it
masak yeah. go for the web framework. 20:15
tadzik on the other hand, I've already talked to people saying "I'll probably use Perl 6 if I could write stuff with it, like a small website"
I told him about bailador, MiniDBI and essentially having everything already in place
masak: I could learn/pick up stuff from Web.pm too
masak yes, you have to. 20:18
masak there are good ideas in there. they just didn't fit in an ill-specified 11 week grant. 20:19
tadzik right
moritz backlogs 20:21
tadzik: I have a third suggestion: bring MiniDBI and drivers in a usable shape
tadzik: if you don't like that, I#d prefer the web framework over the modules stuff
though I'm +1 xx 3 20:22
tadzik moritz: I think if I did web stuff, bringing DBI to a usable shape would be either a prerequisite or a part of the work 20:24
moritz tadzik: well, bringing one of the drivers could be part of the web stuff. Doing all (mysql, postgres, sqlite) would be enough for a full GSOC project, I think 20:26
masak depends on what you consider web stuff ;)
colomon I think I'd prefer the web stuff over modules as well -- I think with another week or two's work, we'd have the module stuff solid enough to support what is needed for p6 for now.
tadzik okay, DOC fixed
dalek kudo/nom: 34b7b10 | tadzik++ | src/Perl6/Actions.pm:
Fix DOC phasers for the new add_phaser() API. felher++ for noticing
20:31
tadzik felher: should work now :)
felher tadzik: *testing*
moritz tadzik++ 20:32
felher tadzik++ : works like a charm :) 20:35
libertyprime Hey guys. I was wondering if there will be an option to disable backtracking in normal regex, not just with tokens 20:51
tadzik :ratchet does that I think 20:52
libertyprime tadzik: chur bro 20:55
masak libertyprime: hey -- welcome! 20:57
moritz r: say so 'aaa' ~~ /a+a/ 21:00
p6eval rakudo fee891: OUTPUT«True␤»
moritz r: say so 'aaa' ~~ /:r a+a/
p6eval rakudo fee891: OUTPUT«False␤»
[Coke] tadzik: congrats on the $dayjob! 21:01
colomon +1
tadzik thanks :) 21:23
libertyprime feels welcomed
masak OMG p6cc blog post! \o/ strangelyconsistent.org/blog/t3-addition-chains 21:31
gfldex libertyprime as in www.google.com/search?q=liberty+pr...p;tbm=isch ? 21:33
jnthn masak: The dynamic programming link in the wikipedia quote section looks busted 21:36
masak I noticed -- already on it.
should look fine in a minute or so.
jnthn++ for reporting it, though :) 21:37
there, fix'd.
jnthn masak: In strangelyconsistent.org/p6cc2011/t3/timtom/ you note "Inconsistent layout of braces after loop and conditional headers, sometimes there is a newline before the brace, sometimes not." - but I can't find a place wehre there is not. Am I missing it? 21:42
felher masak++ : nice post. Great that you explained so much and supplied many links :) 21:43
masak jnthn: no, nor any superstitious if parens. fixing.
jnthn masak: It's true of the author's second submission, but not the first. 21:44
masak jnthn: must've ended up in the rong place, then.
good catch.
felher masak: one thing, though: "Depsite arnsholt's quote above, it hasn't been proven NP-hard". Did you want to write NP-complete? 21:45
masak I feared I might've wanted that, yes... 21:46
jnthn One interesting note from strangelyconsistent.org/p6cc2011/t3/zbiciak/ is that where clauses could in theory have been used in the MAIN signature, but the error messages that resulted woulda been worse.
I wonder if there's a best of both world's solution :)
masak felher: though if it's not NP-hard, it's not NP-complete either, I guess. 21:47
felher masak: np-complete is a subset of np-hard. So there are Problems that are not NP-hard but NP-Complete.
masak jnthn: maybe if we can stringify the contents of blocks... :) 21:48
felher: right. better go with "NP-complete" then.
I don't think it has been proved either, but "NP-complete" is what arnsholt++ said.
felher++ # thanks 21:49
felher :)
arnsholt Oh, I thought I read that it was NP-complete 21:57
But that might be one of those more general ones you mention 21:58
masak as far as I know, it hasn't been shown to be NP-complete.
arnsholt Cool. You've probably got a better handle on it than me =) 21:59
I'm flattered to be picked for the cover blurb though =) 22:00
libertyprime gfldex: yeah, that's what inspired me! 22:08
gfldex :) 22:09
masak 'night, #perl6 22:50
felher o/ masak 22:52
jnthn Hm. Given I've got 16 hours worth of flying along with the various associated hours in airports coming up tomorrow...guess I should sleep too :) 22:54
'night o/
tadzik good night jnthn
felher o/ jnthn
jnthn tadzik: Oh, I forgot - congrats on the job! :)
'night o/
tadzik thanks jnthn :) 22:55
felher tadzik: what job? 22:56
tadzik felher: Perl dev at Opera
flussence wow, gj :)
felher tadzik: Opera? Those with their browser? 22:57
tadzik aye :) 22:58
flussence: yeah, it's pretty great
at a first glance at least, I'm starting on friday
felher tadzik: Oh nice. After all, Opera is my backup-browser in case uzbl doesn't display some page correctly. So the next time i have problems with my backup-browser... ... :) 23:00
tadzik: so, congrats from me, too :) 23:01
japhb Quite, congrats tadzik! 23:06
tadzik thank you :) 23:09
felher night folks 23:54
tadzik 'night
sorear good * #perl6 23:55
tadzik hello sorear 23:56