Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-05-03

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:12 payload1 joined #perl6
00:14 payload joined #perl6
00:25 nbrown_ joined #perl6
00:28 eternaleye_ joined #perl6
00:43 dukeleto joined #perl6
00:58 nbrown left #perl6
00:58 nbrown joined #perl6
01:33 cognominal joined #perl6
01:42 payload1 joined #perl6
01:42 payload joined #perl6
01:44 payload1 joined #perl6
01:48 Diederich joined #perl6
01:53 payload joined #perl6
02:02 nacho_ joined #perl6
02:04 jhorwitz_ joined #perl6
02:13 justatheory joined #perl6
02:34 c9s joined #perl6
03:20 pugs_svn r26623 | hinrik++ | [S26] Let's eat some more of our own dog food by using semantic Pod blocks where we can
03:24 dalek joined #perl6
03:24 literal hah, "Camelia, the Perl 6 bug"
03:46 orafu joined #perl6
04:21 dduncan left #perl6
05:09 dukeleto joined #perl6
05:21 dukeleto_ joined #perl6
05:47 justatheory joined #perl6
05:54 octagon_ joined #perl6
05:56 octagon_ left #perl6
06:54 abra joined #perl6
07:27 meppl joined #perl6
07:37 iblechbot joined #perl6
07:45 amoc joined #perl6
08:10 M_o_C joined #perl6
08:32 payload joined #perl6
08:43 DemoFreak joined #perl6
09:03 cognominal joined #perl6
09:07 H1N1 joined #perl6
09:08 kane__ joined #perl6
10:04 Meijito joined #perl6
10:05 Meijito Hi. I need that my $g will be with numbers. I need $g1, $g2, $g3. I tried to do -variable => \$g$i, but it not works. Any idea how put $i (numbers) to $g?
10:06 Meijito I don't know how, but I remember that it's posssible in some wias to do that.
10:07 sri_kraih_ joined #perl6
10:07 Eevee joined #perl6
10:27 pasteling "HeartQuake" at 85.232.150.110 pasted "My Codee" (14 lines, 655B) at http://sial.org/pbot/36343
10:27 Meijito mhmh
10:27 Meijito this is my source
10:27 Meijito :)
11:16 fridim_ joined #perl6
11:45 payload joined #perl6
11:50 c9s joined #perl6
12:24 clkao joined #perl6
12:36 clkao joined #perl6
12:47 pugs_svn r26624 | ron++ | annotate skip for existing test with matching RT #53804 (not appearing elsewhere)
12:55 patmat joined #perl6
12:55 amoc joined #perl6
12:56 patmat hey! while making some examples in perl6 i found something
12:57 patmat http://www.pastie.org/466633
12:57 patmat is this normal?
12:58 nihiliad joined #perl6
13:00 skids joined #perl6
13:02 pugs_svn r26625 | ron++ | standardize format of RT identification on one test
13:02 patmat hm seems like everyones idle!
13:04 patmat http://www.pastie.org/466633
13:10 arnsholt patmat: It has to be: "}; say $zahl;"
13:11 arnsholt I can't remember exactly why, but if you want a new statement straight after closing a block, you need the ;
13:13 patmat oh... a bit annoying, should be fixed right?
13:15 patmat because it's just ugly :)
13:19 pmurias joined #perl6
13:19 pmurias hi
13:19 lambdabot pmurias: You have 1 new message. '/msg lambdabot @messages' to read it.
13:20 pmurias duplicated lambdabot messages are annoying
13:36 xinming_ joined #perl6
13:39 rblasch joined #perl6
13:40 Limbic_Region joined #perl6
13:41 skids pmurias: @clear to lambdabot
13:57 c9s_ joined #perl6
14:06 ZuLuuuuuu joined #perl6
14:12 pmurias lambdabot: @clear
14:12 lambdabot Messages cleared.
14:14 pmurias perl6: my $foo;say $foo;
14:14 p6eval rakudo d4a0b3: OUTPUT«Use of uninitialized value␤␤»
14:14 p6eval ..elf 26625, pugs: OUTPUT«␤»
14:15 pmurias perl6: my $foo = False;say $foo;
14:15 p6eval elf 26625: OUTPUT«False␤»
14:15 p6eval ..rakudo d4a0b3: OUTPUT«0␤»
14:15 p6eval ..pugs: OUTPUT«␤»
14:19 amoc joined #perl6
14:20 pmurias [
14:20 pugs_svn r26626 | pmurias++ | [re-smop]
14:20 pugs_svn r26626 | pmurias++ | ported over Array
14:20 pugs_svn r26626 | pmurias++ | added .true to idconst
14:20 pugs_svn r26626 | pmurias++ | [re-mildew]
14:20 pugs_svn r26626 | pmurias++ | say calls .Str on each of it's arguments
14:24 SamB joined #perl6
14:35 Jedai joined #perl6
14:38 amoc joined #perl6
14:44 abra joined #perl6
15:10 pugs_svn r26627 | pmurias++ | [re-smop] add missing files
15:13 alester joined #perl6
15:37 pmurias joined #perl6
15:42 skids ow tragic soda spill fail
15:43 skids https://trac.parrot.org/parrot/ticket/636 <-- /me swats parrotbug
15:44 skids Should make it safe to reduce INITIAL_BUCKETS to 4 when applied
15:44 skids turned out not to be a race after all -- weird the failures were so spurious
15:56 Psyche^ joined #perl6
15:57 striccio61 joined #perl6
15:57 striccio61 left #perl6
16:22 AzureStone joined #perl6
16:26 DemoFreak joined #perl6
16:46 ejs joined #perl6
17:11 pmurias_ joined #perl6
17:17 moritz_ re
17:23 literal hi
17:26 moritz_ literal: how's your community bonding time going? ;-)
17:26 literal alright, I suppose
17:26 literal http://github.com/hinrik/grok/tree/master
17:26 literal just pushed some stuff
17:27 moritz_ nice
17:29 moritz_ code binds strongly ;-)
17:29 literal true
17:31 PhatEddy joined #perl6
17:34 PhatEddy rakudo: my %s=%*ENV; say %s<PATH>
17:34 p6eval rakudo d4a0b3: OUTPUT«/usr/local/bin:/usr/bin:/bin:/usr/games␤»
17:36 PhatEddy I'm looking at an RT that looks basically fixed (RT #57400).  There is already a test but it's in a file under spec that isn't under spectest.  What to do?
17:45 PhatEddy ok - if there is no objection to my explaining the situation and location of the test in my reply to the rt - that's what I'll do
18:02 s1n PhatEddy: i'm not so sure that's fixed
18:03 PhatEddy I could do a more elaborate example here but am leery of dumping the environment - why do you think it's still broken?
18:03 s1n rakudo: %*ENV<PATH> = 'yay'; %*ENV<PATH>.say
18:03 p6eval rakudo d4a0b3: OUTPUT«/usr/local/bin:/usr/bin:/bin:/usr/games␤»
18:03 s1n assignment and binding are not working
18:04 s1n pmichaud even said a few days ago that ENV is still mostly broken
18:05 s1n http://irclog.perlgeek.de/​perl6/2009-04-28#i_1098698
18:06 s1n i'd personally like to see that ticket stay open until i can manipulate ENV as i would expect
18:06 kirillm_ joined #perl6
18:07 PhatEddy certainly ...
18:08 justatheory joined #perl6
18:12 jnthn hi all
18:12 * jnthn is back from his day trip to Trnava
18:13 moritz_ hi jnthn, hi all
18:14 moritz_ I see a few failures in spectest
18:14 moritz_ I have local modifications, but they seem innocent
18:14 jnthn moritz_: What in?
18:14 moritz_ t/spec/S03-operators/p5arrow.t
18:14 moritz_ Failed test:  3
18:15 moritz_ t/spec/S03-operators/range.t, 45-48
18:15 jnthn let me pull and try it
18:15 moritz_ t/spec/S09-subscript_slice/slice.t, wait status 11 (segfault; has been doing that for a week now)
18:15 moritz_ t/spec/S32-container/zip.t, 11-12
18:17 jnthn moritz_: t/spec/S09-subscript_slice/slice.t - I have been seeing a segv here too.
18:17 pugs_svn r26628 | moritz++ | [t/spec] tests for external aliases in regexes
18:17 pugs_svn r26629 | moritz++ | [t/spec] external array aliases in regexes
18:17 pugs_svn r26630 | moritz++ | [t/spec] basic tests for :keepall modifier
18:17 pugs_svn r26631 | moritz++ | [t/spec] custom backslash rules in regexes
18:17 pugs_svn r26632 | moritz++ | [t/spec] basic custom traits
18:17 pugs_svn r26632 | moritz++ |
18:17 pugs_svn r26632 | moritz++ | Needs review rather badly
18:18 jnthn yay traits test :-)
18:18 pugs_svn r26633 | moritz++ | [t/spec] roles are now in S14
18:18 jnthn And ay for doing that move. :-)
18:18 pugs_svn r26634 | moritz++ | [t/spec] test for parameterized mixin
18:18 pugs_svn r26635 | moritz++ | [t/spec] s/_/-/g in some file names
18:18 pugs_svn r26636 | moritz++ | [t/spec] README: section about CWD in test files
18:18 pugs_svn r26637 | moritz++ | [t/TASKS] update; [t/spec] default block parameter type is Object
18:18 pugs_svn r26638 | moritz++ | [t/TASKS] fix fudge or harass TimToady
18:18 jnthn test for parameterized mixin - didn't we have a whole file of those? :-)
18:19 pugs_svn r26639 | moritz++ | [t/spec] prefix:<int> is gone
18:19 pugs_svn r26640 | moritz++ | [t/spec] basic tests for `lift' statement prefix
18:19 pugs_svn r26640 | moritz++ |
18:19 pugs_svn r26640 | moritz++ | Needs review very badly, I don't know if I understood it correctly
18:19 pugs_svn r26641 | moritz++ | [t/spec] more tests for lift
18:19 pugs_svn r26642 | moritz++ | [t/spec] test lifting of variables
18:19 pugs_svn r26643 | moritz++ | [t] move non-dotted-new-disallowed.t to spec/integration
18:19 pugs_svn r26644 | moritz++ | [t/spec] unfudge uc.t for Rakudo
18:20 literal moritz++
18:20 jnthn wow
18:20 moritz_ I did some work at home
18:20 jnthn moritz++ indeed
18:20 moritz_ git++
18:20 moritz_ and now git-svn did its job
18:20 literal oh yeah, git++ as well
18:22 moritz_ jnthn: I've added a test file for traits (S14-traits/basic.t), and I would appreciate some review, if you have time
18:22 moritz_ (since you proposed to implement traits I guess you've looked that the synopsis already)
18:22 moritz_ but I'm really not sure if I understood that correctly
18:23 jnthn moritz_: I'll review them sometime in the not too distant future for sure.
18:23 jnthn moritz_: In your email
18:23 jnthn sub f (lift $a + $b);
18:23 jnthn Did you mean {...}
18:23 dalek rakudo: rcddb162 | ((Moritz Lenz))++ | t/spectest.data:
18:23 dalek rakudo: t/spectest.data: passing integration test, #icu marker for uc.t
18:23 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​ddb162a685464e4abe99255ee6bad92a59af68f
18:23 dalek rakudo: rf68de36 | ((Moritz Lenz))++ | docs/ChangeLog:
18:23 dalek rakudo: [docs] typo (vim-o?) in ChangeLog
18:23 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​68de3629d211692ad9e98a6fe388b8939654702
18:24 dalek rakudo: re486ca5 | ((Moritz Lenz))++ | tools/ (2 files):
18:24 dalek rakudo: [tools] fix reading of spectest.data
18:24 dalek rakudo: Don't read the icu markers as part of the file name
18:24 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e​486ca5eae08c20147f33570e1f228fc3cc59245
18:24 dalek rakudo: rd5a8940 | ((Moritz Lenz))++ | t/spectest.data:
18:24 dalek rakudo: track moved test files (S12-role -> S14-roles)
18:24 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​5a8940dbc68959685310f2392f166cbdf88be9b
18:24 moritz_ jnthn: I did
18:24 jnthn std:  sub f (lift $a + $b);
18:24 p6eval std 26644: OUTPUT«##### PARSE FAILED #####␤Malformed block at /tmp/ut34vcR9UK line 1:␤------> [32msub f ([31mlift $a + $b);[0m␤    expecting any of:␤       parameter␤        signature␤        type_constraint␤  typename␤       whitespace␤FAILED 00:02 37m␤»
18:25 PhatEddy left #perl6
18:25 moritz_ stupid typo/thinko
18:26 masak joined #perl6
18:27 masak good Whatever, #perl6
18:28 kirillm__ joined #perl6
18:29 jnthn oh hai masak
18:29 masak jnthn: hello. how's everything going?
18:31 justatheory joined #perl6
18:31 jnthn masak: Just fine. Made a little trip to Trnava today to relax a bit.
18:31 masak nice.
18:31 jnthn Ate way too much Slovak nom.
18:31 patmat joined #perl6
18:31 masak I know the feeling.
18:32 masak I've been celebrating a friend's 30th birthday this weekend. ate way too much moose pie.
18:33 jnthn Mmm. :-)
18:33 masak indeed.
18:34 moritz_ moose pie?
18:34 jnthn use Moose;
18:34 jnthn ;-)
18:34 masak moritz_: from a moose he'd shot himself, no less.
18:34 jnthn masak: I didn't ever eat moose. I can only guess it might be a little like yak.
18:35 s1n moose pie? sounds like cow patty :/
18:35 masak jnthn: I'll confirm or deny this as soon as I've eaten yak.
18:36 masak s1n: comparing it to cow patty doesn't do it justice by far...
18:36 eternaleye joined #perl6
18:36 s1n still doesn't sound appealing
18:37 masak well, it was. I had way too much seconds, and got caught by surprise by dessert.
18:38 masak anyway, I spent most of today getting back to my home town today. the bus companies made sure, like only they can, that the first bus was late, and the second one on time. :/
18:38 jnthn masak: So did you outsourced your bus service to a UK railway company, or did the UK outsource its railway service to a Swedish bus company? :/
18:39 * jnthn had numerous stories like that from the UK railway network when he lived there
18:39 masak jnthn: I'm not sure public transport incompetence is limited to the UK.
18:39 masak jnthn: that said, there's no such thing in Sweden as "the wrong sort of snow" :P
18:40 masak there is, however, "leaf slippage" :/
18:40 jnthn Huh? Leaves are a common excuse in the UK too!
18:41 jnthn They even spent money on an ad compaign about why it's such a hard problem.
18:42 masak anyway, once the bus company realised what they had done today, they tried to bribe me complacent with a gift card. I accepted, since I wasn't that inconvenienced anyway.
18:54 moritz_ rakudo: say $*IN.get()
18:54 p6eval rakudo cddb16: OUTPUT«␤»
18:54 moritz_ evalbot control restart
18:54 masak moritz_: oh hai.
18:55 p6eval joined #perl6
18:55 masak moritz_: I can't understand why my Austrian national anthem doesn't work...
18:55 masak rakudo: say $*IN.get()
18:55 p6eval rakudo cddb16: OUTPUT«Land der Berge, Land am Strome,Land der Äcker, Land der Dome,Land der Hämmer, zukunftsreich!Heimat bist du großer Söhne,Volk, begnadet für das Schöne,vielgerühmtes Österreich,vielgerühmtes Österreich!Heiß umfehdet, wild umstrittenliegst dem Erdteil du inmitten,einem starken
18:55 p6eval ..Herze...
18:55 masak hey, was it that easy? :)
18:55 masak moritz_++
18:55 moritz_ no, it was not
18:56 moritz_ it should read them as separate lines
18:56 moritz_ what about a simple anthem.txt and a shell redirect?
18:56 masak moritz_: that was actually my next question...
18:56 masak moritz_: well, that works, I guess.
18:56 masak moritz_: but I'm curious why this doesn't.
18:58 moritz_ it's a rakudobug actually
18:58 moritz_ rakudo: say $*IN.lines(1)
18:58 p6eval rakudo cddb16: OUTPUT«Land der Berge, Land am Strome,␤»
18:58 masak moritz_: one that having an external file would fix?
18:58 moritz_ no
18:59 moritz_ it's get() which still has the magic context dependent behaviour
18:59 masak moritz_: I'm neither for or against moving it into an external file.
18:59 moritz_ when it was s/readline/get/ in the spec I did the same in rakudo
18:59 moritz_ which was not really correct, but a quick 80%-fix
18:59 moritz_ masak: whatever works for you
19:01 masak moritz_: not sure I understand by your explanation what's wanting with .get
19:02 masak do I understand you correctly that an easy fix was applied in the s/readline/get/ shift, and that a bug persists until a slightly more involved fix is applied?
19:02 jnthn moritz_: Confirm all the failures you saw.
19:02 moritz_ masak: yes. currently .get returns all lines in list context, it should return always just one
19:03 jnthn IOIterator needs to die.
19:03 masak moritz_: ok, gotcha.
19:05 moritz_ there were so many commits since Thursday that I can't say what broke it
19:05 moritz_ not without bisecting
19:06 skids jnthn: it should be safe to try INITIAL_BUCKETS=4 if you apply parrot trac#636
19:07 skids (or anyone, I'd be interested in results from other machines)
19:08 jnthn rakudo: (1 p5=> 2).WHAT.say
19:08 p6eval rakudo cddb16: OUTPUT«List()␤»
19:08 jnthn rakudo: say (1 p5=> 2) ~~ Pair
19:08 p6eval rakudo cddb16: OUTPUT«0␤»
19:08 jnthn rakudo: say (1 p5=> 2) !~~ Pair
19:08 p6eval rakudo cddb16: OUTPUT«1␤»
19:09 masak what's the difference between C<,> and C<< p5=> >> ?
19:09 jnthn masak: in theory, nothing
19:09 moritz_ masak: autoqutoiing on the LHS
19:09 jnthn rakudo: sub whatever { say @_.perl }; whatever('a' p5=> 'b', 'c' p5=> 'd');
19:10 p6eval rakudo cddb16: OUTPUT«["a", "b", "c", "d"]␤»
19:10 moritz_ rakudo: sub f { 'g' }; say (f, 4).perl
19:10 p6eval rakudo cddb16: OUTPUT«["g", 4]␤»
19:10 moritz_ rakudo: sub f { 'g' }; say (f p5=> 4).perl
19:10 p6eval rakudo cddb16: OUTPUT«"g"␤»
19:10 masak moritz_: ah, suspected that.
19:10 moritz_ but that looks wrong to me.
19:10 moritz_ rakudo:  say (f p5=> 4).perl
19:10 p6eval rakudo cddb16: OUTPUT«Could not find non-existent sub f␤current instr.: '_block14' pc 61 (EVAL_16:47)␤»
19:10 moritz_ std: f()
19:10 p6eval std 26644: OUTPUT«Undeclared routine:␤   f used at 1 ␤ok 00:02 35m␤»
19:10 moritz_ std: f p5=> 3
19:10 p6eval std 26644: OUTPUT«Undeclared routine:␤   f used at 1 ␤ok 00:02 35m␤»
19:10 moritz_ oops
19:11 moritz_ it doesn't autoquote
19:11 masak so, it's a pure synonym of C<,> ?
19:11 jnthn rakudo: sub whatever { say @_.join('|') }; whatever('a' p5=> 'b', 'c' p5=> 'd');
19:11 p6eval rakudo cddb16: OUTPUT«a b c|d␤»
19:11 * jnthn suspects the fix to join that pmichaud added
19:12 jnthn Or something related to that.
19:12 jnthn aye
19:12 jnthn is (1..5 Z <a b c>).join('|'), '1|a|2|b|3|c', 'Ranges and infix:<Z>';
19:12 jnthn That's from another file with failures.
19:13 moritz_ I always thought that p5=> did autoquoting, but created a list, not a Pair
19:13 jnthn moritz_: The test file says:
19:13 jnthn # S03:1465 says that p5=> is the same as a comma
19:13 jnthn # We'll test that it doesn't quote the LHS.
19:13 jnthn isnt(eval('my @arr = abc p5=> def;'), <abc def>, 'p5=> does not quote the LHS');
19:13 moritz_ ah
19:13 jnthn but the test looks bogus
19:13 jnthn because I figure the test meant to quote the rhs
19:14 jnthn At the moment it tests that neither are quoted rather than just the LHS.
19:14 jnthn (auto-quoted, that is)
19:14 moritz_ right
19:14 moritz_ using a sub should be cleaner
19:14 jnthn well, abc p5 => "def" would do it
19:15 moritz_ "arguments come in as positional pairs rather than named arguments." - uhm, if it doesn't construct a Pair, how can they come in as pairs?
19:16 jnthn lol fail
19:17 jnthn I'm guessing it musta menat pairs as in "one argument after the other" rather than Pairs.
19:17 moritz_ presumably
19:17 pugs_svn r26645 | moritz++ | [S05] a quantified capture that matches zero times produces a Nil
19:17 pugs_svn r26646 | moritz++ | [docs] move some Pugs specific documents to Pugs/
19:17 pugs_svn r26647 | moritz++ | [docs] remove update scripts
19:17 pugs_svn r26647 | moritz++ |
19:17 pugs_svn r26647 | moritz++ | Those are now unnecessary after the syn documents moved from perl.org
19:17 pugs_svn r26647 | moritz++ | to the pugs repo
19:18 pugs_svn r26648 | moritz++ | [S04] a few more X<...> tags
19:18 moritz_ that was the second git-svn repo that I worked on during the weekend ;-)
19:18 masak moritz_ strikes again!
19:19 moritz_ no, that was moritz (without the _) ;-)
19:22 moritz_ TimToady: in r26617 you changed some `ok try({...}), "text"' to `ok try { ... }, "text"' - that's wrong, because try is not an unary prefix (or it was not, last I looked), so ok() only gets one argument
19:23 moritz_ TimToady: but I find that behaviour of try rather unintuitive
19:27 masak moritz_: ah, like a secret identity? :)
19:28 moritz_ very secret, yes ;-)
19:28 moritz_ jnthn: you pinged me on Friday... was the timeout larger than two days? ;-)
19:31 s1n who's been working the IO stuff lately?
19:32 moritz_ git blame/svn blame is your friend ;-)
19:33 moritz_ {git,svn} {log,blame}
19:33 masak I bet it's that Old McDonald guy who's been working on the IO again...
19:33 moritz_ it really depends on what you mean. Spec? Implementation? Tests?
19:33 masak Projects?
19:34 moritz_ bugs? ;-)
19:34 masak I've been working on "IO stuff" in proto, Druid and November, chasing Rakudo...
19:34 patmat i'm a newbie to perl6, how can i make a blank or a comma between the result in this example?
19:34 patmat http://www.pastie.org/466928
19:34 s1n masak: do you know what happened to readline?
19:34 patmat the right format for the array
19:34 moritz_ s1n: $*IN.get
19:35 moritz_ patmat: @list.sort.join(', ');
19:35 s1n moritz_: was the spec updated to reflect that or is the current IO not in complete wrt getline?
19:35 jnthn moritz_: I think I was going to ask about some tests, but I figured out what to do with them...
19:35 moritz_ jnthn: ok
19:35 masak s1n: I think readline went away.
19:35 * s1n goes off to check the spec
19:35 masak s1n: now known as .get instead.
19:35 jnthn Some tests relied on wrong behavior of eval up to now.
19:36 moritz_ jnthn: the namespace thing?
19:36 jnthn moritz_: Ah, yes, that was it.
19:36 moritz_ well, since nobody implemented it correctly - not surprising at all
19:36 masak patmat: also 'say @list.sort.perl' is your friend.
19:37 patmat moritz_ thank you!
19:37 jnthn moritz_: No, not surprising. And not hard to deal with.
19:37 moritz_ rakudo: say (3.4).int
19:37 masak patmat: also, 'for 1..$zahl.sqrt' is much simpler than that C-style loop stuff.
19:37 p6eval rakudo cddb16: OUTPUT«3␤»
19:37 jnthn And IIRC just the one file.
19:37 s1n masak: .get is for the IO::Readable::Encoded, does $*IN accept that role?
19:38 patmat say @list.sort.join(', ');  doesn't work
19:38 masak s1n: you're asking the wrong abstraction astronaut, sorry. :/
19:38 moritz_ s1n: I'd be very disappointed if $*IN didn't support .get
19:38 masak rakudo: say [1,2,5,4,3].sort.join(', ')
19:38 p6eval rakudo cddb16: OUTPUT«1, 2, 3, 4, 5␤»
19:38 jnthn s1n: .get would be in the Iterator role.
19:38 moritz_ patmat: what's wrong?
19:38 s1n rakudo: my @list = <hello world how are you>; say @list.sort.join(', ');
19:38 masak patmat: yes, it does.
19:38 p6eval rakudo cddb16: OUTPUT«are, hello, how, world, you␤»
19:38 jnthn For required by the iterator role...
19:39 s1n oops, well, you get the idea
19:40 jnthn *or
19:40 s1n jnthn: so there's a Iterator::get and a IO::Readable::Encoded::get? sounds like an overly bland name to choose
19:40 jnthn It may be more that Iterator just has a stub and IO::Readable::Encoded is providing the implementation.
19:42 jnthn Rakudo's IO hasn't got stuff decomposed out into all of the various roles yet, though.
19:42 jnthn Nor does it have an Iterator role.
19:42 patmat masak, moritz_ http://www.pastie.org/466928
19:44 moritz_ patmat: script and error message don't fit together
19:44 masak indeed.
19:44 jnthn Or if they do, something is *very* wrong...
19:44 moritz_ patmat: there's no parse error in the script you pasted
19:44 patmat sorry
19:44 patmat found the error
19:44 * jnthn has a sudden cheezburger craving
19:45 patmat i accidentely typed an "," in the @list = [] got it
19:45 s1n jnthn can haz cheesburger
19:45 jnthn I was going to make bacon sandwiches but then realized...no brown source. :-O
19:45 jnthn erm
19:45 jnthn sauce
19:45 moritz_ lol
19:45 jnthn .oO( you know you program too much when... )
19:46 ab5tract joined #perl6
19:47 s1n yes, i always make sure my food has brown sources before compiling :)
19:48 moritz_ FYI, I updated some of the posts on http://perlgeek.de/blog-en/perl-5-to-6/ (spelling, recent spec changes, rakudo improvements), and made sure that their order won't change when I touch one of the posts
19:48 moritz_ for example =$*IN -> *$IN.lines
19:49 masak moritz_++
19:49 moritz_ I also mailed the ironman people and asked why my blog disappeared from their blog roll
19:51 moritz_ now I wonder why some of my changes didn't make it to the blog...
19:55 moritz_ ah, because I kept generated files under version control... what a stupid idea...
19:56 moritz_ so far I didn't dare to look into my RT
19:56 moritz_ only four tickets assigned to me... could be worse
19:59 pugs_svn r26649 | moritz++ | [t/spec] test for Classname.perl (RT #65260)
20:01 moritz_ rakudo: enum A <b c>; say (a < *).WHAT
20:01 p6eval rakudo cddb16: OUTPUT«Could not find non-existent sub a␤current instr.: '_block20' pc 53 (EVAL_20:43)␤»
20:01 moritz_ rakudo: enum A <b c>; say (b < *).WHAT
20:01 p6eval rakudo cddb16: OUTPUT«Block()␤»
20:01 patmat how can I check if a number is element of an array?
20:02 moritz_ if any(@array) == $number { ... }
20:02 patmat thx
20:05 pugs_svn r26650 | moritz++ | [t/spec] tests for Enums and Whatever star (RT #63880)
20:05 s1n rakudo: multi method foo(Str $what) { say $what }; my %h = ('foo' => &foo); %h<foo>('hello world');
20:05 p6eval rakudo cddb16: OUTPUT«invoke() not implemented in class 'ResizablePMCArray'␤current instr.: '_block14' pc 137 (EVAL_19:65)␤»
20:06 s1n rakudo: method foo(Str $what) { say $what }; my %h = ('foo' => &foo); %h<foo>('hello world');
20:06 p6eval rakudo cddb16: OUTPUT«too few arguments passed (1) - 2 params expected␤current instr.: 'foo' pc 143 (EVAL_19:67)␤»
20:06 s1n rakudo: sub foo(Str $what) { say $what }; my %h = ('foo' => &foo); %h<foo>('hello world');
20:06 p6eval rakudo cddb16: OUTPUT«hello world␤»
20:06 s1n what's wrong with those first two snippets?
20:06 moritz_ what's the meaning of a method outside a class?
20:07 moritz_ as for the second, I guess that Rakudo tries to fill the argument list for self and $what, thus expects 2 params
20:07 moritz_ and you give it only one
20:08 masak moritz_: ISTR named methods outside of classes were banned at some point.
20:08 masak ...in Rakudo.
20:08 s1n that same bit with the methods still fails within classes
20:08 masak if not, the RT ticket I submitted about it ought still be open.
20:09 moritz_ s1n: so what's the invocant of %h<foo>?
20:09 masak rakudo: class A { method foo() {}; foo }
20:09 p6eval rakudo cddb16: OUTPUT«too few arguments passed (0) - 1 params expected␤current instr.: 'parrot;A;foo' pc 113 (EVAL_21:71)␤»
20:09 moritz_ whenever you take a reference to a method you have to make clear how the invocant is passed
20:09 s1n moritz_: how do you do that?
20:10 s1n i was trying to pass manually, but i was still having troubles
20:10 s1n i.e. %h<foo>(self, otherparam)
20:10 moritz_ s1n: by saying -> $x { self.foo($x) } instead of &foo, for example
20:10 moritz_ ie explicit currying
20:10 moritz_ I don't know if there's a different solution specced for it
20:11 s1n moritz_: i don't quite get that snippet...
20:11 moritz_ s1n: the '-> $x { ... }' constructs a closure...
20:11 s1n is that how i'd put it in the hash?
20:12 moritz_ yes
20:12 s1n oh, what's the $x? the invocant?
20:12 moritz_ no, the parameter passed to .foo()
20:12 moritz_ the invocant self
20:12 moritz_ of course that only works inside a class
20:12 patmat http://www.pastie.org/466928 done
20:12 masak rakudo: constant self = 4
20:12 p6eval rakudo cddb16:  ( no output )
20:13 patmat hooray
20:13 masak rakudo: constant self = 4; self.say
20:13 p6eval rakudo cddb16: OUTPUT«4␤»
20:13 masak hehehe.
20:13 masak moritz_: not just within a class...
20:13 moritz_ masak: you're evil.
20:13 s1n where can i read about this in the spec? i'm still kinda confused as to what i need to change
20:13 payload joined #perl6
20:13 * masak smiles broadly
20:14 masak s1n: S04.
20:14 masak s1n: S12.
20:14 jnthn I can't believe self lets you do that...
20:14 jnthn erm, constant
20:14 jnthn :-)
20:15 moritz_ rakudo: class A { method b { hash(a=> -> $x { self.c($x) }) }; method c($c) { say "got $c } }; A.new().b().<a>.("foo")
20:15 p6eval rakudo cddb16: OUTPUT«Statement not terminated properly at line 1, near "foo\")"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)␤»
20:15 masak moritz_: "got $c
20:15 moritz_ rakudo: class A { method b { hash(a=> -> $x { self.c($x) }) }; method c($c) { say "got $c" } }; A.new().b().<a>.("foo")
20:15 moritz_ masak++
20:15 p6eval rakudo cddb16: OUTPUT«invoke() not implemented in class 'Undef'␤current instr.: '_block14' pc 108 (EVAL_22:55)␤»
20:15 moritz_ rakudo: class A { method b { hash(a=> -> $x { self.c($x) }) }; method c($c) { say "got $c" } }; A.new().b().perl.say
20:16 p6eval rakudo cddb16: OUTPUT«{}␤»
20:16 moritz_ so it returns an empty hash? WTF?
20:16 moritz_ rakudo: class A { method b { my %H = a=> -> $x { self.c($x) }; return %H }; method c($c) { say "got $c" } }; A.new().b().perl.say
20:16 p6eval rakudo cddb16: OUTPUT«{"a" => { ... }}␤»
20:16 moritz_ rakudo: class A { method b { my %H = a=> -> $x { self.c($x) }; return %H }; method c($c) { say "got $c" } }; A.new().b().<a>.("foo")
20:16 p6eval rakudo cddb16: OUTPUT«got foo␤»
20:16 moritz_ s1n: that's how it works
20:16 s1n heh
20:17 moritz_ masak: bug?
20:17 masak moritz_: I'm confused.
20:17 masak moritz_: could you boil it down a bit for a tired old brain like me?
20:18 s1n wow that's a lot more than i bargined for
20:18 moritz_ rakudo: class A { method b { hash(a=> "something") };  }; A.new().b().perl.say
20:18 p6eval rakudo cddb16: OUTPUT«{}␤»
20:18 moritz_ masak: better?
20:19 masak moritz_: are the class and the method really needed?
20:19 moritz_ rakudo: say (hash(a => '3' )).perl
20:19 p6eval rakudo cddb16: OUTPUT«{}␤»
20:19 moritz_ no.
20:19 masak now we're talking.
20:19 * masak submits rakudobug
20:19 moritz_ wait a sec
20:19 moritz_ let me look up the semantics of hash() first
20:20 moritz_ seems to specced allright
20:20 masak sure.
20:20 masak moritz_: meaning... no bug?
20:20 moritz_ no, it's specced as I expected
20:20 moritz_ If you wish to be less ambiguous, the C<hash> list operator will
20:20 moritz_ explicitly evaluate a list and compose a hash of the returned value,
20:20 moritz_ while C<sub> introduces an anonymous subroutine:
20:20 moritz_ (from S04)
20:21 * masak submits rakudobug
20:21 moritz_ S04:1187
20:21 moritz_ masak: thank you
20:21 masak it's what I do. :)
20:22 moritz_ no less reason to thank you ;-)
20:22 pugs_svn r26651 | moritz++ | [t/spec] tests for RT #63250, ranges from Enum values
20:24 patmat is there a function in perl6 to generate a random number?
20:24 moritz_ sure
20:24 masak rakudo: say rand
20:24 p6eval rakudo cddb16: OUTPUT«0.986136178792552␤»
20:24 moritz_ rakudo: say 10.rand
20:24 p6eval rakudo cddb16: OUTPUT«3.40147722120495␤»
20:24 masak rakudo: say (1..10).pick
20:24 patmat i'm writing a little example game hehe
20:24 moritz_ rakudo: say (^10).pick
20:24 p6eval rakudo cddb16: OUTPUT«8␤»
20:24 p6eval rakudo cddb16: OUTPUT«5␤»
20:24 moritz_ masak: ha, my random number is better than yours ;-)
20:25 masak moritz_: fsvo.
20:25 patmat .pick ?
20:25 moritz_ randomly picks an item from a list
20:25 jnthn Whoa. I'd forgotten just how awesome fried bread tastes.
20:25 patmat ah great
20:26 * jnthn quickly tries to forget again
20:26 patmat ohhh this channel rocks :D
20:26 masak rakudo: enum Month <January February March>; say Month.pick
20:26 p6eval rakudo cddb16: OUTPUT«2␤»
20:26 masak rakudo: enum Month <January February March>; say Month.pick.name
20:26 p6eval rakudo cddb16: OUTPUT«Method 'name' not found for invocant of class 'List'␤current instr.: 'parrot;P6metaclass;dispatch' pc 243523 (src/gen_actions.pir:23399)␤»
20:26 jnthn fail
20:26 patmat i'm learning perl6 at the moment, very tough!!!
20:26 jnthn masak: pick returns a list.
20:26 moritz_ patmat: that's why it has so many people in here - or the other way round ;-)
20:26 masak jnthn: oh :)
20:26 masak rakudo: enum Month <January February March>; say Month.pick[0].name
20:26 p6eval rakudo cddb16: OUTPUT«February␤»
20:27 jnthn masak: but yeah, that did surprise me too...
20:27 patmat i'm just a newbie now :( for me it's very hard to program
20:27 masak patmat: this channel rocks!
20:27 masak patmat: we're all Perl 6 newbies.
20:27 moritz_ I wonder if it should really do that (returning a list)
20:27 patmat hehe
20:27 masak moritz_: no.
20:27 masak moritz_: it should return a Capture.
20:27 moritz_ meh.
20:27 masak moritz_: but no-one has changed the spec yet.
20:27 patmat my girlfriend studys math and learns some Java in the university
20:27 jnthn Even in that case
20:27 patmat we learn perl6 together that makes it easier
20:27 jnthn we wouldn't be able to just do .name on it
20:28 masak patmat: sounds wonderful.
20:28 jnthn I wonder if .pick and .pick(1) should just return the item itself...
20:28 jnthn patmat: That sounds fun!
20:28 patmat yup
20:28 ab5tract it's a wild frontier.
20:28 masak jnthn: worksforme.
20:28 patmat shes unbeatable at math-examples
20:28 patmat i'm bad at math..
20:28 jnthn masak: Maybe we should ask on p6l first.
20:29 jnthn masak: It's a discontinuity...but it might be a worthwhile one...
20:29 masak jnthn: I'm too tired right now.
20:29 moritz_ patmat: that's why she studies math, and not you ;-)
20:29 jnthn masak: Yeah same... ;-)
20:29 jnthn OK, there's tomorrow.
20:29 patmat morith_ yup that could be :D
20:29 masak jnthn: I think the Capture idea was made to reduce the discontinuity.
20:29 patmat i hope perl6 will get successful at companies for jobs
20:29 patmat i want my helpdesk job be past!!
20:30 jnthn masak: AFAIU, a method call on a returned capture would still be a call on the capture...but maybe I don't understad the latest capture design too. :-)
20:31 ab5tract patmat, that might take a little time... but its also inevitable, so take comfort ;)
20:31 masak jnthn: I'm tired your sentence was TLDR. :P
20:31 payload1 joined #perl6
20:32 patmat ab5tract: good for me, it takes time that i'm goot at the perl6 language :P
20:32 payload joined #perl6
20:32 patmat good
20:32 payload joined #perl6
20:33 s1n bleh, this is giving me grief
20:33 s1n rakudo: class A { has %.H = (a => -> $x { self.c($x) }); method c($c) { say "got $c" }; method test { %.H<a>.("foo").say; }; }; A.new().test();
20:33 pugs_svn r26652 | moritz++ | [t/spec] tests for .pick on enums
20:33 p6eval rakudo cddb16: OUTPUT«Lexical 'self' not found␤current instr.: 'parrot;A;_block27' pc 243 (EVAL_24:111)␤»
20:33 masak s1n: in fact, 'self' is not defined at the place you're using it.
20:34 masak s1n: only use it from within methods.
20:34 moritz_ but why? `self' in class should just refer to the class (formerly proto object), no?
20:34 masak hm.
20:34 s1n it exists, it should
20:34 masak rakudo: class A { self }
20:34 p6eval rakudo cddb16: OUTPUT«Lexical 'self' not found␤current instr.: 'parrot;A;_block20' pc 94 (EVAL_18:66)␤»
20:35 s1n that seems wrong to me
20:35 masak this come up once in a while.
20:35 moritz_ s1n: feel free to submit that as a bug... if jnthn or pmichaud disagree they'll say so on the ticket
20:35 s1n so what does everyone else far wiser than i resolve to do?
20:35 masak I believe we should adopt one or two simple principles, and run with them consistently.
20:36 masak those principles haven't been nailed down, however.
20:36 s1n masak: i agree, i seem to be having trouble with runtime versus compile
20:36 masak s1n: not just you.
20:36 moritz_ s1n: in the end, what do you want to do?
20:36 masak s1n: I struggle with that a lot in my class design.
20:36 s1n moritz_: i want to dispatch methods to a class via a hash
20:37 jnthn `self' in class should just refer to the class -> the more I think about this, the more I worry people are going to get burned by it...
20:37 moritz_ s1n: maybe 'handles' in S12 can take some of your pain away
20:37 masak rakudo: class A { has $.a = 42; has $.b = $.a }
20:37 p6eval rakudo cddb16: OUTPUT«Lexical 'self' not found␤current instr.: 'parrot;A;_block20' pc 128 (EVAL_21:69)␤»
20:38 masak there are subtle problems here, to be sure...
20:38 ab5tract can that be right?
20:38 jnthn rakudo: class A { has $.a = .c; method c { 42 } }; say A.new.a
20:38 s1n moritz_: that might be an alternative, but the current behavior is not dwim
20:38 p6eval rakudo cddb16: OUTPUT«Method 'c' not found for invocant of class 'Failure'␤current instr.: 'parrot;P6metaclass;dispatch' pc 243523 (src/gen_actions.pir:23399)␤»
20:38 moritz_ now *that* surely looks like it should just work
20:38 masak ab5tract: well, I know what's wrong with it.
20:38 masak ab5tract: I just want it to work anyway. :)
20:38 ab5tract oh, i meant i don't see anything wrong with it
20:38 ab5tract so we are in the same boat :)
20:38 LadyLunacy joined #perl6
20:39 masak ab5tract: indeed. except I know what's wrong with it. :)
20:39 jnthn I think the answer is "the RHS is a closure but actually wants to become an anonymous method with the current instance we're constructing passed in"
20:39 masak jnthn: .c calls the method on $_
20:39 jnthn Which may even be spec.
20:39 moritz_ jnthn: that sounds right to me
20:39 ab5tract masak, yes, you're end of the boat is fancier ;)
20:39 jnthn masak: Yeah, I was wondering if we were passing it in and it was just ending up in $_ but not self.
20:39 jnthn But apparently not.
20:40 jnthn File a ticket if there isn't one. It may be an easy fix. Especially given I gotta review all the construction stuffs anyway.
20:40 patmat LadyLunacy: \o/
20:40 s1n jnthn: on which problem? :)
20:40 LadyLunacy :P
20:40 masak LadyLunacy: welcome. I surmise you're related to patmat.
20:40 jnthn s1n: masak's one will do
20:41 masak jnthn: I'm inoperative at this point.
20:41 patmat masak hehehe
20:41 masak jnthn: I will submit tomorrow, if no-one beats me to it.
20:41 LadyLunacy thats right :D
20:41 jnthn masak: Sure
20:42 s1n which one best describes it? this one(?): rakudo: class A { has $.a = 42; has $.b = $.a }
20:42 masak LadyLunacy: I've been thinking of how to get more women to start programming Perl 6. do you have any suggestions?
20:42 s1n shave :)
20:42 masak s1n: I think there's a bug for that one in RT.
20:42 jnthn masak: I expect next day or two I'll be doing more design work on Rakudo than code work, but hope to get the building and so on stuff beaten into a better shape into the not too distant future.
20:43 jnthn s1n: that's the one I meant, but it may already be there.
20:43 LadyLunacy masak, no idea.. all my friends hate programming :)
20:43 LadyLunacy maybe thats because we have to learn java at university
20:43 LadyLunacy :D
20:43 masak LadyLunacy: probably. :)
20:43 moritz_ ;-)
20:43 masak LadyLunacy: so, why don't you hate programming?
20:44 ab5tract gar, why does #parrot insist on being on a different IRC server?
20:44 s1n masak: i'll let you file the bug because i'm not sure how to explain what doesn't work :/
20:44 LadyLunacy hm i guess i like solving problems
20:44 masak s1n: I've stopped caring about explaining things long ago. I just quote from IRC. :)
20:45 masak s1n: what matters in a bug report is two things, basically: (1) an observable, something that you can observe being fixed (2) you're done!
20:45 moritz_ LadyLunacy: so this means we have to find more women with problems? ;-)
20:46 * jnthn going to do other bits and pieces...expect I'll be around and doing Perl 6 stuff lots in the next week. :-)
20:46 masak wohoo!
20:46 jnthn see you all tomorrow
20:46 masak jnthn: 'nite.
20:46 s1n masak: okay then, i'll quote the snippet that started this mess :)
20:46 masak s1n++
20:46 * masak yawns
20:47 masak well, see you all tomorrow.
20:47 LadyLunacy moritz_, maybe :P
20:56 ab5tract moritz_, have you heard of the imbroglio in the Ruby community re: women in OSS recently?
20:56 moritz_ ab5tract: yes
20:57 ab5tract i hope perl6 can be different from the beginning
20:57 ab5tract and i believe it can
20:57 moritz_ that would be nice
20:58 ab5tract even the very reaction of the Ruby community to the callous privileged bigotry is a good sign for the Ruby community
20:58 ab5tract because there were more people pissed that DHH / Rails activists could be so dismissive
20:58 moritz_ (I immediately thought of http://yapc.tv/2008/ye/lt/lt2-15-kane-fck/ but that wasn't offensive, IMHO
20:59 ab5tract well, language versus sexual imagery is different
20:59 kane__ moritz_: a few expletives, that's it i think
20:59 ab5tract when only 6 out 200 people at your conference are women
20:59 ab5tract more specifically male hetronormative sexual imagery
21:00 ab5tract as the presentation was biased that way
21:00 ab5tract ANYHOW
21:00 moritz_ kane__: I very much enjoyed watching it on yapc.tv ;-)
21:00 kane__ thanks :)
21:00 ab5tract main point is that the progression of that debate provides many clues as to how perl6 can be different
21:01 moritz_ ab5tract: yes
21:02 moritz_ kane__: especially your first sentence, "this is not a Perl 6 talk" ;-)
21:05 amoc joined #perl6
21:20 patmat http://www.pastie.org/467035
21:20 patmat why so?? :(
21:21 moritz_ $*IN.get; returns a Str
21:21 moritz_ not an Int
21:21 moritz_ either remove the type constrait
21:21 moritz_ *constraint
21:21 patmat so what do i need?
21:22 moritz_ or say $*IN.get.int
21:22 moritz_ rakudo: say $*IN.get.int;
21:22 p6eval rakudo cddb16: OUTPUT«Could not locate a method 'int' to invoke on class 'IOIterator'.␤current instr.: 'die' pc 16538 (src/builtins/control.pir:225)␤»
21:22 moritz_ not good.
21:22 moritz_ rakudo: say +($*IN.get).int;
21:22 p6eval rakudo cddb16: OUTPUT«Could not locate a method 'int' to invoke on class 'IOIterator'.␤current instr.: 'die' pc 16538 (src/builtins/control.pir:225)␤»
21:22 moritz_ rakudo: say (+($*IN.get)).int;
21:22 p6eval rakudo cddb16: OUTPUT«Method 'Num' not found for invocant of class 'IOIterator'␤current instr.: 'parrot;Perl6Object;' pc 1256 (src/classes/Object.pir:709)␤»
21:23 moritz_ not good either
21:23 moritz_ rakudo: say (+$*IN.lines(1)).int;
21:23 p6eval rakudo cddb16: OUTPUT«1␤»
21:23 patmat that should be a simple game as you see
21:23 moritz_ rakudo: say (+$*IN.lines(1)[0]).int;
21:23 p6eval rakudo cddb16: OUTPUT«0␤»
21:23 moritz_ that works, but it feels soooo wrong
21:25 moritz_ rakudo: my $x = $*IN.get; say +$x;
21:25 p6eval rakudo cddb16: OUTPUT«0␤»
21:25 moritz_ that works better.
21:28 s1n rakudo: my $x = +$*IN.get; say $x;
21:28 p6eval rakudo cddb16: OUTPUT«Method 'Num' not found for invocant of class 'IOIterator'␤current instr.: 'parrot;Perl6Object;' pc 1256 (src/classes/Object.pir:709)␤»
21:29 * s1n store while waiting for results :/
21:34 moritz_ I just tried to fix IO.get, but I failed
21:35 patmat (+$*IN.lines(1)).int;
21:35 patmat ahh
21:35 patmat thats it to show an int???
21:35 patmat looks a bit terrible
21:36 moritz_ not quite, because .lines returns a list
21:36 moritz_ so that will give you always 1
21:36 moritz_ yes, it's terrible
21:36 patmat so how is the simplest way to make the .get function for .int ?
21:36 moritz_ my $s = $*IN.get; my Int $i = $x.int; is better
21:36 moritz_ rakudo: say (~$*IN.get).int
21:37 p6eval rakudo cddb16: OUTPUT«0␤»
21:37 moritz_ that's another workaround
21:37 patmat :D
21:37 moritz_ first turn it into a Str, then into an Int ;-)
21:37 patmat that must be fixed
21:37 moritz_ aye
21:37 patmat $*IN.get.int should work
21:37 * moritz_ submits ticket
21:37 patmat ye :)
21:42 moritz_ http://rt.perl.org/rt3/Tic​ket/Display.html?id=65348 there you go
21:42 patmat http://www.pastie.org/467035
21:42 patmat look at it, it runs the program. but it doesn't work right
21:43 patmat great moritz_ :)
21:44 moritz_ that's scary.
21:44 patmat you see
21:44 patmat why the hell is it 2? :D
21:44 patmat it looks like the interpreter ignores everything :P
21:45 moritz_ wait a sec, I have to recompile rakudo
21:45 patmat okay, why? :P
21:45 moritz_ I had local changes
21:45 moritz_ that screwed it all up
21:46 moritz_ meh
21:46 moritz_ too late to detect jokes
21:46 patmat :/
21:48 moritz_ so $zufallszahl is 65, but $zufallszahl+1 is 2?
21:49 moritz_ ah
21:49 patmat haha yes
21:49 moritz_ as masak said earlier, (1..100).pick returns a list
21:49 moritz_ of one element
21:50 moritz_ when you print it, you simply see the element
21:50 moritz_ when you use it as a number, it does arithmetic with the number of arguments
21:50 moritz_ when you do a 'say $zufallszahl.perl' you'll see what I mean
21:51 moritz_ $thing.perl gives you a short Perl program that evaluates back to $thing
21:51 moritz_ rakudo: say (1..100).pick.perl
21:51 p6eval rakudo cddb16: OUTPUT«[16]␤»
21:51 moritz_ rakudo: say (1..100).pick[0].perl
21:51 p6eval rakudo cddb16: OUTPUT«100␤»
21:51 moritz_ which also explains the type mismatch
21:51 moritz_ which I attributed to the line with $zahl = $*IN.get
21:54 moritz_ patmat: that's how I'd write it (spoiler): http://www.pastie.org/467068
21:57 patmat moritz_ for me it was haaaard
21:57 patmat but thanks for this one :D
21:58 patmat do you speak german??
21:59 moritz_ patmat: yes. I even write German ;-)
21:59 LadyLunacy ^
21:59 LadyLunacy *^^
22:00 moritz_ patmat: actually if you look for German Perl 6 stuff, I wrote some articles for the iX (from Heise Verlag), (April, May and June issues)
22:00 patmat i know iX
22:00 patmat du heisst ja auch moritz_!
22:00 moritz_ http://perl-6.de/ is also mine, but a bit outdate
22:00 patmat hahaha thats what i read!! actually
22:01 patmat do you update it? because you should!!
22:01 patmat for example = =$*IN to = $*IN.get
22:01 moritz_ I do, once in a while
22:01 moritz_ oh yes, I should change that
22:02 patmat but great tutorial \o/
22:02 moritz_ thank you
22:02 patmat do you have another one thats good like yours?
22:03 patmat i hope the first Perl6 version will be released soon
22:03 moritz_ there's another german Perl 6 writer, lichtkind... his stuff is here: http://wiki.perl-community​.de/cgi-bin/foswiki/view/
22:03 patmat ah already have this one, thanks :)
22:04 patmat i hope there won't be changed much in the syntax until the first release
22:04 patmat sonst muss ichs umlernen!!
22:05 moritz_ well, the changes won't be very drastic, I hope
22:06 patmat moritz_: are you a programmer as profession?
22:06 patmat jobdings
22:06 moritz_ patmat: not really
22:06 patmat oh, so what is your job?
22:06 moritz_ patmat: I study physics, and do some programming for my diploma thesis
22:06 patmat ahh ok :))
22:06 moritz_ but I have been paid for programming as well
22:06 moritz_ mostly just short jobs
22:07 LadyLunacy moritz_, so you know something about maths i guess?
22:07 patmat moritz_ in which languages?
22:07 patmat i began with Ruby for a while, but i think i like perl6 better :)
22:07 moritz_ patmat: C++ and Perl 5
22:07 moritz_ LadyLunacy: I hope ;-)
22:07 patmat oh ok
22:07 moritz_ Perl 6 is "just for fun" for me, at least today
22:08 LadyLunacy moritz_, there two problems i'm stuck on.. maybe you could help me? :D
22:08 moritz_ LadyLunacy: I can try... /msg me if they are not Perl related
22:10 meppl good night
22:10 LadyLunacy baba meppl :D
22:10 patmat tschüss meppl
22:10 meppl ;)
22:11 patmat moritz_ thanks for your example, it works nice! and i learned something new :)
22:11 moritz_ patmat: the beginners tutorial is still *very* incomplete... but feedback would be appreciated
22:13 patmat moritz_ i will do a lot of perl6 in next time, so youll hear from me :PP
22:14 moritz_ patmat: nice. And I just removed =$*IN from the pages.
22:14 patmat :) gnight
22:16 moritz_ same to you, sir
22:16 moritz_ (and corresponding lady)
22:16 eMaX joined #perl6
22:17 LadyLunacy yep, good night
22:30 payload1 joined #perl6
22:36 Whiteknight joined #perl6
22:43 payload joined #perl6
23:03 pmichaud the spectest failures are due to @_ not working properly.
23:07 SamB joined #perl6
23:07 payload1 joined #perl6
23:08 pmichaud I'm already working on a fix, but got distracted earlier today.
23:13 PacoLinux joined #perl6
23:22 ZuLuuuuuu joined #perl6
23:46 awarefish joined #perl6

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

Perl 6 | Reference Documentation | Rakudo