Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-12-27

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:06 MayDaniel left #perl6
00:08 lue hai masak o/
00:09 masak greetings, earthling.
00:11 masak lue: <!alpha> isn't too illogical if you ask me. the <? and <! assertions are reserved for booleanish things that don't move the position within the regex match, whereas <+ and <- are reserved for things that do.
00:11 lue hopefully not after genetic recoding is invented >:)
00:11 masak genetic recoding already exists in various forms. one is called "sexual recombination", another is called "cosmic rays".
00:12 lue aah. Well, it was illogical from my regex-beginner POV :)
00:12 masak they are special cases of the all-out thing, admittedly.
00:13 lue .oO(Finally! I have invented purposeful genetic recoding! Step 1: Two hearts...)
00:17 lue I got things mostly working again (and w/ actions!), but I've encountered the same problem as before where the program goes through a list of possibilities, and doesn't start over. [e.g. the first part matches the first possibility, the second the second possibility, but the third part doesn't match the first possibility as it should.]
00:18 masak this conversation would be much helped if you could demonstrate with a minimal program what surprise it is you're encountering.
00:19 masak talking *about* bugs, trying to describe them, is like trying to eat a drawing of a sandwich.
00:21 lue sorry. I'll try to whip up a minimal example. Funny thing is, I encountered this type of problem before, and I don't remember how I fixed it.
00:21 masak no need to apologise. :) I just find it exceedingly useful to show code to each other.
00:23 masak rakudo: grammar G { regex TOP { <foo> }; rule foo { fo*o } }; say ?G.parse("foo")
00:23 p6eval rakudo cae7f9: OUTPUT«Bool::False␤»
00:23 masak could be something like this you're attempting.
00:23 masak rakudo: grammar G { regex TOP { <foo> }; regex foo { fo*o } }; say ?G.parse("foo")
00:23 p6eval rakudo cae7f9: OUTPUT«Bool::True␤»
00:23 masak regex backtracks, token and rule don't.
00:25 lue Funny, it may be a problem with my actions and/or the possibly convoluted grammar. This'll take a few minutes :)
00:40 lue ha! It was a missing \n after the $$ in my <blankline> regex.
00:42 envi joined #perl6
00:43 masak nice catch.
00:43 masak (oh, and use tests. you'll thank yourself.)
00:46 lue I am, but probably not well :)
00:46 masak ah :)
00:47 Eevee left #perl6
00:47 masak well, a good test for that is this: did your fixing the bug you just found result in a corresponding increase in passing tests in the test suite?
00:48 masak if not, then your test suite needs at least one more test :)
00:50 lue no, because there are multiple problems with my code :)
00:50 lue I shall add a test for it though.
00:51 lue rakudo: grammar A { regex B { <C>+ }; regex C { Cc }; }; class AA { method B($/) { make $<C>».ast }; method C($/) { make ~$/ }; }; say A.parse("CcCcCc", :rule<B>, :actions(AA.new())).ast;
00:51 p6eval rakudo cae7f9: OUTPUT«Cc Cc Cc␤»
00:52 lue rakudo: grammar A { regex B { <C>+ }; regex C { Cc }; }; class AA { method B($/) { make $<C>».ast }; method C($/) { make ~$/ }; }; say A.parse("CcCcCc", :rule<B>, :actions(AA.new())).ast[0];
00:52 p6eval rakudo cae7f9: OUTPUT«Cc␤»
00:52 masak \o/
00:52 lue rakudo: grammar A { regex B { <C>+ }; regex C { Cc }; }; class AA { method B($/) { make $<C>».ast }; method C($/) { make ~$/ }; }; my @a = A.parse("CcCcCc", :rule<B>, :actions(AA.new())).ast; say @a[0];
00:52 p6eval rakudo cae7f9: OUTPUT«Cc Cc Cc␤»
00:52 lue storing in an array breaks it :/ Any idea as to why? /me prepares for obvious answer
00:52 masak rakudo: grammar A { regex B { <C>+ }; regex C { Cc }; }; class AA { method B($/) { make $<C>».ast }; method C($/) { make ~$/ }; }; my @a = A.parse("CcCcCc", :rule<B>, :actions(AA.new())).ast.list; say @a[0];
00:52 p6eval rakudo cae7f9: OUTPUT«Cc␤»
00:53 lue ah, danke
00:53 masak rakudo: my @a = 1, 2, 3; say @a.elems; my @b = [1, 2, 3]; say @b.elems
00:53 p6eval rakudo cae7f9: OUTPUT«3␤1␤»
00:53 masak does the above make sense?
00:53 masak it's the same effect.
00:55 sorear good * #perl6
00:56 lue yes. Now my tests fail the way I would expect them to! \o/ [ I had the bright idea of comparing an object in the ast tree (e.g. @a[0]) with a separately created, but otherwise identical, object :) ]
00:56 lue hello sorear o/
00:56 masak good now, sorear!
00:56 masak I accidentally some tickets for you on github :)
00:57 lue .oO(I just realized I made the same boo-boo as people who say 'ATM machine')
00:57 masak sorear: expect more of the same in the next few days.
00:57 icwiener left #perl6
00:57 masak lue: http://en.wikipedia.org/wiki/RAS_syndrome
00:59 sorear masak: thanks!
00:59 sorear who maintains content for Rakudo.org?
01:00 masak pm does. and a few others too, I think.
01:00 masak why, is there spam?
01:01 sorear thegattaca++ mentioned in backlog that how to get rakudo has a stale link to svn.pugscode.org
01:01 masak ah; yes.
01:02 masak seems I have an account.
01:02 masak found the stale link. replacing.
01:04 thegattaca ty
01:04 masak thegattaca++ # discovering it in the first place
01:08 * masak heads sleepwards
01:08 masak 'night, zebras.
01:08 masak left #perl6
01:10 Khisanth left #perl6
01:17 softcoder_ left #perl6
01:23 rgrau left #perl6
01:25 lue afk
01:26 shi left #perl6
01:28 QinGW joined #perl6
01:32 masonkramer left #perl6
01:32 masonkramer joined #perl6
01:36 soroush joined #perl6
01:37 kcwu left #perl6
01:37 plobsing left #perl6
01:37 plobsing joined #perl6
01:42 roen joined #perl6
01:49 lopaway is now known as lopnor
01:50 dalek niecza: df2552f | sorear++ | niecza_eval:
01:50 dalek niecza: Compile-and-run mode passes extra args to program
01:50 dalek niecza: review: https://github.com/sorear/niecza/commit/df2552fd24
02:03 noganex_ joined #perl6
02:05 noganex left #perl6
02:11 Eevee joined #perl6
02:11 Khisanth joined #perl6
02:12 Eth4n joined #perl6
02:16 vastak left #perl6
02:24 adu joined #perl6
02:29 redicaps joined #perl6
02:33 lopnor is now known as lopaway
02:35 molaf_ joined #perl6
02:39 molaf left #perl6
02:47 Eth4n left #perl6
02:47 Eth4n joined #perl6
03:15 dalek niecza: 41acd2e | sorear++ | lib/CLRBackend.cs:
03:15 dalek niecza: Fix $/ regression
03:15 dalek niecza: review: https://github.com/sorear/niecza/commit/41acd2e8b8
03:29 jameswhite left #perl6
03:30 literal left #perl6
03:30 Pacosani left #perl6
03:33 thegattaca left #perl6
03:34 molaf_ left #perl6
03:35 literal joined #perl6
03:35 cataska joined #perl6
03:50 khisanth_ joined #perl6
03:51 Khisanth left #perl6
03:52 coldhead left #perl6
03:54 khisanth__ joined #perl6
03:56 khisanth_ left #perl6
03:59 pmurias joined #perl6
03:59 pmurias sorear: hi
03:59 sorear pmurias!
03:59 sorear hi
04:00 pmurias does niecza currently run an spec tests?
04:00 * sorear just noticed that github issue IDs are not stable.  FAIL.
04:00 pmurias a* any
04:01 sorear pmurias: not on an automatic basis, no
04:01 khisanth__ left #perl6
04:01 sorear the spectests love to put all failing tests in evals, because "a good implementation will catch this at compile time"
04:01 sorear so I need a *fast* eval
04:02 sorear it would be theoretically possible to add eval right now, but at 5 seconds it would be useless for spectesting
04:03 pmurias what takes so long?
04:04 sorear loading Perl, loading STD.pmc, loading SAFE.store
04:05 pmurias having an reusable instance of Niecza could workaround that
04:06 pmurias i used a similiar trick for having a single mildew run multiple tests
04:07 pmurias i haven't tried it for eval but it should work
04:09 pmurias sorear: is adding simple features to pass non-eval using spectests something i should hack on?
04:10 sorear pmurias: yes
04:11 sorear in the past I've been operating under a fear of making the setting too big
04:11 sorear but I've found an effective workaround
04:11 allbery_b how about speculatively parsing/compiling inside eval at compile time?
04:11 sorear allbery_b: gross
04:12 allbery_b dunno, strikes me as an optimization.  coimpare p5 eval BLOCK
04:12 Eth4n left #perl6
04:12 pmurias sorear: seems to be sufficently smart constant folding
04:13 allbery_b (under any other circumstances I'd agree it's gross, but this *is* perl :)
04:13 pmurias if you fold 1+2 into 3 why not fold eval "1+2" into 3
04:14 allbery_b prertty much, yes.  also, it'd be interesting to move as much of an eval into compile time as possible and leave the rest
04:14 Eth4n joined #perl6
04:14 pmurias allbery_b: it would be only gross if it was hacked in an ugly manner
04:15 sorear i don't think you can really do that if the string to eval is at all computed
04:15 allbery_b so eval "1+2" goes completely eval time, but eval "1+\$$foo" gets optimized into 1+ eval "\$$foo" (and extra credit if it recognizes the latter and makes it a deref at comnpile time!
04:15 pmurias that's crazy talk
04:15 pmurias ;)
04:16 sorear allbery_b: but what if $foo eq 'x, 5'
04:16 sorear , has lower prec than +
04:16 allbery_b point
04:17 sorear I will confess that I've thought about hacking the compiler to special case eval_dies_ok STRINGLITERAL, EXPR and eval_lives_ok
04:17 allbery_b I guess what I'm getting at is rexognizing uses of eval that would be better handled as macros (once implemented)
04:18 pmurias if you use eval you shouldn't expect your code to run at a decent speed
04:18 pmurias * use eval in a loop
04:19 allbery_b of course, that would also break the spectests, if you chose to handle it by issuing "this is betrter done as a macro" warnings :)
04:20 pmurias sorear: if eval_dies_ok and eval_lives_ok were special cased in a seperated optimalisation pass it wouldn't be evil
04:23 pmurias sorear: and if we had a persitent niecza (p5 part) how slow would eval be?
04:36 sorear pmurias: about 1 - 1.5 seconds with current technology, I think
04:36 sorear the compiler is currently designed to not reuse any loaded data from one compilation unit to another
04:37 sorear for robustness
04:43 pmurias a special cased eval STRINGLITERAL would take comparable time?
04:45 [Coke] left #perl6
04:46 sorear pmurias: no, because it can be part of the same compilation unit
04:46 sorear Who is -ajs ?
04:48 orafu left #perl6
04:48 orafu joined #perl6
05:05 lopaway is now known as lopnor
05:14 pmurias left #perl6
05:37 sftp left #perl6
05:43 kaare joined #perl6
05:43 kaare is now known as Guest42954
05:45 Guest42954 is now known as kaare_
05:47 risou left #perl6
05:58 Teee joined #perl6
05:59 Thamna joined #perl6
06:00 dalek niecza: 9f864d4 | sorear++ | / (4 files):
06:00 dalek niecza: Add .split, .index, .rindex, .lines, .words, more features to .comb
06:00 dalek niecza: review: https://github.com/sorear/niecza/commit/9f864d48d4
06:08 Teee left #perl6
06:10 Thamna left #perl6
06:11 dalek niecza: 9a3aa2b | sorear++ | test (2 files):
06:11 dalek niecza: Merge back working tests
06:11 dalek niecza: review: https://github.com/sorear/niecza/commit/9a3aa2b3ff
06:11 dalek niecza: 4d1cb46 | sorear++ | lib/SAFE.setting:
06:11 dalek niecza: &say et al return True
06:11 dalek niecza: review: https://github.com/sorear/niecza/commit/4d1cb46520
06:14 lao joined #perl6
06:15 diakopter sorear: last I heard,&say returns 1, but that might've been too long ago.
06:16 lao left #perl6
06:18 dalek sprixel: 9848943 | diakopter++ | / (9 files):
06:19 dalek sprixel: another WIP commit/push. these are great.
06:19 dalek sprixel: review: https://github.com/diakopter/sprixel/commit/984894364f
06:19 lao294 joined #perl6
06:20 lao294 is there a way to list out all methods for Array?
06:20 sorear rakudo: .say for Array.^methods
06:20 p6eval rakudo cae7f9: OUTPUT«new␤at_pos␤Method 'say' not found for invocant of class 'Perl6MultiSub'␤  in <anon> at line 22:/tmp/5LW0oAtxHE␤  in main program body at line 1␤»
06:21 sorear rakudo: say $_ for Array.^methods
06:21 p6eval rakudo cae7f9:
06:21 p6eval ..OUTPUT«new␤at_pos␤perl␤splice␤delete␤new␤Capture␤eager␤elems␤flat␤iterator␤list␤munch␤Bool␤Num␤Str␤exists␤fmt␤map␤perl␤reverse␤rotate␤sort␤pop␤push␤shift␤unshift␤ACCEPTS␤at_pos␤hash␤of␤item␤Numeric␤Int␤Num␤Str␤elems␤fmt␤list␤Numeric␤Real␤Int␤Rat␤Num␤abs␤exp␤log␤log10␤sqrt␤roots␤to-radians…
06:22 lao294 Big thanks. I ocme to right channel with full of gurus.
06:24 roen left #perl6
06:26 sorear it's a pleasure
06:26 diakopter rakudo: [].^methods.join($1).say
06:26 p6eval rakudo cae7f9:
06:26 p6eval ..OUTPUT«newAny()at_posAny()perlAny()spliceAny()deleteAny()newAny()CaptureAny()eagerAny()elemsAny()flatAny()iteratorAny()listAny()munchAny()BoolAny()NumAny()StrAny()existsAny()fmtAny()mapAny()perlAny()reverseAny()rotateAny()sortAny()popAny()pushAny()shiftAny()unshiftAny()ACCEPTSAny()at_posA…
06:26 diakopter hm
06:26 diakopter rakudo: [].^methods.join(' ').say
06:26 p6eval rakudo cae7f9: OUTPUT«new at_pos perl splice delete new Capture eager elems flat iterator list munch Bool Num Str exists fmt map perl reverse rotate sort pop push shift unshift ACCEPTS at_pos hash of item Numeric Int Num Str elems fmt list Numeric Real Int Rat Num abs exp log log10 sqrt roots
06:26 p6eval ..to-radians…
06:34 roen joined #perl6
06:50 lao294 Help, not sure I get error: {}.^methods.grep(/an/). Also is there any equivalent command for help([].sort) as in Python?
06:52 sorear you need to write it out more explicitly
06:52 sorear {}.^methods.grep(-> $method { (~$method) ~~ /an/ })
06:52 sorear that might work
06:57 justatheory left #perl6
06:59 lao294 Hi Sorear, thank for helping. It works but it needs to be explicitl. I just try to convert some Ruby command '[].methods.grep(/an/)' to Perl6
07:01 TiMBuS {}.^methods.map(~*).grep(/an/)
07:04 sorear niecza: 1 ,= 2 ,= 3
07:04 p6eval niecza 406e042: OUTPUT«Can't locate JSON.pm in @INC (@INC contains: /home/p6eval/niecza/src /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /home/p6eval/niecza/src/NAMBackend.pm
07:04 p6eval ..line 9…
07:04 adu left #perl6
07:08 khisanth__ joined #perl6
07:08 khisanth__ is now known as Khisanth
07:09 sorear std: my $x; $x ?? 1 !!= 0;
07:09 p6eval std 625303c: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't make assignment out of ?? !! because conditional operators are too fiddly at /tmp/cKwnBufAUt line 1:␤------> [32mmy $x; $x ?? 1 !!=[33m⏏[31m 0;[0m␤Check failed␤FAILED 00:01 121m␤»
07:09 sorear aww
07:10 lao294 Thanks TiMBuS. Yes it is more concise. Just wonder what the reason for the map? {}.^methods.WHAT is already Array()
07:12 TiMBuS lao294, the methods() call doesn't return proper strings
07:12 Khisanth left #perl6
07:13 TiMBuS so i use prefix<~> on them all, just like how sorear did
07:14 TiMBuS {}.^methods.grep(~* ~~ /an/) might also work
07:44 aindilis joined #perl6
07:45 Layla joined #perl6
07:46 Layla hola, I need to know if latest version of rakudo perl6 implemented variable length lookbehind, if yes please give one simple example, thnx :)
07:47 agentzh joined #perl6
07:49 sorear Layla: I don't understand variable length lookbehind
07:52 Layla sorear: you mean the question is not clear? sorry my english is not great but I can explain more if you need.
07:54 sorear Not the question, but the concept itself
07:54 lopnor is now known as lopaway
07:54 sorear You obviously understand this better than any of the implementor
07:55 dalek niecza: 63f4e9a | sorear++ | / (3 files):
07:55 dalek niecza: Add &&= and company
07:55 dalek niecza: review: https://github.com/sorear/niecza/commit/63f4e9a3ea
08:06 Layla sorear: oh no I did not say that! I am just school student, I mean somthing like this (?<= \d\s*\w) for example, as you see it has non fixed length variable. so I was thinking if it is supported.
08:10 glow joined #perl6
08:12 lao294 In Ruby, there are operators (+,&,-) to operate on two arrays. In Perl6, we can get @unions=(@a,@b).uniq. Are there any Perl6 commands for @intersects and @subtractions? Thanks. Trying to emerge to Perl6.
08:14 sorear Perl 6 has a real Set type
08:14 sorear there aren't Set operations on arrays for that reason
08:15 sorear @a.grep(none @b) and @.grep(any @b) if you insist
08:18 BaggioKwok joined #perl6
08:21 BaggioKwok left #perl6
08:22 daxim joined #perl6
08:25 lao294 sorear, interesting. Thank you. Now seem that we get to the goodies of junction.
08:28 Layla perl6: say "Goodbye P6! \x{263A}!\n";
08:28 p6eval rakudo cae7f9: OUTPUT«===SORRY!===␤Unrecognized backslash sequence: '\x' at line 22, near "{263A}!\\n\""␤»
08:28 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "A"␤    expecting "_", fraction, exponent, term postfix, operator or "}"␤    at /tmp/8BdpfQWhCn line 1, column 24␤»
08:28 Layla ah..
08:29 Layla left #perl6
08:35 cotto partially-tested update for Rakudo for some recent Parrot changes: http://nopaste.snit.ch/27500
08:36 cotto spectest seems fine but my room's getting too warm for me to wait for it to finish running it
08:44 dalek niecza: 14c7d07 | sorear++ | / (3 files):
08:44 dalek niecza: Add the simplest possible &open
08:44 dalek niecza: review: https://github.com/sorear/niecza/commit/14c7d073bb
08:53 Eth4n left #perl6
08:59 BaggioKwok joined #perl6
09:02 BaggioKwok left #perl6
09:05 dalek niecza: 0dc0b89 | sorear++ | docs/lhf.txt:
09:05 dalek niecza: Update LHF
09:05 dalek niecza: review: https://github.com/sorear/niecza/commit/0dc0b89292
09:05 dalek niecza: 92aafcb | sorear++ | / (2 files):
09:05 dalek niecza: Implement hard indirect method calls
09:05 dalek niecza: review: https://github.com/sorear/niecza/commit/92aafcb627
09:06 moritz_ good morning
09:07 sorear hello moritz_
09:07 Eth4n joined #perl6
09:07 Eth4n left #perl6
09:07 Eth4n joined #perl6
09:09 Axius joined #perl6
09:11 moritz_ cotto: with your patch and newest parrot, t/spec/S02-magicals/pid.t segfaults
09:11 moritz_ I suspect it's newest parrot, not your patch
09:16 sorear moritz_: how is rakudo doing these days
09:17 moritz_ sorear: mostly just like before, since jnthn and pmichaud are mostly absent
09:17 moritz_ sorear: a few small fixes here and there, but not much of substance
09:20 roen left #perl6
09:26 LeifD joined #perl6
09:29 dalek niecza: cc7b41e | sorear++ | src/Metamodel.pm:
09:29 dalek niecza: Add a safeguard against class A is A
09:29 dalek niecza: review: https://github.com/sorear/niecza/commit/cc7b41efc6
09:30 Trashlord left #perl6
09:30 sorear moritz_: in docs/announce.v1 I have a draft of the mail I'm going to send tomorrow.  I've written a lot about new stuff but I'm unsure how much old stuff to include
09:32 Trashlord joined #perl6
09:32 * sorear wonders what the difference between submethod BUILD and method !BUILD *really* is
09:36 moritz_ BUILD can be called from outside, !BUILD not
09:36 moritz_ both are not inherited
09:36 daxim left #perl6
09:37 moritz_ sorear: I'm a bit confused... is it just an announcement, or a release?
09:37 moritz_ are you going to put up tarballs?
09:38 daxim joined #perl6
09:40 redicaps left #perl6
09:40 sorear moritz_: I'm not sure what the difference is - it is in a public git repo
09:42 moritz_ sorear: the difference is that if you put up a tarball, and call it a release, people will be less confused about what your mail is talking about
09:43 redicaps1 joined #perl6
09:44 dalek roast: 4bde3e6 | moritz++ | S16-filehandles/io.t:
09:44 dalek roast: [io.t] unfudage a passing tests
09:44 dalek roast: review: https://github.com/perl6/roast/commit/4bde3e61cb
09:44 moritz_ a release is just giving people a specific version to use
09:44 moritz_ and packing that version up in a tarball is more traditionall than pointing at a repo and saying "you figure it out"
09:44 rgrau joined #perl6
09:55 moritz_ sorear: otherwise the announcement looks quite well
09:59 awwaiid left #perl6
10:01 sorear There was definitely to be a tag
10:01 sorear After I've tagged it, I could add a link to the github autotarball
10:02 sorear It would be even better if I could somehow make a self contained module, but I can't just copy JSON::XS into lib/
10:02 Eth4n left #perl6
10:05 Eth4n joined #perl6
10:05 Eth4n left #perl6
10:05 Eth4n joined #perl6
10:09 moritz_ can't you use a pure perl JSON fallback?
10:09 moritz_ and a small wrapper module that uses the ::XS if available, and the fallback otherwise
10:10 tadzik isn't that what JSON::Any does?
10:13 jon__ joined #perl6
10:13 Tedd1 joined #perl6
10:13 jon__ is now known as ThundrMeistr
10:24 QinGW left #perl6
10:24 ThundrMeistr left #perl6
10:29 dalek niecza: 651458b | sorear++ | / (6 files):
10:29 dalek niecza: Implement general submethods
10:29 dalek niecza: review: https://github.com/sorear/niecza/commit/651458b15a
10:29 sorear moritz_: interesting idea
10:29 * sorear out
10:30 Axius left #perl6
10:30 sorear rakudo: class X1 { submethod foo { 1 } }; class X2 is X1 { }; say X2.new.foo
10:30 p6eval rakudo cae7f9: OUTPUT«Method 'foo' not found for invocant of class 'X2'␤  in main program body at line 22:/tmp/qvGHafFRBX␤»
10:32 mahen23 joined #perl6
10:33 mahen23 left #perl6
10:33 rgrau left #perl6
10:40 VXZ joined #perl6
10:40 roen joined #perl6
10:44 Khisanth joined #perl6
10:55 Khisanth left #perl6
10:58 LeifD How do I break out of an for loop?
10:59 tadzik not break?
10:59 LeifD got the error: Could not find sub &break
11:00 tadzik ah, last
11:00 tadzik it's last in Perl I believe
11:00 LeifD it works, thanks!
11:02 moritz_ rakudo: for 1..5 { .say; last }
11:02 p6eval rakudo cae7f9: OUTPUT«1␤»
11:03 LeifD :)
11:03 moritz_ there's nothing like working code :-)
11:03 LeifD Does the '.method' always use $_ ?
11:04 moritz_ yes
11:04 moritz_ and no built-in subroutine defaults to $_
11:04 LeifD clears things up
11:04 moritz_ indeed it does
11:05 am0c left #perl6
11:06 moritz_ a brave soul looking for something to do could bisect a rakudo segfault
11:07 moritz_ rakudo on parrot RELEASE_2_11_0 works fine
11:07 daxim perl6: for 1..5 { $_.say; last }   # what about long-hand? I remember that during jnthn's DaNoob talk, that wouldn't work
11:07 p6eval pugs, rakudo cae7f9: OUTPUT«1␤»
11:07 * daxim :thumb:
11:07 moritz_ rakudo on parrot RELEASE_2_11_0-248-g00259d7 segfaults on t/spec/S02-magicals/pid.t
11:08 moritz_ daxim: which part didn't work?
11:08 Eth4n left #perl6
11:08 daxim something involving $_
11:09 Khisanth joined #perl6
11:13 Eth4n joined #perl6
11:16 soroush left #perl6
11:21 roen left #perl6
11:43 jhuni left #perl6
11:46 kcwu joined #perl6
11:59 soroush joined #perl6
12:03 masonkramer left #perl6
12:12 agentzh left #perl6
12:18 pmurias joined #perl6
12:26 PacoLinux left #perl6
12:26 PacoLinux joined #perl6
12:27 masak joined #perl6
12:27 masak oh hai, zebras.
12:28 masak I don't know whether to be proud or slightly ashamed to be quoted like this: http://twitter.com/NegativeK/status/19147889439674368 :P
12:28 masak here's another word of wisdom: "In order not to get wet, avoid moist and wet things."
12:29 masak "Preferably, keep dry."
12:31 [Coke] joined #perl6
12:32 moritz_ well, he has a point :-)
12:32 moritz_ but you do explain how to keep things simple
12:33 moritz_ which isn't quite as easy as it sounds, in the world of software
12:33 masak writing that post, I felt like I partly failed to get my point across.
12:33 masak but it was my first try, so maybe that's to be expected.
12:33 masak I find I have loads to say that I can't really express.
12:36 masak sorear++ # closing tickets that I've opened
12:44 * moritz_ sometimes wishes for a low precedence infix %
12:44 moritz_ my $successor = $previous + 1 mod $count;
12:45 masak you're a mathematician at heart... :)
12:45 masak but yes, I can see the use of that too.
12:46 moritz_ I don't think it's important enough to warrant its own operator in core though
12:47 masak no.
12:47 masak right now I'm mulling over why % has the tight precedence it has.
12:47 masak is it just because it's considered a multiplicative-ish operator?
12:47 moritz_ because it's conceptually quite similar to division
12:47 masak right.
12:47 masak a kind of dual to it.
12:49 masak rakudo: say 0 ~~ 0 ~~ 0
12:49 p6eval rakudo cae7f9: OUTPUT«Bool::False␤»
12:49 * masak submits rakudobug
12:49 masak just saw that ~~ is "chaining infix" :)
12:49 moritz_ what kind of assoc should ~~ have?
12:50 masak that surprises me. but hey, it's spec. :P
12:50 moritz_ wtf?
12:50 masak rakudo: say 0 === 0 === 0
12:50 p6eval rakudo cae7f9: OUTPUT«Bool::True␤»
12:50 moritz_ now that makes more sense
12:51 masak I have *no* idea whatsoever how I would use the chainedness of ~~
12:51 masak doesn't mean it's wrong, of course.
12:51 masak just an... indicator.
12:52 masak of course, if ~~ is chaining, it can chain with *other* operators. and that might be useful.
12:53 masak rakudo: say "foo" ~~ "foo" ge "bar"
12:53 p6eval rakudo cae7f9: OUTPUT«Bool::False␤»
12:53 masak both of these evaluations should be "Bool::True" according to the spec.
12:54 pmurias rakudo: say :16<3>
12:54 p6eval rakudo cae7f9: OUTPUT«3␤»
12:54 frettled_ is now known as frettled
12:55 bakedb joined #perl6
12:55 * moritz_ finds that spec very questionable
12:56 masak well, now there's an RT ticket reminding us of that.
12:56 tadzik masak, masak
12:57 tadzik I wrote a stupid KeyHash which passes a couple of spectests :)
12:57 masak tadzik: kudos.
12:57 * masak is still backlogging
12:57 tadzik notice the importance of the "stupid" adjective :)
12:57 envi left #perl6
12:58 moritz_ general question: do you prefer array names as singular or plural?
12:58 tadzik http://wklej.org/id/445287/
12:58 masak tadzik: I salute you. you're wise to write stupid code.
12:58 tadzik :)
12:58 masak moritz_: generally plural. but it's not black or white.
12:58 tadzik plural, like "elements"
12:59 masak if you ask me, sigil invariance *increases* the rationale for plural array names.
12:59 moritz_ rationally I think I prefer the singular, because the @ already says plural
12:59 moritz_ and thus @element should be enough, and @elements is like saying  my Array @elements;
12:59 masak nothing wrong with redundancy per se.
13:00 moritz_ but i find myself adding s to variable names out of habit
13:00 masak the array contains many elements, so '@elements' seems a fine name to me.
13:00 tadzik hrm, @element sounds to me as if one element is an array, thus as an array of arrays
13:00 VXZ I use plural when the array name describes what it contains, and singular when the name describes what it is.  IE @list vs @list_items.
13:00 moritz_ 13:59 < masak> if you ask me, sigil invariance *increases* the rationale for  plural array names.
13:00 moritz_ I disagree
13:00 masak giving it the singular assumes that all you'll ever do with the array is index it.
13:01 moritz_ without sigil invariance, @element can become $element[0]
13:01 masak VXZ++ # aye.
13:01 moritz_ which looks like singular...
13:01 moritz_ hm
13:01 moritz_ disregard my last 3 lines
13:01 masak moritz_: :)
13:01 moritz_ :-)
13:03 masak tadzik: looks good. 'method set' looks like a workaround, though.
13:03 masak and I maintain that 'method default' should go with the type ::T, not with the KeyHash. of course the KeyHash could have a delegating method.
13:03 tadzik masak: it is
13:04 Khisanth left #perl6
13:04 tadzik I don't know how to write... lang:C++(operator=) :)
13:05 moritz_ you shouldn't need to
13:05 masak well, that part doesn't really work yet in Rakudo.
13:05 masak we're meant to be able to provide Proxy objects with FETCH and STORE methods.
13:06 masak really looking forward to that working.
13:06 tadzik moritz_: then how do I inspect this setting, as I do in set()?
13:07 moritz_ sorry, I'm a bit distracted atm
13:07 masak tadzik: did you read my last three lines?
13:09 moritz_ uh
13:09 moritz_ nasty
13:09 moritz_ my $line = get // 'foo';
13:09 moritz_ doesn't work
13:10 masak o.O
13:10 moritz_ (I understand very well why it doesn't, but it's still sad because it#d be a nice idiom)
13:10 masak why doesn't it?
13:10 moritz_ because get is a sub
13:10 moritz_ so a term is expected
13:10 masak oh!
13:10 masak right.
13:10 moritz_ and so // is the null regex
13:10 masak get() // 'foo'
13:10 moritz_ (glad we disallowed it)
13:11 masak many good ideas in here: https://github.com/quietfanatic/perl-tan/blob/master/outline
13:11 masak quietfanatic++
13:12 masak "Also Perl 6 is somewhat of a dojikko and works slowly and stumbles a lot." :)
13:12 moritz_ hm
13:12 moritz_ lazy lists make for curious stack traces
13:13 moritz_ not @a
13:13 tadzik masak: yes
13:13 masak tadzik: that's how you'd do it.
13:13 moritz_ makes the prefix:<not> appear in the stack trace when evaluating @a produces an error
13:14 masak tadzik: S06:524
13:14 tadzik masak: so that's either unimplementable atm, os I'd have to reimplement Hash with the low level stuff
13:15 masak I'm almost certain pmichaud would like to discuss this.
13:15 masak he's been planning to rip out and rewrite Hash lately.
13:15 moritz_ \o/ my "pair of stones" implementation passes all of masak's base tests
13:16 masak \o/
13:16 colomon \o/
13:16 colomon "pair of stones"?
13:16 moritz_ p4
13:16 * masak is pondering sending out an email to all 18 contestants to further motivate them
13:17 colomon I fear I've used all mine time obsessed with making p2 better.
13:17 moritz_ I don't think you need to motivate me :-)
13:17 masak moritz_: so I've noticed :P
13:18 moritz_ colomon: my p2 is fairly sloppy :/
13:18 _twitch joined #perl6
13:20 [Coke] left #perl6
13:20 moritz_ ie it doesn't handle points on the edges consistentyl
13:20 colomon See, I know there are very very very unlikely cases where my p2 won't work, and so I want to fix them.
13:21 moritz_ very xx 3, unlikely == masak will break your code :-)
13:21 colomon I doubt he could.
13:21 arnsholt moritz_: I discovered that same bug last night =)
13:22 colomon But it shames my pride to know there are cases where it doesn't work.
13:22 moritz_ arnsholt: I declare it not a bug. The spec doesn't talk about it, so it's ok to have undefined behavior
13:22 tadzik . o O ( masak: thanks for your submissions! Using them I'll surely be able to win another contest you didn't know about )
13:22 dju left #perl6
13:22 dual left #perl6
13:22 jarfhy left #perl6
13:22 szbalint left #perl6
13:22 ascent_ left #perl6
13:22 kst left #perl6
13:22 IllvilJa left #perl6
13:22 arnsholt moritz_: That is indeed an idea
13:23 arnsholt I have a slight case of "must handle EVARYTHING"-syndrome =)
13:23 masak tadzik: :)
13:24 masak tadzik: I generally don't participate in contests.
13:26 colomon which is why you needed this to win your secret contest.
13:26 colomon it's all coming together now.
13:26 colomon ;0
13:26 colomon l)
13:26 colomon ;)
13:27 dju joined #perl6
13:27 dual joined #perl6
13:27 jarfhy joined #perl6
13:27 szbalint joined #perl6
13:27 ascent_ joined #perl6
13:27 kst joined #perl6
13:27 IllvilJa joined #perl6
13:27 [Coke] joined #perl6
13:29 tadzik I knew it! :)
13:32 masak even if what you said were true, which it isn't, I'm still handing out 100 € worth of books to whoever wins my contest. :)
13:32 tadzik :)
13:33 moritz_ masak: and you probably win about 1k € yourself by participating in the secrit contest
13:33 masak yeah, whatever. :P
13:34 MayDaniel joined #perl6
13:35 moritz_ masak: anyway, if the winner's wish list contains more item than you can buy, I expect you to solve the bin packing problem in Perl 6 :-)
13:35 feelout joined #perl6
13:35 masak heh :)
13:35 kaare_ left #perl6
13:36 Khisanth joined #perl6
13:38 Grimnir_ left #perl6
13:38 Grimnir_ joined #perl6
13:42 khisanth_ joined #perl6
13:44 Khisanth left #perl6
13:50 pmurias masak: what's the sekrit contest?
13:50 masak there is none. the boys where just having a laugh.
13:50 khisanth_ left #perl6
13:50 masak there is, however, a very real non-sekrit contest.
13:51 masak unfortunately, the sign-up period has already ended.
13:51 masak the contest itself finishes on 2011-01-14.
13:51 pmurias is not very fond of contests
13:52 am0c joined #perl6
13:52 masak this one is for a good cause. :)
13:52 masak well, several good causes.
13:53 colomon wait, are we secretly enhancing Druid?
13:53 * pmurias is trying to make niecza pass more spectests (52 new ones with a simple fix)
13:54 pmurias but it turns out going out and *then* hanging on irc afterwords was not a good idea ;)
13:55 masak colomon: I *am* secretly enhancing Druid, but that has little to do with the contest. I could have picked tasks that were much closer to Druid, but I didn't.
13:57 colomon masak: for what it's worth, enhancing p6 by writing practical code in it (and enhancing my p6 skills in the process) is more than good enough reason to me.
13:57 colomon reason for me
13:57 colomon ack.
13:57 tadzik rst
13:57 masak colomon: nod.
13:58 colomon but that doesn't mean I won't come up with fanciful reasons why you've _really_ done it.  ;)
13:58 LeifD rakudo: sqrt 600851475143
13:59 p6eval rakudo cae7f9:  ( no output )
13:59 LeifD :/
13:59 colomon rakudo: say sqrt 600851475143
13:59 tadzik ENOSAY
13:59 p6eval rakudo cae7f9: OUTPUT«775146.099224527␤»
14:00 LeifD I get not a number... Rakudo Star 2010.11
14:00 tadzik star: say sqrt 600851475143
14:00 p6eval star 2010.09:  ( no output )
14:00 masak colomon: see the WHY file. it's all there.
14:00 tadzik EOLDSTAR
14:01 LeifD So you would recomend going rakudo git version?
14:01 colomon afk
14:01 khisanth_ joined #perl6
14:01 tadzik LeifD: git is fun :) Or try the recent compiler release (2010.12)
14:02 tadzik LeifD: by EOLDSTAR I meant p6eval uses fhe old star
14:02 LeifD how often does git version break?
14:02 tadzik LeifD: do other sqrt'd work?
14:02 tadzik LeifD: never seen it broken
14:02 LeifD yes, not big numbers
14:02 tadzik * sqrt's
14:03 tadzik LeifD: that might be some Parrot limitation or an old bug, if it bugs you seriously proceed into the newer release
14:03 tadzik 2010.12 should be just fine
14:04 LeifD Ok.
14:11 pmurias why do :2(...),:10(...)... number convertors recognise radix switchers?
14:11 pmurias * converters
14:12 moritz_ what else should they do?
14:12 masak not sure I understand the question. they parse numbers, and 0x1A is a number in Perl 6.
14:12 moritz_ rakudo: say :16('A0')
14:12 p6eval rakudo cae7f9: OUTPUT«160␤»
14:13 pmurias rakudo: say :2(0d7)
14:13 p6eval rakudo cae7f9: OUTPUT«DON'T PANIC! Invalid character (7)! Please try again :) ␤  in main program body at line 1␤»
14:13 pmurias rakudo: say :2("0d7")
14:13 p6eval rakudo cae7f9: OUTPUT«7␤»
14:13 bakedb left #perl6
14:13 * moritz_ wonders if that's a bug
14:13 pmurias rakudo: say :2("0d7") is specced
14:13 p6eval rakudo cae7f9: OUTPUT«===SORRY!===␤Confused at line 22, near "say :2(\"0d"␤»
14:13 masonkramer joined #perl6
14:14 masonkramer left #perl6
14:14 allbery_b heh
14:14 pmurias rakudo: say :16("0d7")
14:14 p6eval rakudo cae7f9: OUTPUT«215␤»
14:14 masak rakudo: say :8("10")
14:14 p6eval rakudo cae7f9: OUTPUT«8␤»
14:14 pmurias masak: but's that a special case
14:14 pmurias meant mortiz
14:15 masak pmurias: yes, I see now. it is.
14:15 masak we should have a good name for :8 et al. something that makes abundantly clear the *direction* of the conversion.
14:16 masak call it the convert-FROM-base operator, or something.
14:16 khisanth_ left #perl6
14:16 pmurias what i meant to ask is there a compelling use case for the numer specifing it's own base
14:16 pmurias aka :2("0d10")
14:17 pmurias rakudo: say :2(":3<01>")
14:17 p6eval rakudo cae7f9: OUTPUT«DON'T PANIC! Invalid character (:)! Please try again :) ␤  in main program body at line 1␤»
14:17 BaggioKwok joined #perl6
14:17 masak not if you ask me.
14:17 masak in fact, it seems to be a construct that gives the last say to the wrong bit; the data rather than the operator.
14:18 masak sorear: there's a line with an 'x' between 'ok 477' and 'ok 478' in the output to test.pl
14:18 pmurias plus it works differently for higher radixes
14:19 masak that doesn't sound good at all.
14:19 * moritz_ thinks that :2(...) doing anything but binary is Very Bad Idea
14:19 masak agreed.
14:20 _kaare joined #perl6
14:22 [Coke] left #perl6
14:23 GinoMan joined #perl6
14:24 BaggioKwok left #perl6
14:24 moritz_ if you want to automatically convert a ':3<01>' string to a number, you should probably use the magic "parse a Perl 6 literal" function which I've speculated about previously
14:24 moritz_ or just .Int
14:25 masak full ACK.
14:25 [Coke] joined #perl6
14:25 colomon rakudo: say ':3<01>'.Int
14:26 p6eval rakudo cae7f9: OUTPUT«1␤»
14:26 colomon rakudo: say ':3<11>'.Int
14:26 p6eval rakudo cae7f9: OUTPUT«4␤»
14:30 feelout left #perl6
14:38 pmurias moritz_: how would the parse a Perl 6 literal be different from eval?
14:38 masak presumably the former would protest if what it got wasn't a literal.
14:39 fhelmberger left #perl6
14:39 arnsholt The parse P6 term function should barf on anything that isn't a term, I suppose
14:39 arnsholt Which is quite a bit safer than eval
14:45 pmurias so the parse a literal one wouldn't have side effects?
14:46 masak right.
14:48 JimmyZ joined #perl6
14:49 masak 卓明亮! \o/
14:49 JimmyZ good afternoon, 麦高
14:49 JimmyZ Is there afternoon?
14:49 masak aye :)
14:49 masak good evening, 卓明亮
14:50 JimmyZ 呵呵,是的, 我这里现在是晚上 10点50分了
14:51 masak thought so :)
14:51 masak bed soon?
14:52 JimmyZ yes
14:52 khisanth_ joined #perl6
14:53 JimmyZ I saw Audrey Tang that she wrote the chinese version of 'Day 24 – Yule the Ancient Troll-tide Carol', I'm glad to see it.
14:53 khisanth__ joined #perl6
14:53 masak JimmyZ: how easy is it for you to read traditional hanzi?
14:53 masak also, is Taiwanese Mandarin very different?
14:54 khisanth_ left #perl6
14:56 JimmyZ almost very esay,  in history, we used Traditional Chinese
14:56 shi joined #perl6
14:56 masak 我知道 :)
14:57 masak that's why it's called "Traditional" :)
14:57 noganex_ is now known as noganex
14:57 JimmyZ but some wording  is different. i.e., blog -> '博客' -> ‘部落格'
14:57 fhelmberger joined #perl6
14:58 masak interesting.
14:58 araujo left #perl6
14:58 JimmyZ but I only read it. :)
14:58 masak but that's a difference between Mainland and Taiwan, right, not between Simplified and Traditional?
15:00 JimmyZ hmm,to me,  Traditional Chinese looks like Simplified chinese in my eye, so I can read it :)
15:01 masak lucky you :P
15:01 araujo joined #perl6
15:02 dual left #perl6
15:02 moritz_ to me that sounds like "algebra looks like simplified math" :-)
15:02 JimmyZ I hadn't learn Traditional Chinese, 呵呵, just read it by instinct .
15:02 rgrau joined #perl6
15:02 JimmyZ *learnt
15:03 pmurias left #perl6
15:03 GinoMan left #perl6
15:04 shi left #perl6
15:04 masak moritz_: I think you might appreciate this: http://www.youtube.com/watch?v=uqwC41RDPyg
15:05 pmurias joined #perl6
15:05 * JimmyZ can't read anything from youtube and facebook or twitter.
15:05 masak Facebook is capitalist and must be suppressed!
15:06 khisanth__ left #perl6
15:07 * JimmyZ can't use Google to search '学习' too.
15:08 masak 'to study'.
15:08 masak JimmyZ: you can use phenny.
15:08 masak phenny: '学习'?
15:09 masak hm.
15:09 masak phenny: "学习"?
15:09 phenny masak: "Learning" (zh-CN to en, translate.google.com)
15:09 masak phenny: "我没有研究繁体中文,呵呵,我刚才读的本能了。"?
15:09 phenny masak: "I did not study traditional Chinese, Oh, I just read an instinct." (zh-CN to en, translate.google.com)
15:10 JimmyZ yes, I can't search study and many words or wording by google. it's forbidden by GFW,h呵呵
15:10 * masak wonders how long GFW will last
15:11 moritz_ masak: (re youtube) nice :-)
15:11 JimmyZ I'm not sure
15:12 masak I mean, it doesn't stop the urban population from reaching out to the outside world. a proxy, and you're free to surf wherever.
15:12 * JimmyZ can't read *.wordpress.com too.
15:12 moritz_ that's a real pity
15:12 moritz_ so you missed the whole advent calendar
15:12 masak :(
15:13 masak JimmyZ: I'll make a gist for you, so you can read them all now :)
15:13 JimmyZ but I can read planetsix.perl.org :)
15:13 masak oh, ok :)
15:13 masak redundancy++
15:13 JimmyZ 呵呵
15:18 pmurias masak: re stray x i found the source of the bug
15:18 masak pmurias++
15:18 masak it's also curious that there are a number of blank lines in that region.
15:18 masak not wrong, just not visually pleasing.
15:19 pmurias it's a newline in the test description
15:19 pmurias ok(1,"foo\nx")
15:20 moritz_ that'll produce wrong TAP output
15:20 masak yes, exactly.
15:20 masak looks like a simple typo.
15:21 pmurias Test::More sort of handles that
15:21 pmurias walk& will fix later
15:22 masak I can't find that this has been linked to in the backlog; it's slightly related to our discussion a few months back about MOP access to private variables: http://www.parashift.com/c++-faq-lite/classes-and-objects.html#faq-7.6
15:23 masak the gist of it is that it's more of a moral issue than a legal issue.
15:24 masak also, FAQ 7.7 illustrates an important philosophical difference between C++/Java and Perl 6. in the former two "private" means "private to the *class*", whereas in Perl 6, it means "private to the *object*".
15:25 LeifD now I run rakudo from github.com/rakudo/rakudo.git, and I still get NaN with: sqrt 600851475143
15:25 masak rakudo: say sqrt 600851475143
15:25 p6eval rakudo cae7f9: OUTPUT«775146.099224527␤»
15:25 LeifD Does it work on your comps in the repl
15:25 * masak checks
15:26 masak works for me.
15:26 LeifD hmm
15:26 moritz_ LeifD: 32bit or 64bit?
15:26 LeifD 32 bit
15:27 moritz_ that might explain the difference
15:27 moritz_ p6eval is on a 64bit machine, iirc
15:27 moritz_ but it's still worrying
15:27 moritz_ LeifD: what do you get for 'say 600851475143'?
15:27 moritz_ and say 600851475143.WHAT
15:27 LeifD :) -443946297
15:28 masak there you go, then.
15:28 masak probably a 32 bit machine.
15:28 LeifD Int()
15:28 moritz_ so it's really a number literal problem, not a .sqrt problem
15:28 masak moritz_++
15:28 masak is this worth a rakudobug?
15:28 LeifD I will be immortal!
15:29 LeifD Larry want to meet me
15:29 masak LeifD: if you got a kick out of *this*, you should stick around :P
15:29 mtk joined #perl6
15:29 LeifD :)
15:29 masak there will be more of the same, and better.
15:29 masak and you can have as big a role in it as you like.
15:30 masak we're understaffed when it comes to discovering and reporting bugs.
15:30 mtk left #perl6
15:30 LeifD Well the plan for me is to use rakudo for Project Euler. So more problems might pop up.
15:31 mtk joined #perl6
15:31 masak there's prior art.
15:32 * masak goes digging
15:32 masak https://github.com/perl6/perl6-examples/tree/master/euler
15:32 LeifD noganex, there isn't. Stop it :)
15:32 LeifD sorry noganex... damn tab feature
15:32 masak but don't let that stop you :)
15:32 masak *any* code-writing activity is much appreciated.
15:33 masak it tends to uncover things.
15:33 LoRe_ is now known as LoRe
15:33 LeifD If I just can keep my hands away from solutions I have not done yet, I can learn from that place.
15:33 masak I was just going to suggest that :)
15:34 masak good luck! as soon as you have a question, think of us and p6eval :)
15:34 LeifD Bookmarked
15:34 LeifD Yes, I will.
15:37 LeifD Is there a good function reference? Like, the Str class has these methods...
15:37 masak look at the S32 parts of http://perlcabal.org/syn/
15:37 LeifD Ok.
15:37 masak also, have a gander at https://github.com/rakudo/rakudo/tree/master/src/core
15:38 LeifD github is an awesome idea.
15:38 masak how did we ever eke out an existence without it? :)
15:42 dalek tpfwiki: (Herbert Breunung)++ | http://www.perlfoundation.org/perl6/index.cgi?perl_6_basics_tablet
15:49 LeifD \quit and thanks for the help
15:49 LeifD :)
15:49 GinoMan joined #perl6
15:49 perlmonger42 joined #perl6
15:49 LeifD left #perl6
15:50 mtk left #perl6
15:50 * moritz_ suddenly wonders why he never thought of using version control for handling his invoices (written in tex)
15:54 mtk joined #perl6
15:57 mtk left #perl6
15:58 mtk joined #perl6
15:58 mtk left #perl6
15:59 mtk joined #perl6
16:04 hercynium joined #perl6
16:08 masak JimmyZ: I just saw a tweet: 昨天研究Perl6的advent calendar http://perl6advent.wordpress.com 到三点,最后在高潮中睡去。如果搞每天一个Perl6脚本解决工作中一个小问题的活动,有多少人愿意参加
16:08 masak what does it mean?
16:09 JimmyZ where is it? could you give me a link?
16:09 * JimmyZ wonders how you find it, 呵呵
16:14 daxim http://twitter.com/hydra35/status/19421750949314560   # by subscribing to <http://search.twitter.com/search?q=perl6>
16:14 justatheory joined #perl6
16:14 masak yes, that's how I found it.
16:15 masak I thought I'd better paste it here if GFW prevented you from seeing it.
16:15 daxim kraftfullt!
16:15 daxim *stalk stalk*
16:17 JimmyZ yesterday I researched perl6's advent calendar http://perl6advent.wordpress.com to three, and went to sleep within a high degree of emotion. if I make activities about everyday sloving a minor issue by using perl6, how many people want to join?
16:18 JimmyZ to three( 3 o'clock) :)
16:18 tadzik that sounds like fun
16:18 masak ah :)
16:18 masak ah; he's soliciting companions in a personal quest of exploring Perl 6?
16:18 tadzik si
16:19 tadzik another warriors to his team in mmorpg
16:19 JimmyZ yes
16:20 pmurias masak: re 7.6 being able to see private attributes but not use them is just plain ugliness
16:20 masak it's 2010, and the dream of Perl 6 is alive and well. we have more things implemented than ever before, and the Advent Calendar, based almost exclusively on things that *already work*, keep some guy in China up till late at night, and then going to sleep full of emotion.
16:20 masak pmurias: please expand that argument a bit.
16:21 masak s/keep/keeps/
16:23 pmurias if something is an implementation detail subject to change (private attributes) shouldn't be visible at all
16:23 pmurias masak: i may be confusing what the 7.6 section refers too
16:23 JimmyZ yesterday I researched perl6's advent calendar http://perl6advent.wordpress.com to three, and *finally* went to sleep within a high degree of emotion. if I make activities about everyday sloving a minor issue by using perl6, how many people want to join?
16:23 masak it refers to another programmer *reading* the source code and seeing private variables.
16:23 JimmyZ I lost finally :)
16:24 masak JimmyZ: nice. thanks.
16:24 masak JimmyZ: 最后 = "finally"?
16:24 JimmyZ 最后,终于
16:25 pmurias masak: what? worring about that seems crazy
16:25 masak JimmyZ: ok.
16:25 masak pmurias: :)
16:25 masak pmurias: you're already at a finer wavelength than the one where you can appreciate stupid beginner questions like that. :)
16:26 JimmyZ though 最后 and 终于 is different context in chinese.
16:26 masak JimmyZ: I imagine "eventually" would also be a good translation for the word in the tweet.
16:26 JimmyZ yes, that'is better.
16:26 masak but it's very close in meaning to "finally".
16:27 daxim no perlchina conference this year ;_;
16:28 JimmyZ I never enjoy it, it's in beijing.
16:29 redicaps1 left #perl6
16:39 pmurias masak: having a person not familiar with the class internals write tests might be a fun experiment tho
16:40 masak I'd suggest having one of each :)
16:43 pmurias is having ok(1,"foo\nb") print out "ok 1 - foo\n#bar" as does Test::More sensible?
16:44 masak it's certainly safer. may or may not be a good idea.
16:47 pmurias Test::More does that so it should be good enough
16:48 masak conceivably.
16:48 masak sounds like one of the little details that'll end up in S24 eventually.
16:49 pmurias S24 is Test.pm?
16:50 masak "Testing", yes.
16:53 pmurias how do i update my fork at github
16:53 * pmurias hates having to do that
16:53 JimmyZ left #perl6
16:53 * pmurias removes his fork and create a new one
16:54 masak there's no S24 yet. I've promised to write a draft.
16:55 diakopter pmurias: how'd you make 52 addl tests pass
16:56 pmurias :10<8> and similiar
16:56 pmurias will commit it soon ;)
16:57 pmurias it's a cheap way of adding passing tests ;)
16:59 diakopter yeah; heh :)
17:06 masak nom &
17:06 masak left #perl6
17:07 am0c left #perl6
17:07 am0c^ joined #perl6
17:08 pmurias diakopter: fixed your bug
17:08 pmurias meant masak
17:17 WonTu joined #perl6
17:17 WonTu left #perl6
17:17 GinoMan left #perl6
17:18 pmurias can i request a commit bit to roast?
17:22 pmurias TimToady: do we really need :2("0d10")?
17:24 jeeger joined #perl6
17:25 jeeger left #perl6
17:29 * rjbs rolls 2"0d10" and gets 0"0"
17:34 MayDaniel left #perl6
17:36 cdarroch joined #perl6
17:36 cdarroch left #perl6
17:36 cdarroch joined #perl6
17:40 [Coke] left #perl6
17:40 [Coke] joined #perl6
17:43 [Coke] left #perl6
17:44 icwiener joined #perl6
17:44 hanekomu joined #perl6
17:46 [Coke] joined #perl6
17:48 sftp joined #perl6
17:49 dalek tpfwiki: (Herbert Breunung)++ | http://www.perlfoundation.org/perl6/index.cgi?perl_6_index_tablet
17:58 born2frag left #perl6
18:00 kanishka joined #perl6
18:01 hanekomu left #perl6
18:08 [Coke] Hey, is there a version of the perl6 book that can be read on the kindle?
18:09 TimToady I believe the last answer I heard was someone needs to work on the translator
18:09 [Coke] the source is in tex, neh?
18:10 * [Coke] realizes he has a checkout of the book somewhere.
18:10 [Coke] pod -> tex -> pdf.
18:11 * [Coke] will try to remember to ask obra before heading down this path.
18:11 allbery_b mmm, should be possible to pod2html and then convert that in calibre.  think I've done that with pod before
18:11 flussence I usually just read the .pod directly...
18:11 TimToady seems almost guaranteed to screw up the Unicode :)
18:11 am0c^ left #perl6
18:13 am0c^ joined #perl6
18:13 daxim left #perl6
18:14 fhelmberger left #perl6
18:14 * [Coke] will work on it after $DAYJOB today.
18:15 * allbery_b pokes
18:15 allbery_b (since I'm futzing with calibre today anyway :)
18:15 fhelmberger joined #perl6
18:15 fhelmberger left #perl6
18:16 * [Coke] will be glad to just be able to download the thing. ;)
18:18 cdarroch left #perl6
18:18 rgrau left #perl6
18:18 dju left #perl6
18:18 jarfhy left #perl6
18:18 szbalint left #perl6
18:18 ascent_ left #perl6
18:18 kst left #perl6
18:18 IllvilJa left #perl6
18:21 MayDaniel joined #perl6
18:23 TimToady pmurias: the point of :2() is to set the default interpretation in the absence of specific user preference
18:24 TimToady but I think it's very kind to users if any perl program lets them enter numbers in any conveninet radix
18:24 TimToady .oO(I guess that's a network for nuns)
18:25 allbery_b ad-hoc wifi?
18:25 TimToady because most programmers are too lazy to provide that functionality on numeric conversions
18:25 * flussence adds "radix subscripts" to my to-do list
18:25 TimToady and the intent of entering 0x is quite unambiguous
18:26 TimToady or 0d
18:26 TimToady it's only if the outside is :16 that we have to disable 0d and 0b (but not 0o or 0x)
18:26 allbery_b why?
18:27 TimToady rakudo: say :16<0d>
18:27 p6eval rakudo cae7f9: OUTPUT«13␤»
18:27 TimToady that's why
18:27 allbery_b m, right
18:27 * allbery_b trying to do too many things at once, clearluy
18:28 TimToady which might be a good argument for changing 0d to 0t
18:28 allbery_b mm, macports gonna get pissy with me for installing Pod::PseudoPod
18:28 TimToady otoh, we also allow :10<42> inside, though I don't believe rakudo does that yet
18:29 TimToady rakudo: say :16(':10<42>')
18:29 p6eval rakudo cae7f9: OUTPUT«DON'T PANIC! Invalid character (:)! Please try again :) ␤  in main program body at line 1␤»
18:29 TimToady error courtesy of lue, it seems
18:30 perlmonger42 left #perl6
18:32 TimToady that might be LHF for someone
18:33 allbery_b hm, calibre doesn't do a very god job with the html
18:34 allbery_b or even a very good job
18:35 TimToady job was said to be very godly
18:36 Trashlord left #perl6
18:39 envi joined #perl6
18:41 allbery_b mmm, it's calibre's fault.
18:45 jenk joined #perl6
18:46 jenk hey, i heard perl6 came out a couple days ago?
18:46 dju joined #perl6
18:47 TimToady there are perl6s coming out continually
18:48 kst joined #perl6
18:48 allbery_b amazing how few people get the joke
18:48 sjn jenk: check out http://rakudo.org/
18:49 TimToady it's people repeating the "by Christmas" part as a private joke, without telling the hearer "but we won't way which Christmas" part
18:49 jenk way to crap all over my joke
18:49 TimToady either maliciously, or because they think the hearer already knows the joke, when they don't
18:49 jenk geez
18:50 TimToady smileys help :)
18:51 * allbery_b always took it s "when p6 comes out, it will be [like] Christmas"
18:51 TimToady jenk: you have to understand we get many people visiting who don't, in fact, get the joke
18:51 szbalint joined #perl6
18:51 ascent_ joined #perl6
18:51 allbery_b ==
18:52 allbery_b (and/or trolls.  amazing number of them just before xmas, even)
18:52 TimToady and most of us don't track lurkers to see who has been hanging otu silently
18:52 TimToady out, even
18:53 rgrau joined #perl6
18:53 TimToady so, sorry 'bout that, to the extent that we are... :)
18:54 * sjn thinks it's quite appropriate to reply with dry facts to a joke like that :)
18:55 TimToady my wife does that, and I have to think of it as an endearing quality...
18:56 yarrak joined #perl6
18:57 * sjn also secretly hopes that "Perl 6.0" never comes out, if only to teach the "normals" that softward be treated as something that continuously changes, and not as a "finished product"
18:58 sjn software*
18:58 kanishka left #perl6
18:59 sjn on that note, it's y kinder to reply "never" when someone asks "when is Perl 6 ready?"
19:00 sjn "just get over it, stop treating software as something other than a languagfe"
19:00 tadzik ha
19:00 TimToady well, but English is ready for lots of things already
19:00 * sjn is on a laggy connection :-/
19:01 sjn TimToady: yes, but you'll be labled as a madman if you'll ever set a release date for "English 1.0" :)
19:01 TimToady and some people prefer to hang their hats on pegs rather than to learn juggling.
19:02 jarfhy joined #perl6
19:02 TimToady well, we have English versions already
19:02 TimToady they just tend to have version names rather than numbers
19:02 sjn TimToady: ITYM "English variations"?
19:03 TimToady use English:ver<Elizabethan>
19:03 allbery_b the latinate prescriptivists tried to do English 1.0
19:03 TimToady use English:ver<Middle>
19:04 sjn Maybe we should use version nes/numbers that asymptotically get closer to 1.0 but really never get there? :)
19:04 allbery_b we're still trying to get over the resulting massive hangover
19:04 TimToady use English:ver<ValleyGirl> :)
19:04 allbery_b <knuth>3.1415</knuth>
19:05 TimToady use English:like<ValleyGirl> :)
19:05 * sjn would propose that a language becomes "1.0" the moment it's last user dies :-P
19:05 allbery_b retroactive reparsing?
19:05 allbery_b sjn: not sure that works.  See Hebrew
19:09 yarrak left #perl6
19:09 rgrau left #perl6
19:10 sjn allbery_b: Don't know about Hebrew. Can that case be "solved" with namespace renaming? "RevivedHebrew v0.1" :)
19:10 allbery_b possibly.  or Hebrew 1.0 vs Hebrew 2.0pre*
19:10 allbery_b (* in tyhe p6 sense...)
19:11 [hercynium] joined #perl6
19:11 allbery_b (and let us completely ignore religious Hebrew which comes in so many variants it'll make your head spin)
19:12 [hercynium] left #perl6
19:12 [Coke] left #perl6
19:13 sjn Sounds like a C/C++/C#/D situation :-P
19:13 [hercynium] joined #perl6
19:14 TimToady Go on...
19:14 hercynium left #perl6
19:14 [hercynium] is now known as hercynium
19:18 colomon o/
19:19 LeifD joined #perl6
19:20 tadzik colomon: o/
19:24 am0c joined #perl6
19:26 Patterner left #perl6
19:31 [Coke] joined #perl6
19:32 sorear good * #perl6
19:33 TimToady o/
19:33 tadzik hello
19:36 yarrak joined #perl6
19:36 cdarroch joined #perl6
19:36 risou joined #perl6
19:36 cdarroch left #perl6
19:36 cdarroch joined #perl6
19:36 jon__ joined #perl6
19:37 IllvilJa joined #perl6
19:38 Psyche^ joined #perl6
19:38 Psyche^ is now known as Patterner
19:38 jon__ is now known as ThundrMeistr
19:40 [Coke] looks like rakudo is borked on parrot HEAD. working on a patch...
19:41 Sarten-X left #perl6
19:41 tadzik didn't somebody do that a while ago?
19:41 tadzik nwellhoff, or someone?
19:41 risou left #perl6
19:41 [Coke] for concat_s_s ?
19:41 tadzik si
19:42 [Coke] tadzik: I'm sure it's been done dozens of times.
19:42 tadzik ah, ok
19:42 [Coke] perhaps I missed an update.
19:42 [Coke] I'm already up to date and getting a failure, so...
19:43 hercynium left #perl6
19:44 risou joined #perl6
19:46 [Coke] if I'm bumping parrot version, is it sufficient to run "make test", or do I need spectest?
19:49 [Coke] ... running spectest, JIC.
19:52 colomon definitely spectest
19:52 colomon [Coke]++
19:54 _twitch left #perl6
19:55 [Coke] zzzzzzzzzzzzzzzzzzzzzz.
19:55 flussence ...wait, what? I did a spectest-rebuild myself only an hour ago and it seemed fine then...
19:55 colomon yeah, it takes some time.
19:58 [Coke] flussence: did you do it against parrot HEAD?
19:58 flussence I was just about to say... my bad. the rakudo git on this computer is pulling from my other one, so not exactly...
19:58 _kaare left #perl6
19:59 [Coke] Guessing that it's ddbdd541c6cf9d1d9deb
19:59 [Coke] https://github.com/parrot/parrot/commit/ddbdd541c6cf9d1d9deb2a4d589bf1fcae416b12
20:00 flussence argh, my rakudo/parrot dir was messed up and a week out of date
20:01 flussence ok, time to rebuild everything there...
20:03 flussence (what would be more useful, should I do my cronned test run based on parrot HEAD or whatever the revision file says?)
20:03 ThundrMeistr left #perl6
20:06 soroush left #perl6
20:06 soroush joined #perl6
20:07 _twitch joined #perl6
20:09 [Coke] checking against revision file protects against breakages in perl6 code.
20:09 [Coke] checking against parrot HEAD protects against changes in parrot.
20:10 [Coke] s/perl6/rakudo/
20:11 flussence I'll leave it alone for now, especially if it's not entirely working with HEAD... I like my perl6 working :)
20:13 [Coke] someone should definitely be testing it on a regular basis to avoid letting bugs pile up (that's what killed partcl)
20:14 [Coke] t/spec/S29-context/exit.rakudo ................................. Failed 1/3 subtests
20:14 [Coke] known?
20:15 flussence I get 3 fails every time, but they're all in S05
20:19 colomon [Coke]: gimma a sec
20:20 _twitch left #perl6
20:20 colomon [Coke]: locally I get "All tests successful", with one of them fudged.
20:21 [Coke] platform?
20:21 [Coke] (I'm on darwin/x86 here.)
20:22 colomon same
20:22 [Coke] freaky.
20:22 colomon that's on latest Rakudo with its parrot, not latest parrot.
20:23 [Coke] colomon: any reason we don't have a calculated # of tests on S32-trig/*.t?
20:23 colomon it's a bit of a pain in the neck to calculate the #
20:24 [Coke] if the tests weren't so slow, I'd not have noticed. ;)
20:33 [Coke] how do I do the equivalent of "prove -v path/to/foo.rakudo"
20:35 jasonmay prove -e perl6 ?
20:41 flussence if I understand p5's test code right, "perl6 path/to/foo.rakudo" does that anyway?
20:42 Tene flussence: but doesn't pass the output to prove
20:43 flussence oh.
20:43 arnsholt [Coke]: If you're working on a subset of the testsuite, there's also make localtest
20:47 dukeleto [Coke]: you can do "make test t/spec/blah/foo.t" i think
20:47 dukeleto [Coke]: and possible with foo.rakudo too
20:48 soroush left #perl6
20:48 soroush joined #perl6
20:49 [Coke] prove -e was what I wanted. no clue why I was stuck on that, danke.
20:51 [Coke] ok. only failure in spectest right now is that "exit 5" is generating a lot of verbose output.
20:55 jhuni joined #perl6
21:12 LeifD left #perl6
21:14 masak joined #perl6
21:14 masak ahoy!
21:14 moritz_ hello zebra!
21:15 tadzik hey!
21:15 dual joined #perl6
21:15 moritz_ http://tachyon.in/clay/ # very different niche than perl 6, but sounds very promising
21:15 lue hello #perl6 o/
21:15 lue and hello fellow zebra \o
21:16 masak <TimToady> which might be a good argument for changing 0d to 0t
21:16 masak I think it's a good argument for not overloading :2 et al.
21:16 masak even after TimToady's explanation, I don't see the use of letting the 0x override the :2
21:17 masak ...so that user input can decide the radix? sounds like a source of subtle bugs to me, without much corresponding usefulness.
21:17 masak if the programmer *wants* that behavior, it should be easy enough to trigger explicitly.
21:17 allbery_b I'm inclined to agree; :base(value) strikes me as an explicit declaration, and some other incantation should mean "user decides"
21:19 moritz_ that incantation is called $yourstring.Int
21:19 moritz_ rakudo: say '0x10'.Int
21:19 p6eval rakudo cae7f9: OUTPUT«16␤»
21:20 masak it seems that lately I've been very much in favor of making Perl 6 use *less* magic.
21:20 lue [backlogging] Ah, I see TimToady stumbled upon my silly error message. That should be fixed...
21:21 masak glad we agree.
21:21 masak makes me smile every time I see the error message. but not because I want to keep it. :)
21:27 lue There's probably more subtle ways of putting a little humor in an error message... [assuming, of course, you want P6 to be -Ofun down to the last error message :)]
21:27 * moritz_ couldn't resist
21:28 lue Funny, I swear I remember seeing things like :16<0d34> becoming an issue when I worked on it...
21:28 * moritz_ waits for dalek to  make his show
21:28 * lue backlogs for proof
21:29 sorear hello masak!
21:29 dalek rakudo: ba1fdde | cotto++ | src/ (6 files):
21:29 dalek rakudo: Remove deprecated uses of two arg concat pirop
21:29 dalek rakudo:
21:29 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
21:29 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/ba1fddece6
21:29 dalek rakudo: 3750262 | moritz++ | src/builtins/Num.pir:
21:29 dalek rakudo: PANIC
21:29 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/375026242f
21:30 masak sorear++! \o/
21:30 masak moritz_++ # in-joke commit message ;)
21:30 pmurias sorear: hi
21:32 pmurias i fixed a bug in Test (see https://github.com/pmurias/niecza/commit/df055f428bbe5ce1b7676a189190768e9a0e39f6)
21:33 lue It was funny when I did it, but I know better now. [Next time I'll program a counter that'll count how many errors you encounter, and at a certain point Rakudo starts screaming in terror :)]
21:34 pmurias TimToady: do users often enter non decimal numers?
21:36 dalek niecza: df055f4 | pmurias++ | lib/Test.pm6:
21:36 dalek niecza: ok(1,"foo\nbar") now print out
21:36 dalek niecza: ok 1 - foo
21:36 dalek niecza: #bar
21:36 dalek niecza: review: https://github.com/sorear/niecza/commit/df055f428b
21:36 dalek niecza: 069b229 | pmurias++ | t/fudgeandrun:
21:36 dalek niecza: fudgeandrun uses ../roast/fudge
21:36 dalek niecza: review: https://github.com/sorear/niecza/commit/069b229e39
21:36 dalek niecza: 75090a8 | pmurias++ | lib/Test.pm6:
21:36 dalek niecza: added skip to Test
21:36 dalek niecza: review: https://github.com/sorear/niecza/commit/75090a85cb
21:36 sorear pmurias++
21:39 sorear TimToady: What is a legitimate use for $obj.submethod?  I think submethods should only be accessible via WALK.
21:40 * [Coke] sees that his patch for concat cleanup is not needed.
21:41 [Coke] I am trying to track down when exit.t started failing.
21:42 masak sorear: S12:607: "Apart from the keyword, submethod declaration and call syntax is identical to method syntax."
21:44 risou left #perl6
21:49 molaf joined #perl6
21:49 pmurias sorear: i get an exception from C# land withought line numbers do i need to pass a debugging flag?
21:51 lue About :16<0d34> and friends, I think the number should go through as d34, not 34. I would lean towards no magic converting (e.g.  :16<0x4C> fails)
21:55 masak rakudo: class A { my method foo { say "OH HAI" }; method bar { foo } }; A.new.bar
21:55 p6eval rakudo cae7f9: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤  in 'A::foo' at line 22:/tmp/zxYfF8RRtW␤  in 'A::bar' at line 22:/tmp/zxYfF8RRtW␤  in main program body at line 22:/tmp/zxYfF8RRtW␤»
21:56 masak rakudo: class A { my method foo { say "OH HAI" }; method bar { foo(self) } }; A.new.bar
21:56 p6eval rakudo cae7f9: OUTPUT«OH HAI␤»
21:56 masak rakudo++
22:01 MayDaniel left #perl6
22:16 risou joined #perl6
22:16 masak I would be writing Perl 6 right now, but I'm too caught up in "Harry Potter and the Methods of Rationality"...
22:18 colomon oh noez!
22:18 Tene masak: Did he start updating again?
22:18 s1n left #perl6
22:18 masak Tene: I wouldn't know, I'm only at instalment 49 so far.
22:19 masak but it's *so* *good*! I should have ceased being amazed at how good a writer he is by now, but he keeps surprising me.
22:19 * lue should get back into HPatMoR
22:20 masak lue: how far did you read?
22:20 * colomon gave up after chapter 10 or so.
22:21 pmurias what's HPatMor?
22:21 colomon "Harry Potter and the Methods of Rationality"
22:21 lue on chapter 22. I had the tab open for a looong time, but I wasn't reading, so I bookmarked it for later.
22:21 colomon it's a crazy fan fic
22:21 lue [I tend to leave tabs open for way too long]
22:21 masak pmurias: http://www.fanfiction.net/s/5782108/1/Harry_Potter_and_the_Methods_of_Rationality
22:22 masak lue: tell me about it.
22:22 masak lue: I have >4k tabs open in Firefox right now. the oldest ones are from last December.
22:23 lue If only I had the computing power to leave that many open :)
22:24 masak the CPU usage that a 30-or-so-days old Firefox consumes tells me it wasn't designed to be used that way. that's with js turned off and lazy tab loading.
22:24 tadzik masak: there is this "Bookmark" thing, you know
22:24 masak tadzik: mrrrh :)
22:24 lue .oO(It's weird to see what Firefox looks like when one has <= 4 tabs open...)
22:24 arnsholt 4 THOUSAND tabs?
22:24 * masak hides
22:24 masak arnsholt: it's sort of... gotten out of control.
22:24 masak I blame Twitter.
22:24 arnsholt I usually close tabs when I realize I'm never going to get around to reading them
22:25 arnsholt Or if I've forgotten why I opened it =)
22:25 lue Firefox 4 has a nifty new organizational technique. I forgot what it's called, and I'll never use it cos 1) Fedora won't update me anymore :(    2) It would kill my CPU :(
22:26 pmurias left #perl6
22:30 lue I would say it's a bug (or maybe an unwanted "feature") when you have all tests passing, but make test still says failure because you only used plan *; [I'm actually counting the # of tests now, so I can see a pretty green light when all passes :)]
22:31 arnsholt In an ideal world, saying plan * would output the plan after the tests have been run
22:31 arnsholt I'm just not sure how to implement that
22:32 masak er, no.
22:32 masak there needs to be some way to tell if the tests have been prematurely interrupted.
22:32 arnsholt Well, yeah
22:32 masak that's what &done_testing is for.
22:33 masak that's what you should use here, lue.
22:33 arnsholt Oooh. I didn't know done_testing existed
22:34 masak by the way, while I remember it, I plan to recommend in S24 that &done_testing be named &done. Ovid wrote about this once.
22:34 masak underscores are ugly, and the '_testing' part is completely unnecessary.
22:34 arnsholt Yeah, that sounds reasonable to me as well
22:34 masak arnsholt: seems an S24 really is needed, then, if &done_testing isn't common knowledge.
22:35 masak arnsholt: I think you just provided me with a disposition for my S24 draft. thank you. :)
22:35 arnsholt Hehe
22:35 arnsholt I was about to ask why there is no S24 =)
22:36 lue so just write &done_testing at the end of the document?
22:37 masak aye.
22:37 masak well, no.
22:37 masak done_testing;
22:40 arnsholt Hmm. I don't think &plan needs to be multi
22:40 masak in Rakudo?
22:40 arnsholt Yah
22:41 arnsholt Test.pm:35
22:41 masak it's exported, so it's not too bad it's a multi.
22:42 * masak echoes moritz_++'s "why you shouldn't forbid stuff just because you think it's wrong"
22:42 bacek joined #perl6
22:43 arnsholt The exporting is a good point. Didn't think about that
22:44 arnsholt I just thought it was unnecessary, rather than to be forbidden
22:44 masak I *think* that's the way it works -- that someone can 'use Test;' and then supply her own 'multi plan' which would commingle with the imported one.
22:44 arnsholt Yeah. Sounds reasonable
22:44 masak arnsholt: there's a tendency in the setting to declare subs and methods multi, too, for the same reason.
22:45 arnsholt Yeah, makes sense
22:46 arnsholt I'm still not acclimatized to this whole multi thing
22:49 masak it's very beautiful.
22:49 masak the Most Recent spec change only makes it a little bit ugly, but we can probably fix that. it was still worth it.
22:50 arnsholt Oh?
22:50 allbery_b four... thousand... tabs
22:50 diakopter allbery_b: wait, what?
22:50 allbery_b someone needs to meet evernote
22:50 allbery_b someone DESPERATELY needs to meet evernote :)
22:50 diakopter who?
22:50 allbery_b <masak> lue: I have >4k tabs open in Firefox right now. the oldest ones are from last December.
22:51 masak people keep recommending all these plugins to me.
22:51 allbery_b evernote's not a plugin, lthough ut has plugins for pretty much anything that supports plugins and handles information
22:51 masak truth is, the system I have works. it's just that I keep overloading all the systems I adopt to their limit.
22:52 lue :)
22:52 allbery_b and it makes a pretty good outboard brain :)
22:53 * lue looks up evernote out of curiousity
22:53 * masak too
22:53 allbery_b there are other programs if you prefer.  the folks at personalbrain keep nagging me because i downloaded a demo once...
22:54 lue I personally would like to know how to keep 4k tabs open, because then I can avoid the semi-ritualistic "should I close this tab?" game.
22:55 allbery_b I'd kinda like to know how he keeps firefox from keeling over with that many tabs open.
22:55 allbery_b and how he ever *finds* anything...
22:55 Tene left #perl6
22:56 arnsholt rakudo: class A { submethod BUILD($a, $b) { say "hello" } }; A.new(1,1) # What am I doing wrong?
22:56 p6eval rakudo cae7f9: OUTPUT«Not enough positional parameters passed; got 1 but expected 3␤  in 'A::BUILD' at line 22:/tmp/8w6UqIxJAv␤  in main program body at line 22:/tmp/8w6UqIxJAv␤»
22:57 masak allbery_b: I don't go looking for things among the tabs. the 4k tabs are a *queue*, things I haven't looked at (and bookmarked) yet.
22:57 masak so I push new tabs to the right, and shift tabs off the left.
22:58 diakopter masak: someday you'll overflow
22:58 masak diakopter: yes. it's happened three or four times already.
22:58 allbery_b for that I use instapaper
22:58 masak allbery_b: I've been recommended that one before. maybe I'll have a look at it.
23:02 arnsholt Anyone have an idea how to get positional arguments working with &BUILD?
23:04 masak rakudo: class A { submethod BUILD($x) { say $x } }; A.new(:x("OH HAI"))
23:04 p6eval rakudo cae7f9: OUTPUT«OH HAI␤»
23:04 masak like that?
23:05 arnsholt Well, I wanted to say A.new($foo, $bar), ideally
23:05 arnsholt Without the pair syntax
23:05 masak then you'll need to provide your own .new method.
23:06 masak that's the only reason I know to provide one's own .new method, in fact: to do custom signatures.
23:06 arnsholt Ah, right
23:17 arnsholt rakudo: if False { say "oh" }
23:17 p6eval rakudo cae7f9:  ( no output )
23:18 masak rakudo: if {False} { say "OH HAI" }
23:18 p6eval rakudo cae7f9: OUTPUT«OH HAI␤»
23:18 masak rakudo: if {if False { say "oh" }} { say "OH HAI" }
23:18 p6eval rakudo cae7f9: OUTPUT«OH HAI␤»
23:20 arnsholt rakudo: sub foo() { return False }; say "oh" if foo();
23:20 p6eval rakudo cae7f9:  ( no output )
23:21 masak rakudo: say ?Nil
23:21 p6eval rakudo cae7f9: OUTPUT«Bool::False␤»
23:21 masak rakudo: say ?()
23:21 p6eval rakudo cae7f9: OUTPUT«Bool::False␤»
23:21 masak rakudo: say defined Nil; say defined ()
23:21 p6eval rakudo cae7f9: OUTPUT«0␤1␤»
23:21 * masak submits rakudobug
23:22 masonkramer joined #perl6
23:22 masak those should be Bools.
23:23 masonkramer What's the name of the rule that implies the .() method?
23:23 masonkramer *role
23:23 flussence (random guess) Positional?
23:24 masak Callable.
23:24 masonkramer Callable
23:24 flussence doh
23:24 masak Positional is .[]
23:24 masonkramer How do I see if a thing does Callable?
23:24 masonkramer rather
23:24 masak rakudo: sub foo {}; say &foo ~~ Callable
23:24 masonkramer if a thing does $x
23:24 p6eval rakudo cae7f9: OUTPUT«1␤»
23:24 masak rakudo: sub foo {}; say &foo.^does(Callable)
23:24 masonkramer Hmm..really?
23:24 p6eval rakudo cae7f9: OUTPUT«1␤»
23:24 flussence I saw the brackets and thought "oh, that looks like a list!" :)
23:25 masonkramer Ahh, yep that's what I wanted
23:25 masak I usually recommend the more specific way to do something -- that'd be .^does in this case. but for some reason, I like ~~ better.
23:26 masak it sweeps the specifics of class/role/enum types under the carpet, which can be quite nice sometimes.
23:26 masonkramer Good point
23:26 masonkramer For now though, as I continue to tinker, I'd like to actually make those distinctions
23:27 masonkramer by the way, shouldn't smartmatch always return Bools?
23:28 masak there's no such rule.
23:28 masak smartmatching on a regex, for example, returns a Match object.
23:28 masonkramer Right...right
23:28 masak (which boolifies well, but carries a lot of other pertinent information too)
23:28 masonkramer I would've expected Bool here though, just because I'm asking a yes or no question
23:29 masonkramer but it's probably very unimportant
23:30 masak I'd say it's a bug too.
23:30 masak but I think it's been reported already.
23:30 * masak checks
23:30 glow left #perl6
23:31 masak yep -- http://rt.perl.org/rt3/Ticket/Display.html?id=71462
23:31 masak but it's been resolved... hm.
23:31 masak rakudo: say (* ~~ Whatever).WHAT
23:31 p6eval rakudo cae7f9: OUTPUT«Bool()␤»
23:31 masak rakudo: say ("OH HAI" ~~ Str).WHAT
23:31 p6eval rakudo cae7f9: OUTPUT«Bool()␤»
23:32 masak those cases are indeed fixed.
23:32 masak this does not happen often.
23:32 * masak reopens ticket because C<&foo ~~ Callable> yields an Int
23:33 masak masonkramer++
23:33 duryodhan joined #perl6
23:33 duryodhan left #perl6
23:33 masonkramer nifty
23:33 masonkramer I love those little serendipities
23:34 cognominal left #perl6
23:35 * arnsholt decides to get started on p1
23:35 masak :)
23:35 arnsholt (And I think I have a fun solution =D)
23:37 Sarten-X joined #perl6
23:38 masak yay
23:39 rhr left #perl6
23:41 colomon I've been plugging away on p2 today, when coherent.
23:43 Tene joined #perl6
23:43 rhr joined #perl6
23:44 cotto left #perl6
23:46 * masak ➳ sleep
23:46 masak left #perl6
23:48 tadzik perl6: Date.new(now).perl # hm?
23:48 p6eval rakudo cae7f9: OUTPUT«Method 'year' not found for invocant of class 'Instant'␤  in 'Date::new' at line 6983:CORE.setting␤  in main program body at line 22:/tmp/AR6PpoChS9␤»
23:48 p6eval ..pugs: OUTPUT«*** No such subroutine: "&Date"␤    at /tmp/d2N2F3Pd8y line 1, column 1 - line 2, column 1␤»
23:51 awwaiid joined #perl6
23:52 Eth4n left #perl6
23:54 lue .u ➳
23:54 phenny U+27B3 WHITE-FEATHERED RIGHTWARDS ARROW (➳)
23:54 sorear good * #perl6
23:57 diakopter howdy sorear
23:59 lue hi sorear o/
23:59 masonkramer what's the return value of &say?
23:59 sorear masonkramer: True

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

Perl 6 | Reference Documentation | Rakudo