Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-04-17

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:08 bacek_ joined #perl6
00:08 amoc joined #perl6
00:18 brunov joined #perl6
00:23 Kisu joined #perl6
00:42 ruoso joined #perl6
00:44 Limbic_Region joined #perl6
00:55 davidad joined #perl6
01:06 nihiliad joined #perl6
01:13 pugs_svn r26239 | cspencer++ | Skip tests calling positional parameters by name.
01:17 nihiliad joined #perl6
01:43 kidd` joined #perl6
01:55 kimtaro joined #perl6
01:55 araujo joined #perl6
01:55 kimtaro_ joined #perl6
02:05 justatheory joined #perl6
02:27 eternaleye joined #perl6
02:32 sitaram joined #perl6
02:38 kimtaro joined #perl6
02:47 baest joined #perl6
02:54 kimtaro joined #perl6
02:54 kidd` joined #perl6
02:54 amoc joined #perl6
02:54 japhb joined #perl6
02:54 Woody2143 joined #perl6
02:54 Helios` joined #perl6
02:54 ingy joined #perl6
02:54 pmichaud joined #perl6
02:54 lucs joined #perl6
02:54 allbery_b joined #perl6
02:54 frobnitz joined #perl6
02:54 agentzh joined #perl6
02:54 [particle] joined #perl6
02:54 silug joined #perl6
02:54 kcwu joined #perl6
02:56 sitaram left #perl6
02:57 orafu joined #perl6
03:06 meppuru joined #perl6
03:33 msmatsko joined #perl6
03:35 frew|work joined #perl6
03:47 baest joined #perl6
03:47 diakopter joined #perl6
03:47 broquaint joined #perl6
03:47 zostay joined #perl6
03:49 xinming joined #perl6
03:52 orafu joined #perl6
03:52 amoc joined #perl6
04:00 msmatsko joined #perl6
04:21 edenc joined #perl6
04:23 kimtaro_ joined #perl6
04:47 szabgab joined #perl6
05:10 cspencer joined #perl6
05:15 justatheory joined #perl6
05:30 DemoFreak joined #perl6
05:38 pugs_svn r26240 | cspencer++ | Skip tests that call positional params by name.
05:42 dalek rakudo: ab7e189 | pmichaud++ | docs/spectest-progress.csv:
05:42 dalek rakudo: spectest-progress.csv update: 362 files, 10357 passing, 0 failing
05:42 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​b7e18913f45277a423c1fa9ac94e6cba28e4e9f
06:28 moritz_ joined #perl6
06:28 ilogger2 joined #perl6
06:28 r0bby joined #perl6
06:28 pjcj joined #perl6
06:28 bigpresh joined #perl6
06:28 kolibrie joined #perl6
06:28 ascent_ joined #perl6
07:01 mj41 joined #perl6
07:06 amoc joined #perl6
07:15 iblechbot joined #perl6
07:30 goksie joined #perl6
07:31 charsbar_ joined #perl6
07:39 goksie joined #perl6
07:51 payload joined #perl6
07:51 mikehh rakudo (ab7e189) builds on Parrot r38168 - make test PASS / make spectest - t/spec/S09-typed-arrays/hashes.rakudo TODO passed:   6-7
07:53 eiro hello world
07:53 mikehh Ubuntu Interpid i386 - in fact ./perl6 t/spec/S09-typed-arrays/hashes.t passes all tests (inc 1 skip in .rakudo)
07:55 mikehh I have reported this before (twice) but do not know if it works on other platforms
07:57 goksie_ joined #perl6
08:36 cognominal joined #perl6
08:46 kane_ joined #perl6
08:47 eiro http://pastebin.com/f66ecafdc
08:47 buubot eiro: The paste f66ecafdc has been copied to http://erxz.com/pb/17079
08:48 eiro hello all
08:48 eiro this grammar acts only for the first line
08:48 payload joined #perl6
08:48 eiro any idea to parse all the file ?
08:52 Matt-W I haven't figured out how that works yet
08:53 orafu joined #perl6
08:53 Matt-W I need it for one of my own projects that's on the back burner at the moment
08:56 eiro the whole script is here:
08:56 eiro http://pastebin.com/d1aac8684
08:56 buubot eiro: The paste d1aac8684 has been copied to http://erxz.com/pb/17080
09:04 eiro ok .. gotcha: it's a rule, not a token :)
09:09 wayland76 How do I update git to head again?
09:10 wayland76 (or whatever git calls head)
09:19 Matt-W git pull
09:22 wayland76 Will that also tell me about the files it's updating as it does it?
09:23 wayland76 Because I try that, and it says "already up-to-date"
09:23 Matt-W hmm then it thinks there's nothing more to get
09:24 Matt-W rakudo hasn't had anything committed today
09:25 Matt-W I'm sure NPW is keeping people's rakudo time down
09:25 stas__ joined #perl6
09:26 wayland76 Well, yes, but the last time I did a successful pull was probably about a month ago
09:27 wayland76 One would think that there have been updates in that time :)
09:29 mikehh I did a git pull earlier and docs/spectest-progress.csv had been updated
09:31 mikehh it tends to be updated daily so you should get something at least once a day
09:32 wayland76 So why aren't I?  :)
09:33 mikehh you probably are pointing at a local master rather that the one on github
09:33 payload joined #perl6
09:35 mikehh git clone git://github.com/rakudo/rakudo.git
09:36 wayland76 Not really the solution I was looking for, but I don't have other options, so I'll do it :)
09:36 wayland76 Thanks
09:39 mikehh The docs on git are fairly dense - there is a fairly good book on git - Pragmatic Version Control Using git
09:40 wayland76 I'll probably just learn a few magic incantations, and use those
09:40 * rgs points at http://consttype.blogspot.com/20​08/10/git-how-remotes-work.html
09:44 * wayland76 points at http://osteele.com/archive​s/2008/05/my-git-workflow and says "The diagram in this article is great"
09:45 wayland76 I've bookmarked your article rgs; it looks like it could be very useful in conjunction with the diagram in the other article
09:46 * rgs looks
09:46 rgs yes, i've simplified mine by not mentioning the index
09:47 wayland76 Tip: Don't update your OS on one machine, do a git clone on another, and then try to browse the web :)
09:47 wayland76 It's reminiscent of dial-up :)
09:48 Southen_ joined #perl6
09:48 mikehh The official git tutorial -> http://www.kernel.org/pub/softwa​re/scm/git/docs/gittutorial.html
10:03 mhsparks joined #perl6
10:22 masak joined #perl6
10:22 masak OH HAI from NPW 2009.
10:22 lambdabot masak: You have 1 new message. '/msg lambdabot @messages' to read it.
10:22 masak @messages
10:22 lambdabot mncharity said 1d 5h 43m 45s ago: Thanks for the commit! Please let me know if you encounter other difficulties, or if I can be of any help.
10:23 masak mncharity: absolutely.
10:23 * masak is listening to pmichaud's talk
10:24 Southen joined #perl6
10:25 wayland76 hihihi
10:26 wayland76 Did omega talk to you about his error running november-wiki?
10:32 lumi joined #perl6
10:41 Southen_ joined #perl6
10:41 Casan joined #perl6
10:52 Southen joined #perl6
11:06 kimtaro joined #perl6
11:06 rodi joined #perl6
11:10 sri_kraih joined #perl6
11:12 Southen_ joined #perl6
11:29 Southen joined #perl6
11:36 pugs_svn r26241 | lwall++ | Document the 'when' statement modifier.
11:42 wayland76 yay!
11:43 Tene sweet
11:43 Tene I will implement soon.
11:43 Tene it needs tests, too
11:46 ispy_ joined #perl6
11:46 TimToady I had thought it was already documented; STD has parsed it for a long time
11:47 wayland76 We should've checked :)
11:47 TimToady perl6: $_ = 42; say 'yes' when 42;
11:47 p6eval elf 26241: OUTPUT«syntax error at (eval 124) line 4, near ";␤elsif"␤ at ./elf_h line 5881␤»
11:47 p6eval ..rakudo ab7e18: OUTPUT«yes␤»
11:47 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "when"␤    expecting operator, ":" or ","␤    at /tmp/hoMx6Sn9FQ line 1, column 20␤»
11:47 pmichaud Rakudo already parses it also.
11:47 TimToady would appear that you don't need to implement it. :)
11:48 pmichaud I followed STD.pm for that one :-)
11:48 wayland76 rakudo: my %k = < this is a good >; for %k.keys { .say when /a/; };
11:48 pmichaud rakudo:  say 'yes' when 0;
11:48 p6eval rakudo ab7e18: OUTPUT«a␤»
11:48 p6eval rakudo ab7e18: OUTPUT«Use of uninitialized value␤yes␤»
11:48 wayland76 rakudo: my %k = < this is a good >; for %k.keys { .say when !/a/; };
11:48 p6eval rakudo ab7e18:  ( no output )
11:48 kimtaro joined #perl6
11:48 pmichaud rakudo:  say 'yes' when 0;
11:49 p6eval rakudo ab7e18: OUTPUT«Use of uninitialized value␤yes␤»
11:49 pmichaud hmmm
11:49 pmichaud oh, yeah, it's a smart match.  :-|
11:49 TimToady undef matches 0, I guess...
11:49 pmichaud I didn't set $_
11:49 pmichaud rakudo:  say 'yes' when False;
11:49 p6eval rakudo ab7e18: OUTPUT«Method 'ACCEPTS' not found for invocant of class ''␤current instr.: 'infix:~~' pc 21632 (src/builtins/match.pir:18)␤»
11:50 pmichaud hmmmm.
11:50 pmichaud okay, we need some work there.
11:50 * pmichaud adds another topic to the hackathon list.
11:50 wayland76 What is rakudo thinking when I do...
11:50 wayland76 rakudo: my %k = < this is a good >; for %k.keys { .say when !/a/; };
11:50 p6eval rakudo ab7e18:  ( no output )
11:50 hanekomu joined #perl6
11:50 pmichaud Rakudo doesn't know how to deal with immediate regex matches yet.
11:51 pmichaud I'm working on that
11:51 wayland76 Ok, so that should work eventually?
11:51 TimToady rakudo: my %k = < this is a good >; for %k.keys { .say when 'a' }
11:51 p6eval rakudo ab7e18: OUTPUT«a␤»
11:51 wayland76 I'm thinking that when !/a/ should turn into $_ !~~ /a/
11:52 payload joined #perl6
11:54 Tene TimToady: is there a negative version of when?  when't?
11:55 TimToady only for tests that are specifically against $_ already, such as //
11:56 wayland76 rakudo: my %k = < this is a good >; for %k.keys { .say whent /a/; };
11:56 p6eval rakudo ab7e18: OUTPUT«Statement not terminated properly at line 1, near "whent /a/;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
11:56 wayland76 std: my %k = < this is a good >; for %k.keys { .say whent /a/; };
11:56 p6eval std 26241: OUTPUT«Undeclared routine:␤   t used at 1 ␤ok 00:02 36m␤»
11:57 TimToady not that "when not 'a' {...}" doesn't work either
11:57 wayland76 std: my %k = < this is a good >; for %k.keys { .say when not /a/; };
11:57 pmichaud there was a thread about this on p6l, I think.
11:57 p6eval std 26241: OUTPUT«ok 00:03 38m␤»
11:57 TimToady *note
11:57 wayland76 rakudo: my %k = < this is a good >; for %k.keys { .say when not /a/; };
11:57 pmichaud just a couple of months ago.
11:57 p6eval rakudo ab7e18:  ( no output )
11:57 ispy_ joined #perl6
11:59 Tene why do you keep making a hash for that example instead of just using for on a list of two items?  I've been curious for a while.
12:00 wayland76 Someone else gave that as an example they were having trouble with
12:00 wayland76 and I just kept using it
12:00 wayland76 slack I am! :)
12:01 Tene 'kay
12:30 SamB joined #perl6
12:31 Southen_ joined #perl6
12:38 ruoso joined #perl6
12:41 hanekomu joined #perl6
12:46 amoc joined #perl6
12:46 payload joined #perl6
13:24 pmichaud pugs:  say split(' ', 'hello world').perl;
13:24 p6eval pugs: OUTPUT«("hello", "world")␤»
13:24 pmichaud pugs:  say split('hello world', ' ').perl;
13:24 p6eval pugs: OUTPUT«(" ",)␤»
13:31 hanekomu joined #perl6
13:34 cspencer joined #perl6
13:34 kimtaro joined #perl6
13:34 pugs_svn r26242 | lwall++ | split function now takes delimiter as first arg
13:37 sitaram joined #perl6
13:37 ejs joined #perl6
13:42 sitaram sb clear
13:43 sitaram (oops!)
13:44 sitaram left #perl6
14:04 Tene argh, it's switching again?
14:07 wayland76 I'd like to propose a new split implementation: sub split($a, $b) { if(rand() > 0.5) { realsplit($a, $b); } else { realsplit($b, $a); }
14:08 ruoso wasn't it always like that?
14:08 ruoso I mean, the way it is now, not the rand part
14:10 wayland76 Does anyone remember the git command to overwrite a file I've messed up and revert to head?
14:10 rgs git checkout ?
14:10 cspencer revert just a file or the entire repo to HEAD?
14:10 PerlJam wayland76: git status will tell you how in the comments
14:10 wayland76 thanks
14:10 alester joined #perl6
14:11 PerlJam ruoso: not in the spec.  That's how it was implemented because of perl-5-think though  :)
14:11 PerlJam Tene: it's not switching, another option has been added  (unless I misread the patch earlier)
14:12 ruoso PerlJam, interesting... I was pretty sure that was covered in S09 as it is in S32/Str now
14:12 ruoso s/S09/S29/
14:12 wayland76 rgs right, PerlJam wrong
14:13 PerlJam wayland76: you wanted to revert a single file to HEAD, or no?
14:14 PerlJam wayland76: oh, you meant after you'd already committed.  ... bad assumptions on my part.  sorry
14:14 wayland76 PerlJam: Preferably one, but git checkout <filename> did what I wanted
14:14 wayland76 No, haven't committed
14:14 wayland76 Applied a patch that went horribly wrong, and wanted to revert and do it by hand
14:15 PerlJam wayland76: anyway ... TMTOWTDI applies to git as well  :)
14:15 PhatEddy joined #perl6
14:16 wayland76 PerlJam: Maybe.  But I tried your way, with no results
14:17 PerlJam c'est la vie
14:20 PhatEddy Is there a test file that covers open RTs with small code samples?
14:21 pmurias joined #perl6
14:24 PhatEddy Since nobody claims to know of such a file - is there interest in creating one?  I started one covering a few RTs.
14:26 ZuLuuuuuu joined #perl6
14:29 pmurias PhatEddy: having one file per RT might make more sense
14:30 skids joined #perl6
14:31 PhatEddy so maybe an RT directory with one file per RT?
14:31 PerlJam PhatEddy: I like the idea of collecting them all in one place rather than stumbling upon them in the code somewhere
14:31 presh joined #perl6
14:32 PerlJam PhatEddy: A dir with one file per rt sounds fine to me.
14:34 PhatEddy If the RT notes an existing test or comes with a test patch that's been applied there's no need to duplicate ...
14:34 PhatEddy otherwise I think that my project may be of some use ...
14:34 brunov joined #perl6
14:38 nihiliad joined #perl6
14:43 * skids ponders of the Int type of push&unshift in S32/Containers is a relic/oversight or conscious design decision.
14:43 skids e.g. the implication of a List-returning variant for feeds, like splice.
14:43 __felix__ joined #perl6
14:43 skids Someone who's been around p6l long enough to know these things should really take an hour and go through and make sure those protos are all correct.
14:43 __felix__ left #perl6
14:53 skids hrm. "whip, v.tr. 1) To strike with repeated strokes ... 8) To wrap or bind (a rope, for example) with twine to prevent unraveling or fraying."
14:54 pmichaud std:  $_ .= abs;
14:54 * skids suggests whip as huffmanization/mnemonic-ization of "roundrobin"
14:54 p6eval std 26242: OUTPUT«ok 00:02 35m␤»
14:54 pmichaud std:  .= abs;
14:54 p6eval std 26242: OUTPUT«##### PARSE FAILED #####␤Can't understand next input--giving up at /tmp/AZ9LYwzfOV line 1:␤------> [32m.=[31m abs;[0m␤    expecting dotty method or postfix␤FAILED 00:02 34m␤»
14:56 pmichaud (split change in S32) -- today we noticed that the spec was backwards from the way p5 does it, even though both pugs and rakudo had implemented the p5 argument ordering
14:56 skids Yeah I noticed that moritz commit.
14:56 pmichaud but when 'split' was migrated from PIR to Perl 6 setting in rakudo, the implementor followed the (incorrect) spec.  So, r26242 corrects the spec (and we need to go fix Rakudo).
14:57 pmichaud Apparently when Rakudo followed the incorrect spec, it broke November.
14:58 pmichaud I think the various spectests (which were also changed to follow the incorrect spec) have to be reverted as well
14:58 pmichaud afk for a while.
15:00 skids Which would make split more a method of the pattern than the target data, right?
15:00 skids Or how does List.split fit in now?
15:02 FurnaceBoy joined #perl6
15:04 orevdiabl joined #perl6
15:05 jbt joined #perl6
15:07 skids pugs: split("h","ahbhc").say
15:07 p6eval pugs: OUTPUT«abc␤»
15:15 PhatEddy left #perl6
15:17 exodist joined #perl6
15:21 wayland76 Who works on the Rakudo install/build setup?
15:35 frew|work joined #perl6
15:39 amoc joined #perl6
15:41 skids wayland76: I seem to recall particle mucks around with makefiles a lot.
15:41 wayland76 ok
15:42 wayland76 I'll try to remember to talk to him about my patch once I have it working with the latest rakudo
15:45 skids best way to know for sure might be to pull a commit log on makefiles
15:45 * skids points out that the majority of split changes that need to be undone are currently the latest commit to the test file.
15:46 Psyche^ joined #perl6
15:49 ejs0 joined #perl6
15:50 skids also, attention to S32-str/comb.t S32-str/quotemeta.t integration/real-strings.t pugs/Demo.pm
15:52 skids lambdabot: @tell moritz: backlog, re: split
15:52 lambdabot Consider it noted.
15:55 orafu joined #perl6
16:01 barney joined #perl6
16:07 antiphase joined #perl6
16:11 kimtaro joined #perl6
16:11 nihiliad joined #perl6
16:28 LylePerl joined #perl6
16:28 kidd` Hi. Is there something like $/=undef to slurp $*IN ?
16:29 LylePerl I've seen some stuff about slurping in the source of http://perlcabal.org/syn/S29.html
16:31 kidd` thanks. I'll search there.
16:31 PerlJam just use slurp() on it.
16:31 PerlJam (or does $*IN not quite work yet?)
16:32 kidd` I tried slurp $*IN and didn't work, but I didn't know if it was supposed to
16:32 PerlJam okay
16:56 arnsholt joined #perl6
17:15 alanhaggai joined #perl6
17:16 alanhaggai joined #perl6
17:41 cognominal joined #perl6
17:57 argggh joined #perl6
18:16 moritz_ re
18:16 lambdabot moritz_: You have 1 new message. '/msg lambdabot @messages' to read it.
18:22 moritz_ "backlog" isn't very specific
18:24 moritz_ ah, TimToady++ changed it back again ;-)
18:24 moritz_ so I'll have to revert some of my changes
18:24 moritz_ well, that happens in Perl 6 land ;-9
18:24 moritz_ actually I'm glad it's back to what it used to be
18:24 * [particle]- has no idea what moritz_ is talking about...
18:25 moritz_ split, and its order of parameters
18:26 Casan joined #perl6
18:27 ZuLuuuuuu joined #perl6
18:27 dalek rakudo: 8f5ecdc | (Moritz Lenz)++ | tools/progress-graph.pl:
18:27 dalek rakudo: better error message in progress-graph.pl
18:27 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​f5ecdcc74930ac2552dcf7847380ff3e0326c0f
18:27 dalek rakudo: 73ead21 | (Moritz Lenz)++ | docs/ChangeLog:
18:27 dalek rakudo: [docs] udpated ChangeLog
18:27 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​3ead21270b95cae04652ad8fbb793907b10245a
18:27 dalek rakudo: 65b3e65 | (Moritz Lenz)++ | t/spectest.data:
18:27 dalek rakudo: eight more passing test files
18:27 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​5b3e6520d01e2982ce0f27b6b9b2fe48b17cd5d
18:31 Casan The other day someone asked how we define that a method in an inherited class can't be overloaded in the subclass. I looked at the synopsis, but didn't find it. any ideas?
18:31 lambdabot Casan: You have 1 new message. '/msg lambdabot @messages' to read it.
18:33 moritz_ Casan: it's not possible, by design
18:34 Casan moritz_: ok lets take it here, whats the reason by design? multiple inheritance related?
18:36 moritz_ Casan: the most compelling reason is probably that you can emulate it anyway
18:36 moritz_ Casan: and it's less work to simply allow it in the first place
18:37 Casan ok
18:37 moritz_ the alternative is to make an effort to implement some restriction, and then somebody else has to put effort in it to work around it
18:37 pugs_svn r26243 | moritz++ | [t] move macro tests to spec/ and unspecced/
18:37 pugs_svn r26244 | moritz++ | [t/magicals] move inc.t to spec/; delete the other tests
18:37 pugs_svn r26244 | moritz++ |
18:37 pugs_svn r26244 | moritz++ | ($?POSTION is not specced, and the other tests only tested that)
18:37 Casan thanks for the answer, I was just curious now it was brought up.
18:37 pugs_svn r26245 | moritz++ | [t] move symbolic_deref.t to spec/
18:37 pugs_svn r26246 | moritz++ | [t] remove dangerous duplicate test
18:37 pugs_svn r26247 | moritz++ | [t] move lvalue_deep_brackets.t to spec/
18:37 pugs_svn r26248 | moritz++ | [t/spec] cleaned up autovivification.t a bit, and added a few more tests
18:38 pugs_svn r26249 | moritz++ | [t/spec] stringify Match object before is() comparison
18:38 pugs_svn r26250 | moritz++ | [t/spec] some unfudges for Rakudo
18:38 pugs_svn r26251 | moritz++ | [t] move fmt.t to spec
18:42 wayland76 Hi all.  Is there a way on github (or git) that I can see all the commits that have affected a particular file?
18:44 arnsholt There's something called git log, but I can't quite make out if it does what you want on the spur of the moment
18:44 literal git log -- Makefile.PL
18:44 literal for example
18:57 sri_kraih_ joined #perl6
19:05 wayland76 thanks.  That answers my question :)
19:06 wayland76 ...and -u if you want to see diffs :)
19:07 mofino joined #perl6
19:18 rblasch joined #perl6
19:27 stas__ joined #perl6
19:30 argggh joined #perl6
19:35 Tene rakudo: say 'fool ~~ s/o/a/
19:35 p6eval rakudo ecca70: OUTPUT«say requires an argument at line 1, near " 'fool ~~ "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
19:35 Tene rakudo: say 'foo' ~~ s/o/a/
19:35 p6eval rakudo ecca70: OUTPUT«Statement not terminated properly at line 1, near "/"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
19:35 Tene I thought that worked...
19:37 moritz_ Tene: no, rakudo never did s/.../.../
19:37 moritz_ Tene: $str.subst($regex, $closure) works, though
19:37 moritz_ or $str.subst(/..../, $str, :g)  for global replacement
19:37 Tene can you access the match from the closure?
19:38 moritz_ yes, I think so
19:38 moritz_ rakudo: say 'foo'.subst(/o/, { uc $0 }, :g)
19:38 p6eval rakudo ecca70: OUTPUT«Use of uninitialized value␤Use of uninitialized value␤f␤»
19:38 moritz_ rakudo: say 'foo'.subst(/o/, { .uc  }, :g)
19:38 p6eval rakudo ecca70: OUTPUT«fOO␤»
19:39 moritz_ rakudo: say 'foo'.subst(/o/, -> $x { $x[0].uc }, :g)
19:39 p6eval rakudo ecca70: OUTPUT«Use of uninitialized value␤Use of uninitialized value␤f␤»
19:39 moritz_ ok, it's passed in as topic $_
19:39 Tene ah
19:39 Tene moritz++
19:39 Tene also in $/
19:42 kate21de joined #perl6
19:45 moritz_ if it's also in $/, why doesn't $0 work?
19:45 moritz_ it's an alias into $/
19:45 moritz_ rakudo: say 'foo'.subst(/o/, -> $x { $/.uc }, :g)
19:45 p6eval rakudo ecca70: OUTPUT«fOO␤»
19:46 moritz_ a bug, probably
19:51 rblasch1 joined #perl6
20:15 pugs_svn r26252 | moritz++ | [t/spec] revert r26201 (except the part that touches TASKS)
20:15 pugs_svn r26252 | moritz++ |
20:15 pugs_svn r26252 | moritz++ | The spec changed split($delimiter, $input) again, so we track that
20:18 dalek rakudo: 01d7ded | (Moritz Lenz)++ |  (2 files):
20:18 dalek rakudo: Revert "The sub form of split() expects the delimiter as second parameter"
20:18 dalek rakudo: The spec was also reverted, we just follow its lead...
20:18 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​1d7dedd2333c413fba5c5c5b8298d9dba5e97e8
20:22 payload joined #perl6
20:28 payload left #perl6
20:28 payload joined #perl6
20:31 moritz_ @seen masak
20:31 lambdabot I saw masak leaving #perl6 9h 39m 21s ago, and .
20:35 TimToady joined #perl6
20:36 dalek rakudo: 616c0b7 | (Moritz Lenz)++ | docs/ChangeLog:
20:36 dalek rakudo: remove ChangeLog entry that was reverted
20:36 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​16c0b71546e9994bdc42259818357655de2a975
20:36 diakopter joined #perl6
20:41 * skids wonders whether comb is supposed to follow splits
20:41 skids split's example
20:41 skids i.e. currently no sub form is defined.
20:43 skids (specced, that is)
20:44 frew|work joined #perl6
20:48 moritz_ S32 mentions the split function
20:48 moritz_ wait
20:48 moritz_ my copy of the spec isn't up to date
20:48 moritz_ it does have a sub form.
20:50 stas__ joined #perl6
20:55 ispy_ left #perl6
20:59 rafl joined #perl6
21:05 skids So Str.pod should have a proto?  But which param order?
21:06 jiing_ joined #perl6
21:06 moritz_ it has one
21:07 skids Are we looking at the same file?  I see a method proto, no sub proto.
21:08 skids or are we counting the is export, and assuming the spec really means to have different param order than split/
21:08 omega from the discussion at npw today I think the method should be string, delim and the function delim, string
21:08 moritz_ skids: I'm looking at http://svn.pugscode.org/pugs/docs/Pe​rl6/Spec/S32-setting-library/Str.pod
21:08 ejs0 joined #perl6
21:09 moritz_ and it does have two multi's without 'method' after it, which default to sub
21:09 skids Yes, split, I'm talking about comb
21:10 moritz_ ah
21:10 moritz_ the 'is export' generates a sub
21:10 skids right but it has the ordering split used to be specced to have.
21:11 PerlJam split is still specced with that ordering :)
21:11 moritz_ aye
21:11 skids so the question is whether that's supposed to stay like that or not
21:11 moritz_ PerlJam: s/still/again/
21:11 omega the spec was always wrong for the function order
21:11 omega but pugs (and hence rakudo) got it wrong
21:11 omega or so I was explained it today at least
21:12 skids Right, until today.
21:12 skids When the spec for split got corrected.
21:12 omega then someone fixed rakudo to follow the spec
21:12 moritz_ ... until I implemented it according the spec, which TimToady didn't seem to like ;-)
21:12 omega and that broke november, so the discussion started
21:12 omega and the spec got changed
21:13 skids Yeah so my question is, do we want the sub form of comb to look like the sub form of split.
21:13 PerlJam skids: I think comb should be specced with the same parameter orderings as split
21:13 moritz_ I agree with PerlJam, and I think that the tests already have it that way
21:14 skids So maybe I'll add a sub proto to comb in Str.pod and see if it gets yanked back out :-)
21:14 PerlJam skids: sounds like a plan
21:15 moritz_ it seems we have no test at all for the parameter order of comb()
21:16 moritz_ the only test for the sub form actually tests the names of the parameters ;-)
21:19 skids I'm still a little foggy on some details: the statement about "returns a list of C<Char> from anything that can give you a C<Str>" would still hold true for $thing.comb(/./)?
21:20 moritz_ wouldn't it return a list of Match objects anyway?
21:20 PerlJam skids: that's foggy to you, but not that business about cats?
21:20 wknight8111 joined #perl6
21:20 skids Cats don't bother me, except the four legged variety, which are very bothersome :-)
21:21 skids I think the matches would stringify?
21:21 PerlJam comb is like a grep for strings
21:21 moritz_ skids: sure
21:22 moritz_ but it still doesn't return list of Chars, does it?
21:22 skids Technically, no :-)
21:23 skids Of wait, technicality -- it only returns Match when there are capturing groups.
21:23 PerlJam are you still talking about comb?
21:24 skids Yeah.
21:24 moritz_ we had something similar in the split case, which was then substituted by the :all flag
21:24 PerlJam that doesn't make sense to me
21:24 PerlJam what moritz_ said
21:24 PerlJam (apply that to comb)
21:24 donaldh joined #perl6
21:25 * skids digs further into the .split verbiage
21:25 PerlJam comb and split would then be symmetric :)
21:25 skids Shame on me for trying to get away with a simple proto add :-)
21:26 moritz_ ;-)
21:26 PhatEddy joined #perl6
21:28 stas__ joined #perl6
21:33 skids Ergh.  I'm torn between the two explanations of cruft|intent and the goals of utility|consistency
21:34 skids First off comb still is specced to have a default value, and this looks intentional, since it is pointed towards as the ease of use alternative to split in the split verbiage.
21:36 moritz_ it has a default rule, but not a default value
21:36 skids So if it has a default value, why not keep the also-convenient non-Matchiness of non-capturing regexes (which include the default value)
21:36 skids Right.
21:36 moritz_ skids: because the capture-or-no-capture question can't be answered at compile time of the pattern (unlike perl 5)
21:37 moritz_ a regex line / [ a | (b) ] / will have a capture if the b matches, but not if the a matches
21:37 moritz_ so if you hand such a pattern to comb, what should it do?
21:38 moritz_ examine the first match, and then decide on a type? or decide for every match individually?
21:38 moritz_ or examine all matches first (and kill lazyness)?
21:38 skids good point.
21:39 skids One answer might be: not do anything special with the captures (still return strings) unless :all
21:40 skids rather than always return matches.
21:40 moritz_ aye
21:40 skids Though it's not QUITE the same thing as split :all, in that you do not get delimiters.
21:40 skids But then, if you want that, use split.
21:40 moritz_ yes, we'd need a better name
21:41 skids :match
21:41 skids ?
21:41 moritz_ dunno
21:42 moritz_ I'm too tired to think about design decisions :/
21:42 skids :-)
21:42 moritz_ bed time for me
21:42 moritz_ see you
21:43 skids good n8
21:43 PerlJam I was thinking something like that earlier.
21:43 PerlJam (:match)
21:44 skids But then the current behavior isn't that awful: it doesn't decide between strings and matches at runtime, just says if I see a () in there, you are getting a Match.
21:44 skids Though I am not sure how much work that is for the compiler to figure.
21:45 PerlJam I don't care how much work it is for the compiler, I care how surprisey it is for the user  :)
21:45 skids :match would be more obvious, true.
21:45 pyrimidine joined #perl6
21:46 pmichaud good localtime
21:46 PerlJam especially when the match may actually be a $var and the parens aren't obviously there.
21:46 PerlJam hey pm!  how's npw?
21:46 pmichaud it's excellent.
21:46 pmichaud we're being very productive up here :-)
21:47 skids There's something about "delimiters must be considered constants, not rules"
21:48 PerlJam skids: for string delimiters, not regex.
21:48 PerlJam pm: so ... what are you producing?
21:49 PerlJam pm: more tests?  more working perl6?  more people willing to work on perl6?
21:49 pmichaud for comb, I suspect that the synopsis is inaccurate and that .comb will always produces a list of matches
21:49 pmichaud that's my guess based on recent changes to split()
21:49 pmichaud pm:  more people working on perl6, and more working perl6
21:49 PerlJam cool
21:51 wayland76 yay! :)
21:51 pmichaud std:  .=abs
21:51 p6eval std 26252: OUTPUT«ok 00:02 35m␤»
21:52 pmichaud std: .= abs
21:52 p6eval std 26252: OUTPUT«##### PARSE FAILED #####␤Can't understand next input--giving up at /tmp/wZVvK8gWfH line 1:␤------> [32m.=[31m abs[0m␤    expecting dotty method or postfix␤FAILED 00:02 34m␤»
21:52 pmichaud a-ha
21:52 PerlJam LTM! :)
21:52 skids pmichaud: well, split still returns strings for the non-delimiter portion, which is usually the "stuff I want" whereas the "stuff I want" in comb is in the rule.
21:52 PerlJam (.=abs is one funky op)
21:53 pmichaud no, I think it's that dottyop doesn't like whitespace between the '=' and the methodname
21:53 skids And if we want "P5's split(' ') to be comb" then a list of Matches is not really that.
21:53 pmichaud "P5's split(' ')  is   comb(/\S+/)
21:54 pmichaud which when used as a list of strings will be exactly that.
21:54 skids And comb's default rule is /\S+/
21:54 pmichaud i.e., the string value of each returned match object will be the "stuff I want"
21:54 PerlJam pm: except that you normally want the strings and not the matches.
21:54 pmichaud pj:  what's the difference between the strings and matches in this case?
21:55 pmichaud since the match objects in string context will be the matched strings
21:56 PerlJam yeah, except you may have to force the context.
21:56 skids Will they behave the same in all possible contexts?  We can't assume the user will place them only in a Str context.
21:56 pmichaud I don't think the point of comb is necessarily to return strings.  If that _is_ the intent, then I suspect that the paragraph "If there are captures in the pattern..." is bogus.
21:57 PerlJam I agree about the bogosity  :)
21:57 PerlJam That's why there should be a :match thingy instead
21:57 PerlJam normally you get strings, but if you want Match objects, you pass :match
21:58 pmichaud I think that for most usages, having comb return a list of Matches is the right thing
21:58 * skids thinks just replacing "If there are captures" with "If :match adverb is applied"
21:58 skids and keeping the paragraph
21:58 PerlJam pm: perhaps.  this is where I lean the other way, but would need some real world examples.
21:59 pmichaud I think that getting a list of strings might be   ~<< .comb
21:59 PerlJam It would *have* to be that if we only got Match objects out.
22:00 skids I think the default matcher rule is a clue that comb is supposed to be a more naive api.
22:01 pmichaud perhaps.  But since the spec explicitly says
22:01 pmichaud Saying
22:01 pmichaud $string.comb(/pat/, $n)
22:01 pmichaud is equivalent to
22:01 pmichaud $string.match(rx:global:x(0..$n):c/pat/)
22:01 pmichaud ... that looks to me like it should be a list of matches
22:01 pmichaud since that's what $string.match(...)   would return
22:01 PerlJam (at least until skids changes it to read otherwise  ;-)
22:01 skids :-)
22:01 pyrimidine spec fight!
22:02 skids ~<<$string.match(rx:global:x(0..$n):c/pat/)
22:03 skids OK, well, I'll put the :match stuff in, and then we can make a point to bring it to TimToady's attention and see if he can tiebreak.
22:04 skids Oh wait ~<< doesn't guarantee order.  :-D
22:05 arnsholt Apart from the synopses and actual Perl 6 code people are working on now, are there any other recommended resources to get a handle on the language?
22:05 PerlJam arnsholt: not really.  Read code.  Read the synopses.
22:06 arnsholt Yeah, that's what I thought
22:06 PerlJam I think merlyn is waiting for an actual release before he makes "Learning Perl 6"
22:06 skids arnsholt: http://www.perlfoundation.org/per​l6/index.cgi?perl_6#main_sections
22:06 pmichaud we have actual releases.  :-)
22:06 PerlJam you know what I mean!
22:07 pmichaud Actually, I think that merlyn et al were waiting for more stable releases, as opposed to "actual releases".  But we're almost there.
22:07 stas__ joined #perl6
22:07 PerlJam xmas almost or closer?
22:07 arnsholt skids: Oooh. That one has a lot of links. Cheers
22:07 PerlJam (assuming xmas is 1.0)
22:08 pmichaud I'm hoping to fix rakudo's "make install" target while at the hackathon, and after that we can start looking at precompiled binaries adn the like
22:08 pmichaud before now part of the issue was that it was hard to find a consistent way to obtain rakudo (or any working perl 6)
22:08 arnsholt Bah. I wish I were able to attend the hackathon. Just not possible unfortunately
22:09 arnsholt But the workshop was really interesting, so that makes up for it I suppose
22:09 skids rakudo: 1.Str.say
22:09 p6eval rakudo 616c0b: OUTPUT«Int<0x8525608>␤»
22:10 * PerlJam pulls and builds rakudo for the first time in over a week.
22:17 wknight8111 joined #perl6
22:17 PerlJam std:  foo(,3)
22:17 p6eval std 26252: OUTPUT«##### PARSE FAILED #####␤Can't understand next input--giving up at /tmp/j2j8kkWzZr line 1:␤------> [32mfoo([31m,3)[0m␤    expecting any of:␤      argument list␤    prefix or noun␤   standard stopper␤ terminator␤     whitespace␤FAILED 00:03 37m␤»
22:18 PerlJam Is there a way to elide a positional paramter (to accept the default) but specify later parameters?
22:20 PerlJam (without using the named syntax obviously)
22:20 pugs_svn r26253 | skids++ | Make comb consistent with split.
22:20 pugs_svn r26253 | skids++ | Comb capturing parens snooping replaced with :match adverb (pending approval)
22:20 pugs_svn r26253 | skids++ | Provide at least a one-liner description of split before thunking the
22:20 pugs_svn r26253 | skids++ |  reader over the head with esoteric subject matter.
22:22 FurnaceBoy joined #perl6
22:23 donaldh left #perl6
22:28 ejs joined #perl6
22:30 skids PerlJam: on a sub you are writing, or one in someone else's code?  For the former, "use //= in the body" is what the spec says.
22:38 pmichaud skids: I think he means "in a sub I am calling"
22:38 pmichaud i.e.,:   sub foo($a = 4, $b = 5) { ... }
22:38 pmichaud how do I call foo() such that it accepts the default value for $a but I provide a value for $b  (short of using named parameters)
22:40 pmichaud anyway, time for sleep here -- bbl.
22:41 meppuru good night
22:48 pyrimidine left #perl6
22:49 skids well then I guess the answer is, you don't.  Instead you find the person who wrote an api without documenting the names of their positional parameters and apply a wet haddock to their head.
22:50 skids at which point they say "hey don't do that I used //= in the body! just pass an undef and stop hitting me with that!"
22:52 PhatEddy left #perl6
22:56 literal http://github.com/perl6/ <-- who's this? :P
23:07 skids what, there are username squatters these day?
23:11 wayland76 I'm hoping it's pmichaud or someone.  That would be a good place to put Specs + STD + test suite
23:13 pmichaud it's me.
23:13 pmichaud and yes, I grabbed it with the thought that we could use it as a git-based location for specs, std, test suite, and example code
23:14 pmichaud I've been wanting to write a post suggesting that we move things there (eventually), but haven't gotten round tuit
23:15 pmichaud okay, I'm really heading off to bed now.  bbl.
23:16 wayland76 'night
23:25 araujo joined #perl6
23:27 ejs joined #perl6
23:29 kate21de1 joined #perl6
23:40 jwest-- joined #perl6
23:40 jwest-- left #perl6
23:46 kirillm joined #perl6
23:50 aindilis joined #perl6

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

Perl 6 | Reference Documentation | Rakudo