perl6-projects.org/ | nopaste: sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/
Set by mncharity on 25 March 2009.
00:07 amoc left 00:08 bacek_ joined, amoc joined 00:13 Limbic_Region left 00:18 brunov joined 00:19 jferrero left 00:23 Kisu joined 00:42 ruoso joined 00:44 Limbic_Region joined 00:55 davidad joined 01:00 ZuLuuuuuu left 01:03 Limbic_Region left 01:06 nihiliad joined 01:08 wknight8111 left
pugs_svn r26239 | cspencer++ | Skip tests calling positional parameters by name. 01:13
01:14 nihiliad left 01:17 nihiliad joined 01:30 kimtaro left 01:42 kidd` left 01:43 kidd` joined 01:48 justatheory left 01:54 FurnaceBoy left 01:55 kimtaro joined, araujo joined, kimtaro_ joined 02:05 justatheory joined 02:09 nihiliad left 02:12 kimtaro left 02:27 eternaleye joined 02:32 sitaram joined 02:38 kimtaro joined 02:45 kimtaro left, kidd` left, amoc left, japhb left 02:47 baest joined 02:54 kimtaro joined, kidd` joined, amoc joined, japhb joined, Woody2143 joined, Helios` joined, ingy joined, pmichaud joined, lucs joined, allbery_b joined, frobnitz joined, agentzh joined, [particle] joined, silug joined, kcwu joined 02:56 sitaram left, kimtaro_ left 02:57 orafu joined 03:02 OuLouFu left 03:06 meppuru joined 03:14 justatheory left 03:17 orafu left 03:21 meppl left 03:32 msmatsko joined 03:35 frew|work joined 03:41 sri_kraih left 03:44 amoc left 03:46 baest left 03:47 baest joined, diakopter joined, broquaint joined, zostay joined 03:48 xinming left 03:49 xinming joined 03:52 orafu joined, amoc joined 04:00 msmatsko left, msmatsko joined 04:03 cspencer left 04:21 edenc left, edenc joined 04:23 kimtaro_ joined 04:40 kimtaro left 04:47 szabgab joined 05:10 cspencer joined 05:15 justatheory joined 05:19 skids left 05:30 DemoFreak joined
pugs_svn r26240 | cspencer++ | Skip tests that call positional params by name. 05:38
dalek kudo: ab7e189 | pmichaud++ | docs/spectest-progress.csv:
spectest-progress.csv update: 362 files, 10357 passing, 0 failing
05:42
05:55 frew|work left 06:27 edenc left, davidad left, Khisanth left, ruoso left, brunov left, [particle] left, lucs left, kcwu left, silug left, frobnitz left, pmichaud left, agentzh left, Helios` left, allbery_b left, ingy left, cspencer left, orafu left, bacek_ left, eternaleye left, REPLeffect_ left, c9s left, baest left, broquaint left, zostay left, diakopter left, kimtaro_ left, msmatsko left, amoc left, japhb left, kidd` left, Woody2143 left, awwaiid left, LylePerl left, szabgab left, xinming left, atomicstack left, dalek left, plu left, BinGOs left, DemoFreak left, justatheory left, araujo left, kst left, Patterner left, wayland76 left, payload left, Kisu left, cj left, sunnavy left, p6eval left, nnunley left, omega left, frodwith left, meppuru left, [particle]1 left, hexmode left, clkao left, hcchien left, cookys left 06:28 jnthn joined, DemoFreak joined, justatheory joined, cspencer joined, szabgab joined, kimtaro_ joined, edenc joined, msmatsko joined, amoc joined, orafu joined, xinming joined, zostay joined, broquaint joined, diakopter joined, baest joined, meppuru joined, kcwu joined, silug joined, [particle] joined, agentzh joined, frobnitz joined, allbery_b joined, lucs joined, pmichaud joined, ingy joined, Helios` joined, Woody2143 joined, japhb joined, kidd` joined, eternaleye joined, araujo joined, davidad joined, ruoso joined, Kisu joined, brunov joined, bacek_ joined, awwaiid joined, dalek joined, atomicstack joined, payload joined, omega joined, Khisanth joined, [particle]1 joined, kst joined, REPLeffect_ joined, Patterner joined, LylePerl joined, wayland76 joined, irc.freenode.net sets mode: +o jnthn, c9s joined, lambdabot joined, bacek joined, Tene joined, aindilis joined, mikehh joined, smtms joined, Gothmog_ joined, PZt joined, krunen joined, jan___ joined, PerlJam joined, tarbo2 joined, sbp joined, lisppaste3 joined, zev joined, c1sung joined, jiing joined, Southen joined, pasteling joined, mtve joined, dukeleto joined, samlh joined, betterworld joined, s1n joined, yahooooo joined, literal joined, gfldex joined, jlaire joined, sephee joined, charsbar joined, SamB joined, revdiablo joined, rafl_ joined, Trey joined, scrottie joined, szbalint joined, shachaf joined, simcop2387 joined, TimToady joined, args joined, gbacon joined, cotto joined, cls_bsd joined, Maddingue joined, buu joined, IRSeekBot joined, Grrrr joined, AzureStone joined, gravity joined, pdc303 joined, pugs_svn joined, Diederich joined, maluco joined, jrockway joined, cxreg joined, mofino joined, Aisling joined, rhr joined, buubot joined, integral joined, Matt-W joined, mmpf joined, jedai joined, drbean joined, ashizawa joined, felipe joined, Caelum joined, ilbot2 joined, eiro joined, elmex joined, NoirSoldats joined, p6eval joined, plu joined, cj joined, hexmode joined, sunnavy joined, BinGOs joined, nnunley joined, frodwith joined, clkao joined, cookys joined, hcchien joined 06:30 cspencer left 06:31 szabgab left 07:01 mj41 joined 07:05 amoc left 07:06 amoc joined 07:15 iblechbot joined, brunov left 07:17 sephee left 07:30 goksie joined 07:31 charsbar_ joined 07:35 charsbar left 07:36 payload left 07:38 goksie left 07:39 goksie joined, bacek_ left 07:51 payload joined
mikehh rakudo (ab7e189) builds on Parrot r38168 - make test PASS / make spectest - t/spec/S09-typed-arrays/hashes.rakudo TODO passed: 6-7 07:51
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)
I have reported this before (twice) but do not know if it works on other platforms 07:55
07:57 goksie_ joined 08:13 atomicstack left 08:14 amoc left 08:16 goksie left 08:36 cognominal joined 08:38 args is now known as rgs 08:46 kane_ joined
eiro pastebin.com/f66ecafdc 08:47
buubot eiro: The paste f66ecafdc has been copied to erxz.com/pb/17079
eiro hello all 08:48
this grammar acts only for the first line
08:48 payload left, payload joined
eiro any idea to parse all the file ? 08:48
Matt-W I haven't figured out how that works yet 08:52
08:53 orafu left, orafu joined
Matt-W I need it for one of my own projects that's on the back burner at the moment 08:53
eiro the whole script is here: 08:56
pastebin.com/d1aac8684
buubot eiro: The paste d1aac8684 has been copied to erxz.com/pb/17080
eiro ok .. gotcha: it's a rule, not a token :) 09:04
wayland76 How do I update git to head again? 09:09
(or whatever git calls head) 09:10
09:11 goksie_ left
Matt-W git pull 09:19
wayland76 Will that also tell me about the files it's updating as it does it? 09:22
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
rakudo hasn't had anything committed today 09:24
I'm sure NPW is keeping people's rakudo time down 09:25
09:25 stas__ joined
wayland76 Well, yes, but the last time I did a successful pull was probably about a month ago 09:26
One would think that there have been updates in that time :) 09:27
mikehh I did a git pull earlier and docs/spectest-progress.csv had been updated 09:29
it tends to be updated daily so you should get something at least once a day 09:31
wayland76 So why aren't I? :) 09:32
09:33 payload left
mikehh you probably are pointing at a local master rather that the one on github 09:33
09:33 payload joined
mikehh git clone git://github.com/rakudo/rakudo.git 09:35
wayland76 Not really the solution I was looking for, but I don't have other options, so I'll do it :) 09:36
Thanks
mikehh The docs on git are fairly dense - there is a fairly good book on git - Pragmatic Version Control Using git 09:39
wayland76 I'll probably just learn a few magic incantations, and use those 09:40
rgs points at consttype.blogspot.com/2008/10/git-...-work.html
wayland76 points at osteele.com/archives/2008/05/my-git-workflow and says "The diagram in this article is great" 09:44
I've bookmarked your article rgs; it looks like it could be very useful in conjunction with the diagram in the other article 09:45
rgs looks 09:46
yes, i've simplified mine by not mentioning the index
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
It's reminiscent of dial-up :)
09:48 Southen_ joined
mikehh The official git tutorial -> www.kernel.org/pub/software/scm/git...orial.html 09:48
09:54 cognominal left 10:03 Southen left, mhsparks joined 10:22 masak joined
masak OH HAI from NPW 2009. 10:22
lambdabot masak: You have 1 new message. '/msg lambdabot @messages' to read it.
masak @messages
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.
masak mncharity: absolutely. 10:23
masak is listening to pmichaud's talk
10:24 Southen joined
wayland76 hihihi 10:25
Did omega talk to you about his error running november-wiki? 10:26
10:32 lumi joined 10:41 Southen_ left, Southen_ joined, Casan joined 10:49 Southen left 10:51 masak left 10:52 Southen joined 10:58 payload left 11:00 Casan left 11:06 kimtaro joined, rodi joined 11:08 Southen_ left 11:10 sri_kraih joined 11:12 Southen_ joined 11:19 ruoso left 11:23 kimtaro_ left 11:25 rodi left 11:29 Southen left, Southen joined
pugs_svn r26241 | lwall++ | Document the 'when' statement modifier. 11:36
wayland76 yay! 11:42
Tene sweet 11:43
I will implement soon.
it needs tests, too
11:44 Southen_ left 11:45 kimtaro left 11:46 ispy_ joined
TimToady I had thought it was already documented; STD has parsed it for a long time 11:46
wayland76 We should've checked :) 11:47
TimToady perl6: $_ = 42; say 'yes' when 42;
p6eval elf 26241: OUTPUTĀ«syntax error at (eval 124) line 4, near ";ā¤elsif"ā¤ at ./elf_h line 5881ā¤Ā»
..rakudo ab7e18: OUTPUTĀ«yesā¤Ā»
..pugs: OUTPUTĀ«*** ā¤ Unexpected "when"ā¤ expecting operator, ":" or ","ā¤ at /tmp/hoMx6Sn9FQ line 1, column 20ā¤Ā»
pmichaud Rakudo already parses it also.
TimToady would appear that you don't need to implement it. :)
pmichaud I followed STD.pm for that one :-) 11:48
wayland76 rakudo: my %k = < this is a good >; for %k.keys { .say when /a/; };
pmichaud rakudo: say 'yes' when 0;
p6eval rakudo ab7e18: OUTPUTĀ«aā¤Ā»
rakudo ab7e18: OUTPUTĀ«Use of uninitialized valueā¤yesā¤Ā»
wayland76 rakudo: my %k = < this is a good >; for %k.keys { .say when !/a/; };
p6eval rakudo ab7e18: ( no output )
11:48 kimtaro joined
pmichaud rakudo: say 'yes' when 0; 11:48
p6eval rakudo ab7e18: OUTPUTĀ«Use of uninitialized valueā¤yesā¤Ā» 11:49
pmichaud hmmm
oh, yeah, it's a smart match. :-|
TimToady undef matches 0, I guess...
pmichaud I didn't set $_
rakudo: say 'yes' when False;
p6eval rakudo ab7e18: OUTPUTĀ«Method 'ACCEPTS' not found for invocant of class ''ā¤current instr.: 'infix:~~' pc 21632 (src/builtins/match.pir:18)ā¤Ā»
pmichaud hmmmm. 11:50
okay, we need some work there.
pmichaud adds another topic to the hackathon list.
wayland76 What is rakudo thinking when I do...
rakudo: my %k = < this is a good >; for %k.keys { .say when !/a/; };
p6eval rakudo ab7e18: ( no output )
11:50 hanekomu joined
pmichaud Rakudo doesn't know how to deal with immediate regex matches yet. 11:50
I'm working on that 11:51
wayland76 Ok, so that should work eventually?
TimToady rakudo: my %k = < this is a good >; for %k.keys { .say when 'a' }
p6eval rakudo ab7e18: OUTPUTĀ«aā¤Ā»
wayland76 I'm thinking that when !/a/ should turn into $_ !~~ /a/
11:52 payload joined 11:54 ispy_ left
Tene TimToady: is there a negative version of when? when't? 11:54
TimToady only for tests that are specifically against $_ already, such as // 11:55
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)ā¤Ā»
wayland76 std: my %k = < this is a good >; for %k.keys { .say whent /a/; };
p6eval std 26241: OUTPUTĀ«Undeclared routine:ā¤ t used at 1 ā¤ok 00:02 36mā¤Ā»
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/; };
pmichaud there was a thread about this on p6l, I think.
p6eval std 26241: OUTPUTĀ«ok 00:03 38mā¤Ā»
TimToady *note
wayland76 rakudo: my %k = < this is a good >; for %k.keys { .say when not /a/; };
pmichaud just a couple of months ago.
p6eval rakudo ab7e18: ( no output )
11:57 ispy_ joined
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. 11:59
wayland76 Someone else gave that as an example they were having trouble with 12:00
and I just kept using it
slack I am! :)
Tene 'kay 12:01
12:09 LylePerl left 12:17 kimtaro left 12:19 hanekomu left 12:29 SamB left 12:30 SamB joined 12:31 Southen_ joined 12:33 payload left 12:38 ruoso joined 12:41 hanekomu joined 12:46 amoc joined, amoc left, payload joined 12:49 Southen left 12:54 payload left 13:02 hanekomu left
pmichaud pugs: say split(' ', 'hello world').perl; 13:24
p6eval pugs: OUTPUTĀ«("hello", "world")ā¤Ā»
pmichaud pugs: say split('hello world', ' ').perl;
p6eval pugs: OUTPUTĀ«(" ",)ā¤Ā»
13:31 hanekomu joined 13:34 cspencer joined, kimtaro joined
pugs_svn r26242 | lwall++ | split function now takes delimiter as first arg 13:34
13:37 sitaram joined, ejs joined
sitaram sb clear 13:42
(oops!) 13:43
13:44 sitaram left
Tene argh, it's switching again? 14:04
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:07
ruoso wasn't it always like that? 14:08
I mean, the way it is now, not the rand part
wayland76 Does anyone remember the git command to overwrite a file I've messed up and revert to head? 14:10
rgs git checkout ?
cspencer revert just a file or the entire repo to HEAD?
PerlJam wayland76: git status will tell you how in the comments
wayland76 thanks
14:10 alester joined
PerlJam ruoso: not in the spec. That's how it was implemented because of perl-5-think though :) 14:11
Tene: it's not switching, another option has been added (unless I misread the patch earlier)
ruoso PerlJam, interesting... I was pretty sure that was covered in S09 as it is in S32/Str now 14:12
s/S09/S29/
wayland76 rgs right, PerlJam wrong
PerlJam wayland76: you wanted to revert a single file to HEAD, or no? 14:13
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
No, haven't committed
Applied a patch that went horribly wrong, and wanted to revert and do it by hand
PerlJam wayland76: anyway ... TMTOWTDI applies to git as well :) 14:15
14:15 PhatEddy joined
wayland76 PerlJam: Maybe. But I tried your way, with no results 14:16
PerlJam c'est la vie 14:17
14:18 hanekomu left
PhatEddy Is there a test file that covers open RTs with small code samples? 14:20
14:21 pmurias joined
PhatEddy Since nobody claims to know of such a file - is there interest in creating one? I started one covering a few RTs. 14:24
14:26 ZuLuuuuuu joined
pmurias PhatEddy: having one file per RT might make more sense 14:29
14:30 skids joined
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
PerlJam PhatEddy: A dir with one file per rt sounds fine to me. 14:32
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
otherwise I think that my project may be of some use ...
14:34 brunov joined 14:38 nihiliad joined 14:40 bigpresh is now known as bigpresh_, presh is now known as bigpresh
skids ponders of the Int type of push&unshift in S32/Containers is a relic/oversight or conscious design decision. 14:43
e.g. the implication of a List-returning variant for feeds, like splice.
14:43 __felix__ joined
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
14:43 __felix__ left
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:53
pmichaud std: $_ .= abs; 14:54
skids suggests whip as huffmanization/mnemonic-ization of "roundrobin"
p6eval std 26242: OUTPUTĀ«ok 00:02 35mā¤Ā»
pmichaud std: .= abs;
p6eval std 26242: OUTPUTĀ«##### PARSE FAILED #####ā¤Can't understand next input--giving up at /tmp/AZ9LYwzfOV line 1:ā¤------> .= abs;ā¤ expecting dotty method or postfixā¤FAILED 00:02 34mā¤Ā»
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.
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).
Apparently when Rakudo followed the incorrect spec, it broke November. 14:57
I think the various spectests (which were also changed to follow the incorrect spec) have to be reverted as well 14:58
afk for a while.
skids Which would make split more a method of the pattern than the target data, right? 15:00
Or how does List.split fit in now?
15:02 FurnaceBoy joined 15:03 nihiliad left 15:04 orevdiabl joined, jbt joined
skids pugs: split("h","ahbhc").say 15:07
p6eval pugs: OUTPUTĀ«abcā¤Ā»
15:11 kane_ left 15:15 cspencer left, PhatEddy left 15:16 revdiablo left 15:17 exodist joined
wayland76 Who works on the Rakudo install/build setup? 15:21
15:35 frew|work joined 15:39 amoc joined, FurnaceBoy left
skids wayland76: I seem to recall particle mucks around with makefiles a lot. 15:41
wayland76 ok
I'll try to remember to talk to him about my patch once I have it working with the latest rakudo 15:42
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 15:47 Patterner left, Psyche^ is now known as Patterner 15:49 ejs0 joined 15:50 ejs left
skids also, attention to S32-str/comb.t S32-str/quotemeta.t integration/real-strings.t pugs/Demo.pm 15:50
lambdabot: @tell moritz: backlog, re: split 15:52
lambdabot Consider it noted.
15:55 orafu left, orafu joined 16:01 barney joined 16:02 [particle]1 is now known as [particle]- 16:03 frew|work left 16:07 antiphase joined 16:10 kimtaro left 16:11 kimtaro joined, nihiliad joined 16:28 LylePerl joined
kidd` Hi. Is there something like $/=undef to slurp $*IN ? 16:28
16:29 amoc left
LylePerl I've seen some stuff about slurping in the source of perlcabal.org/syn/S29.html 16:29
kidd` thanks. I'll search there. 16:31
PerlJam just use slurp() on it.
(or does $*IN not quite work yet?)
kidd` I tried slurp $*IN and didn't work, but I didn't know if it was supposed to 16:32
PerlJam okay
16:47 eternaleye left 16:51 mofino left 16:55 ZuLuuuuuu left 16:56 arnsholt joined 17:02 mhsparks left 17:15 alanhaggai joined, alanhaggai left 17:16 alanhaggai joined 17:23 stas__ left 17:41 cognominal joined 17:57 argggh joined 18:15 araujo left
moritz_ re 18:16
lambdabot moritz_: You have 1 new message. '/msg lambdabot @messages' to read it.
moritz_ "backlog" isn't very specific 18:22
ah, TimToady++ changed it back again ;-) 18:24
so I'll have to revert some of my changes
well, that happens in Perl 6 land ;-9
actually I'm glad it's back to what it used to be
[particle]- has no idea what moritz_ is talking about...
moritz_ split, and its order of parameters 18:25
18:26 Casan joined 18:27 ZuLuuuuuu joined
dalek kudo: 8f5ecdc | (Moritz Lenz)++ | tools/progress-graph.pl:
better error message in progress-graph.pl
18:27
kudo: 73ead21 | (Moritz Lenz)++ | docs/ChangeLog:
[docs] udpated ChangeLog
kudo: 65b3e65 | (Moritz Lenz)++ | t/spectest.data:
eight more passing test files
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.
moritz_ Casan: it's not possible, by design 18:33
Casan moritz_: ok lets take it here, whats the reason by design? multiple inheritance related? 18:34
moritz_ Casan: the most compelling reason is probably that you can emulate it anyway 18:36
Casan: and it's less work to simply allow it in the first place
18:37 alanhaggai left
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
pugs_svn r26243 | moritz++ | [t] move macro tests to spec/ and unspecced/
r26244 | moritz++ | [t/magicals] move inc.t to spec/; delete the other tests
r26244 | moritz++ |
r26244 | moritz++ | ($?POSTION is not specced, and the other tests only tested that)
Casan thanks for the answer, I was just curious now it was brought up.
pugs_svn r26245 | moritz++ | [t] move symbolic_deref.t to spec/
r26246 | moritz++ | [t] remove dangerous duplicate test
r26247 | moritz++ | [t] move lvalue_deep_brackets.t to spec/
r26248 | moritz++ | [t/spec] cleaned up autovivification.t a bit, and added a few more tests
r26249 | moritz++ | [t/spec] stringify Match object before is() comparison 18:38
r26250 | moritz++ | [t/spec] some unfudges for Rakudo
r26251 | moritz++ | [t] move fmt.t to spec
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:42
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
for example
18:57 sri_kraih_ joined
wayland76 thanks. That answers my question :) 19:05
...and -u if you want to see diffs :) 19:06
19:07 mofino joined 19:12 sri_kraih left 19:18 rblasch joined 19:19 Casan left 19:27 stas__ joined 19:30 argggh left, argggh joined
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)ā¤Ā»
Tene rakudo: say 'foo' ~~ s/o/a/
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)ā¤Ā»
Tene I thought that worked...
moritz_ Tene: no, rakudo never did s/.../.../ 19:37
Tene: $str.subst($regex, $closure) works, though
or $str.subst(/..../, $str, :g) for global replacement
Tene can you access the match from the closure?
moritz_ yes, I think so 19:38
rakudo: say 'foo'.subst(/o/, { uc $0 }, :g)
p6eval rakudo ecca70: OUTPUTĀ«Use of uninitialized valueā¤Use of uninitialized valueā¤fā¤Ā»
moritz_ rakudo: say 'foo'.subst(/o/, { .uc }, :g)
p6eval rakudo ecca70: OUTPUTĀ«fOOā¤Ā»
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ā¤Ā»
moritz_ ok, it's passed in as topic $_
Tene ah
moritz++
also in $/
19:42 kate21de joined 19:44 ZuLuuuuuu left
moritz_ if it's also in $/, why doesn't $0 work? 19:45
it's an alias into $/
rakudo: say 'foo'.subst(/o/, -> $x { $/.uc }, :g)
p6eval rakudo ecca70: OUTPUTĀ«fOOā¤Ā»
moritz_ a bug, probably 19:46
19:51 rblasch1 joined 19:57 exodist left 20:08 rblasch left
pugs_svn r26252 | moritz++ | [t/spec] revert r26201 (except the part that touches TASKS) 20:15
r26252 | moritz++ |
r26252 | moritz++ | The spec changed split($delimiter, $input) again, so we track that
dalek kudo: 01d7ded | (Moritz Lenz)++ | (2 files):
Revert "The sub form of split() expects the delimiter as second parameter"
20:18
20:22 payload joined 20:27 TimToady left, diakopter left 20:28 payload left, payload joined
moritz_ @seen masak 20:31
lambdabot I saw masak leaving #perl6 9h 39m 21s ago, and .
20:35 TimToady joined
dalek kudo: 616c0b7 | (Moritz Lenz)++ | docs/ChangeLog:
remove ChangeLog entry that was reverted
20:36
20:36 diakopter joined
skids wonders whether comb is supposed to follow splits 20:41
split's example
i.e. currently no sub form is defined.
(specced, that is) 20:43
20:44 frew|work joined
moritz_ S32 mentions the split function 20:48
wait
my copy of the spec isn't up to date
it does have a sub form.
20:50 stas__ left, stas__ joined 20:55 ispy_ left 20:57 ejs0 left 20:59 rafl joined 21:00 rafl_ left 21:02 mofino left
skids So Str.pod should have a proto? But which param order? 21:05
21:06 jiing_ joined
moritz_ it has one 21:06
skids Are we looking at the same file? I see a method proto, no sub proto. 21:07
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
moritz_ skids: I'm looking at svn.pugscode.org/pugs/docs/Perl6/Sp...ry/Str.pod
21:08 ejs0 joined
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
moritz_ ah 21:10
the 'is export' generates a sub
skids right but it has the ordering split used to be specced to have.
PerlJam split is still specced with that ordering :) 21:11
moritz_ aye
skids so the question is whether that's supposed to stay like that or not
moritz_ PerlJam: s/still/again/
omega the spec was always wrong for the function order
21:11 jiing left
omega but pugs (and hence rakudo) got it wrong 21:11
or so I was explained it today at least
skids Right, until today. 21:12
When the spec for split got corrected.
omega then someone fixed rakudo to follow the spec
moritz_ ... until I implemented it according the spec, which TimToady didn't seem to like ;-)
omega and that broke november, so the discussion started
and the spec got changed
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
moritz_ I agree with PerlJam, and I think that the tests already have it that way
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
moritz_ it seems we have no test at all for the parameter order of comb() 21:15
the only test for the sub form actually tests the names of the parameters ;-) 21:16
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:19
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
skids Cats don't bother me, except the four legged variety, which are very bothersome :-) 21:20
I think the matches would stringify? 21:21
PerlJam comb is like a grep for strings
moritz_ skids: sure
but it still doesn't return list of Chars, does it? 21:22
21:22 barney left
skids Technically, no :-) 21:22
Of wait, technicality -- it only returns Match when there are capturing groups. 21:23
PerlJam are you still talking about comb?
skids Yeah. 21:24
moritz_ we had something similar in the split case, which was then substituted by the :all flag
PerlJam that doesn't make sense to me
what moritz_ said
(apply that to comb)
21:24 donaldh joined
skids digs further into the .split verbiage 21:25
PerlJam comb and split would then be symmetric :)
skids Shame on me for trying to get away with a simple proto add :-)
21:25 ruoso left
moritz_ ;-) 21:26
21:26 PhatEddy joined 21:27 stas__ left 21:28 stas__ joined
skids Ergh. I'm torn between the two explanations of cruft|intent and the goals of utility|consistency 21:33
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:34
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)
Right.
moritz_ skids: because the capture-or-no-capture question can't be answered at compile time of the pattern (unlike perl 5)
a regex line / [ a | (b) ] / will have a capture if the b matches, but not if the a matches 21:37
so if you hand such a pattern to comb, what should it do?
examine the first match, and then decide on a type? or decide for every match individually? 21:38
or examine all matches first (and kill lazyness)?
skids good point.
One answer might be: not do anything special with the captures (still return strings) unless :all 21:39
rather than always return matches. 21:40
moritz_ aye
skids Though it's not QUITE the same thing as split :all, in that you do not get delimiters.
But then, if you want that, use split.
moritz_ yes, we'd need a better name
skids :match 21:41
?
moritz_ dunno
I'm too tired to think about design decisions :/ 21:42
skids :-)
moritz_ bed time for me
see you
skids good n8 21:43
PerlJam I was thinking something like that earlier.
(:match)
21:44 iblechbot left
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
Though I am not sure how much work that is for the compiler to figure.
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
pmichaud good localtime 21:46
PerlJam especially when the match may actually be a $var and the parens aren't obviously there.
hey pm! how's npw?
pmichaud it's excellent.
we're being very productive up here :-)
skids There's something about "delimiters must be considered constants, not rules" 21:47
PerlJam skids: for string delimiters, not regex. 21:48
pm: so ... what are you producing?
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
that's my guess based on recent changes to split()
pm: more people working on perl6, and more working perl6
PerlJam cool
wayland76 yay! :) 21:51
pmichaud std: .=abs
p6eval std 26252: OUTPUTĀ«ok 00:02 35mā¤Ā»
pmichaud std: .= abs 21:52
p6eval std 26252: OUTPUTĀ«##### PARSE FAILED #####ā¤Can't understand next input--giving up at /tmp/wZVvK8gWfH line 1:ā¤------> .= absā¤ expecting dotty method or postfixā¤FAILED 00:02 34mā¤Ā»
pmichaud a-ha
PerlJam LTM! :)
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.
PerlJam (.=abs is one funky op)
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.
pmichaud "P5's split(' ') is comb(/\S+/)
which when used as a list of strings will be exactly that. 21:54
skids And comb's default rule is /\S+/
pmichaud i.e., the string value of each returned match object will be the "stuff I want"
PerlJam pm: except that you normally want the strings and not the matches.
pmichaud pj: what's the difference between the strings and matches in this case?
since the match objects in string context will be the matched strings 21:55
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.
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.
PerlJam I agree about the bogosity :) 21:57
That's why there should be a :match thingy instead
normally you get strings, but if you want Match objects, you pass :match
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 nihiliad left
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.
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.
skids I think the default matcher rule is a clue that comb is supposed to be a more naive api. 22:00
pmichaud perhaps. But since the spec explicitly says 22:01
Saying
$string.comb(/pat/, $n)
is equivalent to
$string.match(rx:global:x(0..$n):c/pat/)
... that looks to me like it should be a list of matches
since that's what $string.match(...) would return
PerlJam (at least until skids changes it to read otherwise ;-)
skids :-)
pyrimidine spec fight!
skids ~<<$string.match(rx:global:x(0..$n):c/pat/) 22:02
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:03
22:04 stas__ left
skids Oh wait ~<< doesn't guarantee order. :-D 22:04
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.
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"
skids arnsholt: www.perlfoundation.org/perl6/index....n_sections
pmichaud we have actual releases. :-)
PerlJam you know what I mean!
22:07 pmurias left
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
22:07 stas__ joined
PerlJam xmas almost or closer? 22:07
arnsholt skids: Oooh. That one has a lot of links. Cheers
PerlJam (assuming xmas is 1.0)
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
before now part of the issue was that it was hard to find a consistent way to obtain rakudo (or any working perl 6)
arnsholt Bah. I wish I were able to attend the hackathon. Just not possible unfortunately
But the workshop was really interesting, so that makes up for it I suppose 22:09
skids rakudo: 1.Str.say
p6eval rakudo 616c0b: OUTPUTĀ«Int<0x8525608>ā¤Ā»
PerlJam pulls and builds rakudo for the first time in over a week. 22:10
22:14 wknight8111 left 22:17 wknight8111 joined
PerlJam std: foo(,3) 22:17
p6eval std 26252: OUTPUTĀ«##### PARSE FAILED #####ā¤Can't understand next input--giving up at /tmp/j2j8kkWzZr line 1:ā¤------> foo(,3)ā¤ expecting any of:ā¤ argument listā¤ prefix or nounā¤ standard stopperā¤ terminatorā¤ whitespaceā¤FAILED 00:03 37mā¤Ā»
PerlJam Is there a way to elide a positional paramter (to accept the default) but specify later parameters? 22:18
(without using the named syntax obviously) 22:20
pugs_svn r26253 | skids++ | Make comb consistent with split.
r26253 | skids++ | Comb capturing parens snooping replaced with :match adverb (pending approval)
r26253 | skids++ | Provide at least a one-liner description of split before thunking the
r26253 | skids++ | reader over the head with esoteric subject matter.
22:22 FurnaceBoy joined 22:23 frew|work left, donaldh left 22:28 stas__ left, ejs joined
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:30
22:35 rblasch1 left
pmichaud skids: I think he means "in a sub I am calling" 22:38
i.e.,: sub foo($a = 4, $b = 5) { ... }
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)
anyway, time for sleep here -- bbl. 22:40
meppuru good night 22:41
22:42 meppuru left 22:45 ejs0 left 22:48 pyrimidine left
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:49
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:50
22:52 PhatEddy left
literal github.com/perl6/ <-- who's this? :P 22:56
23:04 alester left
skids what, there are username squatters these day? 23:07
23:10 jbt left
wayland76 I'm hoping it's pmichaud or someone. That would be a good place to put Specs + STD + test suite 23:11
pmichaud it's me. 23:13
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
I've been wanting to write a post suggesting that we move things there (eventually), but haven't gotten round tuit 23:14
okay, I'm really heading off to bed now. bbl. 23:15
wayland76 'night 23:16
23:20 ejs left 23:25 araujo joined 23:27 ejs joined 23:29 kate21de1 joined 23:33 kate21de left 23:40 jwest-- joined, jwest-- left 23:46 kirillm joined, aindilis left 23:50 aindilis joined