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