Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-07-14

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:04 kborer joined #perl6
00:17 ihrd joined #perl6
00:19 sklarthag joined #perl6
00:31 KyleHa joined #perl6
00:33 KyleHa rakudo: use Test;my $x;my $code='$x';eval $code; ok $! !~~ Exception, 'eval works'; eval_lives_ok $code, 'eval_lives_ok works';
00:33 p6eval rakudo 03bc9d: OUTPUT«ok 1 - eval works␤not ok 2 - eval_lives_ok works␤# Looks like you planned  tests, but ran 2␤# Looks like you failed 1 tests of 2␤»
00:34 pmichaud evali_lives_ok will fail there because $x isn't in scope.
00:35 pmichaud *eval_lives_ok
00:35 pmichaud that seems completely normal and expected to me, fwiw.
00:36 KyleHa moritz said I should submit it as a bug earlier, when $code had a lot of other stuff in it.
00:36 pmichaud right.  It hadn't occurred to me that the problem was variables being out of scope -- but that's what is happening here, now that I think about it.
00:37 KyleHa Okeydoke.
00:37 pmichaud it's equivalent to this:
00:37 pmichaud rakudo:  sub my_eval($x) { eval $x; };   { my $a = 3;  say my_eval('$a') }
00:38 p6eval rakudo 03bc9d:  ( no output )
00:38 pmichaud when $x gets evaluated, there's no $a in scope.
00:38 KyleHa Oh, I see.  $a would have to be a local (is that 'temp' in Perl 6?).
00:38 pmichaud it's not 'temp' in Perl 6, no.
00:39 pmichaud at least, that's not what 'temp' does here, I don't think.
00:39 KyleHa I'm not sure local would work either since eval_lives_ok is off in another package.
00:39 pmichaud exactly.
00:39 KyleHa Well, anyway, lesson learned.  Thanks!
00:39 pmichaud so eval_lives_ok is good for testing eval strings, but not if they rely on scoped lexicals
00:39 KyleHa Right.
00:40 pmichaud at least, not until we get some form of 'lift' implemented.
00:40 KyleHa Is there a plan for that?
00:40 pmichaud we plan to do it, yes.  I don't think it's on our immediate ROADMAP, though.
00:40 pmichaud we could see about adding it soonish
00:40 KyleHa Interesting.
00:41 ihrd left #perl6
00:41 pmichaud afk # swimming
00:46 japhb joined #perl6
00:55 last joined #perl6
00:56 M_o_C joined #perl6
01:03 pugs_svn r27542 | kyle++ | [t/spec] clone of code with START block
01:05 jamtech joined #perl6
01:13 kst joined #perl6
01:15 eMaX joined #perl6
01:22 tann joined #perl6
01:22 ibrown joined #perl6
01:25 eMaX joined #perl6
01:35 simcop2387 joined #perl6
01:42 SmokeMachine joined #perl6
01:49 ihrd joined #perl6
02:02 nihiliad joined #perl6
02:07 alester joined #perl6
02:08 Khisanth joined #perl6
02:27 molaf joined #perl6
02:31 alester joined #perl6
02:38 agentzh joined #perl6
02:49 frew_ joined #perl6
02:55 FCO joined #perl6
03:03 TimToady eval is supposed to use its outer lexical scope as its setting when it compiles, so it should see $a
03:19 kst joined #perl6
03:25 ihrd left #perl6
03:28 pugs_svn r27543 | kyle++ | [t/spec] fudge some more of S02-builtin_data_types/declare.t
03:28 pugs_svn r27544 | kyle++ | [t/spec] Test for RT #62332
03:28 pugs_svn r27545 | pmichaud++ | [t/spec] Update S05 tests to avoid deprecated rules, test <?> and <!>.
03:28 dalek rakudo: 3e1952f | pmichaud++ | src/parser/ (2 files):
03:28 dalek rakudo: Update compiler to avoid deprecated regexes and Match methods.
03:28 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3e1952fcfdd331d956a1ba314892026a043f6f7e
03:28 dalek rakudo: 147b3d7 | pmichaud++ | build/PARROT_REVISION:
03:28 dalek rakudo: Bump build/PARROT_REVISION to get latest PGE changes.
03:28 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/147b3d7df6876966abcef7baa22c86f249e827fa
03:29 pmichaud TimToady: even in the last example I gave?
03:29 pmichaud rakudo:  sub my_eval($x) { eval $x; };   { my $a = 3;  say my_eval('$a') }
03:29 p6eval rakudo 03bc9d: OUTPUT«␤»
03:29 TimToady no, not there
03:29 pmichaud right.
03:30 pmichaud that is what is currently different about "eval_lives_ok" and "bare eval"
03:30 pmichaud the eval_lives_ok function in Test.pm doesn't see the same scope that a bare eval would see.
03:31 TimToady right, cuz it's a string
03:31 pmichaud exactly.
03:31 pmichaud TimToady++ on general principles  :-)
03:31 TimToady okay, sorry for the fuzz
03:31 TimToady :)
03:31 kate21de joined #perl6
03:42 bucky joined #perl6
03:44 kane_ joined #perl6
03:56 kyrbe joined #perl6
04:21 elmex joined #perl6
04:25 agentzh left #perl6
04:49 tann joined #perl6
05:05 beggars joined #perl6
05:27 missingthepoint joined #perl6
05:30 missingthepoint perl6: if 'a' ~~ mm/ a / { say 'a' }
05:30 p6eval rakudo 147b3d: OUTPUT«Statement not terminated properly at line 2, near "say 'a' }"␤in Main (src/gen_setting.pm:3340)␤»
05:30 p6eval ..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/evalenv/pugs/perl5/Pugs-Compiler-Rule/lib';␤    unshift @INC, '/home/evalenv/pugs/third-party/Parse-Yapp/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime…
05:30 p6eval ..elf 27545: OUTPUT«Parse error in: /tmp/HJdzLIiTxw␤panic at line 1 column 12 (pos 12): STD_red bug␤WHERE: if 'a' ~~ mm/ a / { say 'a' }␤WHERE:            /\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:1310:in `quotesnabber'␤  (eval):1:in `__quote_1290049'␤
05:30 p6eval ..STD_red/prelude.rb:406:in `…
05:33 amoc joined #perl6
05:45 jeekobu joined #perl6
05:46 FurnaceBoy joined #perl6
05:58 DemoFreak joined #perl6
06:13 kst joined #perl6
06:20 iblechbot joined #perl6
06:31 SmokeMachine joined #perl6
06:46 moritz_ pmichaud: I get some Null PMC access in invoke() in the S05 tests
06:48 sri_kraih joined #perl6
06:49 azawawi joined #perl6
06:50 azawawi hi
06:55 lisppaste3 moritz_ annotated #83450 "untitled" at http://paste.lisp.org/display/83450#1
07:04 rfordinal joined #perl6
07:09 barney joined #perl6
07:11 szabgab joined #perl6
07:12 szabgab I cannot find the specifications of the available modes of open()  such as :r, :w, :a
07:12 icwiener joined #perl6
07:14 moritz_ neither can I
07:14 moritz_ somebody[tm] should add it to S32::IO
07:14 moritz_ szabgab: did you make any progress on emitting line anchors for the documents under /syn/?
07:15 szabgab somebody who actually knows what they are :-)
07:16 szabgab I have my tuits  for Perl 6 now, so let me understand what line anchors ?
07:16 szabgab I am looking at http://perlcabal.org/syn/S32/IO.html
07:16 moritz_ test: S02:123
07:17 szabgab I can see the links to the tests and if I click on one of them it shows the correct part of the test file
07:17 moritz_ the old script used to generate <a name="line_123"> or so for line 123 of the input POD file
07:18 moritz_ so that one can link to specific lines in the generated HTML
07:18 moritz_ the refactor seemed to have killed those
07:18 szabgab to allow linking fro the outside world to the pods ?
07:18 moritz_ to the HTML version of the pods
07:19 moritz_ for example when I write S02:123 here, the IRC logs turn that into a link to http://perlcabal.org/syn/S02.html#line_123
07:20 szabgab so was that for every line or just where pod tags were ?
07:20 moritz_ every line
07:22 szabgab ok, let me check it
07:22 Matt-W Good morning
07:24 eMaX joined #perl6
07:25 moritz_ bbiab
07:27 dakkar joined #perl6
07:27 missingthepoint perl6: if 'a' ~~ mm/ a / {say 'got a'}
07:27 p6eval elf 27545: OUTPUT«Parse error in: /tmp/nFrE1HMuvG␤panic at line 1 column 12 (pos 12): STD_red bug␤WHERE: if 'a' ~~ mm/ a / {say 'got a'}␤WHERE:            /\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:1310:in `quotesnabber'␤  (eval):1:in `__quote_4179938'␤
07:27 p6eval ..STD_red/prelude.rb:406:in…
07:27 p6eval ..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/evalenv/pugs/perl5/Pugs-Compiler-Rule/lib';␤    unshift @INC, '/home/evalenv/pugs/third-party/Parse-Yapp/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime…
07:27 p6eval ..rakudo 147b3d: OUTPUT«Statement not terminated properly at line 2, near "say 'got a"␤in Main (src/gen_setting.pm:3340)␤»
07:27 missingthepoint should that parse?
07:31 Matt-W std: if 'a' ~~ m/a/ { say 'got a' }
07:31 p6eval std 27545: OUTPUT«ok 00:02 36m␤»
07:31 Matt-W rakudo: if 'a' ~~ m/a/ { say 'got a' }
07:31 p6eval rakudo 147b3d: OUTPUT«got a␤»
07:31 Matt-W only one m
07:32 missingthepoint Matt-W: so it should be a syntax error to have "mm/ a ..."?
07:32 Matt-W probably
07:32 Matt-W rakudo's error message certainly wasn't very helpful
07:33 Matt-W or might be an undefined operator or undefined routine, actually
07:33 Matt-W Rather than an actual syntax error
07:34 Matt-W but 'statement not terminated properly' is definitely not it
07:34 moritz_ missingthepoint: it should parse
07:34 moritz_ std: 'a' ~~ mm/ a /
07:34 p6eval std 27545: OUTPUT«ok 00:02 36m␤»
07:34 missingthepoint moritz_: that's what i though based on your tutorials :)
07:35 missingthepoint moritz_: *thought
07:36 missingthepoint Matt-W: "mm/a/" gives "Could not find non-existent sub mm", which is a bit more helpful
07:37 moritz_ that parses as mm( /a/ ) I guess
07:37 moritz_ but it's NYI in Rakudo
07:37 missingthepoint moritz_: suspected as much
07:37 Matt-W Is mm supposed to be a builtin?
07:38 moritz_ but I think it shouldn't be all to hard, since rule{} is already implemented, which implies :sigspace
07:38 moritz_ Matt-W: it's the same as m:s//
07:38 Matt-W oh
07:38 Matt-W hmm
07:38 * Matt-W doesn't understand sigspace
07:38 * missingthepoint doesn't either :)
07:39 missingthepoint is there any way to dump the syntax tree that rakudo builds?
07:40 missingthepoint so you can see how things parse?
07:40 moritz_ it just means that ever whitespace in the regex is replaced by <.ws>
07:40 moritz_ missingthepoint: perl6 --target=(parse|PAST)
07:40 moritz_ (doesn't work together with -e)
07:43 missingthepoint moritz_: thanks :)
07:43 Matt-W moritz_: ah, okay so it's actually fairly simple then
07:44 Matt-W and rule is just regex with :sigspace by default
07:44 moritz_ ... and :ratchet
07:45 moritz_ rule{} doesn't backtrack by default
07:47 agentzh joined #perl6
07:49 ejs joined #perl6
07:52 r696 left #perl6
07:55 szabgab moritz_, can yo please check me how is the smartlinks.pl executed on the server ? what options does it get ?
07:57 moritz_ szabgab: just a second, the script is somewhere inside the pugs repo...
07:58 szabgab I think docs/feather/script/update-syn
07:58 mikehh joined #perl6
07:58 szabgab but I am not sure
07:59 moritz_ yes, that's the one
08:02 ejs1 joined #perl6
08:06 Matt-W moritz_: oh yes, I remember. That caused me a lot of hassle a few times
08:18 pugs_svn r27546 | szabgab++ | restore anchors with line numbers on the http://perlcabal.org/syn/ pages
08:19 moritz_ szabgab++
08:19 missingthepoint moritz_: thanks for your annotations
08:19 sfdsd joined #perl6
08:20 moritz_ missingthepoint: you're welcome
08:20 missingthepoint moritz_: is there someplace I can keep up to date with stuff like that - plans on "moving towards building against an installed parrot" i mean?
08:20 moritz_ here :-)
08:20 missingthepoint moritz_: heh, ok :)
08:21 moritz_ when such changes actually happen you usually can read it either on the list (perl6-compiler) or on the blogs
08:21 sfdsd hi there, anyone use perl-visio module? how I can draw everyone node with specify coordinates on the sheet?
08:22 moritz_ sfdsd: this channel is about Perl 6 development, not Perl 5 modules
08:23 szabgab sfdsd, better to switch to #perl
08:24 sfdsd ok, I'm there
08:24 pugs_svn r27547 | szabgab++ | eliminate tons of warnings during smartlink generation
08:26 szabgab moritz_, regarding the open :a :r :w stuff, those are paramters of the open() method right ?
08:27 szabgab as the spec does not even say anything about such parameter
08:27 moritz_ szabgab: I think it's implemented in Rakudo and pugs that way, so I'd say "yes"
08:28 szabgab anyway I have no idea how to add that info to the specs so I wonder if adding a section that says TBD: with some text would be appropriate ?
08:28 szabgab or TODO ?
08:28 moritz_ TODO: document read/write/append etc modoes (:r, :w, :a)
08:31 masak joined #perl6
08:31 pugs_svn r27548 | szabgab++ | TODO: open :r, :w, :a
08:31 * szabgab master of copy paste !
08:32 missingthepoint moritz_: can you see something like http://paste.lisp.org/display/83450 being helpful on perl-projects.org?
08:33 kst joined #perl6
08:34 missingthepoint moritz_: or at all? :)
08:34 moritz_ missingthepoint: perl6-projects.org tries to be a meta resource, ie linking to other stuff. Good places for that might be rakudo.org or the perlfoundation Perl 6 wiki
08:34 moritz_ or a blog
08:34 moritz_ or the pugs repo, in docs/
08:35 missingthepoint ok... i'm thinking 'blog'
08:35 svqyqb joined #perl6
08:35 svqyqb http://tinyurl.com/nkypfa
08:35 missingthepoint my goal is to document the whole process of getting involved with p6, from my POV
08:36 missingthepoint hopefully that'll help identify areas where we can make it easier for people to get involved
08:37 missingthepoint or i can just publish a massive document of my experiences which people can learn (and hopefully benefit) from
08:37 moritz_ I think incremental is preferrable
08:38 missingthepoint a la your perl5-to-6 articles?
08:38 moritz_ a bit like that
08:38 missingthepoint why?
08:38 moritz_ I mean: don't write a huge document, and then publish it
08:38 moritz_ rather: publish what you've got, post updates and sequels
08:39 moritz_ one reason is that people don't like to read too much at once
08:39 missingthepoint moritz_: true
08:39 moritz_ so if you have 10 pages blog entry, the last 8 will be lost on 90% of the readers
08:39 moritz_ otoh if you have 10 posts each 1 page, then those who want to read on simply klick on the "next" link, or so
08:40 moritz_ another reason is that it's easier to get feedback on already published stuff
08:41 missingthepoint ok, i think that's valid reasoning.
08:41 missingthepoint not sure i understand your last point though (feedback)
08:42 moritz_ when I wrote my 5-to-6 blog posts it was over the period of maybe 2 months or so
08:42 moritz_ and I got a lot of feedback on the posts
08:43 moritz_ ranging from "your blog layout could be improved $here" to "great" or "this example doesn't look right"
08:43 moritz_ so I learned from the feedback, and hopefully my later posts were better
08:43 missingthepoint or "one of your titles is broken because of C<rules> being parsed as a tag?" :)
08:44 moritz_ yes, stuff like that
08:44 moritz_ I found out that my blog software used to swallow some tags
08:44 moritz_ and that the syntax hilighting didn't work with non-ASCII chars etc.
08:44 Matt-W Oh yes I had great fun putting Perl 6 code on my blog
08:44 Matt-W one reason I've only done it once...
08:44 moritz_ no I simply write
08:45 moritz_ <pre>[% syntax perl6 %]
08:45 moritz_ code here
08:45 moritz_ [% endsyntax %]</pre>
08:46 missingthepoint that's a good point: incremental enables improved later material
08:48 masak incremental++
08:49 missingthepoint moritz_: thanks for your thoughts. it's appreciated :)
08:50 missingthepoint masak: do you have any thoughts on writing docs for public consumption (that you'd like to share)?
08:50 missingthepoint masak: or do you have any already posted e.g. on your use.perl?
08:51 masak missingthepoint: any thoughts posted on writing docs? hm, no.
08:51 masak missingthepoint: but I'd recommend writing "for someone".
08:51 masak that's a good tip, I believe, in all writing.
08:52 missingthepoint masak: write for a specific audience, you mean?
08:52 masak yes. for a specific person, even.
08:53 moritz_ masak: so whom do you write for?
08:53 missingthepoint hmm, hadn't though about that - so imagine John Noob, his skills, what he's likely to know, what he's likely to struggle with, and write for him?
08:53 missingthepoint s/though/thought/
08:53 masak moritz_: I don't know. I guess it depends what I write. I don't always follow my own advice. :)
08:53 masak missingthepoint: yeah, something like that.
08:54 missingthepoint thanks both of you for your help
08:54 missingthepoint bbl - food :)
08:54 masak good luck! release early, release often! :)
08:54 missingthepoint masak: http://paste.lisp.org/display/83450 :)
08:55 missingthepoint masak: and thanks!
08:55 masak missingthepoint++
09:00 * masak reads "TODO fix Rakudo REPL :(" and agrees fully
09:01 * moritz_ pokes masak about doing more Str/Buf work
09:01 masak moritz_: good idea. I'll get right on it.
09:02 * masak goes to read the .bytes method
09:06 masak missingthepoint: good that you don't have any parentheses after 'while'. even more idiomatic would be if you lost the parentheses on the right hand side of array assignments.
09:11 masak ah, seems the old .bytes method might help pass some tests.
09:17 masak maybe it was a mistake to create setting/Str.pm -- maybe .encode should simply go into Any-str.pm
09:19 Matt-W Are there any rules for when things should go into Any
09:20 masak Matt-W: yes. when you want to be able to do things like 65535.chars
09:20 masak i.e. it doesn't have to be a Str, just be stringifiable.
09:20 Matt-W right
09:21 masak I'm asking myself whether that's not true for .encode as well.
09:21 Matt-W hmm maybe
09:21 Matt-W if you've got .chars there, .encode would probably be expected
09:21 Matt-W it's kind of like opening pandora's box...
09:22 masak it was already open in Perl 5. :)
09:22 Matt-W yes but this is perl 6
09:22 Matt-W still I'd much rather have them as methods than top-level subs
09:25 masak they are methods.
09:25 masak ...and sometimes exported as subs. :)
09:28 Matt-W yeah not so sure I like that myself
09:28 Matt-W but I'm not going to make a fuss
09:28 Matt-W I'm happy to leave that for other, less enlightened folk :P
09:28 Matt-W (or possibly the correct term is 'less stubborn')
09:28 masak :)
09:29 * masak is currently looking at PIR code, scratching his head
09:29 Matt-W which PIR
09:29 masak hold on.
09:32 masak oh noes, gist went down while I was using it. :/
09:32 * masak tries some other pastebin
09:32 Matt-W :(
09:33 * Matt-W eats chocolate raisins and stares at nasty misbehaving makefiles
09:34 donaldh joined #perl6
09:34 masak Matt-W: http://paste.lisp.org/display/83563
09:35 masak I think I understand the PIR code itself.
09:35 masak it calculates the value of 'count', the number of bytes.
09:36 masak I want to modify it so that instead of counting the bytes, the PIR code puts 'em in an array.
09:37 masak and then returns the array in %r
09:38 masak so, first problem, I guess, is how to split 'hexstring' into right-sized chunks and put each chunk into the array to be returned.
09:39 Matt-W well hexstring is overwritten every time through the loop...
09:39 Matt-W shouldn't you be sticking something onto the array each loop?
09:40 masak yes, that's what I meant.
09:40 masak but I need to do it after the eat_zeroes thing.
09:41 masak i.e. I'll need to replace the inc_length thing with some sort of split-into-chunks-and-push
09:41 Matt-W oh yes, hexstring isn't necessarily only going to contain one chunk at that point
09:41 Matt-W this is something that was driving me mad in Form a while back
09:41 Matt-W how to split a string into chunks of n characters
09:42 Matt-W didn't figure it out, I think I went and found some wine instead
09:42 masak in Perl 6 it's easy.
09:42 Matt-W so sorry, not a clue how to do it in PIR
09:42 Matt-W or in Perl 6
09:42 masak .comb('.' x $n)
09:42 Matt-W oh
09:42 Matt-W damn
09:42 * Matt-W makes a note
09:42 masak hm, maybe that won't work.
09:42 masak but something very much like it.
09:43 Matt-W let's find out
09:43 masak I used the trick in my one-liner: http://use.perl.org/~masak/journal/39238
09:43 Matt-W rakudo: "abcdefghi".comb('.' x 2).say
09:43 p6eval rakudo 147b3d: OUTPUT«No applicable candidates found to dispatch to for 'comb'␤in Main (/tmp/2kVCXaDmcN:2)␤»
09:43 Matt-W oooh
09:43 Matt-W how interesting
09:43 masak rakudo: say 'abcdefgh'.comb(/../).perl
09:43 p6eval rakudo 147b3d: OUTPUT«["ab", "cd", "ef", "gh"]␤»
09:44 Matt-W ah of course
09:44 Matt-W no comb(Str)
09:44 masak right.
09:44 Matt-W and it's all your fault
09:44 Matt-W :P
09:44 masak that's why I said "something very much like it"
09:44 Matt-W I can't get away without thinking today, can I
09:45 masak rakudo: my $n = 2; say 'abcdefgh'.comb((eval sprtinf '/%s/', '.' x $n).perl
09:45 p6eval rakudo 147b3d: OUTPUT«Statement not terminated properly at line 2, near "((eval spr"␤in Main (src/gen_setting.pm:3340)␤»
09:45 masak rakudo: my $n = 2; say 'abcdefgh'.comb(eval sprtinf '/%s/', '.' x $n).perl
09:45 p6eval rakudo 147b3d: OUTPUT«Could not find non-existent sub sprtinf␤»
09:46 masak g'ah. :)
09:46 masak rakudo: my $n = 2; say 'abcdefgh'.comb(eval sprintf '/%s/', '.' x $n).perl
09:46 p6eval rakudo 147b3d: OUTPUT«["ab", "cd", "ef", "gh"]␤»
09:46 masak that works.
09:47 Matt-W finally :)
09:48 Matt-W hmm
09:48 Matt-W can one define a regex which takes a parameter
09:50 masak Matt-W: interesting question.
09:50 masak Matt-W: you can definitely create a sub which returns a regexp based on a parameter.
09:52 Matt-W of course
09:52 * Matt-W looks at the spec
09:56 Matt-W hmm doesn't seem to be mentioned
09:56 Matt-W std: regex foo($a) { . }
09:56 p6eval std 27548: OUTPUT«ok 00:02 38m␤»
09:56 masak ooh!
09:57 masak rakudo: regex foo($a) { . }
09:57 p6eval rakudo 147b3d: OUTPUT«Malformed regex definition at line 2, near "foo($a) { "␤in Main (src/gen_setting.pm:3340)␤»
09:57 Matt-W well it makes sense in a way, because regexes are a fancy kind of sub...
09:57 Matt-W not sure how you'd then refer to them though
09:57 * masak submits rakudobug
09:57 Matt-W obviously in closures inside the regex
09:57 masak aye
09:57 Matt-W maybe in other ways too
09:58 DemoFreak joined #perl6
10:00 masak this 'Minimiscience' person intrigues me. it's obviously someone building something, given the rakudobug reports.
10:02 DemoFreak joined #perl6
10:04 Matt-W yes, and using a released rakudo too
10:04 masak that can be risky when returning bugs.
10:04 masak s/returning/reporting/
10:05 Matt-W indeed
10:05 Matt-W some of them might already be fixed
10:05 Matt-W still, we should appreciate the attempt
10:05 masak absolutely.
10:05 masak Minimiscience++
10:06 iblechbot joined #perl6
10:07 * masak reads the PIR of .split
10:09 masak hey! someone moved the .split method to the setting, but left the POD :)
10:13 mhsparks joined #perl6
10:19 dalek rakudo: 0c2cb6f | masak++ | src/ (2 files):
10:19 dalek rakudo: moved C<.split> POD from src/builtins to src/setting
10:19 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0c2cb6f9a4d202726bca68c89e98d2f57b12d3bc
10:20 chid joined #perl6
10:21 pmurias joined #perl6
10:23 Matt-W masak: shouldn't leave the POD behind. Messy.
10:23 Matt-W masak++ # for clearing it up
10:24 Helios joined #perl6
10:33 rfordinal joined #perl6
10:38 beggars joined #perl6
10:45 pugs_svn r27549 | pmurias++ | added a .gitignore to src/perl6
10:45 pugs_svn r27550 | pmurias++ | [re-smop] added a simple script to benchmark stuff
10:57 Helios joined #perl6
11:01 last joined #perl6
11:04 davef joined #perl6
11:05 |Jedai| joined #perl6
11:20 donaldh joined #perl6
11:39 last joined #perl6
12:06 M_o_C joined #perl6
12:07 pugs_svn r27551 | bpetering++ | Added descriptions of each POD file per TODO
12:11 masak I have now finished my checkout of Parrot by git-svn :)
12:12 moritz_ masak: I hope you didn't do it all new by yourself, there are plenty of working repos out there...
12:12 takadonet joined #perl6
12:12 takadonet morning everyone
12:12 missingthepoint morning :)
12:13 missingthepoint anyone: should that commit message have been more specific? (i suspect so)
12:13 masak moritz_: seems I took the long route.
12:13 moritz_ missingthepoint: yes, a [docs/Hierarchy.pod] marker would have been create
12:14 missingthepoint moritz_: sorry, version control noob (!)
12:14 missingthepoint moritz_: can that be added? or not worth it
12:17 moritz_ missingthepoint: not afterwards
12:17 moritz_ missingthepoint: just do it better the next time :-)
12:18 missingthepoint moritz_: i will. d'oh!
12:19 moritz_ in git you can change your commit messages after you wrote them, as long as they weren't pushed to the remote repository
12:20 * missingthepoint adds 'checklist before you commit' to his Perl 6 newbies' guide
12:21 moritz_ basically a short path telling which subsystem or document you modified would be good
12:21 missingthepoint ok. again, sorry... classic case of acting before thinking about what i'm doing
12:22 moritz_ well, it's not a big problem
12:22 moritz_ just a convenience for us
12:22 moritz_ and since the pugs commiter's motto is "ask for forgiveness rather than permission" we are rather tolerant :-)
12:23 missingthepoint moritz_: hehe, ok :)
12:33 masak rakudo: say $*IN.get
12:33 p6eval rakudo 0c2cb6: OUTPUT«Method 'get' not found for invocant of class 'IO'␤»
12:33 masak how do I read a line from STDIN in Rakudo?
12:34 moritz_ shouldn't that work?
12:34 moritz_ rakudo: say $*IN.lines(1)
12:34 p6eval rakudo 0c2cb6: OUTPUT«Method 'lines' not found for invocant of class 'IO'␤»
12:36 masak :/
12:36 masak I feel a rakudobug building up...
12:38 masak do we have tests that would catch the loss of .get and .lines?
12:38 moritz_ we have, for things returned from open()
12:39 moritz_ but we need more testing infrastructure
12:39 masak aye, I see the problem.
12:39 * masak submits rakudobug
12:39 moritz_ basically a sub that receives input and a Perl 6 program and launches it
12:39 moritz_ and captures STDOUT/STDERR
12:40 moritz_ basically something like qx{$*PERL $prog-tempfile < $stdin-tempfile 2>&1}
12:41 moritz_ in a portable way, please
12:41 masak that's at least possible now.
12:41 masak don't know about the portability thing, though.
12:41 moritz_ and about tempfile generation that doesn't suffer from race conditions
12:44 Matt-W all we need to do is write an IO library that lets us plug in to stdout and stderr and stdin of a child process... trivial, really :P
12:44 kyrbe joined #perl6
12:45 macae joined #perl6
12:46 masak Arc has a nice feature which works a bit like Perl 6's 'gather', but which co-opts the built-in 'print' and collect things in a string buffer instead.
12:46 moritz_ so something like a Cat of a gather{}?
12:47 masak yes, and with s/take/print/
12:47 masak and, I think, non-lazy.
12:47 masak but probably still dynamically scoped.
12:48 moritz_ so it's more like Perl 5's do { local *STDOUT; open STDOUT, '>', \my $buffer; { ... }; $buffer }
12:48 masak aye.
12:51 jauaor joined #perl6
12:52 missingthepoint later all
12:53 missingthepoint moritz and masak, thanks for your help :)
12:53 payload joined #perl6
12:56 araujo morning all
12:56 meppl joined #perl6
12:56 Matt-W hi araujo
12:56 araujo Hello Matt-W
12:56 araujo :)
12:57 szabgab joined #perl6
12:58 masak oh hai araujo
12:58 masak here's a list of people who have committed to PGE: http://gist.github.com/146930
12:58 masak interesting to see that audreyt is the second biggest committer.
12:58 ispy_ joined #perl6
12:59 araujo hi there masak !
13:00 masak araujo: written anything cool in Rakudo lately?
13:00 masak (I tend to ask people that, because I never tire of looking at new Perl 6 code)
13:00 araujo masak, going through all the cool examples and playing with some scripts these last days in my free time :)
13:00 araujo haha
13:01 masak araujo: nice!
13:01 araujo I am thinking to start writing some scripts in perl6 to help me with my gentoo dev tasks as a start
13:01 araujo :)
13:02 masak araujo: you should take a look at pun. http://github.com/masak/pun/
13:03 * jauaor checks it
13:04 * masak gets anagram vertigo
13:04 jauaor haha cool!
13:04 jauaor haha
13:04 masak :)
13:04 * jauaor plays with Rakudo on his mac box
13:05 jauaor masak: you are main committer for rakudo?
13:05 masak jauaor: define 'main'. I commit about once a month. :P
13:06 moritz_ jauaor: pmichaud and jnthn are
13:06 masak jauaor: what moritz_ said.
13:08 jauaor ooh
13:08 jauaor ok
13:10 Matt-W moritz_ commits stuff too
13:11 masak and mberends.
13:11 jauaor good, i guess i will just throws my bug reports and patches in here :P
13:12 masak yes, please do.
13:13 Matt-W rakudobug@perl.org
13:14 jauaor thanks :)
13:14 Matt-W despite the name, it's also for patches
13:14 jauaor hah
13:14 Matt-W especially as they could be patches which fix bugs :)
13:14 masak and for TODO items.
13:14 Matt-W Everybody likes patches which fix bugs
13:14 jauaor yeah, mainly for fixing bugs
13:15 * jauaor interested on thos
13:15 jauaor those*
13:15 Matt-W You will find that while masak isn't the main contributor to Rakudo's code, he is the main filer of bugs...
13:15 masak well, I'm one of the most active application writers, so I tend to run into quite a few bugs.
13:16 masak also, I've grown to like bug reporting, so I sometimes report bugs that other people find. :)
13:16 PerlJam guten Tag meine Freunde
13:16 masak PerlJam: guten Tag!
13:17 Matt-W masak: 'sometimes'
13:17 masak Matt-W: :P
13:17 Matt-W PerlJam: Guten Tag!
13:17 pmichaud Good morning, #perl6
13:17 Matt-W pmichaud: Good Morning
13:17 masak morning, pmichaud.
13:17 Matt-W the p-people are here!
13:17 PerlJam what's new in the world of perl 6?
13:17 masak pmichaud: $*IN.get is broken.
13:17 Matt-W PerlJam: masak found another bug, of course :)
13:17 takadonet morning pmichaud
13:18 masak Matt-W: actually one of my applications found another bug.
13:18 PerlJam Matt-W: he wouldn't find so many if people would stop creating new ones for him  ;)
13:18 PerlJam masak: you have a sentient application?
13:18 Matt-W oh no! He's written a bug-finding app!
13:18 masak PerlJam: no, but one which tests things not in the spectest suite.
13:18 masak Matt-W: I actually considered doing that at one point half a year ago.
13:19 Matt-W masak: Are they also things which can't be in the test suite?
13:19 masak Matt-W: there were so many random bugs at that time that I figured I could just autogenerate Perl 6 code and auto-run it to find new bugs. :_
13:19 masak :)
13:19 masak Matt-W: well, as moritz_ said, they need more test structure.
13:20 drbean joined #perl6
13:20 PerlJam masak: All we need is a program that can read and understand the specs, then we generate random strings of valid perl 6 and feed them through rakudo and we're well on our way towards an evolutionary bug finder.
13:21 PerlJam Or, even better, something that can read STD.pm and use it as a generator
13:21 PerlJam (read: "even easier" :)
13:21 masak rakudo: time
13:21 p6eval rakudo 0c2cb6:  ( no output )
13:21 masak rakudo: say time
13:21 p6eval rakudo 0c2cb6: OUTPUT«too many arguments passed (2) - 1 param expected␤in Main (/tmp/I1s4e62W0R:2)␤»
13:22 masak o_O
13:23 Matt-W yes there are some weird things going on there
13:23 Matt-W there's a bug about some of them
13:23 PerlJam erm ... indeed
13:23 masak aye. one by Minimiscience++, I think.
13:23 PerlJam $ perl6
13:23 PerlJam > say 1..24
13:23 PerlJam maximum recursion depth exceeded
13:23 lambdabot <no location info>: parse error on input `..'
13:24 masak o_O
13:24 masak PerlJam: I get that too.
13:24 Matt-W BUG!
13:24 * masak submits
13:24 * Matt-W presses the big red button
13:24 jauaor hah
13:25 masak rakudo: say 1
13:25 p6eval rakudo 0c2cb6: OUTPUT«too many arguments passed (2) - 1 param expected␤in Main (/tmp/CvrYjvGi9O:2)␤»
13:25 masak there it is.
13:25 * masak submits another rakudobug
13:25 masak this is very bad!
13:26 Matt-W that is very disturbing
13:26 Matt-W rakudo: say "1"
13:26 p6eval rakudo 0c2cb6: OUTPUT«too many arguments passed (2) - 1 param expected␤in Main (/tmp/b5wePovvPy:2)␤»
13:26 pmichaud okay, checking.
13:26 Matt-W rakudo: "1".say
13:26 p6eval rakudo 0c2cb6: OUTPUT«too many arguments passed (2) - 1 param expected␤in Main (/tmp/dxkdGnneLu:2)␤»
13:26 Matt-W ack
13:27 araujo o_0
13:27 pmichaud I'm wondering if parrot needs a realclean
13:27 PerlJam pmichaud: doing that now
13:28 masak my Parrot already is realclean, and it breaks here.
13:29 pmichaud okay, doing a fresh build here
13:29 PerlJam as an aside, should rakudo's realclean also do a realclean in parrot if it's there?
13:29 pmichaud no, but --gen-parrot does one.
13:29 PerlJam Hmm.
13:29 PerlJam Then I guess I already had a clean parrot
13:30 masak so it's not that.
13:30 pmichaud (--gen-parrot does one if it detects that the parrot you had wasn't sufficiently advanced)
13:30 PerlJam Though the recompile seems to be taking longer than the original compile I did mere moments ago
13:30 PerlJam okay, still same problem.
13:32 pmichaud Obsolete pod format, please use =begin/=end instead at line 480, near "item split"
13:32 alester joined #perl6
13:32 pmichaud in Main (<unknown>:3340)
13:32 pmichaud that looks like a culprit.
13:32 PerlJam still scary
13:33 masak oh, that's my fault. :/
13:33 masak allow me to fix immediately.
13:33 nihiliad joined #perl6
13:33 PerlJam heh.  masak do you work for Microsoft?  Introducing bugs that you then report seems to be something they'd do.   :-)
13:34 jauaor hah
13:34 masak :/
13:34 pmichaud The build probably should've stopped at that point -- I'll see if I can figure out how to make the build stop there.
13:34 jauaor is this latest svn code guys?
13:35 szabgab joined #perl6
13:35 PerlJam masak++ for finding a bug in the build process  though
13:35 pugs_svn r27552 | ruoso++ | [re-mildew] take the compilation times separated from running time... the difference seems not so big nwo
13:36 user_2105 joined #perl6
13:38 masak pushed.
13:39 masak time to go close a few of today's alarming RT tickets, then...
13:39 nihiliad joined #perl6
13:40 synth joined #perl6
13:40 dalek rakudo: 8037412 | masak++ | src/setting/Any-str.pm:
13:40 dalek rakudo: fixed Perl5-centric POD in Perl 6 code
13:40 dalek rakudo: masak-- for breaking Rakudo by not running `make` before committing.
13:40 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8037412ee83685119e2d03a9a3f8b4386e1fdf5b
13:41 PerlJam masak: The other .pm files seem to use  =begin item foo ... =end
13:41 PerlJam er, =end item
13:41 masak PerlJam: ok, I'll change that. I wasn't really sure.
13:42 masak need to close two more tickets first, so I don't forget.
13:42 PerlJam I could change it while you do that :)
13:42 masak please do.
13:43 PerlJam It feels silly, but I'm running make again so as to not make the same mistake as masak.
13:44 user_2105 joined #perl6
13:44 masak it does feels silly to run make. but not as silly as finding three bugs in quick succession which turn out to be your own fault. :P
13:44 PerlJam indeed.
13:44 masak ah well, live und learn.
13:45 user_2105 left #perl6
13:48 pmichaud oh, great, it's a parrotbug that causes the build to not detect errors
13:51 masak same as the one that returns 0 on errors during building of Perl 6 projects?
13:51 pmichaud yes.
13:51 pmichaud that one.
13:51 masak I have a lot to say about that one.
13:51 masak but I probably shouldn't. :P
13:51 dalek rakudo: eaa3ea8 | duff++ | src/setting/Any-str.pm:
13:51 dalek rakudo: make POD consistent
13:51 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/eaa3ea8902df54ab02b54ee13603ea22acf1f95e
13:52 masak PerlJam++
13:52 pmichaud http://nopaste.snit.ch/17260  # bug in exit opcode
13:53 masak that bug makes 'make' a lot less useful.
13:53 frankshaw joined #perl6
13:56 pmichaud agreed, I'm going to see if I can fix or work around.
13:57 ruoso joined #perl6
13:58 ruoso Hello!
13:59 masak o/
13:59 pmurias joined #perl6
14:00 pmichaud that's weird;   "exit 1" doesn't set the return code, but "die 'message'"  does.
14:00 pmurias ruoso: hi
14:02 ruoso pmurias, have you seen my change in the benchmark script?
14:03 Matt-W masak: I yell at people at work who don't run make before they commit
14:03 pmurias ruoso: yes
14:04 pmichaud Matt-W: sure, but "make" didn't flag the error very well.  :-)
14:04 Matt-W pmichaud: oddly enough, we have that problem too. Somebody managed to set up a build system that doesn't stop on errors.
14:04 pmichaud Matt-W: would've needed "make test" or something like that to catch it.
14:04 Matt-W the difference is that ours is deliberate
14:04 Matt-W whereas this one's a mistake
14:05 pmichaud Rakudo's build system would stop-on-errors, it's Parrot that doesn't error.
14:05 masak Matt-W: you're completely right to yell at people who don't run 'make'. I'm trying to kick the habit.
14:05 pugs_svn r27553 | pmurias++ | [re-smop] benchmark takes the test size as the first argument, and
14:05 pugs_svn r27553 | pmurias++ | prints results in a more consise format
14:05 masak this time it was "but it's such a small commit, surely..."
14:05 masak it's a classic.
14:06 Matt-W masak: it's a form of hubris, I think. We've all done it.
14:06 pmichaud laziness and impatience apply as well, I suspect :-)
14:06 masak a trifecta!
14:07 skids joined #perl6
14:10 FurnaceBoy joined #perl6
14:10 KyleHa joined #perl6
14:10 gfldex rakudo: my @a = 1,2,3; @a.map({ -$_ });
14:10 pmurias ruoso: i'm considering approaching the mildew performance problem bottom up - that is make progressively more complex things run fast by striping the abstraction
14:10 p6eval rakudo 803741:  ( no output )
14:10 masak gfldex: you need 'say' too.
14:11 gfldex in general yes, in my case no
14:11 ruoso pmurias, what do you mean?
14:12 masak gfldex: ok, good.
14:12 ruoso rakudo: multi infix:<+> (2, 2) { 5 }; say 2 + 2; # breaks... :(
14:12 p6eval rakudo 803741: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/0ULABtx3M6:2)␤»
14:12 gfldex I had "Method 'map' not found for invocant of class 'Perl6Array'" on my local rakudo build and wanted to check if it's just me.
14:13 masak ruoso: well, constant params are NYI in Rakudo, I think...
14:14 ruoso rakudo: multi infix:<+> ($a where 2,$b where 2) { 5 }; say 2 + 2; # breaks... :(
14:14 masak ruoso: ...and there's a well-known bug where fallback to a non-overridden op variant gives a Null PMC Access.
14:14 p6eval rakudo 803741: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/iUsPx38RPj:2)␤»
14:14 ruoso masak, I think jnthn implemented it
14:14 pmichaud rakudo:  multi foo(0) { say 'hello'; };   multi foo($x) { say $x; };    foo(0);
14:14 p6eval rakudo 803741: OUTPUT«hello␤»
14:14 pmurias i plan to start optimising simple things and when they are fast make the complex stuff run fast
14:14 ruoso rakudo: multi infix:<+> ($a where { $_ == 2 },$b where { $_ == 2 }) { 5 }; say 2 + 2; # breaks... :(
14:14 masak oh, he did? in that case, cool!
14:14 p6eval rakudo 803741: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/WjCLExFzqT:2)␤»
14:15 pmichaud I think it's that we haven't converted the builtin infix:<+> to be a Perl6MultiSub yet
14:15 PerlJam rakudo: multi infix:<+> (2,2) { 5 }; say 2 + 2;
14:15 p6eval rakudo 803741: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/LN5oDM39TX:2)␤»
14:15 PerlJam just checking
14:15 pmichaud because we run into a problem with    multi infix:<+>(Complex $a, $b)    and    multi infix:<+>($a, Complex $b)
14:16 pmurias ruoso: by making yeast of RIs
14:16 pmichaud rakudo:  multi infix:<def>(2,2) { say 'hello'; };    2 def 2
14:16 ruoso you mean generating a low-level yeast implementation from the Perl 6 source?
14:16 p6eval rakudo 803741: OUTPUT«hello␤»
14:17 pmurias ruoso: yes
14:18 ruoso pmurias, I think the m0ld middle step in the compilation might not be so cool
14:18 pmichaud on perl6-projects.org, the "Compilers and Interpreters" content overflows its box in my browser.
14:18 ruoso if you compile directly from Perl 6 to yeast, you can implement a lot of special casings for known low-level types
14:19 pmurias i plan to add a "RI of register" annotation to m0ld
14:24 masak pmichaud: looks fine here.
14:25 ruoso pmurias, I see.. but if we go directly from Perl 6 to yeast, you could generate smarter code
14:25 ruoso m0ld generates excessive steps for things that could be done in a single step when the types are known
14:26 ruoso and that context is lost when you generate the m0ld first
14:26 pmurias food&
14:26 pmichaud http://pmichaud.com/sandbox/snapshot2.png   # screen dump from my browser
14:27 PerlJam pmichaud: same here for FF.  Looks fine on Konquerer  though
14:28 PerlJam On K, the title is one line rather than being wrapped as on FF.
14:28 moritz_ we should just remove the links to the setting libs :-)
14:28 pmichaud I think it's useful to see the libs.  In fact, it was exactly that which caused me to open the page in the first place.
14:28 pmichaud (i.e., I wanted to look at setting libs)
14:29 Matt-W just need to fix the design to be a bit more flexible somehow
14:31 pugs_svn r27554 | moritz++ | [perl6-projects.org] don't make me overflow
14:31 moritz_ I just bumped the height a bit
14:31 moritz_ more flexible patches welcome.
14:31 * Matt-W is short of tuits right now
14:38 alester joined #perl6
14:42 justatheory joined #perl6
14:44 pmurias back
14:44 pmurias ruoso: got an example?
14:44 ruoso pmurias, so... the re-use of lexicals being an example
14:45 ruoso currently, it's de-contextualized to a lot of calls
14:45 ruoso but you could generate from yeast smarter code that, for instance, use the lowlevel FETCH on the scalar
14:45 ruoso since it's the known lowlevel type
14:46 ruoso and additionally, it could store the value in the yeast frame, and avoid another lookupt
14:46 ruoso you could also have a lowlevel implementation of the lookup
14:46 ruoso (considering all outer scopes are also native)
14:46 pmichaud masak: Whiteknight++ has fixed the exit code problem in Parrot;  I'm spectesting rakudo and then will commit the new PARROT_REVISION.
14:49 Matt-W pmichaud: hurrah!
14:54 last joined #perl6
14:54 * ruoso lunch &
14:57 masak pmichaud: \o/
14:58 rfordinal joined #perl6
15:06 Exodist joined #perl6
15:08 chid joined #perl6
15:11 szabgab moritz_, your server gives me 500 Internal server error http://perlgeek.de/blog-en/perl-5-to-6/07-regex.html
15:12 moritz_ szabgab: I'll look into it, thanks
15:12 szabgab of course that's a non existing page
15:12 szabgab but still
15:13 szabgab and a comment, http://perlgeek.de/blog-en/perl-5-to-6/19-regex.html says "regexes are already covered in lesson 07"   that should be a link to the lesson 07...
15:14 moritz_ hum, why does a 404 try to read a blog comment file?
15:18 pmurias ruoso: all that could be done in m0ld
15:18 masak moritzblogbug?
15:18 moritz_ aye.
15:18 moritz_ blosxom + 5 plugins + 20% local code changes = less than awesome
15:20 PerlJam you'll just have to rewrite the whole thing in perl 6!
15:20 PerlJam ;)
15:20 moritz_ I will, at some point. No smiley necessary :-)
15:20 pmichaud "Perl 6:  Awesome or bust."
15:20 donaldh joined #perl6
15:21 masak by the by, I noticed the '1 param expected' message is now no longer less than awesome. Parrot++
15:21 pmichaud chromatic++
15:21 * moritz_ still gets the non-zero return status with parrot r40083
15:22 moritz_ is it supposed to be fixed in that revision?
15:22 pmichaud yes, but I'm curious about the phrasing of what you just said
15:23 pmichaud errors in source should result in a non-zero return status.
15:23 pmichaud the bug was that they were resulting in a zero return status, which signaled to make that "it's okay to continue"
15:24 moritz_ ah no, I was referring to something else
15:24 moritz_ never mind then
15:24 moritz_ mlenz@wvbh074:/scratch/mlenz/rakudo$ ./perl6 -e '1/0'
15:24 moritz_ echo Divide by zero
15:24 moritz_ mlenz@wvbh074:/scratch/mlenz/rakudo$ echo $?
15:24 moritz_ 1
15:24 moritz_ that's what you mean, right?
15:25 szabgab rakudo: my $x = "abc def"; say $x ~~ m/c/;
15:25 p6eval rakudo eaa3ea: OUTPUT«c␤»
15:25 szabgab rakudo: my $x = "abc def"; say $x ~~ m/c d/;
15:25 p6eval rakudo eaa3ea: OUTPUT«␤»
15:25 szabgab rakudo: my $x = "abc def"; say $x ~~ mm/c d/;
15:25 p6eval rakudo eaa3ea: OUTPUT«Statement not terminated properly at line 2, near "/;"␤in Main (src/gen_setting.pm:3340)␤»
15:25 pmichaud yes, that's what I mean.
15:25 moritz_ that should match, but it's NYI
15:26 masak szabgab: mm NYI.
15:26 szabgab rakudo: my $x = "abc def"; say $x ~~ m:sigspace/c d/;
15:26 p6eval rakudo eaa3ea: OUTPUT«Colons cannot be used as delimiters in quoting constructs at line 2, near ":sigspace/"␤in Main (src/gen_setting.pm:3340)␤»
15:26 szabgab how ?
15:26 moritz_ rakudo: say 'b c' ~~ / :sigspace c d/
15:26 p6eval rakudo eaa3ea: OUTPUT«␤»
15:27 moritz_ rakudo: say 'b c' ~~ / :sigspace b c/
15:27 p6eval rakudo eaa3ea: OUTPUT«b c␤»
15:27 szabgab rakudo: my $x = "abc def"; say $x ~~ m/ : sigspace c d/;
15:27 p6eval rakudo eaa3ea: OUTPUT«perl6regex parse error: Quantifier follows nothing in regex at offset 43, found ' '␤in Main (src/gen_setting.pm:3340)␤»
15:27 szabgab rakudo: my $x = "abc def"; say $x ~~ m/ :sigspace c d/;
15:27 last joined #perl6
15:27 p6eval rakudo eaa3ea: OUTPUT«␤»
15:28 moritz_ rakudo: say " b c" ~~ /:sigspace b c/
15:28 p6eval rakudo eaa3ea: OUTPUT« b c␤»
15:28 moritz_ rakudo: say "ab c" ~~ /:sigspace b c/
15:28 szabgab rakudo: say "abc def" ~~ m/ :sigspace c d/;
15:28 p6eval rakudo eaa3ea: OUTPUT«␤»
15:28 p6eval rakudo eaa3ea: OUTPUT«␤»
15:28 moritz_ ok, it inserts an implicit :ws after the :sigspace
15:28 moritz_ rakudo: say "ab c" ~~ /:sigspace[b c]/
15:28 p6eval rakudo eaa3ea: OUTPUT«b c␤»
15:28 szabgab rakudo: my $x = "abc def"; say $x ~~ m/ :sigspacec d/;
15:29 p6eval rakudo eaa3ea: OUTPUT«d␤»
15:29 szabgab rakudo: my $x = "abc def"; say $x ~~ m/ :sigspace[c d]/;
15:30 p6eval rakudo eaa3ea: OUTPUT«c d␤»
15:30 r696 joined #perl6
15:31 szabgab Is the leading m/  optional ?
15:31 szabgab as in Perl 5 ?
15:31 moritz_ in this context yes
15:31 moritz_ the m/.../ means "match immediately"
15:31 szabgab ah so //   is like qr in Perl 5 ?
15:32 moritz_ /.../ is context dependent
15:32 * szabgab is backtracking
15:33 szabgab rakudo: say "a d" ~~ m/a[ ]d/
15:33 p6eval rakudo eaa3ea: OUTPUT«Null PMC access in find_method()␤in Main (src/gen_setting.pm:3340)␤»
15:34 PerlJam that's an interesting bug
15:35 PerlJam rakudo:  say "" ~~ /()/;
15:35 p6eval rakudo eaa3ea: OUTPUT«Statement not terminated properly at line 2, near "~~ /()/;"␤in Main (src/gen_setting.pm:3340)␤»
15:35 moritz_ rakudo: /()/
15:35 p6eval rakudo eaa3ea: OUTPUT«Syntax error at line 2, near "/()/"␤in Main (src/gen_setting.pm:3340)␤»
15:36 moritz_ PerlJam: empty regexes are forbidden, not sure about empty groups
15:36 PerlJam I'd guess they would be forbidden too since we already have a nice assertion for matching empty  things
15:37 szabgab so how can I capture a space now, \   (there is a space :-)   \s        <-[ ]>
15:37 PerlJam szabgab: say "abc def" ~~ /c ' ' d/;
15:37 PerlJam rakudo: say "abc def" ~~ /c ' ' d/;
15:38 p6eval rakudo eaa3ea: OUTPUT«c d␤»
15:38 PerlJam rakudo: say "abc def" ~~ /c\ d/;
15:38 moritz_ m:Perl5/c d/ # :-)
15:38 p6eval rakudo eaa3ea: OUTPUT«c d␤»
15:38 szabgab PerlJam, rakodo can process it faster than I do :-)
15:38 moritz_ rakudo: say 'c d'  ~~ m:Perl5/c d/
15:38 PerlJam rakudo: say "abc def" ~~ /c<space>d/;  # I think
15:38 p6eval rakudo eaa3ea: OUTPUT«c d␤»
15:38 p6eval rakudo eaa3ea: OUTPUT«c d␤»
15:38 szabgab rakudo: say "a b" ~~ m/a  \s  b/
15:39 p6eval rakudo eaa3ea: OUTPUT«a b␤»
15:39 szabgab rakudo: say "a b" ~~ m/a  ' '  b/
15:39 p6eval rakudo eaa3ea: OUTPUT«a b␤»
15:39 szabgab rakudo: say "a b" ~~ m:Perl5/a b/
15:39 p6eval rakudo eaa3ea: OUTPUT«a b␤»
15:39 szabgab very nice
15:40 PerlJam rakudo: say "a" ~~ /a/;
15:40 p6eval rakudo eaa3ea: OUTPUT«a␤»
15:42 PerlJam rakudo: say "" ~~ /[]/
15:42 p6eval rakudo eaa3ea: OUTPUT«Statement not terminated properly at line 2, near "~~ /[]/"␤in Main (src/gen_setting.pm:3340)␤»
15:42 PerlJam rakudo: say "" ~~ /[ ]/
15:42 p6eval rakudo eaa3ea: OUTPUT«Null PMC access in find_method()␤in Main (src/gen_setting.pm:3340)␤»
15:42 PerlJam That's just weird.
15:42 moritz_ PerlJam: please open a ticket for the last one
15:42 moritz_ I'm sure that's wrong
15:42 moritz_ not entirely sure about the others
15:43 TimToady std: say "" ~~ /[]/
15:43 p6eval std 27554: OUTPUT«##### PARSE FAILED #####␤Unrecognized regex metacharacter at /tmp/BcDXBbF0TI line 1:␤------> [32msay "" ~~ /[[31m]/[0m␤    expecting ws␤FAILED 00:04 36m␤»
15:44 TimToady should have a better message
15:44 PerlJam Assuming that means that empty groups are disallowed, that could use a ... what TimToady said  :)
15:45 Util joined #perl6
15:45 justatheory joined #perl6
15:47 PerlJam rakudobugged.
15:48 moritz_ std: /()/
15:48 p6eval std 27554: OUTPUT«##### PARSE FAILED #####␤Unrecognized regex metacharacter at /tmp/2ua7X1gfPV line 1:␤------> [32m/([31m)/[0m␤    expecting ws␤FAILED 00:02 36m␤»
15:52 masak looks like an STD-bug to me.
15:52 masak at least the error message is less than awesome.
15:52 TimToady masak: see about 8 minutes ago
15:54 masak oh. 对.
15:55 * PerlJam wants a whiteboard/chalkboard that doesn't have the mess.
15:57 masak PerlJam: our office sports a blackboard. it's the only time we've been exercising our right to decide about our environment (they wanted to give us a whiteboard). we're very happy about our presence of mind.
16:01 pmichaud there's also
16:01 pmichaud rakudo: say 'a b' ~~ m/ 'a b' /
16:01 p6eval rakudo eaa3ea: OUTPUT«a b␤»
16:01 rfordinal joined #perl6
16:02 pmichaud PerlJam: http://www.youtube.com/watch?v=5s5EvhHy7eQ  # whiteboard without the mess
16:03 masak rakudo: say ?('a b'.index('a b'))
16:03 p6eval rakudo eaa3ea: OUTPUT«0␤»
16:06 Util ( The following question is repeated from http://irclog.perlgeek.de/perl6/2009-07-10#i_1304274 )
16:07 Util In the S02 table on "generalized adverbial form of Pair notation", the last line reads:
16:07 Util a => %foo<a>        %foo<a>:p
16:07 Util Why `p`? Is it a typo?
16:07 Psyche^ joined #perl6
16:09 TimToady :p modifies any subscripting operation to return both the key and the value as a pair
16:09 Util Doh! Now that I see the slice-subscript adverbs, I see that PerlJam was right. Nevermind!
16:09 Util And thanks!
16:10 TimToady .oO(why does masak keep testing a rock?)
16:11 PerlJam Util: you didn't believe me?!?  :)
16:11 moritz_ most people need somthing solid in their lives; something that gives them a feeling of safety
16:11 moritz_ so if you keep testing a rock, and find it's always solid, always falls to the ground when you drop etc. you gain confidence
16:12 PerlJam and if you drop it and flys off to the right at a high rate of speed, then you know there's another gravity well nearby that wasn't there before.
16:14 last joined #perl6
16:14 Util PerlJam: Actually, no. It made no sense, and I could find no support in the specs for your answer, and the pattern in the table was broken only by that one cell. I was *sure* you had to be wrong.
16:14 Util Of course, the moment that I re-posted the question, I thought to search on `:p`, and saw that you were right all along. ++PerlJam.
16:19 last_ joined #perl6
16:20 davef joined #perl6
16:21 pmichaud rakudo: say  (1 => 2 => 3).perl
16:21 p6eval rakudo eaa3ea: OUTPUT«1 => 2 => 3␤»
16:21 TimToady rakudo: say (1 => 2 => 3).key.perl
16:22 p6eval rakudo eaa3ea: OUTPUT«1 => 2␤»
16:22 TimToady that's wrong
16:22 moritz_ rakudo: say (1 => 2 => 3).value ~~ Pair
16:22 p6eval rakudo eaa3ea: OUTPUT«0␤»
16:22 dalek rakudo: 2fb60ee | pmichaud++ | build/PARROT_REVISION:
16:22 dalek rakudo: Bump PARROT_REVISION so that we get appropriate exit status codes (Whiteknight++)
16:22 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2fb60eea450975584a175e49083719c3c4fe5cd5
16:23 PerlJam TimToady: associativity-wise?
16:23 TimToady yes, supposed to be ra
16:24 TimToady supposed to work like . in Lisp
16:25 TimToady where "key" is misprounounced "car", and "value" is mispronounced "cdr" :)
16:25 PerlJam heh
16:26 last__ joined #perl6
16:26 PerlJam someone at some point will make .car and .cdr methods now that you've said that.
16:27 moritz_ PerlJam: they already exist in some spectests
16:27 TimToady hmm, if Parcels are really s-exprs...
16:27 moritz_ augment class Pair { method car() { $.key } } etc
16:29 pugs_svn r27555 | moritz++ | [t/spec] test that => is right-associative
16:29 PerlJam moritz_: and do caar, caaar, caaaar, cddr, cdddr, and cddddr  exist too?
16:30 moritz_ actually it seems I removed that nonsense, mostly
16:30 PerlJam moritz_++ then!
16:30 moritz_ see spec/S12-methods/chaining.t
16:30 PerlJam we're moving the right direction.
16:30 moritz_ and feel free to remove remaining nonesense
16:30 moritz_ I have to buy something to eat before the shops close ;-)
16:41 dalek rakudo: b7643e8 | pmichaud++ | docs/spectest-progress.csv:
16:41 dalek rakudo: spectest-progress.csv update: 415 files, 11784 passing, 0 failing
16:41 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b7643e82a200caed73b777e2b09e9f9065b1ff39
16:43 takadonet Are we passing 12 less test now?
16:45 hercynium joined #perl6
16:50 pmichaud .... 12 less?
16:50 pmichaud oh.
16:50 pmichaud Yes.  12 tests were for outdated features and thus were removed.
16:51 pmichaud (things like <sp>, <gt>, <lt>, <dot>, <null>, etc. in regexes)
16:51 ruoso pmurias, the problem is that doing that from m0ld is considerably harder, since you lost most of the context...
16:52 ruoso TimToady, any decision on the @ API concerning the possible merge of Parcel and Capture?
16:54 nihiliad joined #perl6
16:54 TimToady what do you think @(1,2,:a) should return?  Then what should @a = 1,2,:a do?
16:55 tann joined #perl6
16:55 TimToady I think the user will be quite confused if :a disappears
16:56 TimToady so I don't see the types merging at the moment
16:58 molaf joined #perl6
17:00 pugs_svn r27556 | Util++ | [t/spec] Corrected typo in fmt.t
17:01 rfordinal left #perl6
17:04 ruoso TimToady, there's always the idea of getting back to "every named is also a positional until it is used by the signature"
17:05 * ruoso somehow doesn't feel confortable about having Parcel and Capture as different types
17:08 pmurias ruoso: so what is the point where we want to do optimalisations?
17:08 ruoso pmurias, one thing I'm pretty sure would help a lot would be to have a smarter lexpad
17:09 ruoso and use the yeast frame capabilities for that purpose
17:09 ruoso i.e.: if (SMOP_RI(scalar) == SMOP__S1P__Scalar) do_smart; else do_dumb;
17:10 ruoso for instance, when initializing the yeast, it could just save the used variables from the outer scope
17:10 pmurias ruoso: what i meant to ask at what stage do we want to do the optimalisations
17:10 ruoso instead of doing a lookup in the inner scope
17:10 pmurias we have the VAST, the AST and the m0ld
17:10 ruoso I meant we would need a smarter AST
17:11 ruoso where the lexpad itself should be part of it
17:11 ruoso and we avoid doing unecessary lookups
17:13 moritz_ rakudo: sub a(:$x, :foo($x)) { say $x }; say a(x => 0), a(foo => 1)
17:13 p6eval rakudo b7643e: OUTPUT«Use of uninitialized value␤␤1␤11␤»
17:13 moritz_ rakudo: sub a(:$x, :foo($x)) { say $x }; a(x => 0), a(foo => 1)
17:13 p6eval rakudo b7643e: OUTPUT«Use of uninitialized value␤␤1␤»
17:13 moritz_ rakudo: sub a(:$x, :foo($x) = $x) { say $x }; a(x => 0), a(foo => 1)
17:13 p6eval rakudo b7643e: OUTPUT«Null PMC access in isa()␤in sub a (/tmp/DwhywHHbjV:2)␤called from Main (/tmp/DwhywHHbjV:2)␤»
17:13 mikehh joined #perl6
17:13 moritz_ masak!
17:13 moritz_ dammit, I have to report myself ;-)
17:14 moritz_ rakudo: sub a($x, $y = $x) { say $x }; a(3); a(1, 2);
17:14 p6eval rakudo b7643e: OUTPUT«3␤1␤»
17:15 moritz_ rakudo: sub a(:$x, :foo($y) = $x) { say $x }; a(x => 0); a(foo => 1)
17:15 p6eval rakudo b7643e: OUTPUT«0␤Use of uninitialized value␤␤»
17:15 r696 left #perl6
17:16 cdarroch joined #perl6
17:16 pmurias ruoso: the lexical scope can be merged with the yeast frame
17:17 pmurias so that the lexicals are stored in registers
17:17 moritz_ rakudo: sub a(:$x, :foo($y) = $x) { say $y }; a(x => 2); a(foo => 3)
17:17 p6eval rakudo b7643e: OUTPUT«2␤3␤»
17:18 * moritz_ wonders if we have tests for that
17:18 kst joined #perl6
17:19 ruoso pmurias, that's my point
17:25 explorer joined #perl6
17:33 dalek joined #perl6
17:34 kborer joined #perl6
17:59 macae joined #perl6
18:04 justatheory joined #perl6
18:09 DemoFreak joined #perl6
18:12 nihiliad joined #perl6
18:13 tann joined #perl6
18:17 kborer_ joined #perl6
18:17 TimToady phenny: tell masak that's just { my $OUT is context = FakeOut.new; stuff(); } or some such, where FakeOut defines appropriate interception routines to emulate IO
18:17 phenny TimToady: I'll pass that on when masak is around.
18:25 last joined #perl6
18:34 athomason joined #perl6
18:36 kane_ joined #perl6
18:37 kane___ joined #perl6
18:40 ispy_1 joined #perl6
18:42 payload joined #perl6
18:52 ispy_1 left #perl6
18:54 mikehh joined #perl6
18:55 dalek rakudo: d8d0640 | pmichaud++ | src/parser/grammar-oper.pg:
18:55 dalek rakudo: infix:�=>� and related operators should be right associative.
18:55 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d8d0640766dd6f330539fad377dce5513000bce6
18:55 mikehh rakudo builds on parrot 40086 - PASSes make test/make spectest (t/spec/S03-operators/precedence.rakudo - TODO passed:   53-54)
18:56 mikehh Ubuntu 9.04 amd64
18:57 rindolf joined #perl6
18:57 rindolf Hi all.
18:57 moritz_ hi rindolf, hi *
18:57 rindolf moritz_: what's up?
18:57 moritz_ rindolf: #parrotsketch is up
18:59 rindolf moritz_: what is it?
18:59 moritz_ rindolf: weekly parrot developer's IRC meeting
18:59 rindolf moritz_: ah.
18:59 rindolf moritz_: on irc.perl.org #parrot?
18:59 moritz_ rindolf: aye
18:59 moritz_ http://irclog.perlgeek.de/parrotsketch/today for the logs
18:59 rindolf moritz_: OK.
19:01 r696 joined #perl6
19:02 sri_kraih joined #perl6
19:05 M_o_C joined #perl6
19:09 justatheory joined #perl6
19:16 kborer joined #perl6
19:18 kborer__ joined #perl6
19:20 kborer___ joined #perl6
19:21 donaldh joined #perl6
19:24 moritz_ can somebody please tell me if I messed up the last two tests in t/spec/S03-operators/precedence.t?
19:24 moritz_ they were actually passing for me before d8d0640766dd6f330539fad377dce5513000bce6
19:24 moritz_ but I can't understand why
19:28 FCO joined #perl6
19:28 pugs_svn r27557 | moritz++ | [t/spec] unfudge precedence.t for rakudo
19:30 payload joined #perl6
19:30 takadonet joined #perl6
19:30 donaldh joined #perl6
19:34 eternaleye joined #perl6
19:34 hcchien joined #perl6
19:50 szabgab joined #perl6
19:58 takadonet left #perl6
20:01 tann rakudo: multi sub myqsort() { () }; multi sub myqsort(*$p, *@list) { (myqsort(@list.grep: { $_ <= $p }), $p, myqsort(@list.grep: { $_  > $p })); }
20:01 p6eval rakudo d8d064:  ( no output )
20:01 TimToady moritz_: I think the uc test is wrong, at least until someone defines uc as prefix:<uc>, which it doesn't look like anyhing in the spec does
20:01 TimToady otherwise uc parses as listop, looser than eq
20:01 pochi joined #perl6
20:02 tann rakudo: multi sub myqsort() { () }; multi sub myqsort(*$p, *@list) { (myqsort(@list.grep: { $_ <= $p }), $p, myqsort(@list.grep: { $_  > $p })); };  say (1..100).pick(10).myqsort.perl
20:02 p6eval rakudo d8d064: OUTPUT«Method 'myqsort' not found for invocant of class 'List'␤»
20:02 moritz_ TimToady: I meant the ok ((1 => 2 => 3).key  !~~ Pair), '=> is right-assoc (1)'; test
20:02 tann rakudo: multi sub myqsort() { () }; multi sub myqsort(*$p, *@list) { (myqsort(@list.grep: { $_ <= $p }), $p, myqsort(@list.grep: { $_  > $p })); };  say myqsort((1..100).pick(10)).perl
20:02 moritz_ and the one after it
20:03 p6eval rakudo d8d064:  ( no output )
20:03 moritz_ rakudo: say 1
20:03 p6eval rakudo d8d064: OUTPUT«1␤»
20:03 moritz_ tann: 15607 CPU time limit exceeded | PERL6LIB=lib ./perl6 /tmp/nilbO3P6HR >> /tmp/hZGatXZU8H 2>&1
20:03 rindolf tann: you should define a closure.
20:04 moritz_ tann: that's why there was no output
20:04 rindolf For the myqsort with @list.grep
20:04 TimToady would help if I did svn up first :)
20:04 moritz_ rindolf: that is a closure already
20:04 moritz_ rindolf: it closes over $p
20:05 TimToady those look fine to me
20:05 tann moritz_: i got a different error my mac though
20:05 rindolf moritz_: well, extract a function.
20:05 moritz_ rakudo: say uc('a' eq 'b')
20:05 p6eval rakudo d8d064: OUTPUT«0␤»
20:05 rindolf moritz_: because there's some duplicate code there.
20:05 moritz_ rakudo: say uc 'a' eq 'b'
20:05 p6eval rakudo d8d064: OUTPUT«0␤»
20:05 moritz_ rakudo: say uc 'a' eq 'A'
20:06 tann moritz: was trying to reproduce this error with the same cut 'n paste code "src/call/pcc.c:613: failed assertion 'PObj_is_PMC_TEST(sig_pmc)'"
20:06 p6eval rakudo d8d064: OUTPUT«0␤»
20:08 Guest60620 joined #perl6
20:16 icwiener_ joined #perl6
20:16 pugs_svn r27558 | moritz++ | [t/spec] corrected test regarding precedence of argument lists and infix:<eq>.
20:16 pugs_svn r27558 | moritz++ |
20:16 pugs_svn r27558 | moritz++ | TimToady++ for accidental review ;-)
20:17 pugs_svn r27559 | lwall++ | [CORE] add rotate
20:23 rfordinal joined #perl6
20:28 khisanth_ joined #perl6
20:30 tann rakudo: multi sub myqsort() { () }; multi sub myqsort(*$p, *@list) { (myqsort(grep { $_ <= $p }, @list), $p, myqsort(grep { $_  > $p }, @list)); }; say myqsort((1..100).pick(10)).perl;
20:30 p6eval rakudo d8d064:  ( no output )
20:43 justatheory joined #perl6
20:44 bigpresh_ joined #perl6
20:51 chipdude joined #perl6
21:02 iblechbot joined #perl6
21:03 KyleHa rakudo: my $t = 5; say $t.i
21:03 p6eval rakudo d8d064: OUTPUT«Method 'i' not found for invocant of class 'Int'␤»
21:05 PerlJam KyleHa: are you trying to say the complex number 5i?
21:05 KyleHa No, I'm looking at this ticket:  http://rt.perl.org/rt3/Ticket/Display.html?id=62382
21:05 moritz_ rakudo: (1+4i).i.say
21:05 p6eval rakudo d8d064: OUTPUT«Method 'i' not found for invocant of class 'Complex'␤»
21:05 moritz_ rakudo: (1+4i).im.say
21:05 p6eval rakudo d8d064: OUTPUT«4␤»
21:06 KyleHa Did .i change its name to .im ?
21:06 moritz_ no
21:06 moritz_ Num.i returns the Num * 1i
21:06 moritz_ Complex.im returns the imaginary part
21:07 moritz_ not sure if Num.i still exists
21:08 KyleHa The only mention of .i in the spec is in S03.  "$regex.i might tell you whether the regex is case insensitive, for instance."
21:08 PerlJam the "method not found" error above would indicate that Num.i does not exist :)
21:08 [particle] buubot: spack method i
21:08 buubot [particle]: Couldn't match input.
21:09 [particle] what happened to spack?
21:09 KyleHa The only mention of .i in the spec tests appears to be where it's been used as an attribute or user-defined method name.
21:09 KyleHa I'm guessing this ticket is stale.
21:10 PerlJam KyleHa: unless method .i should exist but doesn't.
21:11 KyleHa PerlJam: It what way should it exist if it's not in the spec or spectests?  8-)
21:11 KyleHa rakudo -V doesn't work.  I'll not mention this further.
21:21 masak joined #perl6
21:21 masak phenny: I already backlogged, you don't need to...
21:21 phenny masak: 18:17Z <TimToady> tell masak that's just { my $OUT is context = FakeOut.new; stuff(); } or some such, where FakeOut defines appropriate interception routines to emulate IO
21:21 masak TimToady: nice.
21:22 masak I'm writing tests for Hitomi tonight. I want to get to the point where I can declare week 11, and thus my part of the Web.pm grant, finished.
21:23 bucky joined #perl6
21:26 last joined #perl6
21:26 frew joined #perl6
21:28 Whiteknight joined #perl6
21:28 masak rakudo: sub random-smiley() { <; : X>.pick X~ '-' X~ <) P> }; print random-smiley
21:28 p6eval rakudo d8d064: OUTPUT«:-):-P»
21:29 masak rakudo: sub random-smiley() { <; : X>.pick X~ '-' X~ <) P>.pick }; print random-smiley
21:29 p6eval rakudo d8d064: OUTPUT«X-P»
21:31 ruoso rakudo: sub random-smiley() { [~] <; : X>.pick, '-', <) P>.pick }; print random-smiley
21:31 p6eval rakudo d8d064: OUTPUT«;-P»
21:32 masak ;-P
21:32 moritz_ <) P>. looks like a smiling fish already ;-)
21:32 ruoso rakudo: sub random-smiley() { [~] <; : X>.pick, '-', <) P D }>.pick }; print random-smiley
21:32 p6eval rakudo d8d064: OUTPUT«;-)»
21:33 rfordinal joined #perl6
21:34 masak so, what's blocking a pure-Perl6 bot on the channel, really?
21:34 rfordinal left #perl6
21:34 moritz_ somebody implementing it?
21:34 ruoso rakudo: sub random-smiley() { [~] map { .pick } <; : X>, <->, <) P D }> }; print random-smiley
21:34 p6eval rakudo d8d064: OUTPUT«Statement not terminated properly at line 2, near "<; : X>, <"␤in Main (src/gen_setting.pm:3340)␤»
21:34 PerlJam what moritz_ said
21:34 ruoso rakudo: sub random-smiley() { [~] map { .pick }, <; : X>, <->, <) P D }> }; print random-smiley
21:34 moritz_ pioneer spirit
21:34 p6eval rakudo d8d064: OUTPUT«maximum recursion depth exceeded␤in Main (src/gen_setting.pm:3340)␤»
21:34 moritz_ a thick skin
21:34 masak if that's true, we clearly need more slaves^Wapplication developers
21:34 [particle] safe mode
21:34 moritz_ a finger near the rakudobug trigger
21:35 masak [particle]: good point.
21:35 moritz_ and tuits
21:35 PerlJam rakudo: run("ls")
21:35 p6eval rakudo d8d064: OUTPUT«operation not permitted in safe mode␤in Main (lib/Safe.pm:25)␤»
21:35 masak everybody needs tuits.
21:35 PerlJam looks like there's a safe mode to me  :)
21:35 moritz_ well, it cheats a bit ;-)
21:35 [particle] yes, but it needs to be hardened.  not sure it's safe enough.
21:35 moritz_ but for a bot that's not evalbot you don't need a safe mode so badly.
21:36 masak if it's not an evalbot, the need for a safe mode isn't as large.
21:36 ruoso we already have an eval bot? what can be worse in terms of security?
21:36 kst joined #perl6
21:36 moritz_ an evalbot running as root in a non-chrooted environment? ;-)
21:36 masak ouch.
21:37 PerlJam moritz_: on a production server that processes financial transaction  ;->
21:37 KyleHa Name it 'Rudy' (rooty).
21:37 moritz_ :-)
21:38 moritz_ (and don't dare mis-typing it as Ruby :)
21:38 PerlJam rue tea
21:39 cbk joined #perl6
21:42 Lorn rakudo: 1.WHAT();
21:42 p6eval rakudo d8d064:  ( no output )
21:42 masak rakudo: say .WHAT
21:42 p6eval rakudo d8d064: OUTPUT«Failure()␤»
21:43 KyleHa rakudo: say 1.WHAT
21:43 p6eval rakudo d8d064: OUTPUT«Int()␤»
21:43 pugs_svn r27560 | kyle++ | [t/spec] Tests for RT #62622
21:43 Lorn masak,KyleHa: thanks
21:44 masak oh no, I need to go and sleep a few hours soon! :/
21:46 pugs_svn r27561 | moritz++ | [S29] document eval(Buf)
21:46 KyleHa perl6: say 1 ~~ Complex;
21:47 p6eval pugs: OUTPUT«1␤»
21:47 p6eval ..rakudo d8d064: OUTPUT«0␤»
21:47 p6eval ..elf 27560: OUTPUT«␤»
21:47 moritz_ three implementations, three answers
21:47 masak and I agree with all of them. :)
21:47 KyleHa This argues that Pugs is right:  http://rt.perl.org/rt3/Ticket/Display.html?id=62628
21:47 pmichaud there's more than one way to answer it.
21:48 moritz_ KyleHa: I don't think pugs is right
21:48 moritz_ we had this discussion before
21:48 KyleHa Oh.  Maybe I should search for it.
21:49 KyleHa Or...did the discussion make it to the spec?
21:49 moritz_ the short answer is "Perl 6's object model and mathematics are incompatible; we're screwed"
21:49 * ruoso decommute &
21:49 KyleHa *nervous laughter*
21:49 moritz_ the long answer was that we don't want sqrt(-1) to give 1i or -1i as the answer
21:49 moritz_ because it will scare all the non-mathematicians away
21:49 masak not as a default, anyway.
21:49 PerlJam moritz_: we don't *always* want that.
21:49 KyleHa Oh right, I think I remember this discussion.
21:50 moritz_ so I think the decision was that "normal" numbers aren't complex too
21:50 masak all is fair if you pre-declare yourself a mathematician.
21:50 KyleHa OK...Rat is NYI, but would 1 ~~ Rat ?
21:50 PerlJam use Math;  # I know what I'm doing
21:50 PerlJam (i hope)
21:51 moritz_ KyleHa: don't think so either, but not sure
21:51 KyleHa perl6: say 1 ~~ Rat
21:51 masak use Math::Complex;
21:51 p6eval rakudo d8d064: OUTPUT«Could not find non-existent sub Rat␤»
21:51 p6eval ..pugs: OUTPUT«1␤»
21:51 p6eval ..elf 27561: OUTPUT«␤»
21:51 KyleHa Again with the three answers.
21:52 KyleHa I think I'll skip that ticket.
21:52 masak we encourage diversity. :)
21:53 moritz_ I try to unify (writing tests and stuff), and masak diversivies. Does that make us enemies? ;-)
21:53 pmichaud opposites attract?
21:53 pmichaud the tension between unity and diversity is where we get stuff done :-)
21:54 KyleHa Not so much enemies as rivals, or perhaps merely opponents.
21:54 pmichaud In the U.S., the phrase would be "E Pluribus Unum"  :-)
21:54 moritz_ speaking of which, I wanted to correct some tests and write a blog post tonight
21:54 moritz_ but "today" is only 5 more minutes
21:54 moritz_ so I better hurry up
21:55 masak moritz_: I don't diversify, I complain when the diversity is of the wrong sort. :) we're simply doing different parts of the same job.
21:57 masak when there's a junction of two types in a parameter declaration, that always means that the routine accepts either one type or the other, right?
21:58 moritz_ right
21:58 masak does it mean that it would accept a junction of values of all those types? my guess is no.
21:58 moritz_ no, I'd autothread
21:58 masak right.
21:58 masak what about return types? same question.
21:58 moritz_ same answer.
21:59 payload rakudo: sub postfix:<!> ($n) { [*] 1..$n }; say (3!)!
21:59 p6eval rakudo d8d064: OUTPUT«720␤»
21:59 payload rakudo: sub postfix:<!> ($n) { [*] 1..$n }; say 6!
21:59 p6eval rakudo d8d064: OUTPUT«720␤»
21:59 payload rakudo: sub postfix:<!> ($n) { [*] 1..$n }; say 3!!
21:59 p6eval rakudo d8d064: OUTPUT«Syntax error at line 2, near "!!"␤in Main (src/gen_setting.pm:3340)␤»
21:59 payload rakudo: sub postfix:<!> ($n) { [*] 1..$n }; say 3! !
21:59 p6eval rakudo d8d064: OUTPUT«720␤»
21:59 masak payload: new bug?
22:00 pmichaud std:  say 3!!
22:00 moritz_ uhm, I don't think postfix should allow spaces
22:00 PerlJam LTM thwarts postfix !!
22:00 p6eval std 27561: OUTPUT«##### PARSE FAILED #####␤Syntax error (two terms in a row?) at /tmp/X1PIaQYjSb line 1:␤------> [32msay 3[31m!![0m␤    expecting any of:␤  POST␤   infix or meta-infix␤        infix stopper␤    infix_prefix_meta_operator␤       postfix␤        postfix_prefix_meta_operator␤
22:00 p6eval ..standard stopper␤       statement modif…
22:00 moritz_ std: sub postfix:<!>($x) { }; 3!!
22:00 masak PerlJam: but if no !! is defined?
22:00 p6eval std 27561:  ( no output )
22:00 moritz_ std: sub postfix:<!>($x) { }; 3! !
22:00 PerlJam the  there's not !! op and it should fial
22:00 moritz_ meh
22:00 pmichaud I think rakudo may be getting confused by the !! in   ?? !!
22:00 PerlJam er, fail
22:00 p6eval std 27561:  ( no output )
22:00 masak pmichaud: oh. right.
22:01 masak gotta go. g'night.
22:01 payload well i was just playing ^^
22:01 payload n8
22:01 moritz_ sigh, evalbot hiccup
22:02 pugs_svn r27562 | moritz++ | [t/spec] fix hyper as-latin-1 tests
22:03 sri_kraih joined #perl6
22:04 KyleHa moritz++ # For taking down that hyper latin1 serpent
22:04 pmichaud rakudo: sub postfix:<?!>($n) { [*] 1..$n };  say 3?!?!
22:04 p6eval rakudo d8d064: OUTPUT«720␤»
22:05 explorer joined #perl6
22:06 kidd` joined #perl6
22:06 og1 joined #perl6
22:07 og1 left #perl6
22:15 burmas joined #perl6
22:19 ihrd joined #perl6
22:19 ihrd left #perl6
22:38 Sexygirl joined #perl6
22:38 payload rakudo: sub postfix:<!> (Num $n where { $_ >= 0 }) { [*] 1..$n }; say (-1)!
22:39 p6eval rakudo d8d064: OUTPUT«Parameter type check failed; expected Junction, but got Int for $n in call to postfix:!␤in sub postfix:! (/tmp/83pqcYRyKg:2)␤called from Main (/tmp/83pqcYRyKg:2)␤»
22:39 payload rakudo: sub postfix:<!> (Num $n where { $_ >= 0 }) { [*] 1..$n }; say -1!
22:39 p6eval rakudo d8d064: OUTPUT«-1␤»
22:39 payload ^^
22:39 Sexygirl left #perl6
22:40 moritz_ I guess postfix:<!> binds tighter than prefix:<->
22:40 moritz_ rakudo: sub postfix:<!> (Num $n where { $_ >= 0 }) { [*] 1..$n  }}; say (-1)!
22:40 p6eval rakudo d8d064: OUTPUT«Syntax error at line 2, near "}; say (-1"␤in Main (src/gen_setting.pm:3340)␤»
22:40 moritz_ rakudo: sub postfix:<!> (Num $n where { $_ >= 0 }) { [*] 1..$n  }; say (-1)!
22:40 p6eval rakudo d8d064: OUTPUT«Parameter type check failed; expected Junction, but got Int for $n in call to postfix:!␤in sub postfix:! (/tmp/ss8FoOB5ZM:2)␤called from Main (/tmp/ss8FoOB5ZM:2)␤»
22:41 moritz_ payload: is that more like what you expected?
22:43 payload yes sure
22:44 Sexygirl joined #perl6
22:44 payload i am just searching for some little examples in perl 6 to blog about... but factorial is boring
22:44 moritz_ (except that the usage of a Junction for type checking is an implementation detail that shouldn't appear in the error message)
22:44 payload the type checking is nice
22:45 moritz_ rakudo: multi sub infix:</>(Str $a, Str $b) { $a ~ '/' ~ $b }; say '' / 'etc'
22:45 p6eval rakudo d8d064: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/uDz60IoDcb:2)␤»
22:45 moritz_ bah
22:45 moritz_ if that worked you could have overloaded / between strings to act like a path separator
22:46 moritz_ and on windows return \ instead of /
22:48 s1n pmichaud: http://s1n.dyndns.org/index.php/2009/07/13/walk-this-way/
22:49 s1n (everyone else is welcome to comment, even if they can't attend dallas.p6m)
22:51 payload maybe i do something about adventure.pl... you can "take a vampire" and after that you carrying a vampire
22:51 payload but for that i should make it OO
22:52 ben_m joined #perl6
22:52 moritz_ feel free
22:52 payload or an XMPP lib :-/
22:53 moritz_ s1n: it should be s/module/class/g
22:53 s1n moritz_: semantically the same thing though iirc
22:54 moritz_ s1n: I don't think that modules can inherit.
22:54 burmas left #perl6
22:55 s1n moritz_: hmm if that's the only difference, sounds like a trait/attribute rather than a new keyword that would apply
22:55 moritz_ and it's .WALK(:name<baz>), not :name(baz) (the latter tries to call a baz() sub)
22:55 moritz_ s1n: it's not the only difference, but one that matters here
22:57 moritz_ s1n: http://nopaste.snit.ch/17270 this version works today in Rakudo, and prints
22:57 moritz_ baz, baz
22:57 moritz_ icanhaz
22:59 s1n moritz_: okay, i made sure to put a note at the top about how it was an exercise to the reader to check the snippets
22:59 moritz_ so, did I pass my exercise?
22:59 moritz_ ;-)
22:59 s1n moritz_: yes, thanks heh, i'll make sure to mention you contributions :)
22:59 s1n moritz_: have any thoughts about the few questions i had?
23:00 moritz_ it's just that blogging working Perl 6 code makes quite a difference to the "Perl 6 is vapourware" meme
23:00 moritz_ s1n: no, sorry
23:01 moritz_ bed time for me :/
23:04 ZuLuuuuuu joined #perl6
23:07 nihiliad joined #perl6
23:07 skids joined #perl6
23:09 s1n moritz_: that's a good point about the vaporware meme, i will blog again with proper working code
23:09 ben_m left #perl6
23:09 s1n moritz_: i was more concerned with understanding WALK than getting all of the bits compiling and running, so thanks for correcting me
23:20 donaldh joined #perl6
23:27 last joined #perl6
23:32 kyrbe joined #perl6
23:38 Limbic_Region joined #perl6
23:46 kst joined #perl6
23:57 noobsic joined #perl6
23:58 noobsic left #perl6

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

Perl 6 | Reference Documentation | Rakudo