Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-12-14

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:03 baest_ joined #perl6
00:05 Psyche^ joined #perl6
00:17 benabik joined #perl6
00:22 lue joined #perl6
00:26 cognominal joined #perl6
00:35 popl joined #perl6
00:40 benabik joined #perl6
00:56 anuby joined #perl6
01:22 hypolin joined #perl6
01:39 asdf12 joined #perl6
01:58 Targen joined #perl6
02:04 asdf12_ joined #perl6
02:18 FROGGS_ joined #perl6
02:25 diakopter anyone around?
02:30 japhb diakopter, yes, but I'll be AFK again in a couple minutes.  What's up?
02:30 diakopter oh, just wanting someone to listen to me grouse about writing tests
02:31 japhb heh
02:31 diakopter I mean.
02:32 diakopter the only reason I'd write regression tests is so *someone else* doesn't break stuff. because I'm DTRT the first time always
02:32 japhb Oh, of *course* ...
02:33 diakopter I'm speaking tongue in cheek, hopefully apparently.
02:34 diakopter I mean, if I spend 20x more time thinking/designing than typing, surely that means I understand it well enough to know all its behaviors and interactions with other software.
02:34 japhb Yes, quite.  ;-)
02:34 popl joined #perl6
02:35 japhb As has been true for all such thoughtful programmers, for decades now ....
02:46 ggoebel_ joined #perl6
03:12 timotimo so, anyone going to do the ludum dare compo with perl6? :)
03:15 fgomez joined #perl6
03:55 noggle_ joined #perl6
04:02 colomon masak++ # just read day 9, lovely.
04:07 valen_03 joined #perl6
04:08 valen_03 hi...
05:02 thou joined #perl6
05:24 telex joined #perl6
05:35 telex joined #perl6
05:39 kaleem joined #perl6
05:44 xinming_ joined #perl6
05:52 Kharec joined #perl6
05:52 SamuraiJack joined #perl6
06:05 moritz good morning
06:08 fgomez joined #perl6
06:09 SamuraiJack joined #perl6
06:12 stevan__ joined #perl6
06:17 sorear o/ moritz
06:25 woosley joined #perl6
06:29 quester joined #perl6
06:38 wamba joined #perl6
06:44 GlitchMr joined #perl6
07:06 kaleem joined #perl6
07:13 edin joined #perl6
07:13 edin left #perl6
07:24 SamuraiJack_ joined #perl6
07:27 SamuraiJack_ joined #perl6
07:33 SamuraiJack_ joined #perl6
07:42 SamuraiJack_ joined #perl6
07:48 SamuraiJack_ joined #perl6
07:57 stanley joined #perl6
08:33 quester left #perl6
08:38 cedrvint hello #perl6
08:42 cedrvint seen PerlJam
08:42 aloha PerlJam was last seen in #perl6 16 hours 35 mins ago joining the channel.
08:44 moritz ah yes, we need an advent post
08:45 moritz anybody got one up their sleeves?
08:46 cedrvint my article is way too far from finished
08:48 fhelmberger joined #perl6
08:49 cedrvint there's a draft from PerlPilot.
08:50 moritz oh, there is?
08:51 tadzik good morning #perl6
08:52 cedrvint o/ tadzik
08:54 mtymula joined #perl6
08:54 mtymula hello my friends in perl
08:57 cedrvint hello mtymula!
08:58 mtymula i have a problem with installing rakudo on my fedora 15
08:59 cedrvint what's the problem?
08:59 mtymula i've been told that this shuld work
08:59 mtymula https://github.com/rakudo/rakudo/blob/nom/INSTALL.txt
08:59 moritz yes, it should
08:59 mtymula but it doesn't
08:59 moritz what's the problem?
08:59 mtymula i wanted to upgrate my rakudo to latest verion
09:00 mtymula but the version remains the same
09:00 moritz so what did you do?
09:01 mtymula i logged into fedora
09:01 mtymula opened switched to root
09:02 mtymula and performed successfully fallowing steps:
09:02 Rix joined #perl6
09:02 mtymula $ rm -r rakudo
09:02 mtymula $ git clone git://github.com/rakudo/rakudo.git
09:03 mtymula $ cd rakudo
09:03 mtymula $ git pull
09:03 mtymula $ perl Configure.pl --gen-parrot
09:03 mtymula $ make
09:03 mtymula $ make install
09:03 mtymula $ make test
09:03 mtymula and
09:03 mtymula make spectest
09:03 mtymula everything passed
09:04 mtymula than i write perl6 -v
09:04 mtymula and the old version is displayed
09:04 moritz what does   which perl6   say?
09:05 mtymula dont know
09:05 moritz then try it
09:06 mtymula give me a sec
09:06 moritz I suspect that now both the old and the new rakudo are installed, and PATH points to the old one
09:07 mtymula which perl6 gives me a path:
09:08 mtymula bin/perl6
09:09 moritz and is that the same path that you installed the new rakudo to?
09:10 cedrvint by default it's <rakudo-src>/install/bin I guess
09:11 mtymula dont think so... i was installing rakudo in root/rakudo/install
09:12 moritz then you need to manipulate your PATH to include /root/rakudo/install/bin before bin/
09:13 mtymula ok sine i am dumass in unix could you tell me how can i do it??
09:13 mtymula *since
09:13 cedrvint export PATH=/root/rakudo/install/bin:$PATH
09:13 cedrvint if it fails: setenv PATH /root/rakudo/install/bin:$PATH
09:14 cedrvint (not all shells use the same syntax)
09:15 cedrvint then check with "which perl6"
09:15 mtymula and it will be pernament change?
09:16 moritz no, for that you have to put it into a file that is executed during login
09:16 mtymula ok it works
09:16 cedrvint otherwise, if you want to overwrite your old perl6, use "perl Configure.pl --gen-parrot --prefix=/" instead of  "perl Configure.pl --gen-parrot".
09:16 mtymula what is nex?
09:17 mtymula *next
09:17 moritz that's typically ~/.bashrc or ~/.bash_profile
09:17 moritz oh, or system wide in /etc/bash.bashrc
09:28 mtymula .bash_profile indeed
09:34 mtymula it does not work...
09:36 moritz .bash_profile is only included for login shells
09:40 SamuraiJack__ joined #perl6
09:44 mtymula what about this:  otherwise, if you want to overwrite your old perl6, use "perl Configure.pl --gen-parrot --prefix=/" instead of  "perl Configure.pl --gen-parrot".
09:44 mtymula ??
09:44 mtymula can it work??
09:44 moritz it can work, but I wouldn't recommend using a prefix of /
09:44 moritz because then it'll be hard do deinstall
09:46 * cedrvint agrees
09:47 tadzik mtymula: where did your old perl6 come from?
09:47 mtymula i installed it the same way i quess...
09:48 nelsond joined #perl6
09:51 nelsond hay guys, can you give me one (and most important) feature perl6 will have, that is considered an advantage to other modern languages ?
09:51 moritz nelsond: grammars
09:51 nelsond i'm just wondering... as last time i touched perl was probably around 1998.
09:52 nelsond yo mean, in terms of syntax?
09:52 Su-Shee nelsond: no, you can create your own grammars for whatever you need.
09:53 Su-Shee nelsond: also, Perl 6 gets all this nasty encoding unicode string stuff right.
09:53 moritz like regexes, but more readable, powerful and composable
09:53 kivutar joined #perl6
09:53 Su-Shee a regex framework ;)
09:54 GlitchMr nelsond: good error message
09:54 GlitchMr s
09:54 GlitchMr std: if(42 > 52){}
09:54 p6eval std a8bc48f: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'if' used at line 1�Check failed�FAILED 00:00 43m�»
09:54 GlitchMr perhaps not
09:54 GlitchMr std: while(1) { }
09:54 p6eval std a8bc48f: OUTPUT«[31m===[0mSORRY![31m===[0m�Word 'while' interpreted as 'while()' function call; please use whitespace instead of parens at /tmp/QpHgQJRtMM line 1:�------> [32mwhile[33m�[31m(1) { }[0m�Unexpected block in infix position (two terms in a row) at /tmp/QpHgQJRtMM …
09:54 Su-Shee nelsond: I think - compared to other modern languages - it keeps Perl's density and conciseness, it's very "smooth" do use, has a lot of "do what I mean" and tons of features from operators, types, roles, grammars...
09:55 nelsond ya, errors with hints, i like it.
09:55 GlitchMr Also, bye
09:55 Su-Shee nelsond: it's very open in terms of style - OO, functional, baby-perl...
09:56 nelsond well, thanks, all this looks interesting, i'll read about them.
09:57 Su-Shee nelsond: keep in mind that there probably isn't a "best practise" culture like in other languages yet .. like "you should do this and not that" and such..
10:00 cedrvint nelsond: I think Perl 6 is the best language not (only) be cause a given set of features, but mainly because of its clever design (syntax, consistency, ...)
10:00 cedrvint Perl 6 designers did a really good job, kudos to all of you!
10:01 Su-Shee I'm hacking javascript, python, ruby and perl 5 side by side these days and perls - both of them - still have the least "getting in my way" factor...
10:09 GlitchMr joined #perl6
10:11 GlitchMr By the way, Perl 6 allows you to write natural code. For example, $x == 3 | 5 instead of $x == 3 || $x == 5
10:28 felher good *, #perl6
10:36 hypolin joined #perl6
10:46 hugme joined #perl6
10:54 bowtie joined #perl6
11:05 Su-Shee_ joined #perl6
11:12 SamuraiJack__ joined #perl6
11:15 cognominal joined #perl6
11:25 ggoebel_ joined #perl6
11:29 SmokeMachine joined #perl6
11:38 sftp joined #perl6
11:47 cedrvint no Advent gift today :'-(
12:03 moritz today is still a while longer
12:03 fgomez joined #perl6
12:20 colomon Was it PerlJam who edited his post today?  That seems promising.
12:23 felher colomon: btw: are the set operations you talked about in your nice post specced?
12:23 wamba joined #perl6
12:23 colomon phenny: tell sorear Any notion how hard it would be to add trait_mod:<is> to Niecza?
12:23 phenny colomon: I'll pass that on when sorear is around.
12:24 colomon felher: neither TimToady nor I nor anyone else has gotten around to adding them to the spec.  They've been in the spectest for a while.
12:24 felher colomon: ah, i see. Thanks :)
12:24 fgomez joined #perl6
12:25 sorear colomon: I think that would be pretty much useless without a metamodel
12:25 phenny sorear: 12:23Z <colomon> tell sorear Any notion how hard it would be to add trait_mod:<is> to Niecza?
12:26 colomon sorear: ah.  And I doubt we're getting a metamodel in the next week, right?
12:26 moritz it would be just like sorear to add a metamodel within a week :-)
12:27 * colomon is thinking about BPDD for his next Advent post now, trying to avoid the last minute hacking rush this time.
12:27 sorear actually if there's a spec it might be doable
12:27 sorear niecza *has* a metamodel, it's just in a million pieces
12:28 rindolf joined #perl6
12:28 sorear making something consistant and usable is not impossible
12:28 sorear I'd rather not design anything though
12:29 sorear also if you're talking about sub traits, rakudo and niecza currenty have a substantial difference in sub handling
12:30 colomon yeah, I was just wondering how hard it would be to get a simple "is cached" implementation going for Niecza.
12:32 sorear colomon: my sleep schedule has gone insane the last week,what's your excuse
12:32 sorear I need to sleep now
12:32 colomon sorear: err, 7:30 am here, I've been up for half an hour.
12:32 sorear I thought you were a fellow west coaster
12:32 sorear nm
12:33 colomon no worries
12:33 sorear &
12:40 rindolf joined #perl6
12:41 colomon huh.  just tested to see if moritz's "is cached" implementation still worked in rakudo, and it seems to compile all right, but using it actually makes a simple recursive factorial call slower rather than faster.  :\
12:42 moritz :(
12:42 colomon r: say (1, 1, * + * ... *)[^100]
12:42 p6eval rakudo 6e6ac5: OUTPUT«1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 1346269 2178309 3524578 5702887 9227465 14930352 24157817 39088169 63245986 102334155 165580141 267914296 433494437 701408733 1134903…
12:42 moritz maybe some argument passing changed, and it never hits the cache now
12:43 colomon nope.
12:44 colomon I mean, I just tested it with Fibonacci instead, and "is cached" is a huge performance improvement there.
12:44 colomon like 50 times faster on fib(30)
12:45 colomon it must be the overhead of caching is slower than just recursively calling fact
12:45 colomon crazy
12:49 moritz erm, wait
12:50 moritz recursive factorial doesn't ever hit the cache
12:50 moritz so it only sees the overhead from from checking the cache, and never benefits from it
12:50 moritz no wonder it's slower
12:51 hugme joined #perl6
12:52 rindolf joined #perl6
13:05 rindolf joined #perl6
13:22 rindolf joined #perl6
13:36 rindolf joined #perl6
13:38 s1n joined #perl6
13:43 pmurias joined #perl6
13:44 pmurias japhb: have you tried building nqp-js under the current rakudo star?
13:54 rindolf joined #perl6
13:57 atrodo joined #perl6
14:05 SamuraiJack__ joined #perl6
14:09 PacoAir joined #perl6
14:12 stevan_ joined #perl6
14:13 daxim joined #perl6
14:23 xilo_ joined #perl6
14:25 cognominal joined #perl6
14:38 anuby_h joined #perl6
14:45 skids joined #perl6
14:48 bluescreen10 joined #perl6
14:58 stopbit joined #perl6
15:02 cognominal joined #perl6
15:08 am0c joined #perl6
15:16 anuby_h_ joined #perl6
15:22 arlinius joined #perl6
15:26 colomon moritz: why wouldn't it hit the cache?
15:27 benabik joined #perl6
15:27 moritz colomon: because fac(5) = 5 * fac(4) = 5 * 4 * fac(3) etc
15:27 colomon moritz: I mean, calculating just one factorial wouldn't be faster, which is why I calculated fact(10000) and fact(10001)
15:27 moritz colomon: oh, I didn't know that
15:41 grondilu joined #perl6
15:41 grondilu eval: $_ = 0; $_ + $_++
15:41 buubot_backup grondilu: 1
15:41 grondilu rn: my $_ = 0; say $_ + $_++
15:41 p6eval rakudo 6e6ac5: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Redeclaration of symbol $_â�¤at /tmp/bM9YY4BUvQ:1â�¤------> [32mmy $_ [33mâ��[31m= 0; say $_ + $_++[0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤        constraintâ�¤Â»
15:41 p6eval ..niecza v24-12-g8e50362: OUTPUT«Potential difficulties:â�¤  Useless redeclaration of variable $_ (see  line 0) at /tmp/ApNYsk470b line 1:â�¤------> [32mmy $_ [33mâ��[31m= 0; say $_ + $_++[0mâ�¤â�¤1â�¤Â»
15:41 grondilu rn: $_ = 0; say $_ + $_++
15:41 p6eval rakudo 6e6ac5, niecza v24-12-g8e50362: OUTPUT«1␤»
15:42 grondilu rn: $_ = 0; say 0+$_ + $_++
15:42 p6eval rakudo 6e6ac5, niecza v24-12-g8e50362: OUTPUT«0␤»
15:45 pmurias Any resumable exceptions may not be resumed once we exit the CATCH statement?
15:47 colomon moritz: actually, I think the problem with fact may be that all the time is actually in converting the number to a string to print out.
15:49 moritz :-)
15:50 colomon yeah, that's totally it.
15:51 colomon unless rakudo's gotten really smart about eliminating unused variables.
15:51 GlitchMr Somehow I've feeling that C++ isn't for humans. `int a(24);` and `int a = 24;` are identical.
15:51 benabik GlitchMr: That's only because initializing and assigning to an int are the same thing.
15:51 moritz colomon: it hasn't
15:52 colomon moritz: didn't think so.
15:52 pmurias GlitchMr: that's actually usefull
15:53 GlitchMr Also... 0 +... isn't it P5ism?
15:53 colomon 0 +, p5, yes.
15:55 GlitchMr Also, that 14th day article for Perl 6 Advent...
15:55 GlitchMr At least I see draft by PerlJam in posts, but...
15:56 GlitchMr Also, http://perl6advent.wordpress.com/2011/12/24/day-24-subs-are-always-better-in-multi-ples/
15:56 GlitchMr perl6 tag?
15:57 cedrvint ?('PerlJam' ~~ 'Perlpilot')
15:58 moritz True
16:00 GlitchMr False
16:00 GlitchMr But, $PerlJam eqv $perlpilot
16:08 jnthn evening o/
16:09 felher o/ jnthn
16:09 jnthn Phew...final class of the year taught. :)
16:10 [Coke] jnthn!!
16:10 sjn jnthn: well done! \o/
16:10 [Coke] er, jnthn++
16:10 [Coke] . o O (odd thinko)
16:10 sjn jnthn: now you can send me some receipts ;)
16:11 jnthn sjn: I got as far as ordering a new printer :)
16:11 sjn :D
16:15 cognominal joined #perl6
16:16 colomon moritz: even without printing, it's still slow with is cached.  but... does Hash in rakudo still use Str keys?
16:16 moritz yes
16:17 moritz what else should it use?
16:17 jnthn It should use Str keys by default
16:17 timotimo so, 14th calendar post this evening?
16:17 moritz I hope so
16:17 GlitchMr PerlJam is writing it
16:17 moritz if there's none when I get home, I'll write something myself
16:18 * jnthn will make sure tomorrow's one happens :)
16:18 * sjn is wondering if the dec 21st calendar post somehow will include the end of the mayan calendar :)
16:18 GlitchMr moritz: it's already in drafts. When trying to modify it I get "Warning: perlpilot is currently editing this post"
16:18 jnthn If you want a hash with objecty keys, declare it: my %hash{Mu};
16:19 GlitchMr my %hash{Mu};... that's interesting trick.
16:19 moritz though Int.WHICH also uses .Str internally
16:20 moritz so that's no way around a slow Int stringification
16:20 colomon jnthn: I'm just trying to figure out why "is cached" doesn't help the performance of recursive factorial.  I'm thinking it's because converting the number to a Str during the caching process is actually slower than calculating the number!
16:20 GlitchMr Just wondering, does Perl 6 have immutable tuples, like Python?
16:20 jnthn colomon: Hm. Hope big are the numbers? :)
16:21 colomon approximately 35000 digits, I think.
16:22 felher r: my $x = \(1,2,3); say $x[1]; $x[1] = 4;
16:22 p6eval rakudo 6e6ac5: OUTPUT«2␤Cannot assign to a non-container␤  in block  at /tmp/M1Le3xO3Gj:1␤␤»
16:22 colomon rn: say ([*] 1..10000).log(10)
16:22 p6eval niecza v24-12-g8e50362: OUTPUT«35659.45427452078␤»
16:22 p6eval ..rakudo 6e6ac5: OUTPUT«Inf␤»
16:22 felher GlitchMr: Captures may be used, I guess.
16:22 jnthn felher: Captures are immutable.
16:22 jnthn oh, you knew :)
16:22 jnthn duh :)]
16:22 colomon yeah, 35,000+
16:23 jnthn colomon: Well, guess the profiler can best answer :)
16:23 felher jnthn: thanks anyway :)
16:23 mtymula joined #perl6
16:24 mtymula hello again:)
16:24 felher o/ mtymula
16:24 GlitchMr https://gist.github.com/4286656
16:24 mtymula can anyone tell me if panda works correctly and where exactly it installs modules??
16:24 GlitchMr What if I would like to use tuple as hash key, just like in Python
16:24 moritz mtymula: it worked yesterday for me
16:24 PerlJam greetings.
16:25 GlitchMr (I know, I should do %a{1}{2}, but let's say I'm crazy enough)
16:25 moritz mtymula: and it installs into %*CUSTOM_LIB<site> ~ 'lib/' by default
16:25 mtymula motiz you make me laught
16:25 mtymula every time
16:25 moritz r: say %*CUSTOM_LIB<site>
16:25 p6eval rakudo 6e6ac5: OUTPUT«/home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/site␤»
16:25 PerlJam I've got a draft article about is-prime, but apparently I suck at explaining Rabin-Miller.  Anyone care to take a look and improve it?
16:25 * moritz should have chosen a career as comedian
16:25 spider-mario joined #perl6
16:26 PerlJam http://perl6advent.wordpress.com/?p=1677&amp;preview=true
16:26 mtymula or maybe it is the amount of alcochol in my vains
16:26 PerlJam (I assume that link works properly if you're logged in)
16:26 GlitchMr PerlJam: I already have saw it ;-). It's nice article.
16:27 GlitchMr (I don't know why you would want to implement is-prime function when Perl 6 already has one, but whatever)
16:27 colomon jnthn, moritz: wait, my theory is completely wrong.  there are 35,000 digits in the value of (the biggest) number in the cache.  but the key (which is the bit that gets stringified, right?) is just 5 digits.
16:27 moritz right
16:28 moritz unless the value is stringified too, somewhere
16:28 [Coke] can someone set me up with a login on p6advent?
16:28 mtymula moritz: can you explain me like to an idiot what exactly is %*CUSTOM_LIB<site> ~ 'lib/'
16:28 mtymula or how can i find out
16:28 GlitchMr r: say %*CUSTOM_LIB<site> ~ 'lib/'
16:28 p6eval rakudo 6e6ac5: OUTPUT«/home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/sitelib/␤»
16:28 mtymula because i would like to make it work... and it does not...
16:28 GlitchMr But I think he meant ~ '/lib/'
16:29 moritz yes, I did
16:30 mtymula ok so where the hell is this lib folder supposed to be located??
16:30 mtymula somwhere in rakudo
16:30 felher r: my %hash; %hash{\(1,2)} = 'Universe'; say %hash{\(1,2)}. # @ GlitchMr -- You may still acces those objects with %hash{'1 2'}, though, which might pose a problem for you.
16:30 p6eval rakudo 6e6ac5: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unsupported use of . to concatenate strings;  in Perl 6 please use ~â�¤at /tmp/Jj1rzwtfZa:1â�¤------> [32m(1,2)} = 'Universe'; say %hash{\(1,2)}. [33mâ��[31m# @ GlitchMr -- You may still acces thos[0mâ�¤Â»
16:30 mtymula or in panda?
16:30 felher r: my %hash; %hash{\(1,2)} = 'Universe'; say %hash{\(1,2)} # @ GlitchMr -- You may still acces those objects with %hash{'1 2'}, though, which might pose a problem for you.
16:30 p6eval rakudo 6e6ac5: OUTPUT«Universe␤»
16:31 jnthn colomon: perl6 --profile ? :)
16:31 colomon jnthn: okay, okay.
16:32 GlitchMr felher: that is like old $a{1,2} syntax in Perl 5. Not interested in that.
16:32 colomon jnthn: sure, I could look for real evidence instead of just wildly spectating.
16:32 jnthn ;)
16:34 felher GlitchMr: okay, I see :)
16:36 japhb pmurias, No, I have not been able to build anything in a couple days -- moving all my stuff to a new computer that hopefully won't overheat when I compile Rakudo.  :-/
16:37 colomon jnthn: shall I mail you a profile?
16:38 jnthn colomon: Feel free, and the code :)
16:43 colomon should be on their way to you.
16:43 jnthn Thanks
16:46 FROGGS_ g'evening
17:02 Kharec joined #perl6
17:04 skids .oO( So (&) is the "Texas Intersection."  Yep.  Looks like an off-ramp to me.)
17:10 kivutar joined #perl6
17:11 MayDaniel joined #perl6
17:14 erkan joined #perl6
17:15 cognominal joined #perl6
17:17 nyuszika7h joined #perl6
17:20 thou joined #perl6
17:21 gaussblurinc_ joined #perl6
17:22 hash_table joined #perl6
17:26 TimToady we went and saw The Hobbit last night at midnight, so if you notice bags under my eyes, you'll know why  :)
17:29 noggle joined #perl6
17:31 geekosaur so your eyes are Bag End?
17:31 stanley joined #perl6
17:32 TimToady either that, or they're burning from the Smaug
17:32 betterworld joined #perl6
17:32 geekosaur (or at least looking out from Bag End...)
17:42 wamba joined #perl6
17:56 masak top o' the evening to you, #perl6
17:57 diakopter o|
17:58 * TimToady read that as a grim cyclops
17:59 groky joined #perl6
17:59 * FROGGS .oO(   - |    <--- a chinese grim cyclops?   )
18:00 diakopter *smacks forehead*
18:00 * diakopter hopes FROGGS is chinese
18:00 groky joined #perl6
18:01 FROGGS no, then I'd be known as FLOGGS ;o)
18:01 timotimo >_>
18:01 * diakopter tries very hard not to rotfl
18:02 timotimo does the diakopter turn into a roflcopter when he's amused?
18:02 diakopter chromatic wins making that joke first
18:02 timotimo OK
18:03 kaare_ joined #perl6
18:04 diakopter FROGGS: seems TimToady meant the | to be the (flat) mouth
18:04 FROGGS ya, of course
18:05 timotimo so a stereotypically chinese grim cyclops should look more like   ||   ?
18:06 FROGGS depends on how its eyelids work
18:06 diakopter ¦|
18:06 diakopter er.
18:06 diakopter oops.
18:07 diakopter fail
18:07 FROGGS hehe
18:08 timotimo :D
18:08 diakopter anyway, /me hopes no one is offended
18:09 TimToady a bunch of round-eyed racists, the lot of you
18:09 FROGGS well, I wouldn't be if someone makes jokes about germans...
18:09 * TimToady is a racistist
18:09 diakopter FROGGS: I don't think you'd be amused by the jokes Craig Ferguson makes about Germans quite often
18:10 groky joined #perl6
18:10 * TimToady hopes no one here is a racististist
18:10 * moritz is just a meta-ist
18:10 FROGGS diakopter: try me
18:10 diakopter nope
18:11 masak <da1ek> OMG GUYS, A COMMIT TO perl6/ecosystem!
18:11 diakopter it hasn't been 500 years since the world wars yet.
18:11 masak tadzik++
18:11 * TimToady would rather stay up late to watch The Hobbit
18:13 masak no perl6advent post today? :'(
18:13 GlitchMr masak: there is
18:13 GlitchMr Day 14 - Primal Needs
18:14 diakopter it's not published.
18:14 TimToady Primal Scream Therapy
18:14 GlitchMr Scheduled for: Dec 14, 2012 @ 20:00 Edit
18:14 GlitchMr huh?
18:14 GlitchMr Date was already set. Yes, it's late. But better than never.
18:15 diakopter when is 20:00
18:15 GlitchMr This is the question...
18:17 diakopter I mean, what time zone
18:17 GlitchMr My timezone is GMT+1
18:18 GlitchMr But I don't know what timezone is 20:00 in
18:18 moritz I guess in 42 minutes
18:18 moritz because the dates wordpress has shown me so far were in my own time zone (also GMT+1)
18:20 Rotwang joined #perl6
18:20 Rotwang hi
18:20 Rotwang how can I get last element of an array?
18:20 Rotwang is there better way than: @array[@array.end] ?
18:20 moritz [*-1]
18:20 FROGGS Craig Ferguson is quite good
18:20 GlitchMr Rotwang: @array[* - 1]
18:20 tadzik masak! \o/
18:20 Rotwang ok, what does the star do?
18:21 GlitchMr It declares subroutine
18:21 Rotwang wth?
18:21 Rotwang why do I need subroutine in array index?
18:21 GlitchMr It gets array length as its argument.
18:22 Rotwang ok, thank you
18:22 diakopter actually the * sends the array to a remote server (currently feathre) that computes a bunch of stuff then returns the array length
18:22 Rotwang yeah
18:22 masak tadzik! \o/
18:22 GlitchMr diakopter: what?
18:23 Rotwang diakopter: I think you may be onto something here
18:23 tadzik masak: did you see the coroutines post draft?
18:23 masak Rotwang: diakopter has it right.
18:23 masak it's a remote procedure call.
18:23 masak tadzik: no, I haven't had time to look at drafts.
18:23 masak tadzik: and likely won't for most of the evening.
18:23 Rotwang masak: remote?
18:24 GlitchMr remote procedure call?
18:24 GlitchMr Now I'm confused.
18:24 diakopter Rotwang: we're kidding
18:24 masak Rotwang: the * gets packaged as a SOAP requ... dang, diakopter.
18:24 diakopter GlitchMr: just a joke; sorry :)
18:24 Rotwang [;
18:24 Rotwang for a minute I've thought I'm in a parallel universe or something
18:25 masak yeah, just kidding. Perl 7 has the star as a remote procedure call, though... :P
18:25 cosimo you should use AWS, ofc
18:25 cosimo "Trust the Cloud. The Cloud is Magic"
18:25 diakopter in fact, all of Perl 6 runs on the Curiosity on Mars
18:26 Rotwang that's why it is so slow
18:26 * FROGGS .oO( mars is bright tonight )
18:27 * masak .oO( Rakudo Curiosity )
18:27 moritz sounds good :-)
18:27 cosimo .oO( should I push this code live now? )
18:30 Rotwang so
18:30 Rotwang how can I get index of a given element of an array, except for grep of for loop?
18:31 Rotwang is there any mechanizm for that?
18:31 moritz well, you can always go through a hash
18:31 Rotwang s/of/or/2
18:31 diakopter Rotwang: do you want === or == comparison?
18:31 Rotwang moritz: use hash instead of array?
18:31 diakopter or eq
18:31 moritz r: my @a = <a b c d e>; say @a.pairs.hash<c>
18:31 p6eval rakudo 6e6ac5: OUTPUT«Any()␤»
18:31 moritz hm
18:32 moritz r: my @a = <a b c d e>; say @a.pairs.hash.perl
18:32 p6eval rakudo 6e6ac5: OUTPUT«("0" => "a", "1" => "b", "2" => "c", "3" => "d", "4" => "e").hash␤»
18:32 moritz r: my @a = <a b c d e>; say (@a Z=> @a.keys).hash.<c>
18:32 p6eval rakudo 6e6ac5: OUTPUT«2␤»
18:33 Rotwang perl6 is amazing
18:33 diakopter the learning curve is not a function. sometimes it goes backwards a bunch.
18:33 Rotwang but how the hell human brain is supposed to comprehend that?
18:34 moritz like everything else: by learning
18:34 Rotwang yeah, but perl6 is waaaay more complicated than perl5, I think
18:35 moritz and in some other sense it is waaay simpler than Perl 5
18:35 moritz compare   class A { has $.x; };  say A.new(x => 5).x
18:35 moritz with
18:35 Rotwang yeah, I guess once you learn perl6 hard things get easier
18:35 kaleem joined #perl6
18:36 moritz { package A; sub new() { my ($self, %h) = @_; bless \%h, $self }; sub a { shift->{a} } }; A->new(a => 1)->a
18:36 diakopter er. I think I meant to say the learning curve is not always increasing. double fail.
18:36 moritz and some are easier straight away
18:37 flussence r: say @('a'..'z').index('e') / 2
18:37 p6eval rakudo 6e6ac5: OUTPUT«4␤»
18:37 diakopter commute&
18:38 Rotwang ok, thank you guys a lot
18:38 Rotwang hopefuly in a month I'll be able to scratch perl6's surface a bit
18:39 masak make it sooner! :)
18:39 Rotwang I'm trying
18:42 masak try quicker! :)
18:43 Rotwang [:
18:46 flussence r: say ('a'..'z').pairs.first(*.value eq 'e') # less wrong
18:46 p6eval rakudo 6e6ac5: OUTPUT«4 => "e"␤»
18:57 betterworld r: <a b c d e>.pairs>>.invert.hash<c>.say
18:58 p6eval rakudo 6e6ac5: OUTPUT«2␤»
19:02 popl joined #perl6
19:04 moritz r: <a b c d e>.kv.reverse.hash<c>.say
19:04 p6eval rakudo 6e6ac5: OUTPUT«Any()␤»
19:04 moritz r: <a b c d e>.kv.reverse.perl.say
19:04 p6eval rakudo 6e6ac5: OUTPUT«((4, "e"), (3, "d"), (2, "c"), (1, "b"), (0, "a")).list␤»
19:04 moritz r: <a b c d e>.kv.flat.reverse.hash<c>.say
19:04 p6eval rakudo 6e6ac5: OUTPUT«2␤»
19:04 moritz I guess that .reverse should flatten
19:04 moritz though I'm never sure
19:09 betterworld r: say (<a b c d e> ... 'c').elems -1
19:09 p6eval rakudo 6e6ac5: OUTPUT«2␤»
19:09 betterworld :)
19:09 moritz :-)
19:17 ponbiki joined #perl6
19:29 kaleem joined #perl6
19:31 SamuraiJack__ joined #perl6
19:47 sorear good * #perl6
19:47 FROGGS hi sorear
19:53 betterworld sadly that code will loop endlessly if the array does not contain any "c" :(
19:53 betterworld is there some variant of ... to prevent this?
19:56 yagoubix joined #perl6
19:56 yagoubix salut
19:56 FROGGS hi yagoubix
19:56 moritz betterworld: not really; though you could slice to the original array length to prevent that
19:57 yagoubix hi froggs
19:58 sirrobert joined #perl6
19:59 ggoebel_ joined #perl6
19:59 sirrobert how do I go from a unicode character number to the symbol for it in p6?
20:01 jnthn r: say "\x8089"
20:01 p6eval rakudo 6e6ac5: OUTPUT«肉␤»
20:01 FROGGS r: say chr(0x8089)
20:01 p6eval rakudo 6e6ac5: OUTPUT«肉␤»
20:02 jnthn Or that :)
20:03 sirrobert thanks =)
20:10 GlitchMr joined #perl6
20:23 masak folks, may I have your complete attention, please. :)
20:23 masak it's that time of year again.
20:23 * masak smiles a big Cheshire Cat grin and waits for someone to guess it
20:24 jnthn Perl 6 Cheshire Cat?
20:24 masak jnthn: you're not allowed to guess, I privmsg with you, you know :P
20:25 jnthn Sorry, didn't mean to reveal the cat secret... :P
20:25 * jnthn swears at Parrot's op compiler for not supporting goto
20:25 masak there is no cat secret.
20:25 * masak makes a jedi wave
20:26 colomon there is no cat secret
20:26 masak *lol*
20:26 jnthn what's a cat?
20:26 jnthn :P
20:26 masak next guess?
20:26 colomon jnthn: it's a program for sending the contents of a file to std out
20:27 masak colomon: actually, it simply echoes stdin to stdout :)
20:27 GlitchMr It's the program I don't have on my computer
20:27 jnthn 'cat' is not recognized as an internal or external command,
20:27 jnthn operable program or batch file.
20:27 jnthn ...me either!
20:27 GlitchMr But I've put alias cat='awk 1'
20:27 GlitchMr Now it works!
20:27 colomon masak: it definitely reads files if given them.
20:27 masak channel! focus! what am I about to spectacularly reveal to you?
20:28 moritz p6cc2012?
20:28 jnthn Did you orbit a satellite?
20:28 awwaiid cats are made of meat, just like humans?
20:28 colomon you've programmed ten million monkeys to code in p6?
20:28 awwaiid or cats are made of code, just like humans?
20:28 masak moritz has it. \o/
20:28 moritz \o/
20:28 masak uploading post now.
20:28 moritz though my next guess would have been nice to have indeed
20:28 GlitchMr Perhaps if ten million monkeys would make AWK programs, some monkey would actually make cat program.
20:28 moritz time-travelling for perl6-debug
20:29 masak :)
20:29 jnthn Yeah, masak should totally implement that :D
20:29 masak totally.
20:29 jnthn How hard can it be? The debugger is already in Perl 6 :P
20:29 masak http://strangelyconsistent.org/blog/the-2012-perl-6-coding-contest
20:29 masak sign up sign up sign up
20:29 * colomon has yet another programming contest to ignore, ignore, ignore.
20:29 GlitchMr It's... back?
20:30 masak hm, s/two implementations/two major implementations/
20:30 jnthn "you've nothing to lose" - lies! You could lose DAYS! :P
20:31 masak masak disclaims responsibility for any loss of days.
20:31 colomon DAYS and PRECIOUS SANITY!
20:31 masak ...or sanity.
20:31 masak (sign up amazon books yay)
20:32 masak also, could someone reddit the post? gracias.
20:32 GlitchMr https://github.com/masak/p6cc2012/blob/master/t2/description.md
20:32 GlitchMr Sounds fun
20:32 immortal joined #perl6
20:32 GlitchMr Actually, I'm going to start with this challenge, as it sounds easy.
20:32 masak GlitchMr: did you sign up yet?
20:32 GlitchMr No
20:33 jnthn "sounds easy" :D
20:33 masak no comment :)
20:33 GlitchMr How can I sign up?
20:33 sftp_ joined #perl6
20:33 masak GlitchMr: it's in the blog post.
20:33 colomon GlitchMr: that's the hard part!
20:33 masak just send an email to me.
20:33 masak (you could be the first to sign up!)
20:34 masak this year's tasks are pretty swell. I think we'll all enjoy this.
20:35 doy ocaml's debugger has time travelling
20:35 GlitchMr Sent
20:35 doy it's pretty useful(:
20:35 masak GlitchMr: received \o/
20:35 sorear I would have liked MASAKSTAR
20:35 * moritz too has sent a mail
20:35 sorear or would that be Masakiy Sputnik?
20:36 GlitchMr "...unless people actually send in solutions." ;-)
20:36 stopbit joined #perl6
20:36 GlitchMr So, I've chance to win if nobody will send solutions. But hey, I'm going to send solutions at least to second problem.
20:36 moritz sorear: is a MASAKSTAR something like a death star?
20:37 moritz ok, correction: mail not yet sent; I tried to, but ran into DNS problems :(
20:37 sorear moritz: ECHOSTAR, TELSTAR, NAVSTAR
20:37 masak GlitchMr: in the previous two years, we've gotten all five solutions by at least one contestant. often several.
20:38 masak moritz: notice that I didn't end up handicapping moritzes or #perl6ers. I did write it into the rules, and then got a bad conscience and removed it again.
20:39 masak are we on reddit yet? :)
20:39 sorear check yo mail :D
20:39 masak o.O
20:39 sftp joined #perl6
20:39 masak this will be... interesting... :D
20:39 masak GlitchMr++ moritz++ sorear++
20:39 jnthn Woo, 3 entrants already :D
20:39 moritz masak++ # contest
20:40 masak moritz++ # cockiest signup email ever :P
20:40 GlitchMr I'm going to make dictionary for second challenge fun ;-).
20:41 moritz masak: I kinda stole the meme from "Name of the Wind"
20:41 * masak sends "welcome aboard" emails back to the new contestants
20:41 masak moritz: oh!
20:41 * masak checks the reference
20:41 moritz (a book well worth reading if you like fantasy and books)
20:41 GlitchMr "The haiku should consist of English words."
20:41 GlitchMr Should be possible, if I would remove few words.
20:42 jnthn moritz: So, now I don't have much besides Perl 6 worry about any more (for now, at least...) - what's the status of the sink stuff?
20:42 * sorear smiles at "double vision"
20:42 masak :)
20:42 masak left it in from last year.
20:42 moritz jnthn: I haven't had any success tracking down the for-loop-in-gather bug
20:42 sorear cloneded
20:42 moritz jnthn: that's the only known bug left
20:42 masak I just realized that I don't allow apostrophes in the haikus.
20:42 masak oh, well.
20:42 jnthn moritz: Reminder of what it is?
20:43 sorear o'rear frowns
20:43 moritz jnthn: just a sec
20:43 moritz jnthn: https://gist.github.com/4258258
20:43 masak sorear: s'orry :(
20:44 jnthn moritz: k
20:44 jnthn Hm, I just made for ^100 X ^100 -> $i, $j { $i + $j } run in around half the time it used to...
20:45 jnthn It's still slow as shit though. Hm.
20:46 Chillance joined #perl6
20:47 moritz masak: huh, according to rules.md I too decide who wins
20:48 jnthn hm, dalek missing?
20:48 masak moritz: that can't be right. fixing.
20:48 moritz jnthn: yes
20:48 masak moritz: frightfully decent of you to report that :P
20:49 GlitchMr Dictionary of 213 words... should be enough
20:49 masak moritz: fixed.
20:49 moritz .oO( 213 words should be enough for everybody )
20:50 GlitchMr I won't say what this dictionary contains. This is a spoiler.
20:50 GlitchMr secret8
20:50 GlitchMr s/spoiler/secret/
20:50 * masak .oO( contestant doth talk too much ) :P
20:51 masak ...are we on reddit yet? :P
20:51 masak preferably both /r/programming and /r/perl
20:51 masak I don't care so much about /r/perl6... ;)
20:52 moritz isn't t1 like SAT?
20:52 sjohnson joined #perl6
20:53 sorear is Smul short for Smullyman?
20:53 masak sorear: ayup.
20:53 masak Smullyan*
20:54 sorear would it be improper of me to answer moritz' question?
20:54 masak moritz: I'd tell you, but that would be spoiling things.
20:54 masak sorear: I can't realistically stop people from talking about the solutions.
20:54 masak sorear: however, consider the pros and cons of explaining solutions to other contestants :P
20:55 sorear hehe
20:57 sorear how does scheduling work for this?  do we submit different puzzles at different times, or all at once?
21:00 masak up to you.
21:00 masak I'd prefer to get solutions ASAP and individually.
21:01 sorear I s'pose you'd like your solutions in ORDER too...
21:02 moritz I guess order doesn't matter much
21:02 hash_table joined #perl6
21:02 jnthn moritz: That's not what you said about the gather bug :P
21:02 * jnthn is having a look at it :)
21:02 masak sorear: no, not at all.
21:02 moritz jnthn: :-)
21:03 masak jnthn: that's what you said about events. :P
21:03 jnthn masak: If your transport doesn't promise the ordering, you don't get it. :)
21:03 masak cheap shots. we haz them.
21:03 masak jnthn: true. I don't get it.
21:05 sorear masak: t4 seems underspecified.  what is the ambient temperature and pressure?  how big are the cubes?  is that VSMOW?  what kind of air?
21:05 diakopter jnthn: hide the goto in a macro!
21:05 jnthn diakopter: *lol*
21:05 masak sorear: thank you kindly for your feedback. good luck with the task. :)
21:05 masak sorear: the cubes are 1x1x1.
21:06 jnthn moritz: Was it just statemnet form of gather? Or does using the block form help?
21:06 diakopter I would've guessed 0x0x0
21:06 moritz jnthn: iirc it doesn't matter
21:06 masak diakopter: 0x0x0 wouldn't hold water very well.
21:06 jnthn moritz: OK, 'cus my crack at fixing it does so for the bl form and not for the st form...
21:06 jnthn .oO( Dang and blorst... )
21:06 masak diakopter: also known as "points" :P
21:07 sorear 1x1x1 ... meters?
21:07 masak sorear: length units.
21:07 sorear :D
21:07 diakopter universe widths
21:07 moritz light years
21:07 masak whatever floats your cube.
21:07 moritz now you have to take relativistic effects into account :-)
21:07 diakopter so where do I find these challenges
21:08 masak diakopter: https://github.com/masak/p6cc2012
21:08 masak diakopter: http://strangelyconsistent.org/blog/the-2012-perl-6-coding-contest
21:08 masak and, hopefully soon, reddit ;)
21:08 sorear moritz: that one is very easy. a cubic light year of water is a black hole, so at run's end the total amount of water (defined as a kind of condensed matter) is 0
21:08 masak you guys are overanalyzing things
21:09 sorear masak: if your cubes form into an airtight hook shape, the amount of water collected depends on the compressibility of the air
21:09 diakopter that's a very wet black hole
21:09 * FROGGS was hoping p6cc was about a perl 6 christmas carol :/
21:09 sorear overanalyzing YEAH
21:09 masak sorear: yeahbut the air leaks out through the cracks. says so in le description.
21:10 masak sorear: for the purposes of the task, water always displaces air completely.
21:11 sorear masak: the description says that air leaks through cracks between cells sharing an edge.  says nothing about air being able to leak out between cells sharing a face.
21:11 sorear as a former nethack player I have to make this distinction.
21:11 diakopter don't they share an edge if they share a face?
21:11 masak wow, a high number of #perl6 signups this year.
21:11 masak diakopter: they do. four, in fact.
21:12 flussence as a minecraft player I figured out what t4 was asking pretty much instantly :)
21:12 sorear I interpreted it as sharing (only) an edge
21:12 popl Minecraft. Pfeh.
21:12 masak sorear: same goes for cubes sharing a face. nice try :)
21:12 masak flussence: I must've been inspired by minecraft, yes. despite never having played it ;)
21:12 sorear masak: yay, I don't have to model the non-ideal-gas behavior of air
21:13 masak you don't. :)
21:13 sorear all five tasks read.
21:13 * sorear cogitates
21:13 masak sorear: in fact, the volume will always be an integer.
21:14 jnthn moritz: Yeah, got a fix for the block form...just need to work out what on earth is going on with the non-block one...
21:15 Rotwang joined #perl6
21:18 diakopter masak: in which direction does a vertical waterfall go when it hits a large flat surface? all?
21:18 moritz down :-)
21:19 masak diakopter: it behaves like rain.
21:19 jnthn moritz: yay, think I have a fix...now to make sure I didn't bust spectests
21:20 diakopter masak: will there be duplicate cube coordinates?
21:20 masak diakopter: I guess so, but there will still be just one cube.
21:21 * masak .oO( no use trying to game the system -- I've been thinking about cubes for a month ) :P
21:22 sorear diakopter: statistically, over infinite time - all of them
21:23 bruges joined #perl6
21:23 sorear the problem is very carefully worded to talk about collection rather than movement
21:23 masak right.
21:24 jnthn moritz: Pushed the fix.
21:24 grondilu joined #perl6
21:24 * sorear will probably do t1, t3, t5, t2, t4
21:24 grondilu again, panda failed to rebootstrap after recompilation of rakudo.
21:25 sahadev joined #perl6
21:25 moritz jnthn: great, thanks
21:25 jnthn moritz: One test fails in S32-exceptions/misc.rakudo
21:26 jnthn moritz: But that's probably just the branch being behind nom.
21:26 flussence now that I'm giving it some thought, t4 is a lot harder than it first looks. Water runoff in reality doesn't follow taxicab geometry...
21:26 sahadev r: ([1, 2], [3, 4]).perl
21:26 p6eval rakudo fc9c3b:  ( no output )
21:26 sahadev r: say ([1, 2], [3, 4]).perl
21:26 p6eval rakudo fc9c3b: OUTPUT«([1, 2], [3, 4])␤»
21:27 sahadev r: say set([1, 2], [1, 2]).perl
21:27 p6eval rakudo fc9c3b: OUTPUT«set("1", "2")␤»
21:27 sahadev r: say set(([1, 2], [1, 2])).perl
21:27 p6eval rakudo fc9c3b: OUTPUT«set("1", "2")␤»
21:27 sahadev r: say set(([1, 2], [3, 4])).perl
21:27 p6eval rakudo fc9c3b: OUTPUT«set("1", "2", "3", "4")␤»
21:27 jnthn moritz: You may wish to look at semilist and if it needs any sink love
21:28 jnthn moritz: I'm happy enough for it to be merged when you feel ready, though.
21:28 masak jnthn: "sink love" sounds... wrong, somehow. :P
21:28 sahadev how do I prevent the list of lists from being flattened when passed to set()?
21:28 masak sahadev: I'm not sure, if you succeeded, arrays would be very good set members anyway.
21:28 masak (and I don't know how to prevent it)
21:29 jnthn Preventing it probably means "fix Rakudo"...
21:29 jnthn sub set(*@args) {
21:29 jnthn Should that be **@args?
21:29 jnthn r: say Set.new([1, 2], [1, 2]).perl
21:29 p6eval rakudo fc9c3b: OUTPUT«set("1", "2")␤»
21:30 jnthn Hm, but method new also does *@args
21:30 * jnthn ain't sure off hand
21:30 jnthn TimToady: ^^ if
21:30 jnthn you have a moment :)
21:35 masak anyone want to submit http://strangelyconsistent.org/blog/the-2012-perl-6-coding-contest to reddit?
21:35 TimToady [] should not be flattening in list context, and () should be transparent to list context
21:36 TimToady r: my $a = [1,2]; my $b = [3,4]; say set($a,$b).perl
21:36 p6eval rakudo fc9c3b: OUTPUT«set("1", "2", "3", "4")␤»
21:36 moritz masak: what about yourself? :-)
21:36 TimToady if Set.new is unwrapping Set items into elements, that's wrong
21:36 masak moritz: I could, I guess, but I prefer if some other name showed up.
21:37 TimToady otherwise we can't create a set of sets...
21:37 moritz anyway, http://www.reddit.com/r/programming/comments/14v368/the_2012_perl_6_coding_contest/
21:37 masak \o/
21:37 masak moritz++
21:37 flussence interesting numbers here, it seems rakudo's startup time is in the same order of magnitude as java now: http://www.reddit.com/r/programming/comments/14uh56/yuicompressor_rewritten_from_java_perl_for_50/c7goksj
21:37 masak this tends to bring in some people.
21:38 diakopter flussence: that doesn't look like rakudo
21:38 moritz also submitted to http://www.reddit.com/r/CodingContests/comments/14v390/the_2012_perl_6_coding_contest/
21:38 * moritz -> sleep
21:38 flussence diakopter: I've just done it on my own machine, the numbers are similar
21:38 masak \o/
21:39 jnthn TimToady: Figured that'd be the answer
21:39 jnthn masak: feel free to file ;)
21:40 * masak submits rakudobug
21:40 jnthn Oh wait
21:40 * masak waits
21:40 jnthn r: sub foo(*@x) { say @x.perl }; foo([1,2], [3,4])
21:40 p6eval rakudo fc9c3b: OUTPUT«Array.new([1, 2], [3, 4])␤»
21:40 jnthn ah, ok, that is OK
21:40 jnthn so it's just a set bug
21:40 jnthn masak: file aheads, just wanted to be sure it wasn't a more general problem :)
21:41 * masak files ahead
21:42 masak TimToady: from the bright side, if we can't create sets of sets, then there's no barber's paradox... :P
21:45 * grondilu is a knave  :)
21:46 masak grondilu: :P
21:47 grondilu I like the way masak solved Cantor's paradox by just saying:  "in that case, there is no solution".
21:48 grondilu .oO(on second thought I'm not sure it's called Cantor's paradox, but you know what I mean)
21:48 masak I think you're thinking of some other paradox than Cantor's... :)
21:48 masak Epimenides', perhaps.
21:49 masak or Russell's.
21:50 grondilu I'll jut call it the https://en.wikipedia.org/wiki/Liar_paradox from now on I guess
21:50 Targen joined #perl6
21:50 chee joined #perl6
21:50 sahadev left #perl6
21:51 masak grondilu: well, "no solution" is basically just saying that if we stick to the values "true" and "false", there's no way to model a person saying "I'm a knave".
21:51 masak er, assuming also that knights and knaves are the only possible person types.
21:53 Targen joined #perl6
21:53 grondilu masak: are you sure problem #1 is computationnaly doable?  It's not NP = P or something, is it?
21:55 * grondilu thinks of it and realizes the number of possibilities is not so large
21:56 grondilu .oO( 2**number_of_islanders  possibilities anyway )
21:57 masak grondilu: I don't see you among the signups yet.
21:57 masak sending an email is quick, and easy.
21:58 grondilu I'm like people in front of a store:  just watching right now... :)
22:01 masak ;)
22:02 bluescreen10 joined #perl6
22:04 Rotwang why 10..1 doesn't work?
22:04 Rotwang I know I can do (1..10).reverse(), but I'm wondering
22:05 masak Rotwang: it's a good question.
22:05 jnthn .oO( because ranges succ :P )
22:05 masak Rotwang: because reverse ranges are more useful empty than going backwards.
22:06 jnthn r: say 10...1
22:06 p6eval rakudo fc9c3b: OUTPUT«10 9 8 7 6 5 4 3 2 1␤»
22:06 jnthn The sequence operator is more magical and will do what you're after.
22:06 masak Rotwang: think of it as evading an 'if' statement saying "and if the upper limit is lower than the lower limit, make it an empty range".
22:07 Rotwang I see, so one needs to be explicit about that by reversing it
22:07 masak Rotwang: basically, when you have constants like that, it's easy to assume that the range going backwards would be a good thing. but when you have variables, it's almost always surprising.
22:07 Rotwang to say "I didn't make a mistake
22:07 masak Rotwang: right.
22:07 Rotwang ok
22:07 masak Rotwang: also, honestly, I think (1..10).reverse reads better.
22:07 masak if I look at (10..1) quickly, I may miss that it goes backwards.
22:08 masak 'night, #perl6
22:08 masak be sure to upvote http://www.reddit.com/r/programming/comments/14v368/the_2012_perl_6_coding_contest/ and http://www.reddit.com/r/CodingContests/comments/14v390/the_2012_perl_6_coding_contest/ ;)
22:08 Rotwang night
22:12 bluescreen100 joined #perl6
22:22 [Coke] masak: did you ever finish grading 2011p6cc ?
22:23 jnthn [Coke]: http://strangelyconsistent.org/blog/announcing-the-winner-of-the-perl-6-coding-contest-2011
22:24 [Coke] huh. I have no recollection of that post.
22:25 [Coke] masak++ Coke--
22:30 [Coke] jnthn++ for making the contest less painful to code this year. :)
22:36 * [Coke] tries to rope some of his perl5 buddies into joining.
22:48 * [Coke] finds http://www.learningperl6.com/
22:48 jnthn sleep &
23:07 [Coke] masak, you still about?
23:08 cooper joined #perl6
23:10 [Coke] nevermind.
23:12 grondilu rn:  for ^3 { say "wait for it..."; LAST { say "now!" } }  # pretty cool
23:12 p6eval rakudo fc9c3b: OUTPUT«wait for it...␤wait for it...␤wait for it...␤now!␤»
23:12 p6eval ..niecza v24-12-g8e50362: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Action method statement_prefix:LAST not yet implemented at /tmp/yHxTj4NT0R line 1:â�¤------> [32may "wait for it..."; LAST { say "now!" }[33mâ��[31m }  # pretty cool[0mâ�¤â�¤Unhandled exception: Unable to resolve method statemen…
23:24 [Coke] Hurm. if I have a named alias for a subrule, and I successfully match, shouldn't I be able to dump this with $/<alias> ? (I'm getting Any(). and yet I can see the alias if I dump $/ itself)
23:25 [Coke] (rakudo)
23:28 [Coke] r: grammar a { rule a { '0' } ; rule b { <c=.a>} } ; $_="0" ; if /<a::b>/ { say $/; say $/.<c> } else { say "no" }
23:28 p6eval rakudo fc9c3b: OUTPUT«「0」␤ a::b => 「0」␤  c => 「0」␤␤Any()␤»
23:29 [Coke] n: grammar a { rule a { '0' } ; rule b { <c=.a>} } ; $_="0" ; if /<a::b>/ { say $/; say $/.<c> } else { say "no" }
23:29 p6eval niecza v24-12-g8e50362: OUTPUT«Unhandled exception: Cannot dispatch to a method on a because it is not inherited or done by Cursor␤  at /home/p6eval/niecza/lib/CORE.setting line 281 (Mu.dispatch:<::> @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1668 (List.gist @ 5) ␤  at <unknow…
23:29 [Coke] r: grammar a { rule a { '0' } ; rule b { <c=.a>} } ; $_="0" ; if /<a::b>/ { say $/; say $/<c> } else { say "no" }
23:29 p6eval rakudo fc9c3b: OUTPUT«「0」␤ a::b => 「0」␤  c => 「0」␤␤Any()␤»
23:30 [Coke] so, how do you get at that 'c' subpart of $/ ?
23:30 [Coke] r: grammar a { rule a { '0' } ; rule b { <c=.a>} } ; $_="0" ; if /<a::b>/ { say $/; say $/<a::b><c> } else { say "no" }
23:30 p6eval rakudo fc9c3b: OUTPUT«「0」␤ a::b => 「0」␤  c => 「0」␤␤「0」␤␤»
23:30 [Coke] ah, that way.
23:48 wamba joined #perl6

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

Perl 6 | Reference Documentation | Rakudo