Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-09-12

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 araujo joined #perl6
00:04 leprevost joined #perl6
00:25 patspam left #perl6
00:28 tylercurtis jnthn: ooc, what's the rounding behavior of nqp::div_int?
00:29 patspam joined #perl6
00:29 patspam left #perl6
00:30 jnthn tylercurtis: Heh, good question.
00:30 jnthn tylercurtis: Whatever the C# % operator does :-)
00:30 jnthn tylercurtis: oh wait...rounding behavior?
00:31 jnthn nqp::div_int will never coerce in and of itself
00:31 p6eval nqp: OUTPUT«Confused at line 1, near ":div_int w"␤current instr.: 'parrot;HLL;Grammar;panic' pc 654 (src/cheats/hll-compiler.pir:206)␤»
00:31 jnthn If you don't provide it something that knows how to be unboxed to an int it'll just fail.
00:32 tylercurtis jnthn: nqp::div_int(3, 2) still needs to be rounded somehow.
00:32 jnthn oh, gah
00:32 jnthn div, not mod :-)
00:32 jnthn Yeah, you're right.
00:32 jnthn I'm not sure off hand. I'm sure / in C# is probably "whatever the CPU thinks" where the CPU is x86 though. ;-)
00:33 dalek 6model: c79e97e | jnthn++ | parrot/src/pmc/STable.pmc:
00:33 dalek 6model: Here starts the port of 6model to Parrot. This just begins to stub in an STable PMC. It ain't going to do a great deal more than this really - mostly just learn to freeze/thaw itself. Note, didn't even check if it compiles yet. :-)
00:33 dalek 6model: review: http://github.com/jnthn/6model/commit/c​79e97e6ad2ef65ec882b416af2e9a2699cdf8f6
00:33 dalek 6model: aa048af | jnthn++ | parrot/src/pmc/RakudoObject.pmc:
00:33 dalek 6model: Add a stub RakudoObject PMC with lots of comments about what it is/isn't.
00:33 dalek 6model: review: http://github.com/jnthn/6model/commit/a​a048af7e5ced854f453467d43f28e84baf6c985
00:33 dalek 6model: 1db95fb | jnthn++ | parrot/src/metamodel/repr.h:
00:33 dalek 6model: Add a struct containing a bunch of function pointers that map to the representation API (or at least, what we have got defined so far). Again, not checked it compiles yet - just stubbing with notes.
00:33 dalek 6model: review: http://github.com/jnthn/6model/commit/1​db95fb2319f4bdc7e507fcbe88b6ad1f9b9450c
00:33 jnthn I wouldn't take what 6model does from that angle with any value at all though.
00:33 jnthn I didn't even really consider it
00:33 jnthn Was more interested in modeling the box/unbox stuff.
00:34 tylercurtis Right. I'm not asking about what semantics is currently has so much as what it should have.
00:37 jnthn I guess see if S03 has anything to say about it under the div entry.
00:38 tylercurtis $x div $y is floor($x / $y), iirc.
00:43 whiteknight joined #perl6
00:53 patspam joined #perl6
00:59 tom_tsuruhara left #perl6
01:08 colomon floor sounds right.  I think it's fdiv in parrot
01:15 patspam left #perl6
01:20 guidjos joined #perl6
01:23 azert0x left #perl6
01:27 guidjos left #perl6
01:49 araujo left #perl6
02:05 TimToady rakudo: say (1/2 ** 3).WHAT
02:06 p6eval rakudo 9734b2: OUTPUT«Rat()␤»
02:07 TimToady rakudo: say (1 ** 3).WHAT
02:07 whiteknight left #perl6
02:07 p6eval rakudo 9734b2: OUTPUT«Int()␤»
02:07 TimToady rakudo: say (0 ** 3).WHAT
02:07 p6eval rakudo 9734b2: OUTPUT«Int()␤»
02:11 colomon rakudo: say ((1/2) ** 3).WHAT
02:11 p6eval rakudo 9734b2: OUTPUT«Num()␤»
02:11 colomon Ah, okay.
02:14 TimToady why's that a Num?
02:17 ipatrol_ joined #perl6
02:17 ipatrol_ perl6: say ah;
02:17 p6eval rakudo 9734b2: OUTPUT«Could not find sub &ah␤  in main program body at line 22:/tmp/N99oNidBlK␤»
02:17 p6eval ..pugs: OUTPUT«*** No such subroutine: "&ah"␤    at /tmp/oPLQnVaT3g line 1, column 5-7␤»
02:17 ipatrol_ perl6: say "ah";
02:18 p6eval pugs, rakudo 9734b2: OUTPUT«ah␤»
02:20 TimToady Doctor, it hurts when you do that...
02:21 * ipatrol_ gives TimToady some bicarbonate
02:22 TimToady <blurfsk>
02:25 ipatrol_ see, isn't it less painful to read code when you stick to a style?
02:28 ipatrol_ awk gave me an inspiration for a class syntax
02:28 colomon TimToady: because there is no Rat infix:<**> operator.
02:29 colomon guess there's no reason we couldn't have one, though, for positive Int powers
02:29 ipatrol_ $class = {BEGIN sub; my $data = $stuff; END cleanup;}
02:30 TimToady colomon: just hated having to write { $_ * $_ * $_ } in http://rosettacode.org/wiki/​Numerical_integration#Perl_6
02:31 colomon TimToady: well, just for you, I suppose...
02:32 ipatrol_ i think the awk thing is a perfect idiom
02:41 nimiezko joined #perl6
02:41 [Coke] left #perl6
02:43 TimToady we're trying to err on the non-minimalistic side of OO this time
02:43 colomon TimToady: do we want to add spectests to the effect that Rats raised to positive Ints should be Rats if possible?
02:43 TimToady works fo rme
02:43 TimToady *r <-- note the space here
02:46 ipatrol_ it's very compact and very familiar to any *nix administrator
02:46 colomon > say ((2/3) ** 3).perl
02:46 colomon 8/27
02:46 ipatrol_ looking like awk
02:50 tylercurtis ipatrol_: I'm not familiar with awk. What exactly would that syntax do?
02:51 ipatrol_ O.O
02:51 ipatrol_ perl is based on awk
02:51 \xF0 :/
02:52 tylercurtis I know what all the individual bits of it mean in Perl. I'm not sure what you are suggesting to make the combination mean.
02:53 ipatrol_ BEGIN would create the instance, the centerwould defime functions and atteibutes, and END would be called for destruction
02:55 tylercurtis It seems like that would require getting rid of the current meaning of BEGIN and END.
02:57 tylercurtis ipatrol_: What syntax would you want for roles?
02:58 nimiezko left #perl6
03:13 colomon TimToady: spectesting, but I'm going to go to bed before it's done.
03:14 TimToady thanks
03:16 mfollett joined #perl6
03:24 ingy rakudo: say (1..3 Xxx 1..3).perl
03:24 p6eval rakudo 9734b2: OUTPUT«((1), (1, 1), (1, 1, 1), (2), (2, 2), (2, 2, 2), (3), (3, 3), (3, 3, 3))␤»
03:24 ingy tupltastic
03:30 TimToady now if only we had slice context...
03:31 TimToady those are not yet tuples in the pythonic sense
03:33 meppel joined #perl6
03:33 mfollett left #perl6
03:36 meppl left #perl6
03:38 meppel is now known as meppl
03:42 mfollett joined #perl6
03:44 brxue joined #perl6
03:54 Schwern joined #perl6
03:55 petdance joined #perl6
03:57 mfollett left #perl6
03:58 tylercurtis Good night, #perl6.
03:58 TimToady o/
03:59 tylercurtis left #perl6
03:59 [sbp] joined #perl6
04:00 Raynes_ joined #perl6
04:01 snarkyboojum_ joined #perl6
04:02 gabiruh_ joined #perl6
04:02 saaki_ joined #perl6
04:02 ingyfoo joined #perl6
04:02 xinming joined #perl6
04:03 aesop_ joined #perl6
04:03 MOAR-f00li5h joined #perl6
04:04 MOAR-f00li5h left #perl6
04:04 MOAR-f00li5h joined #perl6
04:05 f00li5h left #perl6
04:05 MOAR-f00li5h left #perl6
04:05 f00li5h joined #perl6
04:05 f00li5h left #perl6
04:05 f00li5h joined #perl6
04:21 envi^home joined #perl6
04:22 saaki left #perl6
04:22 xinming_ left #perl6
04:22 mberends left #perl6
04:22 Raynes left #perl6
04:22 flatwhatson left #perl6
04:22 aesop left #perl6
04:22 gabiruh left #perl6
04:24 leprevost left #perl6
04:26 leprevost joined #perl6
04:36 gottreu left #perl6
04:36 mberends joined #perl6
04:36 flatwhatson joined #perl6
04:47 xinming left #perl6
04:50 Tene_ joined #perl6
04:50 moritz joined #perl6
04:50 saaki joined #perl6
04:50 gfldex_ joined #perl6
04:51 aesop joined #perl6
04:51 mathw_ joined #perl6
04:51 jettero_ joined #perl6
04:51 christin1 joined #perl6
04:52 xinming joined #perl6
04:52 risou joined #perl6
04:52 brxue hello, I downloaded rakudo from github.com, but it report "undefined reference to `allocate_interpreter'" when executes "perl Configure.pl -gen-parrot", can anyone help?
04:53 brxue and something like this, undefined reference to `initialize_interpreter'
04:54 brxue undefined reference to `Parrot_cmd_options'
04:54 Sec left #perl6
04:56 frodwith_ joined #perl6
04:56 TimToady I've never seen that one...
04:56 bacek joined #perl6
04:56 TimToady did you say -gen-parrot or --gen-parrot?
04:58 aloha joined #perl6
04:59 brxue hello, it's -gen-parrot
04:59 TimToady I always use --gen-parrot, dunno if it makes a diff
04:59 TimToady did you have a parrot installed anywhere already?
05:00 brxue no installed before
05:00 brxue let me try it
05:01 christine left #perl6
05:01 aesop_ left #perl6
05:01 jettero left #perl6
05:01 saaki_ left #perl6
05:01 proller left #perl6
05:02 proller joined #perl6
05:02 brxue to TimToady, it seems there is a parrot installed already, but I didn't source the environment variable of the installed parrot
05:03 TimToady I don't much about using an existing parrot--I always use the one that rakudo builds
05:03 TimToady that way it's likelier to be the right version
05:03 brxue there seems no difference about using --gen-parrot or -gen-parrot
05:03 TimToady what kind of machine are you on?
05:05 brxue amd64
05:05 TimToady OS?
05:06 brxue redhat linux
05:06 TimToady and does it actually do much of anything when you use --gen-parrot, such as check out an SVN of parrot and compile it?
05:07 brxue let me confirm
05:08 TimToady I get: Checking out Parrot r48933 via svn...
05:08 TimToady then a bunch of stuff that configure is checking, signed "The Parrot Team", then a compile
05:09 TimToady sometimes it skips all this unless you do a 'make clean' first
05:10 brxue it seems parrot-2.7.0 already in the tarball?
05:10 TimToady tarball?  which tarball?
05:10 TimToady is this Rakudo Star?
05:10 brxue yeah
05:10 TimToady or the HEAD version?
05:11 brxue Rakudo Star 2010.08 release
05:11 TimToady I've never actually installed Star; I just use HEAD...
05:11 TimToady someone else around here might know more
05:12 TimToady if you say 'parrot' does it find an already installed one?
05:12 * TimToady is just cherry picking here in the absence of someone who really knows what's going on piping up
05:13 TimToady but this tends to be a rather low point in the 24-hour clock
05:13 * TimToady blames the Pacific Ocea
05:13 TimToady *Ocean even
05:13 TimToady most of the eurofolk haven't got out of bed yet
05:14 brxue no svn check out is performed, probably because I don't do cleaning, but Makefile is still not generated
05:14 brxue let extract tarball again and rebuild
05:15 florz R* doesn't do an SVN checkout
05:15 florz but other than that I can only tell you that it build without any problems on debian lenny if you just follow the readme ;-)
05:15 brxue the downloaded rakudo star already has parrot
05:16 florz yeah
05:17 kjeldahl joined #perl6
05:18 proller left #perl6
05:18 colomon left #perl6
05:18 perlygatekeeper1 left #perl6
05:35 Guest23195 joined #perl6
05:37 petdance left #perl6
05:46 risou left #perl6
06:07 chitragupt joined #perl6
06:13 brxue where does parrot_config locate in rakudo star's parrot directory?
06:18 brxue when doing configure, it executes "/usr/bin/perl tools/build/parrot_config_c.pl --mini > src/null_config.c", may it should be "/usr/bin/perl tools/build/parrot_config_c.pl --mini > src/parrot_config.c"?
06:19 kjeldahl left #perl6
06:20 chitragupt left #perl6
06:29 brxue build error when gcc -o miniparrot src/main.o src/null_config.o -Wl,-rpath=/home/brxue/work/perl6/raku​do-star-2010.08/parrot-2.7.0/blib/lib -L/home/brxue/work/perl6/rakudo-s​tar-2010.08/parrot-2.7.0/blib/lib -lparrot -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt -lgmp -lreadline -lncurses -Wl,-E
06:30 icwiener joined #perl6
06:31 chitragupt joined #perl6
06:34 sorear you'd really be better off asking that over in #parrot
06:35 sorear (irc.perl.org)
06:35 kjeldahl joined #perl6
06:36 sorear also it would be prudent to tell them exactly what the build error is
06:37 sorear ideally, via unabridged build transcript
06:37 molaf joined #perl6
06:37 sorear (use pastebin.)
06:41 brxue thank you, sorear
06:41 brxue left #perl6
06:50 wamba joined #perl6
06:58 mathw_ is now known as mathw
07:12 araujo joined #perl6
07:17 chitragupt left #perl6
07:21 Chillance left #perl6
07:23 chitragupt joined #perl6
07:27 chitragupt left #perl6
07:28 chitragupt joined #perl6
07:35 ipatrol_ left #perl6
07:36 ipatrol_ joined #perl6
07:45 chitragupt left #perl6
07:45 galf joined #perl6
07:45 galf left #perl6
07:52 x3nU left #perl6
07:52 x3nU joined #perl6
07:54 ipatrol_ left #perl6
07:59 Ross joined #perl6
08:03 * moritz is currently at his parents in law's, and saw a body lotion or so called "Body Series". They could have written it as "Body ...*" :-)
08:05 stepnem left #perl6
08:05 mberends <Body>...*</Body>
08:07 moritz :-)
08:11 szabgab left #perl6
08:11 szabgab joined #perl6
08:14 chitragupt joined #perl6
08:15 timbunce joined #perl6
08:17 araujo left #perl6
08:19 araujo joined #perl6
08:21 stepnem joined #perl6
08:25 Mowah joined #perl6
08:26 patrickas joined #perl6
08:30 chitragupt left #perl6
08:34 tadzik joined #perl6
08:39 masak joined #perl6
08:40 masak alohai, #perl6!
08:40 phenny masak: 11 Sep 19:49Z <moritz_> ask masak if he already applied some version of his enum patch, and if not, if I can do anything to speed it up or to help
08:40 dalek 6model: 12b7d68 | mberends++ | java/ (9 files):
08:40 dalek 6model: [java] fully update Lexpad and some other classes that use it
08:40 dalek 6model: review: http://github.com/jnthn/6model/commit/1​2b7d684353975d47c241210988b77c482af0e22
08:40 masak moritz: I want to incorporate a bit of feedback from pmichaud++, and maybe write a few tests, too. providing a sounding-board for that would help me the most right now.
08:40 moritz http://www.perlmonks.org/?node_id=859811 funny thing, we just discussed this in #perl6 the other day
08:41 moritz masak: I'll do my best, but today I'll spend 5 hours driving, so probably not today :/
08:42 masak moritz: it's good to know you're interested, though. I'll see how far I get, and then I might status-report my findings to you, whether you're on- or offline.
08:43 moritz masak: and if you push your changes to the branch, I can start experimenting with them
08:44 moritz or even write tests :-)
08:44 masak "the branch"? there's a branch already?
08:44 moritz s/the/a/
08:44 masak oki
08:44 masak I can do that.
08:44 moritz the branch as such.
08:44 wamba left #perl6
08:44 masak I'm really just blocking on focus right now -- too many things at once happening. :)
08:48 chitragupt joined #perl6
08:48 masak wow, either I don't yet fully understand repeated captures into capturing groups in Perl 5 regexes, or they suck. suspecting the latter :)
08:52 masak by the way, #perl6 should totally get a bot that can do @hoogle-like searches, like lambdabot does in #haskell. except with Perl 6 signatures and on the setting, of course.
08:52 masak something like this:
08:52 masak @setting Str --> List of Str
08:52 masak and it responds Str.split, Str.comb...
08:52 masak ...Str.words, Str.lines...
08:53 masak along with their full signatures.
08:55 moritz masak: in p5, (.)+ captures only the last repetition
08:55 moritz not all that useful, but understandable in the context of backtracking
08:55 masak moritz: aye.
08:55 * moritz -> on the road
08:56 masak drive safely!
08:58 zulon joined #perl6
09:05 tadzik http://search.cpan.org/~garu​/App-Rad-1.04/lib/App/Rad.pm -- just when I thought Perl 6 is _so_ better for writing short scripts due to MAIN sub
09:07 masak it comes built-in in Perl 6.
09:09 tadzik all this, this subs running too?
09:11 masak no; you'll have to wire that yourself.
09:12 tadzik yeah, that's my point
09:12 * tadzik feels like writing something simiilar
09:12 masak rakudo: sub MAIN($subcommand) { &::($subcommand) }; sub foo() { say "OH HAI" }
09:13 p6eval rakudo 9734b2: OUTPUT«===SORRY!===␤Indirect name lookups not yet implemented at line 22, near " }; sub fo"␤»
09:13 masak that'd be the way, I guess.
09:13 masak $ perl6 -e 'sub MAIN($subcommand) { eval($subcommand) }; sub foo() { say "OH HAI" }' foo
09:13 masak OH HAI
09:15 tadzik Perl 5 has it way easier with no parameter lists
09:16 masak simpler, yes. easier, mmmn.
09:17 tadzik simplier, yeah
09:18 zulon left #perl6
09:22 chitragupt left #perl6
09:31 chitragupt joined #perl6
09:36 DarthGandalf joined #perl6
09:37 azert0x joined #perl6
09:49 chitragupt left #perl6
09:50 chitragupt joined #perl6
09:57 chitragupt left #perl6
10:06 JimmyZ joined #perl6
10:08 JimmyZ left #perl6
10:10 chitragupt joined #perl6
10:18 Axius joined #perl6
10:21 Ross left #perl6
10:24 amkrankruleuen joined #perl6
10:24 tadzik when doing: say 'ok' if foo() and bar; is it any different than say 'ok' if foo() && bar;?
10:25 masak no.
10:25 masak the precedence is different between '&&' and 'and', but in that case it doesn't affect the resulting AST.
10:26 tadzik that's what I thought, thanks masak
10:26 tadzik say 'ok' if foo and bar looks just so humanish :)
10:26 masak that's the idea :)
10:27 * masak is currently greatly enjoying himself automatically turning the HTML mush generated by use.perl.org into clean, pretty Markdown
10:27 tadzik speaking of markdown, I recently seen something called sexpcode
10:28 sorear 'if' isn't an operator, it's special statement syntax
10:28 sorear operator precedence doesn't affect it
10:28 masak nod
10:29 tadzik http://cairnarvon.rotahall.org/20​10/05/25/towards-a-better-bbcode/
10:29 tadzik this seems like fun
10:29 masak interesting.
10:30 tadzik sounds like yet another funny grammar excercise
10:33 Axius left #perl6
10:33 * sorear wonders how to properly schedule a #cpan6sketch when there isn't an attendable working meeting of all who care about it
10:34 sorear I guess e-mail
10:34 tadzik maybe a calendar on doodle
10:34 tadzik we always schedule PM meetings there
10:35 tadzik oh, you mean the form, not the date?
10:39 tadzik masak: are you thinking about improving read()/write()?
10:39 risou joined #perl6
10:39 masak tadzik: a bit.
10:40 tadzik neutro went hell faster after dropping ufo for Module::Build, but now File::Copy is a pain in the head
10:40 alksentrs joined #perl6
10:40 pmurias joined #perl6
10:40 sorear maybe what we really need is a moderated mailing list
10:40 sorear pmurias!!!
10:40 pmurias sorear: hi!
10:40 phenny pmurias: 09 Sep 21:18Z <tylercurtis> ask pmurias is there's a more up-to-date source of information about SMOP and Mildew than http://www.perlfoundation.org/perl6/index.cgi?smop
10:41 sorear pmurias: I'd like to repeat my earlier ask about mildew's non-cpan install procedure
10:41 tadzik http://wklej.org/id/387906/ -- now that's funny
10:42 pmurias sorear: non-cpan install procedure?
10:43 pmurias sorear: what do you mean?
10:43 * pmurias was away on vacation so it not up to date on the backlog
10:45 sorear pmurias: you dropped by, said hi, got the first tell, and then left before I woke up :(
10:46 sorear timezones.  hates 'em.
10:46 sorear anyway, mildew is almost certainly completely broken with the STD-rennovating I've done
10:47 sorear and I'd like to fix it... not really easy to fix a CPAN dist on the post-build side
10:47 * pmurias has to help unpack the bicycles :/
10:48 sorear just a pointer to the procedure you used to prepare the dist would be a huge help
10:48 sorear even (especially) if it's just an INSTALL file I mised
10:48 pmurias dzil buil
10:48 pmurias d
10:48 pmurias dzil build
10:48 pmurias you have comaint on all my stuff on CPAN
10:48 pmurias i'll be back in 30~ min
10:49 tadzik rakudo: try { die "asd"; CATCH { exit 0; } }; say 'alive'
10:49 p6eval rakudo 9734b2: OUTPUT«alive␤»
10:49 tadzik intentional?
10:49 sorear v6/Mildew or v6/Mildew-Setting-SMOP?
10:50 sorear oh, wait
10:50 sorear THIS IS A DEPENDENCY TREE
10:51 sorear install SMOP, then Mildew, then Mildew-Setting-SMOP
10:51 sorear I'll try this in the morning, out
10:51 sorear thanks
10:59 mikehh joined #perl6
11:02 gfldex_ is now known as gfldex
11:07 patrickas left #perl6
11:15 tadzik how do I make 'or' in when?
11:15 tadzik I tried: when any('i', {! *.defined }), but that's not the way
11:15 masak don't use both {} blocks and whatever *.
11:15 stepnem left #perl6
11:16 tadzik well, that was desparate
11:16 masak it's one or the other.
11:16 masak unless you're really sure what you're doing.
11:16 tadzik I get Unable to parse blockoid, couldn't find final '}' at line 177 either way
11:17 tadzik http://wklej.org/id/387921/
11:17 whiteknight joined #perl6
11:17 timbunce left #perl6
11:19 stepnem joined #perl6
11:21 specific_bot joined #perl6
11:22 specific_bot left #perl6
11:22 jettero_ is now known as jettero
11:23 jettero left #perl6
11:29 Kodi joined #perl6
11:34 rgrau_ joined #perl6
11:35 masak not altogether on-topic (since it's Ruby), but... wow! http://mamememo.blogspot.com/2010/09/qlobe.html
11:36 dju joined #perl6
11:36 timbunce joined #perl6
11:36 masak lunch &
11:37 masak left #perl6
11:37 dalek rakudo: fdae00f | colomon++ | src/core/Rat.pm:
11:37 dalek rakudo: Add infix:<**>(Rat $a, Int $b).
11:37 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​dae00f1049d5fd5b88bfc3fdc0b4c853968add1
11:39 dju left #perl6
11:39 plobsing left #perl6
11:40 dju joined #perl6
11:41 plobsing joined #perl6
11:57 Axius joined #perl6
11:59 rindolf joined #perl6
12:00 tadzik nice
12:00 jnthn o/
12:01 zulon joined #perl6
12:02 tadzik oh hai
12:02 tadzik jnthn: mind some neutro on windows testing in a short while?
12:09 jnthn tadzik: I can give it a quick go, sure.
12:09 tadzik jnthn: so once again, where should the module files be installed on windows?
12:12 * araujo is back home now
12:14 jnthn tadzik: Good question - where are they being installed on other platforms?
12:14 timbunce left #perl6
12:14 tadzik jnthn: they go to ~/.perl6/lib, and it is assumed that the directory is in users' PERL6LIB
12:14 jnthn Probably somewhere similar, anyway. But I guess then it depends on if it's a local or global install...
12:14 jnthn ah, OK
12:15 tadzik is %*ENV<HOME> available on windows?
12:16 tadzik given that, it should be pretty portable, assuming user has git installed
12:17 jnthn no, but
12:17 jnthn > say %*ENV<HOMEPATH>
12:17 jnthn \Documents and Settings\Jonathan
12:17 jnthn That one works, it seems.
12:17 tadzik oh, File::Copy is horribly broken by now. Not really File::Copy, but Rakudo's read()/write() rather
12:17 Axius left #perl6
12:18 [Coke] joined #perl6
12:18 Axius joined #perl6
12:21 chitragupt left #perl6
12:23 nadim left #perl6
12:27 Axius left #perl6
12:28 Axius joined #perl6
12:32 [sbp] is now known as sbp
12:33 tadzik btw, maybe you know jnthn
12:33 tadzik rakudo: try { die "asd"; CATCH { exit 0; } }; say 'alive' # intentional?
12:33 p6eval rakudo 9734b2: OUTPUT«alive␤»
12:34 jnthn No, wrong.
12:34 tadzik I hoped so
12:34 jnthn exit is perhaps a control exception, if it is going to be implemented as an exception at all.
12:34 jnthn But even CONTROL probably shouldn't catch it either.
12:40 Ross joined #perl6
12:40 risou left #perl6
12:43 risou joined #perl6
12:43 nadim joined #perl6
12:45 dual left #perl6
12:51 nadim left #perl6
12:52 nadim joined #perl6
12:53 tadzik crap :(
12:55 masak joined #perl6
12:55 masak \o/
12:55 zulon left #perl6
12:55 tadzik hai
12:55 jnthn yayitsmaska!
12:55 jnthn er, masak :-)
12:55 masak :)
12:56 masak re &exit and CONTROL; by the spec END should run both after &exit and after &die
12:57 masak but maybe that's implemented as direct calls to the END phaser triggers from those functions, I dunno.
12:57 jnthn Well, die only causes us to exit if something doesn't catch and handle the exception.
12:58 jnthn I guess see backtrace function in src/perl6/compiler.pir or worreva it's called to add something to call the end blocks.
12:58 jnthn That's what gets called if we're about to exit due to uncaught exceptions.
12:58 masak speaking of which, someone requested backtrace-without-die functionality the other day. I think that'd be nice.
12:59 tadzik jnthn: cp on windows is 'copy'?
12:59 jnthn rakudo: say Perl6::Compiler.backtrace(Exception.new) # maybe
12:59 p6eval rakudo fdae00: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤  in main program body at line 1␤»
12:59 nadim left #perl6
12:59 jnthn rakudo: say Perl6::Compiler.backtrace(Exception.new('blah')) # maybe
12:59 p6eval rakudo fdae00: OUTPUT«Method 'backtrace' not found for invocant of class 'Perl6Exception'␤  in main program body at line 5␤»
13:00 jnthn oh, hm
13:00 jnthn Well, not quite that then.
13:00 jnthn tadzik: yes
13:00 jnthn masak: Anyway, it should be do-able.
13:00 masak yay
13:00 jnthn (without major effort)
13:01 jnthn dir('examples') ==> map { slurp("examples/$_") } ==> [+] () # Read in a bunch of files and add together the values inside them
13:01 masak why the last empty pair of parens?
13:02 LoRe rakudo: print ([1..3] <<->> [1..3]).perl
13:02 masak Rakudo deficiency?
13:02 p6eval rakudo fdae00: OUTPUT«Bool::False»
13:02 LoRe rakudo: print ([1..3] <<+>> -<< [1..3]).perl
13:02 p6eval rakudo fdae00: OUTPUT«[0, 0, 0]»
13:02 masak LoRe: huh.
13:03 masak LoRe: oh!
13:03 masak the first one parses as <[<->]>
13:03 masak er, or not... :)
13:04 masak rakudo: say ((1, 2, 3) <<->> (1, 2, 3)).perl
13:04 p6eval rakudo fdae00: OUTPUT«Bool::False␤»
13:04 masak rakudo: say ((1, 2, 3) >>-<< (1, 2, 3)).perl
13:04 p6eval rakudo fdae00: OUTPUT«[0, 0, 0]␤»
13:04 masak should those two differ? the arrays are of the same length.
13:05 LoRe rakudo: print ([1..3] <<[-]>> [1..3]).perl
13:05 tadzik jnthn: could you try if you can bootsrap neutro on windows now?
13:05 tadzik or at least use it
13:05 p6eval rakudo fdae00: OUTPUT«[0, 0, 0]»
13:05 LoRe ok
13:05 masak oh!
13:05 masak it parses as either < or > and something.
13:05 masak I'm not sure how it manages to do that.
13:06 * masak submits rakudobug
13:06 masak LoRe++
13:09 tadzik I can has a commit bit to perl6/Ecosystem?
13:10 Kodi Is %h.grab(*, :replace) the same as %h.pick(*, :replace), or does the former leave %h empty?
13:10 orafu left #perl6
13:10 orafu joined #perl6
13:10 Kodi Honestly I doubt whether grab should accept a :replace argument.
13:11 masak tadzik: I think moritz admins that one.
13:11 tadzik moritz: ping
13:11 masak wuh, what happened to moritz' underscore? :)
13:12 jnthn std: dir('examples') ==> map { slurp("examples/$_") } ==> [+] ()
13:12 p6eval std 32123: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤      'dir' used at line 1␤Check failed␤FAILED 00:01 119m␤»
13:12 jnthn std: dir('examples') ==> map { slurp("examples/$_") } ==> [+]
13:12 p6eval std 32123: OUTPUT«[31m===[0mSORRY![31m===[0m␤Prefix requires an argument at /tmp/OSSbhqktGG line 1 (EOF):␤------> [32m==> map { slurp("examples/$_") } ==> [+][33m⏏[31m<EOL>[0m␤Undeclared routine:␤     'dir' used at line 1␤Parse failed␤FAILED 00:01 118m␤»
13:12 jnthn masak: Nope, STD wants 'em too
13:13 masak ok.
13:13 masak std: [+]
13:13 p6eval std 32123: OUTPUT«[31m===[0mSORRY![31m===[0m␤Prefix requires an argument at /tmp/YJs4nYDtdl line 1 (EOF):␤------> [32m[+][33m⏏[31m<EOL>[0m␤Parse failed␤FAILED 00:01 115m␤»
13:13 jnthn :-)
13:13 masak I thought those parsed as listops.
13:13 jnthn Looks like STD needs to learn about dir too :-)
13:13 tadzik moritz lost his tail! :(
13:14 jnthn masak: I seem to remember [+] on its own working once too
13:14 Axius left #perl6
13:14 jnthn masak: In STD. Never has in Rakudo.
13:14 masak nod
13:15 jnthn Dunno if it's regression or deliberate change in STD.
13:15 masak guess we'll have to ask weird Al.
13:16 Patterner left #perl6
13:17 Ross left #perl6
13:17 jnthn When he gets back from the amish paradise? :-)
13:18 Ross joined #perl6
13:19 Ross left #perl6
13:19 Ross joined #perl6
13:20 masak heh :)
13:22 * jnthn loves the weird Al videos.
13:24 masak yes, he's good.
13:25 masak heh, my hacked-together HTML->Markdown filter keeps finding infelicities in the HTML :)
13:26 jnthn oh heh
13:26 jnthn > now
13:26 jnthn (DateTime.new(year => 1970).Instant + 1284297974.875)
13:26 tadzik :)
13:26 masak urgh :)
13:27 tadzik well, true
13:27 jnthn Surely we can stringify a bit more usefull than that? :-)
13:27 masak "it's 1970 and then some"
13:27 * masak submits rakudobug
13:27 tadzik . o O ( [BUG] now() could be smarter )
13:27 Psyche^ joined #perl6
13:27 Psyche^ is now known as Patterner
13:28 masak tadzik: [BUG] LTA DateTime.perl in Rakudo
13:28 masak tadzik: nothing to do with now()
13:28 jnthn rakudo: 1, 1, *+* ... 100
13:28 p6eval rakudo fdae00:  ( no output )
13:28 jnthn rakudo: say (1, 1, *+* ... 100)
13:28 p6eval rakudo fdae00:
13:28 p6eval ..OUTPUT«(timeout)1345589144233377610987159725844​1816765109461771128657463687502512139319641831781​1514229832040134626921783093524578570288792274651​4930352241578173908816963245986102334155165580141​2679142964334944377014087331134903170183631190329​7121507348075269767778742049125862690252036501…
13:29 masak jnthn: nowadays you have to hit it exactly.
13:29 jnthn ...huh, why doesn't it stop?
13:29 jnthn oh, damm
13:29 masak jnthn: new spec.
13:29 masak that's the downside it bought.
13:29 tadzik so how does it work now?
13:29 jnthn > 1, 1, *+* ... *>100
13:29 jnthn 1 1 2 3 5 8 13 21 34 55 89 144
13:29 masak tadzik: you have to hit it exactly.
13:29 tadzik duh
13:29 jnthn ...it still goes one over there too
13:30 jnthn oh, ...^
13:30 masak :)
13:31 tadzik > perl6 t/01-parser.t
13:32 tadzik zsh: segmentation fault  perl6 t/01-parser.t
13:32 tadzik oh funny
13:32 tadzik shouldn've messed with too fresh parrots I'm afraid
13:33 pmurias left #perl6
13:33 Raynes_ is now known as Raynes
13:33 Raynes left #perl6
13:33 Raynes joined #perl6
13:34 Kodi masak: That silly stringification of Instant was my idea. Instant is supposed to be opaque, so I think that's the only way you can reliably seralize them.
13:35 jnthn OTOH, Perl 6 is meant to be, like, useful and helpful...
13:35 masak Kodi: ok.
13:36 jnthn Stringification is nothing to do with serialization though
13:36 jnthn That's a fine output for .perl
13:36 jnthn Just not .Str(ingy)
13:36 masak Kodi: but it's a DateTime, not an Instant
13:36 masak Kodi: a DateTime should be able to do better.
13:36 Kodi jnthn: Indeed, it is .perl. I guess .Str() was auto-generated from it?
13:36 jnthn Maybe, yeah
13:36 masak no, the REPL does .perl
13:36 jnthn We could use a good .Str
13:36 jnthn oh.
13:36 jnthn yeah, you're right
13:37 jnthn > ~now
13:37 jnthn (DateTime.new(year => 1970).Instant + 1284298637.796)
13:37 jnthn ...still no better.
13:37 Kodi masak: Huh? now() should return an Instant, not a DateTime. Do you mean DateTime.now()?
13:37 jnthn masak: wait, is that really true?
13:37 masak Kodi: see the output.
13:37 jnthn > "lol\n"
13:37 jnthn lol
13:37 jnthn >
13:37 masak ok, it's .Str
13:37 jnthn masak: no, seems it stringifies.
13:37 masak aye.
13:37 masak maybe only non-scalars do .perl or something.
13:37 jnthn I prefer that though I think.
13:37 masak aye.
13:38 jnthn .oO( .repl )
13:39 Kodi masak: I'm sorry, I don't understand. You said 'now', not 'DateTime.now', so you got an Instant, not a DateTime. What's the problem?
13:39 Kodi masak: Do you mean Instant.Str should convert to DateTime?
13:41 risou left #perl6
13:41 Kodi I think what's going on here is that stringification falls back on .perl in the absense of .Str. Perhaps that should be considered a bug.
13:43 ash_ left #perl6
13:45 ash_ joined #perl6
13:45 risou joined #perl6
13:45 ash_ left #perl6
13:45 ash_ joined #perl6
13:48 masak Kodi: oh, sorry. I read the REPL output as giving back a DateTime, but it doesn't.
13:49 masak Kodi: nevertheless, couldn't the stringification be nicer somehow?
13:49 masak for example a nicer DateTime converted to an .Instant, without the ugly additive constant.
13:50 Kodi masak: That would certainly work. The one downside is that stringification would be more expensive than the user might expect, since it would require converting the Instant to a DateTime.
13:50 Kodi masak: To be clear, do you agree that .perl should be left as-is?
13:50 masak hm.
13:51 masak I don't have a well-formed opinion one way of another.
13:51 masak s/of/or/
13:53 Kodi masak: I guess there are no real promises that stringification is fast, so we can just say 'method Str { ~DateTime.new(self) }'.
13:54 masak hm. provided that's what the user'd expect.
13:54 masak that output says nothing about it being an Instant.
13:56 Kodi masak: What about something like 'Instant:2010-09-12T13:49:34.05Z'? Not really ISO nor actual Perl 6 syntax, but unambiguous and readable.
13:56 Kodi Uh, wait, that wouldn't work with leap seconds.
13:56 masak why not?
13:57 Kodi No, I take that back.
13:57 Kodi For a moment I thought UTC had leap-second handling as screwy as POSIX time. :P
13:57 masak :)
13:58 masak wow, my Markdown converter parses all my old blog posts! \o/
13:59 Kodi Anyway, I don't expect Instant.Str to even exist, so I guess whatever you want it to do is fine by me.
13:59 alksentrs left #perl6
13:59 tadzik masak: is it in Perl 6?
14:00 masak tadzik: sadly, no. I needed the speed this time.
14:00 tadzik :)
14:00 masak but it probably could have been. I'm not doing anything odd.
14:00 masak just tokenizing the HTML, building a DOM out of it, traversing the DOM and outputting Markdown.
14:01 masak it's just 300 lines of Perl 5.
14:05 nadim joined #perl6
14:06 patspam joined #perl6
14:08 tadzik damnit, why is my Config::INI fucked again after some Rakudo update
14:12 tadzik oh, forgot to pull
14:12 tadzik -_-
14:18 masak huh? Perl 5 scalarifies the lhs to || ?
14:18 masak that language is just so full of surprises!
14:19 jnthn We should make a new Perl that's less surprising!
14:19 jnthn Oh, wait...
14:20 tadzik :D
14:21 Kodi left #perl6
14:22 tadzik I'm afraid my grammar parsing has just hanged
14:24 nadim left #perl6
14:28 dual joined #perl6
14:36 moritz is now known as moritz_
14:36 nadim joined #perl6
14:37 moritz_ then you probably quantified a zero-width match
14:37 Infinoid joined #perl6
14:40 alksentrs joined #perl6
14:41 risou left #perl6
14:42 risou joined #perl6
14:43 tadzik moritz_: I can has a commit bit for perl6/ecosystem?
14:45 Axius joined #perl6
14:47 Infinoid Howdy, folks.  I'm going to be banging on dalek a little bit, to get moritz++'s evil commit-feed scheme working.
14:49 tadzik http://wklej.org/id/388019/ -- can someone help me with a grammar? Why doesn't it match to the very end?
14:49 masak Infinoid++
14:50 colomon joined #perl6
14:52 dalek left #perl6
14:53 dalek joined #perl6
14:53 colomon rakudo: say ((2/3) ** 3).perl
14:54 p6eval rakudo fdae00: OUTPUT«8/27␤»
14:55 masak tadzik: it looks kosher to me. I'm thinking it might be something similar to the backtracking-into-quantifier bugs that are in RT already.
14:55 masak tadzik: though here it's not backtracking per se, but getting back to an ongoing quantifier after successfully matching an inner rule. perhaps that triggers the same weakness in the grammar engine.
14:59 tadzik wow, plenty or modules are gone
15:00 masak gone?
15:02 colomon gone?
15:07 moritz_ tadzik: you should have commit bit to perl6/ecosystem
15:07 moritz_ it's in the same user group as mu/roast/specs/perl6.org etc.
15:09 tadzik gone. Uploading smoke tests results, you will see
15:09 tadzik http://tjs.azalayah.net/ser.html
15:10 tadzik selecting the black fields shows a secret message
15:10 tadzik (I think 'building failed' should be red too)
15:12 tadzik updated
15:13 tadzik moritz_: I thought so, but I have no ssh clone link
15:14 colomon what does "module gone" mean?
15:14 tadzik that the repo is gone
15:14 masak moritz_: same here; I don't seem to have commit access to perl6/ecosystem.
15:15 dalek left #perl6
15:15 tadzik hmm, there are modules missing
15:15 dalek joined #perl6
15:15 tadzik (on the list)
15:16 colomon http://github.com/gluckspilz/mubot
15:16 Infinoid moritz_: I just noticed JSON doesn't have support for comments.  Is there some other way we can document this config file?
15:16 Infinoid (commits to perl6.org and modules.perl6.org should also be tracked now btw)
15:16 tadzik there should be no json :)
15:17 colomon huh
15:17 tadzik colomon: it's gone from modules.perl6.org
15:17 Axius left #perl6
15:17 moritz_ tadzik, masak: should be fixed now
15:17 pmichaud good morning, #perl6
15:17 Axius joined #perl6
15:17 tadzik good morning pmichaud
15:18 tadzik oh, who has a windows machine?
15:18 tadzik moritz_++ # works
15:18 masak morning, pmichaud
15:18 masak tadzik: jnthn has one
15:19 tadzik yeah, but he seems uninterested :)
15:19 tadzik so, who wants to test a module installer on windows?
15:19 moritz_ Infinoid: maybe a separate file? dalek.README or so?
15:20 * moritz_ pushed a test commit to perl6.org
15:20 Infinoid Great, let's see how long the bot takes
15:21 vapace joined #perl6
15:21 Axius left #perl6
15:22 Infinoid the bot is now tracking 51 github feeds...
15:23 Axius joined #perl6
15:23 moritz_ wow
15:23 moritz_ btw somebody added logging for the perl6/roast repo, but it goes to #parrot instead of #perl6
15:23 moritz_ if the new scheme works, I'll just add it to the config file
15:24 Infinoid The log claims that feed will now output to both channels
15:27 wamba joined #perl6
15:28 tadzik so what about this grammars bug?
15:34 zulon joined #perl6
15:36 masak tadzik: I didn't manage to convince myself it's an actual bug. it may be; I'm simply not sure.
15:36 masak tadzik: it might appear clearer if you golf the rules and the input a bit.
15:36 tadzik http://wklej.org/id/388044/ -- anyone?
15:37 yrgd joined #perl6
15:38 masak all I can say is that it has some of the traits of the 'backtracking into quantifier' bugs.
15:38 masak well, except for the backtracking part.
15:39 moritz_ tadzik: try to put <expr> first in the arg rule
15:39 Axius left #perl6
15:39 moritz_ and exclude { from the charclass too
15:40 tadzik same effect, only longer debug
15:40 moritz_ as is, it will match a { through the character class <-[}]>
15:40 moritz_ and then fail to match a }
15:40 tadzik the second one makes it not parse
15:41 Axius joined #perl6
15:42 moritz_ and it should not parse
15:42 moritz_ because i is not an allowed function name
15:42 moritz_ just b and u
15:42 pmichaud anyone know a fast way to compute   (^$n).reverse  without using 'reverse' ?
15:43 pmichaud tadzik: looking at your nopaste
15:43 * moritz_ has a working version
15:43 moritz_ token func { 'b' | 'u' | 'i' }
15:43 moritz_ token arg  { [ <-[{}]> | <expr> ]+ }
15:43 masak moritz_++
15:43 tadzik oh noes
15:43 tadzik my bad
15:44 moritz_ pmichaud: I'm tempted to propose postfix:<^>, the 'downfrom' operator :-)
15:45 moritz_ but I'm not entirely serious
15:45 zulon left #perl6
15:46 pmichaud I can always do    gather loop ($i = $n-1; $i>=0; $i--) { take $i }    but it seems like there ought to be something just a bit nicer
15:46 pmichaud or even
15:46 moritz_ IMHO (^$n).reverse should return a range with a backward iterator
15:46 pmichaud we don't have backwards iterators (yet?)
15:47 jnthn Well, if we did, then reverse can maybe just return a backwards iterator..
15:47 pmichaud maybe .reverse just implements a backwards iterator
15:47 pmichaud oh, wait!
15:48 pmichaud nm
15:48 dalek mu: 718e7c9 | Infinoid++ | misc/dalek-conf.json:
15:48 dalek mu: Add the dalek-plugins repo to dalek's feed config.
15:48 dalek mu: review: http://github.com/perl6/mu/commit/718​e7c979066626722ebefee5ddb7746c5e2a198
15:48 pmichaud I thought Parrot might have a built-in reverse :)
15:49 masak moritz_: as long as it doesn't present itself as a Range...
15:49 pmichaud I'll think about it a bit more shortly -- bbiab
15:49 Mowah left #perl6
15:49 moritz_ Infinoid++
15:50 masak I'm ready to give the enums patch a whack. one question: is 'make spectest' supposed to give so many failures?
15:50 Infinoid moritz_: Either your perl6.org commit got lost in the startup time (takes dalek up to 6 minutes to sync up after starting) or the feed still isn't working
15:50 masak I don't have the results summary, but it's 10-15 failing files.
15:51 masak this one, made 4 days back, is typical for how it looks nowadays: http://gist.github.com/569768
15:51 moritz_ masak: my last spectest on latest parrot was clean
15:51 masak ok, making spectest again.
15:51 Kodi joined #perl6
15:51 masak but the above gist is not atypical for how it looks nowadays on my machine.
15:52 moritz_ Infinoid: pushed another commit to perl6.org
15:52 Kodi pmichaud: $n ... 0 ? (Admittedly I haven't kept up with the recent changes to series.)
15:53 Sanitoeter joined #perl6
15:53 * moritz_ doubts that series are fast
15:53 moritz_ rakudo: say 3 ... 0
15:53 p6eval rakudo fdae00: OUTPUT«3210␤»
15:53 rindolf Wow! It works?
15:53 rindolf rakudo: say 3 .. 0
15:53 p6eval rakudo fdae00: OUTPUT«␤»
15:53 rindolf Oh.
15:53 moritz_ '.' ne ''
15:53 moritz_ is http://irclog.perlgeek.de/perl6/today unbearably slow for anybody else?
15:54 Kodi moritz_: Normal speed for me.
15:54 masak moritz_: no problems here.
15:54 jnthn moritz_: Feels a little slower than usual but not unbearably.
15:54 dalek perl6.org: 2127193 | moritz++ | README:
15:54 dalek perl6.org: add missing reference to README
15:54 dalek perl6.org: review: http://github.com/perl6/perl6.org/commit/​2127193fa8feef031aed833eb2d1e95b53d1d877
15:54 Infinoid \o/
15:55 moritz_ Kod, masak: thanks. Oddly enough all http connects to that server take ages on my laptop (like, 10 to 20 seconds or so)
15:55 rindolf moritz_: loads pretty quickly.
15:55 ingyfoo is now known as ingy
15:55 jnthn moritz_: Yeah, it's the connect that's taking the time for me too. After that it loads fast. But it's not anythin glike 10 to 20 seconds. More like 2.
15:55 moritz_ maybe it's related to the ipv6 bridge
15:56 moritz_ yep, seems to be pretty normal after 'aiccu stop'
15:58 patrickas joined #perl6
15:58 Axius left #perl6
15:59 dalek 6model: add93e5 | mberends++ | java/ (8 files):
15:59 dalek 6model: [java] add p6hash and p6int
15:59 dalek 6model: review: http://github.com/jnthn/6model/commit/a​dd93e5633a999ec9d5620c98d7ab8c6980092ae
16:03 tadzik yay, I has a basic sexpcode parser
16:07 pmichaud .... why does   3 ... 0   work, ooc?
16:07 jnthn .oO( I remember P-Code from my Visual Basic days, but never came accross Sex P-Code )
16:07 pmichaud we still have a succ/pred decider?
16:08 pmichaud ah, we do.
16:09 tadzik jnthn: FYI http://cairnarvon.rotahall.org/misc/sexpcode.html
16:09 tadzik looks quite nice, and quite nice as a grammar example
16:10 tadzik or an excercise
16:10 chitragupt joined #perl6
16:10 jnthn Oh, as in S-expression
16:10 jnthn :-)
16:15 Axius joined #perl6
16:15 tadzik how to express escaping characters in a character class, so } is disallowed but \} is ok?
16:17 masak moritz_: seems many test file failures are of the kind "Dubious, test returned 1 (wstat 256, 0x100)"
16:18 masak that used to happen and had something to do with the harness, no?
16:18 * moritz_ not sure where it comes from
16:18 moritz_ but if there's no "parse failure: no plan" or so, it's harmless
16:21 tadzik the only sensemaking way on my mind right now is "wait for <!before> and <!after>" :/
16:22 moritz_ you can't do it with char classes
16:22 patspam left #perl6
16:22 moritz_ because they only ever match one character
16:22 moritz_ so
16:23 moritz_ [ <-[{}\\]> | \\ . ]*
16:24 moritz_ or [ <-[{}\\]> | \\ <[{}]> ]*
16:24 moritz_ if you only want to allow { or } after a backslash
16:24 moritz_ before and after don't work well because of cases like \\\{
16:24 moritz_ vs
16:24 moritz_ \\{
16:24 tadzik hmm
16:26 moritz_ in perl 5 it's a bit more efficient if add a + after the char class
16:26 moritz_ btw Jeffrey Friedl explains those regexes nicely in "Mastering Regular Expressions". He uses Perl 5 syntax, but the concepts are the same
16:31 pmurias joined #perl6
16:33 tadzik rakudo: my %a = sub => 'asd'; # intentional?
16:33 p6eval rakudo fdae00: OUTPUT«Null PMC access in getprop()␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/tn689O_7xb␤»
16:33 tylercurtis joined #perl6
16:33 masak tadzik: something a bit like that has been reported to RT.
16:33 masak tadzik: though I don't remember it being a NPMCA.
16:34 moritz_ masak: hm, doing another spectest run now, this seems to have quite some fallout again :(
16:35 masak moritz_: good. let's compare notes after both our spectest runs finish.
16:38 kuzuha joined #perl6
16:38 Axius_ joined #perl6
16:39 Axius left #perl6
16:39 patspam joined #perl6
16:47 pmichaud anyone think we should switch the pod links at http://perlcabal.org/syn/ to point to the raw versions of the files?  (As it is now, they end up displaying "This blog is taking too long to generate".)
16:47 moritz_ works for me
16:48 patrickas left #perl6
16:48 patrickas joined #perl6
16:49 pmichaud done.
16:49 masak pmichaud++
16:51 dalek mu: 31c0945 | pmichaud++ | docs/feather/syn_index.html:
16:51 dalek mu: Switch pod links at http://perlcabal.org/syn/ to point to the raw sources instead of the blobs (many of the files end up with "This blob is taking too long to generate.")
16:51 dalek mu: review: http://github.com/perl6/mu/commit/31c​094561c48804dae8be069123e127f8eea7760
17:00 moritz_ masak: http://nopaste.snit.ch/23305
17:01 masak moritz_: thanks. I'm on S32, so not long now.
17:01 Axius_ left #perl6
17:03 masak moritz_: I already see that I have two failures each in S29-context/die.rakudo and S29-context/exit.rakudo that you don't.
17:03 pmichaud afk, soccer
17:04 dalek rakudo: d1eb87c | pmichaud++ | src/core/ (2 files):
17:04 dalek rakudo: Rewrite C<.reverse> to be more efficient, move from Any-list to List.
17:04 dalek rakudo: On my system, the code C<$*IN.slurp.words.reverse.say> goes
17:04 dalek rakudo: from 44s to 4s when run on Rakudo's README.
17:04 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​1eb87cfe3049a8090eafd1e32d58e0cedc334f2
17:05 masak moritz_: you have no test failures. I have plenty.
17:17 envi^home left #perl6
17:17 colomon pmichaud: just wondering -- should we have some way of iterating a list backwards?  Off the top of my head, it seems like that would be faster than constructing the reversed list, and still work many of the times you'd want to use reverse.
17:20 tadzik := is assigning, not copying?
17:22 TimToady := is binding, = is called "assignment", and copies
17:22 tadzik ok, thanks TimToady
17:25 Kodi TimToady: Should KeyHash's .grab really have a :replace argument?
17:27 tadzik := doesn't work in has, is it known?
17:27 tadzik rakudo: my $a = 5; class A { has $.foo := $a; }
17:27 p6eval rakudo fdae00: OUTPUT«maximum recursion depth exceeded␤  in '&infix:<=>' at line 1␤  in <anon> at line 1␤  in 'Signature::perl' at line 1␤  in main program body at line 2:/tmp/vuuXGkRr3B␤»
17:27 masak moritz_: http://gist.github.com/569768
17:28 masak nom &
17:28 masak left #perl6
17:29 dalek left #perl6
17:30 dalek joined #perl6
17:33 TimToady Kodi: sometimes I think that not even .pick should have a :replace, but that it should be a different operation
17:33 TimToady .repick or some such
17:33 Kodi That makes a certain amount of sense.
17:34 TimToady pick with replacement is a nice metaphor, but the reality of implementation is quite different
17:36 patrickas should $s ... $e and $s .. $e produce the same results when $s and $e are strings of single characters?
17:40 rgrau_ left #perl6
17:41 TimToady .. turns into the corresponding ... when iterated, so yes
17:41 TimToady though only if the sequence is increasing, I suspect
17:41 TimToady since ranges don't autoreverse
17:43 tadzik .u ಠ
17:43 phenny U+0CA0 KANNADA LETTER TTHA (ಠ)
17:43 patrickas I am reading the series spec for strings and  it's going to take a while for me to digest it and attempt to implement it
17:49 patrickas Going the other way, a ...^ maybe be forced to have a final value by passing an argument to an explicit last($my-last-value)
17:49 patrickas what's the reason behind this requirement? ^^
17:50 patrickas and the opposite case too.
17:51 TimToady it is merely that it is specced to be implemented in terms of a loop of some kind, using last semantics.  that's all
17:52 TimToady bbl &
17:59 Axius joined #perl6
18:03 ingy left #perl6
18:04 Axius left #perl6
18:04 Axius joined #perl6
18:04 ingy joined #perl6
18:08 tadzik rakudo: 'asd^2'.index(/'*' | '^'/)
18:09 p6eval rakudo fdae00:  ( no output )
18:09 tadzik Substring '_block91' not found in 'asd^2' here
18:09 tadzik std: 'asd^2'.index(/'*' | '^'/)
18:09 p6eval std 32123: OUTPUT«ok 00:01 117m␤»
18:09 tylercurtis tadzik: index doesn't take a regex argument.
18:10 tylercurtis LTA error message, though.
18:10 tadzik tylercurtis: it could complain... what you just said
18:10 bluescreen joined #perl6
18:11 bluescreen is now known as Guest27047
18:14 skangas joined #perl6
18:21 patrickas how long does p6eval run before timing out ?
18:22 risou left #perl6
18:36 redarrow joined #perl6
18:37 patrickas left #perl6
18:37 Ross left #perl6
18:38 wamba left #perl6
18:38 Ross joined #perl6
18:38 Myhrlin joined #perl6
18:39 Schwern left #perl6
18:44 icwiener left #perl6
18:46 Guest23195 left #perl6
18:50 Axius left #perl6
18:54 chitragupt left #perl6
18:58 rgrau_ joined #perl6
19:01 Mowah joined #perl6
19:17 gottreu joined #perl6
19:26 chitragupt joined #perl6
19:30 dalek 6model: dceef70 | jnthn++ | dotnet/runtime/Metamodel/Re​presentations/P6opaque.cs:
19:30 dalek 6model: Fill out P6opaque some more, so that it now does slot allocation in the single inheritance case to enable array offset attribute access to be supported. Untested.
19:30 dalek 6model: review: http://github.com/jnthn/6model/commit/d​ceef709f4035d20ead4fa3113be1d47c120e2c5
19:30 dalek 6model: 04ff386 | jnthn++ | dotnet/runtime/Metamodel/Kno​wHOW/KnowHOWBootstrapper.cs:
19:30 dalek 6model: Fix a thinko in KnowHOWBootstrapper. I think. :-)
19:30 dalek 6model: review: http://github.com/jnthn/6model/commit/0​4ff3867427860f9946e9da73d8db4a06b28f6f4
19:36 dalek 6model: e04e040 | jnthn++ | dotnet/compiler/PAST2DNSTCompiler.pm:
19:36 dalek 6model: Fix an ordering problem to unbreak knowhow delcarations in ordinary non-setting code.
19:36 dalek 6model: review: http://github.com/jnthn/6model/commit/e​04e0404e37c0c7b98d38659d768555421115a56
19:37 amkrankruleuen left #perl6
19:53 Schwern joined #perl6
19:54 gottreu Does anyone know where the repository for Pod::PseudoPod resides, if there is one?
19:57 mberends left #perl6
19:58 moritz_ gottreu: on github, owner is chromatic
19:59 moritz_ http://github.com/chromatic/Pod-PseudoPod-LaTeX
20:01 patspam left #perl6
20:02 dalek 6model: b2f3bac | jnthn++ | common/NQP/NQPSetting.pm:
20:02 dalek 6model: Add a (very primitive) KnowHOWAttribute knowhow to the setting, so we can start to declare knowhows with attributes.
20:02 dalek 6model: review: http://github.com/jnthn/6model/commit/b​2f3bac3ca51745136207f9db5ef5b58d8a9cb1b
20:02 dalek 6model: c5dac2d | jnthn++ | dotnet/compiler/ (2 files):
20:02 dalek 6model: Refactor JnthnNQP's package declarators a little to be more STD-ish, and then do a first cut of the new code for compiling attribute declarations.
20:02 dalek 6model: review: http://github.com/jnthn/6model/commit/c​5dac2d3eb1467b4a289fb7d7d84e00d8a0a0d0f
20:02 patspam joined #perl6
20:07 dalek rakudo: 9993bb2 | moritz++ | docs/ChangeLog:
20:07 dalek rakudo: [docs] update ChangeLog
20:07 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9​993bb24d7d109485fe78a6afd463671912c6960
20:10 wallberg joined #perl6
20:11 tadzik btw, how is speeding up read()/write() going? :)
20:13 tadzik bah, bedtime. See you tomorrow
20:13 tadzik left #perl6
20:13 rindolf left #perl6
20:14 chatcopitecos joined #perl6
20:15 chatcopitecos left #perl6
20:15 wallberg hi masak & Co!
20:18 alksentrs left #perl6
20:18 gottreu moritz_, not the LaTeX generator, but the base package Pod::PseudoPod.  there's a github repo, but it's behind CPAN's version, and it doesn't seem to be the place where development actually takes place.
20:23 jnthn wallberg: Seems only the Co are here at the moment. :-)
20:23 wallberg :-)
20:26 lue ohai o/
20:26 jnthn hellue
20:27 timbunce joined #perl6
20:27 dalek 6model: 3ab10e5 | jnthn++ | dotnet/ (17 files):
20:27 dalek 6model: All representation methods should probably get the ThreadContext in the .Net version (just as the Parrot ones will all want to get the interp). Gets us a step closer to P6opaque slot alloc actually working.
20:27 dalek 6model: review: http://github.com/jnthn/6model/commit/3​ab10e5447915b4d72e0a31c8c01c72de0ad0942
20:29 lue on perlcabal.org/syn, the S26 .pod should link to the /raw/ version, not /blob/ [where may I change this?]
20:30 jnthn mberends++ will probably smack me for doing that commit now rather than thinking of it earlier...
20:30 jnthn lue: I think pmichaud++ fixed that earlier.
20:30 jnthn lue: It's just not propagated to the live site yet.
20:33 alksentrs joined #perl6
20:34 mberends joined #perl6
20:36 vapace left #perl6
20:36 vapace joined #perl6
20:44 kjeldahl left #perl6
20:49 mj41 left #perl6
20:51 mj41 joined #perl6
21:00 Kodi left #perl6
21:09 jferrero left #perl6
21:09 tylercurtis jnthn: in :($!foo), is $!foo bound or assigned the value of the parameter?
21:11 chitragupt left #perl6
21:12 yrgd left #perl6
21:13 vapace left #perl6
21:13 vapace_ joined #perl6
21:17 vapace_ left #perl6
21:17 vapace_ joined #perl6
21:23 mj41_ joined #perl6
21:24 mj41 left #perl6
21:24 chitragupt joined #perl6
21:24 mj41_ is now known as mj41
21:25 jnthn tylercurtis: assignment
21:25 jnthn Same for :($.foo) too, though in that case it calls self.foo to get the thing to bind to
21:26 tylercurtis jnthn: Can $!foo be bound explicitly? Can $.foo (assuming it's rw)?
21:27 jnthn $!foo := ...; should work in a method
21:27 jnthn (may not work in declarations)
21:27 jnthn Binding to $.foo is weird
21:27 jnthn ('cus it's really a method call returning an l-value)
21:28 qw3rty joined #perl6
21:29 mj41 left #perl6
21:29 mj41_ joined #perl6
21:29 mj41_ is now known as mj41
21:35 ash_ rakudo: my $a = 5; sub f($a = \$a) { say $a }; f; $a = 3; f;
21:35 p6eval rakudo 9993bb: OUTPUT«Capture()<0x630b3b0>␤Capture()<0x5e88d20>␤»
21:35 tylercurtis Thanks for answering these questions. I started thinking about representations and wondering in what circumstances a class could be laid-out as a simple struct of the attributes without needing actual containers.
21:35 ash_ rakudo: my $a = 5; sub f($b = \$a) { say $b[0]; }; f; $a = 3; f;
21:35 tylercurtis Obviously, augment complicates things, but I think that could be handled by either precompiling a pessimized and an optimized version, or precompiling one and caching the compilation in some intermediate form that still has the necessary pessimization/optimization options to generate the other.
21:35 p6eval rakudo 9993bb: OUTPUT«5␤3␤»
21:36 jnthn I'm going for lazy pessimization
21:36 jnthn e.g. we produce something struct-ish when we can, but fall back to something worse if needed.
21:37 chitragupt left #perl6
21:40 Mowah left #perl6
21:42 tylercurtis I'm very curious about how you'll implement compact structs on Parrot.
21:42 vapace_ left #perl6
21:42 jnthn At the moment I'm pondering that some reprs can flag that they should be stored "inline".
21:43 vapace_ joined #perl6
21:44 PacoLinux left #perl6
21:50 ash_ compact structs could be handled with a bytebuffer
21:51 ash_ or an UnmanagedStruct
21:52 jnthn I expect I'll do something a little like [Un]managedStruct does.
21:52 tylercurtis One nice thing about targetting a lower-level backend with Bennu is that I'll have considerably more freedom with how I can emit code for certain things. For example, for compact structs, Bennu could, if no pessimizations were necessary, emit essentially(possible exactly?) the same code a C compiler would.
21:53 tylercurtis Of course, targeting a lower level backend also means I have to roll my own everything...
21:56 jnthn Trade-offs. :-)
21:57 svetlins joined #perl6
22:02 tylercurtis :) Once I get some more stuff parsing, I'll have to decide whether to roll my own vtables (for the low-level classes involved in bootstrapping the metamodel) in the setting or to do them in the compiler.
22:02 tylercurtis The latter's likely the prettier option, and makes it more convenient for other people to write representations, but it has the disadvantage that it might make it harder for people to roll their own low-level method dispatch.
22:02 Myhrlin left #perl6
22:04 TimToady rakudo: .say for 0, 0.001, 0.002 ... 20  # segfault on my machine before it gets to 20
22:04 p6eval rakudo 9993bb:
22:04 p6eval ..OUTPUT«(timeout).002␤0.003␤0.004␤0.005␤0.006␤0.​007␤0.008␤0.009␤0.01␤0.011␤0.012␤0.013␤0.014␤0.01​5␤0.016␤0.017␤0.018␤0.019␤0.02␤0.021␤0.022␤0.023␤​0.024␤0.025␤0.026␤0.027␤0.028␤0.029␤0.03␤0.031␤0.​032␤0.033␤0.034␤0.035␤0.036␤0.037␤0.038␤0.039␤0.0​4␤0.041␤0.042␤0.043␤0.044␤0.045␤0.046␤0.047␤0.…
22:06 TimToady it's really difficult to do a large integration when you can't run 20,000 iterations...
22:06 chitragupt joined #perl6
22:06 flussence appears to work on mine (2010.08), though it's slowly leaking memory
22:06 TimToady 32 or 64-bit?
22:06 flussence 32
22:06 TimToady 32 here too
22:06 TimToady it gets all the way to 20 for you?
22:06 flussence slow laptop, but it's at 4.1 so far
22:07 TimToady mine only gets to 19.804
22:07 rgrau_ left #perl6
22:07 * ash_ running it to see how far my compy gets
22:07 TimToady it seems quite reproducable here
22:09 jnthn tylercurtis: My feeling is representations are OK to be harder to write/port and can be quite low-levely, and customizable method dispatch wants to be something folks can do easily.
22:10 Tene_ is now known as Tene
22:10 timbunce left #perl6
22:10 ash_ my dies at 19.362 (this time, i'll run again and see if its the same)
22:11 TimToady recompiled HEAD, trying again
22:12 ash_ hmm, i'll try it in the gdb next to see where the segfault happens
22:12 flatwhatson left #perl6
22:12 tylercurtis jnthn: well, customizable method dispatch should be easy, either way. It's non-vtable-based low-level ultra-fast method dispatch that might be less convenient(impossible, even, perhaps) to write if I do vtables in the compiler.
22:12 jnthn Eww, it only gets to 5.286 before segfaulting here. :/
22:13 jnthn tylercurtis: I'm pondering that the HOW API will have a way for a meta-class to say "here's the things that belong in my v-table" or some such
22:14 TimToady 19.678 this time
22:14 pmichaud I'm guessing that it's ending up with the full linked list of iterators somehow.
22:14 pmichaud (back from soccer :)
22:14 * jnthn tries it under the 'bugger.
22:15 flussence 20 :D
22:15 ash_ its noticably jerkier at around 18~ish, like it prints a bunch then freezes for a second, prints a bunch, then freezes
22:15 ash_ 19.342 this time
22:15 jnthn pmichaud: You are...CORRECT.
22:15 flussence yeah, mine does that every ~196 iterations
22:15 jnthn It stack overflows.
22:15 flussence GC?
22:16 jnthn oh huh, where on earth are my debug symbols...
22:16 * flussence tries with 64bit
22:16 tylercurtis jnthn: note that I'm not talking about things at the Perl 6 MOP level. Hopefully, new HOWs and at least some new reprs can be implemented above the level I'm discussing. I'm talking about things at the bootstrap-the-metamodel level. Representations are more likely to need to be at that level than HOWs, though, I expect.
22:17 jnthn tylercurtis: Oh, OK.
22:17 azert0x left #perl6
22:17 jnthn tylercurtis: I thought you were a level higher. :-)
22:18 qw3rty left #perl6
22:18 ash_ running in gdb, so i'll see where it crashes for me, hopefully its consistent
22:18 flussence 64bit 2010.08 made it to 20 too
22:18 jnthn ash_: I suspect it's consistent-ish on a given machine
22:18 jnthn ash_: And depends on stack size.
22:18 pmichaud we know that Parrot tends to die whenever there's any sort of linked list with more than 20K elements.  http://trac.parrot.org/parrot/ticket/1723
22:19 jnthn er, yup
22:19 jnthn pmichaud: It's in the GC
22:19 jnthn pmichaud: deep recursion.
22:19 pmichaud I should probably look at the series operator to see if it's somehow keeping the entire list.
22:19 jnthn pmichaud: So it's exacly that.
22:19 pmichaud I haven't been following the commits for that over the past few days.
22:19 tylercurtis jnthn: I don't think that it is acceptable for representations to necessarily be harder and more low-level, by the way. Although most will need to be low-level, I can think of some that should be able to be implemented in normal Perl 6 code(e.g., ORM stuff).
22:20 jnthn tylercurtis: I don't think folks writing ORM stuff will need custom representations.
22:20 jnthn tylercurtis: That's more a custom meta-class issue.
22:21 jnthn tylercurtis: I suspect I'll be able to find some way to allow higher level implementations of them, but I don't know that it'll be very useful.
22:21 TimToady it's seems suboptimzal for GC to be using recursion where it could probably be using its own list of TODOs
22:22 cj_ is now known as cj
22:22 jnthn TimToady: Indeed.
22:22 pmichaud TimToady: I don't know anyone who disagrees with that.  :)
22:22 jnthn oh wtf
22:22 jnthn You gotta love this
22:22 jnthn The comment says
22:22 jnthn /* if object is a PMC and contains buffers or PMCs, then attach the PMC
22:22 jnthn * to the chained mark list. */
22:23 jnthn However, it doesn't do that at all - it just recurses.
22:25 vapace_ left #perl6
22:26 tylercurtis jnthn: ORM isn't a good example, since that would require caching that may make a custom representation inappropriate. I guess I don't really have any good examples of high-level representation use cases. But I plan to make it possible/convenient. Maybe someone else will find a good use for it.
22:27 pmichaud afk again for a while -- need a bit of rest after today's soccer game.
22:28 pmichaud bbl
22:31 Ross left #perl6
22:36 tylercurtis In S03, := and ::= are listed under "Item assignment precedence" even though their descriptions specify that they're parsed as list assignments.
22:36 meppl left #perl6
22:40 patspam left #perl6
22:42 pmurias left #perl6
22:47 dalek 6model: 79cb4c2 | jnthn++ | dotnet/runtime/Rakudo.Net.csproj:
22:47 dalek 6model: Remove several references that we're not using.
22:47 dalek 6model: review: http://github.com/jnthn/6model/commit/7​9cb4c205b4d7907593600f28648e823e3aa6e58
23:01 chitragupt left #perl6
23:04 chitragupt joined #perl6
23:15 wallberg left #perl6
23:19 dalek 6model: 2e85654 | jnthn++ | dotnet/runtime/Runtime/Ops.cs:
23:19 dalek 6model: Add some ops for dealing with low level lists (those based on the P6list representation).
23:19 dalek 6model: review: http://github.com/jnthn/6model/commit/2​e85654cf7085f798f25d1dada365d3056c00c52
23:19 dalek 6model: d88a87b | jnthn++ | common/NQP/NQPSetting.pm:
23:19 dalek 6model: Flesh out NQPList a little bit.
23:19 dalek 6model: review: http://github.com/jnthn/6model/commit/d​88a87b1b00863afdacc1d5a77d9f20fbe54384d
23:19 dalek 6model: 2eadf22 | jnthn++ | dotnet/runtime/ (2 files):
23:19 dalek 6model: Add a default list field type to the TC.
23:19 dalek 6model: review: http://github.com/jnthn/6model/commit/2​eadf22984a2c992efa2358c1a3bb13eb58ad6f4
23:20 lue rakudo: my %h = "2a", 1, "ri", 3; say (%h.keys ~~ /<digit> .+/)
23:20 p6eval rakudo 9993bb: OUTPUT«any(Match.new(␤ from => 2,␤ orig => "ri",␤ to   => -3,␤), Match.new(␤ from => 0,␤ orig => "2a",␤ to   => 2,␤ named => {␤  digit =>    Match.new(␤    from => 0,␤    orig => "2a",␤    to   => 1,␤   ),␤ },␤))␤»
23:20 lue rakudo: my %h = "2a", 1, "ri", 3; say (%h.keys «~~» /<digit> .+/)
23:20 p6eval rakudo 9993bb: OUTPUT«2a␤»
23:21 lue I find that interesting. I assume it's supposed to do that?
23:23 flatwhatson joined #perl6
23:23 tylercurtis lue: why not? It's just normal hyperop bheavior as far as I can see. None of the other elements of %h.keys matches / <digit> .+ /
23:25 tylercurtis s/bheavior/behavior/
23:25 lue I meant that without hyperoping it, it prints the code for a junction of match objects, but with «», it only prints the strings that match.
23:25 * tylercurtis didn't notice the first one.
23:25 dalek 6model: 8fd22f5 | jnthn++ | dotnet/runtime/Metamodel/Kno​wHOW/KnowHOWBootstrapper.cs:
23:25 dalek 6model: Add parents, methods and attributes introspection methods for knowhows.
23:25 dalek 6model: review: http://github.com/jnthn/6model/commit/8​fd22f5f7c5291660bb7105307e0363c6730e3dd
23:25 dalek 6model: cd212c9 | jnthn++ | dotnet/runtime/Metamodel/Re​presentations/P6opaque.cs:
23:25 dalek 6model: Fix a thinko in the slot computation code. Seems it runs and allocates slots now.
23:25 dalek 6model: review: http://github.com/jnthn/6model/commit/c​d212c9a44d21e3a164ce0b6d6e3c315679afee5
23:27 tylercurtis Apparently, Regex.ACCEPTS(Array) is essentially @array.any.match($regex).
23:28 tylercurtis rakudo: my %h = "2a", 1, "ri", 3; say (%h.keys «~~» /<digit> .+/).perl;
23:28 p6eval rakudo 9993bb: OUTPUT«[Match.new(␤ from => 2,␤ orig => "ri",␤ to   => -3,␤), Match.new(␤ from => 0,␤ orig => "2a",␤ to   => 2,␤ named => {␤  digit =>    Match.new(␤    from => 0,␤    orig => "2a",␤    to   => 1,␤   ),␤ },␤)]␤»
23:28 tylercurtis lue: Matches stringify to the matched string. But junctions apparently just do .perl to stringify.
23:30 ash_ jnthn: when you ran that loop for the 0.001 ... 20 loop, my stack trace is 155304 frames deep, that seems really scary
23:31 jnthn ash_: Yes, it's Bad.
23:31 Sanitoeter left #perl6
23:32 ash_ does gc_mark not return?
23:32 Sanitoeter joined #perl6
23:33 lue What's the magic operator that'll let me see if I got no matches from a List (like %h.keys) against a regex?
23:36 lue [I've been experimenting for a while now]
23:36 ash_ ~~ ?
23:36 ash_ rakudo: my @a = <a b c>; say /a/ ~~ @a, /a/ ~~ <b c d>;
23:36 tylercurtis !(%h.keys ~~ / <digit> .+/) should work.
23:36 p6eval rakudo 9993bb: OUTPUT«00␤»
23:36 lue aaah. What does the ! mean?
23:37 tylercurtis ash_: that doesn't work.
23:38 tylercurtis ash_: because Array.ACCEPTS is <<===>>
23:38 ash_ i thought one of the smart matches was this case, let me double check
23:38 tylercurtis ash_: only in Perl 5.
23:38 lue so all I needed was a .Bool...
23:39 tylercurtis lue: well, you asked how to check for no matches, so I told you to use !(or not if you prefer).
23:39 tylercurtis or .not.
23:40 ash_ S03 line 3595
23:40 ash_ rakudo: say ?(<a b c> ~~ /a/), ?(<b c d> ~~ /a/)
23:40 p6eval rakudo 9993bb: OUTPUT«10␤»
23:40 lue I guess I got stuck trying to use prefix:<?> as a way to check for boolean
23:40 tylercurtis ash_: right. But ~~ is asymmetric.
23:41 ash_ Array ~~ Regex checkes .any.match(X)
23:41 ash_ where X = your regex
23:41 lue and using «~~» in combination with ? apparently
23:42 ash_ lue: how are you using your match? in an iffy context?
23:42 tylercurtis lue: @a <<~~>> $regex should always be true for non-empty @a.
23:43 lue rakudo: my %h = 'di', 3, 'hai', 4; say ?(%h.keys «~~» /^'=' .+/)
23:43 p6eval rakudo 9993bb: OUTPUT«1␤»
23:43 ash_ rakudo: my %h = 'di' => 3, 'hai' => 4; say ?(%h.keys ~~ /^'=' .+/)
23:43 p6eval rakudo 9993bb: OUTPUT«0␤»
23:44 ash_ rakudo: my %h = 'di' => 3, 'hai' => 4; say ?(%h.keys ~~ /^'=' .+/), ?(<'='> ~~ /^'='.+/)
23:44 p6eval rakudo 9993bb: OUTPUT«00␤»
23:44 ash_ rakudo: my %h = 'di' => 3, 'hai' => 4; say ?(%h.keys ~~ /^'=' .+/), ?(<'='foo> ~~ /^'='.+/)
23:44 tylercurtis lue: also, you can just do %h ~~ $some-regex instead of %h.keys ~~ 4some-regex
23:44 p6eval rakudo 9993bb: OUTPUT«00␤»
23:44 dalek 6model: a7e45c1 | jnthn++ | README.txt:
23:44 dalek 6model: Couple of README updates to better explain what's in here, for the curious.
23:44 dalek 6model: review: http://github.com/jnthn/6model/commit/a​7e45c1ebe9137393e2a217d11dfa160fca98ed4
23:45 lue oh, it automagically ignores the values?
23:45 tylercurtis According to S03.
23:45 ash_ it should do hash keys
23:45 ash_ not hash values
23:45 lue I wonder why it only works right when you use =>.
23:46 tylercurtis rakudo: my %h = 'di', 3, 'hai', 4; say ?(%h.keys ~~ /^'=' .+/), ?(<'='foo> ~~ /^'='.+/)
23:46 p6eval rakudo 9993bb: OUTPUT«00␤»
23:46 ash_ rakudo: my %h =  'a', 1; say %h.perl
23:46 p6eval rakudo 9993bb: OUTPUT«{"a" => 1}␤»
23:46 lue rakudo: my %h; %h{'di'} = 3; %h{'hai'} = 4; say ?(%h.keys «~~» /^'=' .+/)
23:46 p6eval rakudo 9993bb: OUTPUT«1␤»
23:46 tylercurtis lue: don't use <<~~>>.
23:46 ash_ rakudo: my %h = 'di', 3, 'hai', 4; say %h.perl
23:46 lue ash_: I didn't see your removal of «»
23:47 p6eval rakudo 9993bb: OUTPUT«{"hai" => 4, "di" => 3}␤»
23:47 ash_ it should be fine with comma's
23:48 tylercurtis lue: <<~~>> is not what you want. If either the left or right side of the ~~ has any elements, it will be true, regardless of whether any elements actually matched.
23:51 lue .oO[ The preceding conversation was a result of me not knowing the finer points of various bits of Perl 6. If you already know these points, you may ignore the conversation. :) ]
23:53 tylercurtis lue: personally, I'd prefer using %h.keys.grep($some-regex), because it relies less on the reader knowing what Regex.ACCEPTS does with Hashes or Arrays. (I didn't remember what it did until I looked it up just a few moments ago).
23:56 tylercurtis Speaking on smart-matching, specbug in S03:3600. $_ ~~ X where X is Match should be X, not $_.
23:57 lue Alright .oO[ although I've never had enough reason to even see what .grep is for and what it means :) ]

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

Perl 6 | Reference Documentation | Rakudo