Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-12-11

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:00 jnthn sorear: I think cotto_work++ is interested in what I'm working on becuase it is of interest for Parrot development.
00:00 cotto_work very much so
00:01 jnthn sorear: nqpclr is not meant to grow beyond what nqp-rx is; the aim is that it paves the way for Rakudo also running on the CLR.
00:01 nymacro left #perl6
00:01 cotto_work Once the new object model is workable and Lorito is ready it'll be what our PMCs are implemented in terms of.
00:01 jnthn But it's also turning out to be very useful for rapid prototyping.
00:02 jnthn Since the runtime layer - unlike Parrot - is small enough to fit in my head, and I don't really have a user base to worry about just yet who care about the API of the runtime layer (whereas Parrot has to pay attention to API stability and deprecation issues).
00:03 jnthn It's kinda -Oprototyping at the moment. :)
00:03 jnthn Though admittedly becoming less so as more stuff gets built up. :)
00:05 cotto_work It's the kind of thing I'd read up on anyway though.  I find it fascinating.
00:06 jnthn It's a fun area. :)
00:06 jnthn I'll have a bunch more time for it again after next week too.
00:07 impious left #perl6
00:08 nymacro joined #perl6
00:11 scottp joined #perl6
00:11 whiteknight joined #perl6
00:11 scottp left #perl6
00:13 Guest87704 joined #perl6
00:14 thelazydeveloper left #perl6
00:15 * jnthn -> rest
00:16 jaldhar joined #perl6
00:16 nymacro left #perl6
00:18 dalek book/issue-39-pagedims: 51ea448 | (Jerome Eteve)++ | src/images/.gitignore:
00:18 dalek book/issue-39-pagedims: Ignore make time generated src/image/ files
00:18 dalek book/issue-39-pagedims: review: https://github.com/perl6/book/commit/51ea448835
00:18 dalek book/issue-39-pagedims: 4e8d751 | (Jerome Eteve)++ | / (3 files):
00:18 dalek book/issue-39-pagedims: Allow any paper width and height to be specified in PAPER make variable
00:18 dalek book/issue-39-pagedims: review: https://github.com/perl6/book/commit/4e8d7513ec
00:36 fhelmberger joined #perl6
00:49 fhelmberger left #perl6
00:51 lichtkind jnthn: o/
00:51 lichtkind the path quoting, is part of the reason we have it that fire tests get distinguishable from string ops?
00:52 lichtkind karma Herbert Breunung
00:52 aloha Herbert Breunung has karma of 217.
00:53 Guest87704 left #perl6
00:54 dalek niecza: 8d02fba | sorear++ | / (5 files):
00:54 dalek niecza: Refactor and encapsulate stash handling
00:54 dalek niecza: review: https://github.com/sorear/niecza/commit/8d02fba60c
00:58 dalek mu: ba3aad7 | lue++ | misc/perl6advent-2010/schedule:
00:58 dalek mu: Added self to day 16 to teach Temporal to the masses.
00:58 dalek mu: review: https://github.com/perl6/mu/commit/ba3aad7814
01:00 dalek tpfwiki: (Herbert Breunung)++ | http://www.perlfoundation.org/perl6/index.cgi?perl_6_basics_tablet
01:01 cdarroch left #perl6
01:07 Guest87704 joined #perl6
01:24 redicaps joined #perl6
01:32 Guest87704 left #perl6
01:37 Guest87704 joined #perl6
01:46 lopnor hello everyone,
01:47 lopnor I started perl6 advent calendar in japanese
01:47 lopnor http://perl-users.jp/articles/advent-calendar/2010/perl6/
01:48 sorear wow!  lopnor++
01:48 dukeleto lopnor++
01:48 sorear welcome, if you're new here
01:49 lopnor i'm just a biginner for perl6
01:50 lopnor i don't know how to find/distribute user defined modules like CPAN
01:50 lopnor is there any good place for that?
01:50 sorear modules.perl6.org
01:50 lopnor thank you!
01:50 sorear the ecosystem is... new.
01:50 * sorear tests his Japanese
01:53 lopnor articles are written in Japanese, but code is perl6.
01:54 lopnor please let me know if there are any bad codes
01:58 redicaps1 joined #perl6
01:58 redicaps left #perl6
02:01 Guest87704 left #perl6
02:01 sorear yeaahh this is way beyond my level :D
02:03 sorear lopnor: is this an original calendar or is it translated from someone else's?
02:04 lopnor sorear: it's original.
02:05 lopnor japanese perl users make 6 tracks this year here. http://perl-users.jp/articles/advent-calendar/2010/
02:05 lopnor including english track!
02:05 Guest87704 joined #perl6
02:05 sorear "tracks"?
02:06 lopnor it's analogy of some conferences.
02:07 lopnor 6 advent calendars there :)
02:08 adu joined #perl6
02:14 envi joined #perl6
02:17 Guest87704 left #perl6
02:18 lopnor which should i use proto or pls?
02:19 florz left #perl6
02:20 florz joined #perl6
02:20 rjbs In reference to today's Advent calendar entry, does one ever see both ==> and <== in one statement?
02:20 rjbs (apart from highly contrived examples) :)
02:24 whiteknight left #perl6
02:24 plobsing perl6: Bool::True ǁ Bool::False
02:24 p6eval pugs: OUTPUT«decodeUTF8': bad data: '\449'␤*** No compatible multi variant found: "&Bool::True"␤    at /tmp/1YJG2rK7xS line 1, column 1 - line 2, column 1␤»
02:24 p6eval ..rakudo : OUTPUT«===SORRY!===␤Confused at line 22, near "Bool::True"␤»
02:25 Guest87704 joined #perl6
02:25 sorear .u ǁ
02:25 phenny U+01C1 LATIN LETTER LATERAL CLICK (ǁ)
02:26 plobsing left #perl6
02:26 plobsing joined #perl6
02:26 sorear .u ǁ
02:26 phenny U+01C1 LATIN LETTER LATERAL CLICK (ǁ)
02:26 sorear .u 2228
02:26 phenny U+2228 LOGICAL OR (∨)
02:27 mkramer left #perl6
02:27 sorear I suspect you wanted that
02:27 sorear rakudo: say (True ∨ False)
02:27 p6eval rakudo : OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
02:27 plobsing I figured it would be similar to french/texas quotes
02:28 mkramer joined #perl6
02:38 awwaiid_ joined #perl6
02:38 sorear lopnor: Why do your twigils use more than one color?
02:39 sorear oh, it seems to be getting highlighted as Perl 6
02:39 sorear the cheat sheert
02:39 lichtkind left #perl6
02:41 Guest87704 left #perl6
02:41 s1n1 joined #perl6
02:41 Psyche^ joined #perl6
02:41 sorear lopnor: in day 4, say $_ better written as .say
02:41 puddingpimp_ joined #perl6
02:43 awwaiid left #perl6
02:43 Patterner left #perl6
02:43 puddingpimp left #perl6
02:43 Psyche^ is now known as Patterner
02:44 lopnor sorear: $data.[0].<text>.say; ?
02:45 Guest87704 joined #perl6
02:53 Guest87704 left #perl6
02:57 Guest87704 joined #perl6
03:00 lopnor ah,
03:00 lopnor k
03:02 sorear no, .say for @*INC
03:02 sorear I have no further comments to make on the code insets
03:02 lopnor yes, i found that. thank you
03:02 * sorear hopes to someday be able to read the rest
03:04 lopnor fixed
03:04 Chillance left #perl6
03:05 nymacro joined #perl6
03:25 nymacro left #perl6
03:26 jferrero left #perl6
03:37 Jim112 joined #perl6
03:40 Guest87704 left #perl6
03:42 ggoebel left #perl6
03:57 mkramer1 joined #perl6
03:57 mkramer left #perl6
03:58 Jim112 left #perl6
04:00 mkramer joined #perl6
04:01 lopnor is now known as lopaway
04:01 mkramer1 left #perl6
04:04 mkramer1 joined #perl6
04:04 mkramer left #perl6
04:13 cotto_work left #perl6
04:15 cotto_work joined #perl6
04:21 risou joined #perl6
04:24 risou_ left #perl6
04:26 mkramer joined #perl6
04:29 mkramer1 left #perl6
04:41 lopaway is now known as lopnor
04:45 getpwnam left #perl6
05:09 Guest87704 joined #perl6
05:10 Guest87704 left #perl6
05:13 lopnor is now known as lopaway
05:20 orafu left #perl6
05:20 orafu joined #perl6
05:24 risou left #perl6
05:24 l34k left #perl6
05:25 risou joined #perl6
05:43 snarkyboojum joined #perl6
05:58 risou left #perl6
06:19 Axius joined #perl6
06:34 mkramer1 joined #perl6
06:35 mkramer left #perl6
06:36 sorear sweet, 5.0kb exe for "use Test; plan 5"
06:37 mkramer joined #perl6
06:38 mkramer1 left #perl6
06:41 dalek niecza: d2e0804 | sorear++ | src/Metamodel.pm:
06:41 dalek niecza: De-conflate packages and stashes in the compiler some more
06:41 dalek niecza: review: https://github.com/sorear/niecza/commit/d2e0804c3b
06:41 dalek niecza: 09e2417 | sorear++ | / (2 files):
06:41 dalek niecza: Use load-time commutative operators to build stash tree
06:41 dalek niecza: review: https://github.com/sorear/niecza/commit/09e2417569
06:41 dalek niecza: 338a605 | sorear++ | / (2 files):
06:41 dalek niecza: Use per-module BOOT functions
06:41 dalek niecza: review: https://github.com/sorear/niecza/commit/338a6055a9
06:49 adu left #perl6
06:52 Axius left #perl6
06:54 hercynium left #perl6
07:10 dalek niecza: 04e2294 | sorear++ | src/ (2 files):
07:10 dalek niecza: Fix augment declarations being ignored
07:10 dalek niecza: review: https://github.com/sorear/niecza/commit/04e229455d
07:21 mkramer left #perl6
07:24 mkramer joined #perl6
07:27 dalek niecza: 42e73ab | sorear++ | lib/Kernel.cs:
07:27 dalek niecza: Quick fix for multi-parameter roles
07:27 dalek niecza: review: https://github.com/sorear/niecza/commit/42e73ab234
07:28 sorear yay STD is running again and not (much) slower
07:29 sorear up from 35.8 to 36.9
07:31 am0c left #perl6
07:44 am0c joined #perl6
07:53 dalek specs: 995ad12 | TimToady++ | S29-functions.pod:
07:53 dalek specs: braino noticed by Eirik++
07:53 dalek specs:
07:53 dalek specs: chrs just returns a Str, duh
07:53 dalek specs: review: https://github.com/perl6/specs/commit/995ad12ee6
07:55 dalek niecza: 54b8c18 | sorear++ | / (4 files):
07:55 dalek niecza: Implement require (no importing yet)
07:55 dalek niecza: review: https://github.com/sorear/niecza/commit/54b8c18d3b
08:06 sorear also, I now know the true size of STD's compiled form
08:07 sorear this 3.2MB file contains everything needed to run "require STD"
08:08 am0c left #perl6
08:08 sorear TimToady: STD.pm6 likes to pretend that compile-time subs and packages are fundamentally the same.  How true is this?
08:15 TimToady I guess I'd need to see an example
08:25 redicaps1 left #perl6
08:25 TimToady $.mode = Sleep;
08:49 envi left #perl6
08:53 envi joined #perl6
09:10 Bzek_ left #perl6
09:10 glow joined #perl6
09:10 Bzek joined #perl6
09:15 redicaps joined #perl6
09:16 jedai_ joined #perl6
09:17 jedai left #perl6
09:52 araujo left #perl6
09:58 wamba joined #perl6
10:01 thelazydeveloper joined #perl6
10:30 thelazydeveloper left #perl6
10:38 justatheory left #perl6
10:53 abra joined #perl6
11:00 puddingpimp_ is now known as puddingpimp
11:04 ggoebel joined #perl6
11:07 abra left #perl6
11:11 ggoebel left #perl6
11:20 glow left #perl6
11:36 rhr left #perl6
11:40 moritz_ phenny: ask masak re problem 1, what is meant by "Ayou also don't have to consider polygons with holes."? are only convex polygons considered?
11:40 phenny moritz_: I'll pass that on when masak is around.
11:48 rhr joined #perl6
12:03 snarkyboojum moritz_: I'm guessing a polygon "with holes" refers to a polygon with other polygon(s) excluded from its interior
12:06 colomon that would certainly be my take.
12:07 colomon isn't that problem 2?
12:07 snarkyboojum seems to be
12:24 jhuni left #perl6
12:25 colomon rakudo: "  this       is    \n\n  \n  \r  a  \t\t\n _  test".subst(/<-alpha>+/, " ").say
12:25 p6eval rakudo : OUTPUT« this       is    ␤␤  ␤
12:26 colomon dog!
12:26 colomon doh!  doh!
12:26 colomon rakudo: "  this       is    \n\n  \n  \r  a  \t\t\n _  test".subst(/<-alpha>+/, " ", :global).say
12:26 p6eval rakudo : OUTPUT« this is a _ test␤»
12:28 colomon rakudo: "  this       is    \n\n  \n  \r  a  \t\t\n _  test".subst(/<:!Letter>/, " ", :global).say
12:28 p6eval rakudo : OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
12:28 colomon rakudo: "  this       is    \n\n  \n  \r  a  \t\t\n _  test".subst(/<:!Letter>/, " ", :global).say
12:28 p6eval rakudo : OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
12:30 colomon rakudo: "  this       is    \n\n  \n  \r  a  \t\t\n _  test".subst(/"_" | "'"/, "", :global)./subst(/<-alpha>/, " ", :global).say
12:30 p6eval rakudo : OUTPUT«===SORRY!===␤Confused at line 22, near "\"  this   "␤»
12:31 Shozan joined #perl6
12:34 moritz_ remove the / before subst
12:36 moritz_ rakudo: say <a b c>.rotate
12:36 p6eval rakudo : OUTPUT«bca␤»
12:47 MayDaniel joined #perl6
12:48 colomon rakudo: "  this       is    \n\n  \n  \r  a  \t\t\n _  test".subst(/"_" | "'"/, "", :global).subst(/<-alpha>/, " ", :global).say
12:49 p6eval rakudo : OUTPUT«  this       is              a        test␤»
12:49 colomon rakudo: "  this       is    \n\n  \n  \r  a  \t\t\n _  test".subst(/"_" | "'"/, "", :global).subst(/<-alpha>+/, " ", :global).say
12:49 p6eval rakudo : OUTPUT« this is a test␤»
12:49 colomon moritz_++
12:49 * moritz_ barely involved :-)
12:49 colomon Never-the-less, you solved the problem I'd forgotten I had.  :)
12:50 * moritz_ is now in the process of solving p2 from masak++
12:50 cdarroch joined #perl6
12:50 cdarroch left #perl6
12:50 cdarroch joined #perl6
12:50 * colomon has to finish his Advent post before starting those.
12:51 colomon which in practice, means finishing fiddling with this code and getting on to the actual blogging part.
12:52 moritz_ you do know that s:g/// is partially implemented? (except for $/ interpolation)
12:54 colomon yeah, I just like .subst.
12:54 moritz_ good :-)
12:54 moritz_ in fact I like it too, because it's non-destructive
12:58 colomon moritz_: mind if I distract you from masak++'s project to look over my Advent post code?
12:58 moritz_ colomon: is it in wp?
12:58 colomon nope, I'll make a gist
12:58 moritz_ ok
12:59 colomon https://gist.github.com/737355
12:59 colomon It works fine atm (well, slow), I'm just looking for any style suggestions.
13:00 moritz_ what should it do?
13:00 colomon It uses a Markov chain to create a random sequence of almost sensible text.
13:00 moritz_ right now I don't see a reason why you need a separate class
13:00 colomon "a locke god till toastrumps th his yout up grour babys and there but of thearlik"
13:01 colomon how would you do it?
13:01 moritz_ you can just use an array
13:01 moritz_ an array has push and roll too
13:01 colomon true.
13:01 colomon It really wants to be an actual KeyBag, but that's NYI
13:01 moritz_ if you want to add methods later on, you could also do
13:02 moritz_ class QuickThing { has @.values handles <push roll> }
13:02 colomon does that work yet?
13:02 moritz_ yes
13:02 colomon hmmmm....
13:03 moritz_ rakudo: class A { has @.values handles <push roll> }; $_ = A.new(values => (1, 3, 4)); .push: <foo bar>; .roll.say
13:03 p6eval rakudo : OUTPUT«1␤»
13:03 colomon \o/
13:03 moritz_ rakudo: class A { has @.values handles <push roll> }; $_ = A.new(values => (1, 3, 4)); .push: <foo bar>; .roll(5).say
13:03 p6eval rakudo : OUTPUT«4143bar␤»
13:03 moritz_ but it really only makes sense to have a separate data type if you add more methods
13:04 moritz_ anyway, regarding style:
13:04 moritz_ lines are too long
13:04 moritz_ make that first regex / <[_']> /
13:05 moritz_ $model-text.comb(/<alpha> | \s/)
13:05 moritz_ is there anything besides <alpha> and \s left in the string?
13:05 colomon ooo, probably not
13:05 moritz_ if not, you can just use  .
13:05 moritz_ which I think is the default
13:05 colomon this is why another pair of eyes is good
13:06 moritz_ so just $model-text.comb
13:06 moritz_ line 19 can become %next-step{$last-two} //= QuickKeyBag.new
13:07 moritz_ or if you use Array instead of QuickBag:
13:07 moritz_ %next-step.push:  $a ~ $b => $c
13:07 moritz_ rakudo: say 5.roll
13:07 p6eval rakudo : OUTPUT«5␤»
13:08 colomon wait, that's too good to be true.
13:08 colomon rakudo: my %a; %a.push: "10" => "blue"; %a.push: "20" => "green"; say %a.perl
13:08 p6eval rakudo : OUTPUT«{"10" => "blue", "20" => "green"}␤»
13:08 colomon rakudo: my %a; %a.push: "10" => "blue"; %a.push: "10" => "green"; say %a.perl
13:08 p6eval rakudo : OUTPUT«{"10" => ["blue", "green"]}␤»
13:09 colomon okay, that's enough to convince me to switch to Array
13:10 colomon moritz_++
13:11 * moritz_ tests in a shorted version
13:11 moritz_ $ perl6 chain.pl < ~/p6/rakudo/README
13:11 moritz_ a perl is copyright virtual machine rakudo perl a perl machis rakudo parrot virt
13:12 moritz_ colomon: http://nopaste.snit.ch/26959
13:12 moritz_ rakudo: .say for { a => 1, b => 5 }.roll(10)
13:12 p6eval rakudo : OUTPUT«a␤b␤b␤b␤b␤a␤b␤a␤a␤b␤»
13:14 colomon rakudo: .say for { a => 1, b => 10 }.roll(20)
13:14 p6eval rakudo : OUTPUT«b␤a␤b␤b␤b␤b␤a␤b␤b␤b␤b␤b␤a␤a␤b␤b␤a␤b␤b␤b␤»
13:14 colomon I didn't realize that was already implemented.
13:14 moritz_ you can change to hash based .roll with  %next-step{$a ~ $b}{$c}++
13:14 moritz_ colomon: it was a weekly challenge, back in the days
13:15 colomon I like pushing to a Hash so much I almost don't want to change it!
13:15 moritz_ it's ok :-)
13:16 colomon I think maybe I'll present it both ways.
13:17 rokoteko is there any perl5+xs implementation of perl6? I mean like; did anyone ever even try it?
13:17 colomon so, I think the script should be Unicode-friendly as presented, but off the top of my head I don't have an easy way to test that.
13:18 rokoteko I mean it is probably very insane to go on extending perl5 code to perl6. but what about building perl6 with perl5 and making the difficult parts possible or fast with XS?
13:19 moritz_ rokoteko: I don't know of any such attempt
13:19 rokoteko Im not aware either.
13:20 rokoteko are there any fundamental problems with it?
13:20 moritz_ colomon: one problem is that it can run into situations where it can't continue to generate output
13:21 moritz_ rokoteko: two, actually. One is the impedance mismatch between p5 and p6, and the second is XS
13:21 colomon moritz_: I don't believe that's true, though I've worried about it several times.
13:21 rokoteko moritz_: not enough people how know XS?
13:21 moritz_ rokoteko: no. Those that know it don't want to use it
13:21 moritz_ colomon: it can happen, for example if you hit the end of the training string
13:22 colomon ooooo, good point
13:22 rokoteko moritz_: do you happen to know XS?
13:22 moritz_ if you train it with 'abc', and start with 'ab', it will generate 'abcAny()Any()Any()...'
13:22 moritz_ rokoteko: just a bi
13:22 moritz_ t
13:23 rokoteko moritz_: nods. I think this is the "broken telephone" that Ive played as a kid. :)
13:23 rokoteko ie. whisper something to the next in the queue and see how different the message is at the end.
13:23 rokoteko Ive never met a person that can program XS and don't love it. :)
13:24 moritz_ rokoteko: the real problem is that p5 and p6 are too different to p6 calls to equivalent p5 primitives
13:24 moritz_ rokoteko: and p5 is not a good assembler language, and not a good language to generate code for
13:24 moritz_ rokoteko: so there's really no point in using p5 for the runtime
13:25 moritz_ instead you ideally want something that has very cheap, primitive objects and allows you to build your own object system
13:25 moritz_ and define your own dispatch
13:25 colomon moritz_: can you think of any other case where it would fail to have a next option?
13:26 rokoteko moritz_: ok. :) I was mainly curious.
13:26 moritz_ rokoteko: maybe I should blog about it
13:26 moritz_ perl6 chain.pl < ~/p6/rakudo/README
13:26 moritz_ a parrot virtual is is copyright c 2Any()Any()Any()Any()Any()
13:26 moritz_ no idea what went wrong there
13:27 moritz_ oh, I changed <-alpha> to \W. Maybe that was not so bright
13:27 colomon We don't have FIRST yet, do we?
13:27 moritz_ nope
13:28 colomon I'm trying to figure out how to gracefully restart.
13:28 colomon and maybe have better starts, as well, it's kind of English-centric right now.
13:33 colomon my $first = $model-text.substr(0, 1);
13:33 colomon my $second = $model-text.substr(1, 1);
13:33 colomon my @chain := $first, $second, -> $a, $b { %next-step{$a ~ $b}.roll // $first, $second } ... *;
13:34 colomon that doesn't work correctly, which is making me scratch my head right now
13:34 colomon ah, // ($first, $second) is a bit better
13:35 xinming left #perl6
13:35 xinming joined #perl6
13:36 colomon interesting weirdness in sequence op, actually.
13:36 colomon rakudo: my @a = -> { rand, rand } ... *; say @a[0]
13:36 p6eval rakudo : OUTPUT«(timeout)»
13:37 colomon rakudo: my @a := -> { rand, rand } ... *; say @a[0]
13:37 p6eval rakudo : OUTPUT«0.594149672283919 0.956055957629484␤»
13:37 colomon surely you should only get the first element....
13:39 moritz_ rakudo: my @a := -> { rand, rand } ... *; say @a[0].WHAT
13:39 p6eval rakudo : OUTPUT«Seq()␤»
13:39 moritz_ it seems it doesn't flatten where it maybe should
13:40 colomon 1,1,{ $^a + 1, $^b * 2 }...*   # 1,1,2,2,3,4,4,8,5,16,6,32... is an example in the spec
13:41 moritz_ so it really should flatten
13:41 risou joined #perl6
13:41 moritz_ maybe just use // $first or so
13:42 colomon but that's not guaranteed to have a valid follow up, either
13:42 moritz_ right
13:42 colomon essentially you have the risk of it just becoming $first, $first, $first, $first...
13:42 moritz_ maybe just go until *.defined instead of *
13:42 moritz_ erm, !*.defined
13:42 colomon moritz_++
13:43 moritz_ then you get shorter, but not repeated sequences
13:43 moritz_ $ perl6 chain.pl < ~/p6/rakudo/README
13:43 moritz_ a bug moduall onfiguall ortall rakudo perl alwastal to do cuse tage pers aults p
13:43 * moritz_ likes it
13:43 colomon but then [^80] pads with Anys
13:44 moritz_ then use ... what's the method called...
13:44 colomon munch
13:44 moritz_ right
13:44 colomon bingo
13:45 smash joined #perl6
13:45 colomon so, where can I get a handy Unicode file to test it with?
13:45 smash hello everyone
13:45 colomon rakudo: $*IN.slurp.say # would be nice to have locally
13:45 p6eval rakudo : OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmitten,␤einem stark…
13:45 colomon smash!
13:46 whiteknight joined #perl6
13:49 rindolf joined #perl6
13:50 moritz_ colomon: it's in the perl6/evalbot repo, file 'input'
13:51 colomon I don't see it there?
13:51 colomon file is 'stdin'
13:52 colomon moritz_++
13:52 rindolf Hi all.
13:53 colomon perl6 markov2.pl <../evalbot/stdin
13:53 colomon land dem er sch volk brüftes söhnentarkerreiß in get derreiten heich viebtes öst
13:53 colomon \o/
13:53 colomon (one of my early drafts could only handle 'a' .. 'z', this makes me happy!)
14:00 bluescreen joined #perl6
14:00 bluescreen is now known as Guest31478
14:08 MayDaniel left #perl6
14:10 jferrero joined #perl6
14:21 Chillance joined #perl6
14:22 risou_ joined #perl6
14:24 glow joined #perl6
14:24 risou left #perl6
14:44 Eevee left #perl6
14:46 redicaps left #perl6
14:53 * moritz_ has a sign error in his solution to p2
14:53 rindolf moritz_: what is p2?
14:54 rindolf Pentium II?
14:54 moritz_ rindolf: problem 2 of http://strangelyconsistent.org/blog/masaks-perl-6-coding-contest
14:54 * moritz_ doesn't have solutions to pentiums
14:59 risou_ left #perl6
15:10 araujo joined #perl6
15:10 araujo left #perl6
15:10 araujo joined #perl6
15:11 robert__2 joined #perl6
15:12 robert__2 left #perl6
15:16 glow left #perl6
15:24 rbxbx joined #perl6
15:29 rbxbx left #perl6
15:38 Patterner left #perl6
15:41 tadzik o/
15:42 kersplat I am on a Pentium IV
15:42 kersplat I think it may be a dual core
15:42 kersplat how do I tell?
15:42 kersplat dmidecode?
15:42 rindolf kersplat: dual core or hyperthreading?
15:44 flussence lscpu
15:49 Psyche^ joined #perl6
15:50 Psyche^ is now known as Patterner
16:02 kersplat CPU(s):                1
16:02 kersplat Thread(s) per core:    1
16:02 kersplat Core(s) per socket:    1
16:02 kersplat CPU socket(s):         1
16:02 kersplat I guess it is single core
16:02 kersplat but it is running at 2.7 ghz!
16:02 kersplat that is something, isn't it?
16:03 tadzik is it? My old P4 is 3.0 too
16:04 tadzik and I prefer the core2 in my thinkpad which is "only" 2.1 :)
16:04 tadzik Intel like hitting more and more Gigaherzes in their CPUs those days
16:05 kersplat so 2 cores at lower speed better than one core at higher speed?
16:10 rindolf kersplat: actually, even a single core of the 2 cores is speedier.
16:10 kersplat oh well, serves me right for buying used computers
16:10 kersplat but that is all I can afford
16:10 kersplat I am not doing any serious number crunching or gaming
16:10 kersplat or graphics
16:10 kersplat so *shrug*
16:11 kersplat and to think six years ago the Pentium IV was the peak of technology
16:22 smash left #perl6
16:24 colomon moritz_: huh, Hash.roll doesn't seem to actually be in the spec?
16:24 moritz_ colomon: maybe as Hash.pick ?
16:25 colomon not there either.
16:25 colomon (at least, as far as I see.)
16:27 TimToady are pick and roll in .Any?
16:28 TimToady s/\.//
16:29 TimToady rakudo: say { a => 1, b => 2 }.pick.WHAT
16:29 p6eval rakudo : OUTPUT«Str()␤»
16:29 TimToady o_O
16:29 TimToady rakudo: say { a => 1, b => 2 }.pick
16:29 p6eval rakudo : OUTPUT«b␤»
16:30 moritz_ TimToady: what do you think it should return? Pair?
16:30 TimToady was expecting Pair
16:30 TimToady a normal hash is not a KeyHash
16:30 TimToady or a Set
16:30 rurban joined #perl6
16:30 colomon oh noez, a complication for my Advent calendar post!
16:31 moritz_ colomon: just go with what is implemented
16:31 colomon you sure?
16:32 colomon it would be easy enough to go back to the Array implementation.
16:32 colomon It would require rewriting a paragraph or two, that's all.
16:32 TimToady I'm just not sure that a normal hash should be expected to behave that much like a set, but I could be wrong
16:32 ch3ck joined #perl6
16:33 colomon ooo, or I could leave it as is and add a note
16:33 colomon that would let me sneak the cool array version into the post, too.
16:33 TimToady we do have sets
16:33 colomon TimToady: but what I need is a KeyBag
16:34 TimToady ah
16:34 colomon which we do not have yet.
16:34 TimToady well, there's always Hash.keys.pick
16:34 TimToady that will always work
16:34 moritz_ or Hash.roll(80).key
16:34 colomon but it won't be right.
16:34 colomon it wouldn't be weighted properly
16:35 TimToady moritz_: you mean ».key I think
16:35 moritz_ TimToady: was just about to correct it
16:36 * TimToady realizes that » is a plural marker
16:36 rgrau left #perl6
16:57 JimmyZ joined #perl6
16:57 risou joined #perl6
16:59 colomon rakudo: say +( 1, 2, 3, { Any } ... * )
16:59 p6eval rakudo : OUTPUT«3␤»
17:02 colomon moritz_: ping
17:05 colomon moritz_: I've scheduled the post to go in 3 hours.  Would appreciate it if you could proofread it, my tuits and limited and fuzzy at the moment.
17:06 * colomon feels like this isn't the greatest example of the brilliance of p6, but the post turned up a Rakudo bug, a spec hole, and taught him several new p6 constructs, so it was pretty useful on the balance.
17:12 moritz_ colomon: will proofread
17:12 colomon moritz_++
17:20 M_o_C joined #perl6
17:22 JimmyZ left #perl6
17:34 rindolf left #perl6
17:44 soroush left #perl6
17:57 MayDaniel joined #perl6
18:03 plobsing left #perl6
18:13 glow joined #perl6
18:17 nymacro joined #perl6
18:23 risou_ joined #perl6
18:23 plobsing joined #perl6
18:24 risou left #perl6
18:31 dju_ joined #perl6
18:31 dju_ left #perl6
18:31 dju_ joined #perl6
18:32 dju left #perl6
18:41 dju_ left #perl6
18:44 felliott left #perl6
18:44 dju joined #perl6
18:49 dju left #perl6
18:49 dju joined #perl6
18:54 kjeldahl joined #perl6
18:57 moritz_ colomon: ENODRAFT
18:57 colomon ?
18:57 moritz_ colomon: ah, scheduled, not drafted
18:57 colomon oh, it's up on wordpress instead of in Mu
18:59 moritz_ colomon: btw the "standard input file of p6eval" might better be described as Austrias National Anthem
19:00 moritz_ colomon: apart from that, it looks great
19:01 colomon oh, sure, be technical.  ;)
19:01 colomon If you feed it Austria's national anthem (the standard "Land der Berge" file that p6eval uses as stdin), you'll get strings like...
19:01 colomon moritz_++
19:02 colomon or should national anthem be capitalized?
19:03 moritz_ I think lower case is fine
19:04 moritz_ colomon++ # nice post
19:04 colomon blush
19:04 colomon thanks for all your help.
19:04 colomon as I've said before, I really enjoy working with you.  :)
19:05 pjcj left #perl6
19:07 nymacro left #perl6
19:11 pjcj joined #perl6
19:13 pjcj left #perl6
19:14 pjcj joined #perl6
19:24 jaldhar left #perl6
19:25 jaldhar joined #perl6
19:26 alester joined #perl6
19:32 glow left #perl6
19:32 sorear good * #perl6
19:37 whiteknight left #perl6
19:42 nothingmuch left #perl6
19:43 nothingmuch joined #perl6
19:58 dju left #perl6
19:59 justatheory joined #perl6
19:59 dju joined #perl6
20:03 dju left #perl6
20:03 dju joined #perl6
20:03 M_o_C left #perl6
20:03 Shozan left #perl6
20:06 molaf joined #perl6
20:09 MayDaniel left #perl6
20:10 sorear TimToady: ping
20:16 lue hello citizens of the interwebs o/
20:34 dukeleto lue: greetings, meatbag.
20:40 plobsing left #perl6
20:44 thelazydeveloper joined #perl6
20:45 Guest31478 left #perl6
20:47 plobsing joined #perl6
20:52 moritz_ any volunteers for tomorrow's advent post?
20:52 moritz_ maybe dukeleto about perl 6 in postgres?
20:53 moritz_ or sorear on * ?
20:55 moritz_ or anybody else on anything?
20:56 lichtkind joined #perl6
20:57 MayDaniel joined #perl6
20:58 envi left #perl6
20:59 masak joined #perl6
20:59 masak #perl6! \o/
20:59 phenny masak: 11:40Z <moritz_> ask masak re problem 1, what is meant by "Ayou also don't have to consider polygons with holes."? are only convex polygons considered?
20:59 moritz_ s/Ay/Y/
20:59 masak why would "holes" have anything to do with convex polygons?
20:59 * moritz_ thinks he just implemented the general case anyway
21:00 moritz_ because something that's not convex can have holes
21:00 * moritz_ doesn't know what else "holes" means in this context
21:01 masak the set difference between a large filled pentagon and a small filled pentagon is a polygon with a hole in it.
21:02 masak (to a first approximation)
21:02 * moritz_ doesn't see how the algorithm for a non-convex polygon and for a polygon with holes can differ, but is fine with that explanation
21:02 masak it has two borders, and splits the plane into three parts, one of which is the "inside".
21:06 sorear hi masak
21:07 masak hi sorear
21:11 plobsing left #perl6
21:12 Eevee joined #perl6
21:17 * moritz_ has solutions to p1 and p2, but hasn't tested with non-convex polygons yet
21:24 arnsholt masak: A question for p2: Is a point on the border inside or outside?
21:26 masak arnsholt: I chose not to spec that.
21:26 masak according to me, it's not. but I don't care much.
21:26 arnsholt 'k
21:27 moritz_ those are the fine points that make geometric algorithms so nasty to implement
21:27 masak indeed. that's part of why I expect lots of variation on that one.
21:27 moritz_ masak: how many people have signed up so far?
21:28 masak three \o/
21:29 masak and that's about the only question about the internal state of the contest that I've prepared to answer ;)
21:29 masak not even the MOP will work for the rest.
21:30 rurban left #perl6
21:31 lichtkind left #perl6
21:32 jnthn .oO( What about the BRUSH? )
21:33 masak for a brief moment, I thought "oh noes, another higher-level OO concept I have to learn about!" :P
21:34 jnthn I want to invent one just so I can call it that. :P
21:34 masak "the successor of the MOP" :)
21:35 * jnthn nommed a lovely curry this evening o/
21:36 * moritz_ takes a certain masochistic delight in finding new test cases that make his polygon detection thing fail
21:37 cdarroch left #perl6
21:40 * masak nommed a lovely dhal this evening o/
21:43 moritz_ \o/ all tests passed
21:44 * moritz_ still has no post for tomorrow's advent calendar entry, and no volunteer either
21:45 zb and tomorrow is only 15 minutes away over here :-P
21:46 masak zb: hi! new face? don't recognize your nick.
21:46 zb hi :)
21:46 masak welcome! we hug newbies here, rather than bite them :)
21:46 zb thanks!
21:47 masak how did you find Perl 6 and #perl6?
21:47 lue hai masak o/
21:47 * arnsholt goes to check the list of taken topics for the advent calendar
21:47 masak lue: \o
21:47 masak ++arnsholt
21:47 zb masak: found it somewhere on the internet..
21:48 masak :)
21:48 MayDaniel left #perl6
21:48 jhuni joined #perl6
21:49 lue arnsholt: I just snagged Day 16 for Temporal a while back
21:49 arnsholt Right, not that much
21:50 arnsholt moritz_: I think I saw operator precedence parsing on the brainstorming list a while back
21:50 arnsholt I might be able to write one about that from my experiences writing Parrotlog
21:51 arnsholt (Which has been in NQP, admittedly)
21:57 moritz_ arnsholt: that would be great
21:57 moritz_ arnsholt: for tomorrow? or a later day?
21:58 arnsholt Sounds like you really need something for tomorrow, so I could write up something
21:58 moritz_ \o/
21:58 arnsholt If I could use you guys for support a bit as well, it should turn out decent
22:00 * moritz_ is available for support, except when sleeping
22:00 arnsholt Better get started then =)
22:01 arnsholt Should I write it up as a gist or something?
22:02 moritz_ or put it in the mu repo
22:02 moritz_ misc/perl6advent-2010/articles/ or so
22:04 arnsholt Someone might have to give me access to mu. I'm in the perl6 org. but I'm not sure if I have write privs to mu
22:05 moritz_ arnsholt: done
22:05 kersplat and to think six years ago the Pentium IV was the peak of technology
22:05 arnsholt Cheers
22:05 sorear moritz_: What about * did you want me to write about?
22:05 sorear Unless you meant Rakudo Star...?
22:06 moritz_ sorear: about Whatever you want to write
22:11 masak sorear: I want you to know I'm excited about what niecza could mean for me in terms of speed.
22:12 masak sorear: I want to start with the Markdown parser, but if that turns out well, I'll probably rewrite the whole of psyde to work on niecza.
22:12 masak (partly because ~2 minutes is starting to feel like a long time just to update the blog)
22:13 moritz_ masak: from p4, base-test
22:13 moritz_ is run("3\ncomputer\n"), "computer takes 0,1\ncomputer wins\n"
22:13 masak yes.
22:13 moritz_ that's not the only possible winning move
22:13 masak no.
22:14 moritz_ but by masakian decree, that's what the program must do to be considered correct?
22:14 masak if your algorithm happens to do one of the other two, you're free to ignore that test.
22:14 masak either change it or write me a note.
22:14 masak but it's not terribly hard to add an exception and a cheerful comment in your code, either.
22:15 Holy_Cow joined #perl6
22:15 Holy_Cow left #perl6
22:17 masak colomon++ # "laß in ber bist brüften las schören zeites öst froher land der äckerzeichöne lan"
22:19 * sorear wonders if that means anything in German
22:20 jnthn phenny: "laß in ber bist brüften las schören zeites öst froher land der äckerzeichöne lan"
22:20 jnthn phenny: "laß in ber bist brüften las schören zeites öst froher land der äckerzeichöne lan"?
22:20 phenny jnthn: "let in over brüften read times are eastern Schoer happy land of the long äckerzeichöne" (de to en, translate.google.com)
22:21 moritz_ it does not
22:21 jnthn happy land of the long \o/
22:21 moritz_ but it sounds not too bad :-)
22:21 * masak is a big believer in letting in over brüften
22:22 lue just like the funniest joke in the world
22:23 dju_ joined #perl6
22:25 dju left #perl6
22:27 lue straight from monty python:
22:27 lue phenny: "Wenn ist das Nunstück git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput!"?
22:27 phenny lue: "If the Nunstück git and Slotermeyer? Yes! Or the Beiherhund the Flipperwaldt gersput!" (de to en, translate.google.com)
22:30 alester left #perl6
22:34 moritz_ phenny: "mein Luftkissenboot ist voller Aale"?
22:34 phenny moritz_: "My hovercraft is full of eels" (de to en, translate.google.com)
22:37 jnthn .oO( It's aalle full of 'em! )
22:39 thelazydeveloper left #perl6
22:45 lue which mailing list is recommended for the Perl6 deficient (aka newcomers)?
22:45 moritz_ lue: the mailing lists are separated by topic, not by proficiency level
22:46 moritz_ in language design, user problems, compiler writer's topics, announcement
22:46 lue rephrase: which mailing list would you recommend to a newcomer with questions about P6?
22:46 moritz_ what kind of questions?
22:46 lue (seems like perl6-users)
22:46 moritz_ how to achieve $x? what does $y do?
22:46 moritz_ then perl6-users
22:47 lue yes. the I-just-found-out-about-Perl6-through-the-advent-or-some-other-tutorial kind of stuff
22:47 moritz_ right
22:51 dju__ joined #perl6
22:54 dju_ left #perl6
23:00 aloha left #perl6
23:04 * lue drafting Day 13 post
23:05 * moritz_ -> sleep
23:06 dju joined #perl6
23:06 dju left #perl6
23:06 dju joined #perl6
23:09 dju left #perl6
23:09 dju__ left #perl6
23:11 lue Quick! Can anyone remember off the top of their heads a moment in the channel that perfectly demonstrates the nature of #perl6 !? (i'm looking too)
23:12 dalek niecza: d1ad2d3 | sorear++ | src/Sig.pm:
23:12 dalek niecza: Kill old unused binder generator
23:12 dalek niecza: review: https://github.com/sorear/niecza/commit/d1ad2d308b
23:12 dalek niecza: 406e042 | sorear++ | src/ (7 files):
23:12 dalek niecza: Rename clr_string to str as it is not VM-specific
23:12 dalek niecza: review: https://github.com/sorear/niecza/commit/406e0429a3
23:12 felliott joined #perl6
23:12 sorear #perl6 has many natures
23:13 sorear there's punfests with jnthn and masak, insane techno with jnthn and pmichaud, high level meta-mode with pmichaud and TimToady, ...
23:16 risou_ excuse me, I have 2 question.
23:17 risou_ what will the difference of = and := be?
23:18 sorear := is lower level and represents the linguistic concept of aliasing
23:18 sorear taken in isolation, = and := are the same
23:18 sorear but in interation, := creates aliases
23:19 sorear niecza: my $x := 1; my $y := $x; say $y
23:19 p6eval niecza 54b8c18: OUTPUT«1␤»
23:19 sorear niecza: my $x = 1; my $y := $x; $x = 1 say $y
23:19 p6eval niecza 54b8c18: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/9PWaPW6lRO line 1:␤------> [32mmy $x = 1; my $y := $x; $x = 1 [33m⏏[31msay $y[0m␤    expecting any of:␤    bracketed infix␤        infix or meta-infix␤    statement modifier loop␤Parse failed␤»
23:19 sorear niecza: my $x = 1; my $y := $x; $x = 1; say $y
23:19 p6eval niecza 54b8c18: OUTPUT«1␤»
23:19 sorear niecza: my $x = 1; my $y := $x; $x = 3; say $y
23:19 p6eval niecza 54b8c18: OUTPUT«3␤»
23:19 sorear niecza: my $x = 1; my $y := $x; $y = 3; say $x
23:19 p6eval niecza 54b8c18: OUTPUT«3␤»
23:19 masak sorear: when ruoso and pmurias roamed the channel together not long ago, they had insane techno too.
23:19 sorear niecza: my $x = 1; my $y = $x; $y = 3; say $x
23:20 arnsholt moritz_/masak: I've committed an initial short draft in perl6advent/articles/opp.pod
23:20 arnsholt Have a look?
23:20 p6eval niecza 54b8c18: OUTPUT«1␤»
23:20 * masak has a look
23:20 sorear risou_: is it clearer now?
23:20 bluescreen joined #perl6
23:21 bluescreen is now known as Guest5042
23:21 masak arnsholt: pulled but see no perl6advent/articles/opp.pod
23:22 risou_ i see...
23:22 dalek mu: 4315acd | (Arne Skj�rholt)++ | misc/perl6advent-2010/articles/opp.pod:
23:22 dalek mu: First draft of OPP post.
23:22 dalek mu: review: https://github.com/perl6/mu/commit/4315acdb88
23:22 arnsholt masak: I r idiot
23:22 arnsholt Comitted, but forgot to push =)
23:22 risou_ if $y := $x, $y and $x indicate same address ?
23:25 sorear yes
23:26 risou_ thx, i understand
23:26 risou_ plz teach, another question.
23:26 risou_ what will the difference of .. and ... be?
23:28 masak arnsholt: "For extra credit, try writing a grammar that gets the precedence right in all cases without using operator precedence. It's not as easy as you think."
23:28 masak arnsholt: enlighten me. isn't it just a matter of recursing the subrules right?
23:29 arnsholt It's a bit fiddly actually
23:29 arnsholt Getting the oeprators to bind correctly is kinda tricky
23:29 arnsholt Or, I couldn't get it right right away at least
23:29 arnsholt =)
23:30 anon_ joined #perl6
23:30 masak I thought the chief gains from OPP was speed.
23:30 masak s/gains/gain/
23:30 anon_ left #perl6
23:30 arnsholt Yeah, it's more efficient as well
23:31 wooden left #perl6
23:31 arnsholt But it's a lot more practical for implementation as well
23:31 arnsholt s/for implementation/to use/
23:32 wooden joined #perl6
23:32 wooden left #perl6
23:32 wooden joined #perl6
23:39 Bzek_ joined #perl6
23:40 lue grr, I'm getting rejected adding a new file to the mu/ repo
23:41 masak lue: check that .git/confic has the right origin address?
23:41 masak the one that is read/write, not just read.
23:41 masak er, .git/config
23:41 arnsholt Ah, crap. <EXPR> isn't actually in "normal" Perl 6, only NQP
23:42 * masak thought EXPR was in STD, even
23:42 masak and in Rakudo.
23:43 Bzek left #perl6
23:43 arnsholt So did I
23:43 plobsing joined #perl6
23:44 arnsholt I get ``Method 'EXPR' not found for invocant of class 'Math''' for my code though >.<
23:45 dalek mu: 70e49da | lue++ | misc/perl6advent-2010/articles/community.pod:
23:45 dalek mu: Added first draft of my Perl 6 Community post.
23:45 dalek mu: review: https://github.com/perl6/mu/commit/70e49da27e
23:45 dalek mu: b8316a8 | lue++ | misc/perl6advent-2010/articles/opp.pod:
23:45 dalek mu: Merge branch 'master' of git@github.com:perl6/mu
23:45 dalek mu: review: https://github.com/perl6/mu/commit/b8316a8a63
23:45 lue I just forgot to git pull beforehand
23:45 lue I invite you to take a look at community.pod, tell me what you think.
23:45 masak lue: next time, if you pull with --rebase, you won't make a merge commit.
23:45 * masak looks
23:45 lue ok, thanks
23:47 arnsholt masak: Apparently it's an optional thing to do
23:48 masak 'Things like "I think there should be a beat-object-with-catfish operator in the language" go here.' # lue: :)
23:48 arnsholt S05:2485-6 "perhaps with a bottom-up "middle layer" to handle operator precedence"
23:49 masak arnsholt: that surprises me, given how central OPP parsers are in every Perl 6 implementation.
23:49 arnsholt Yeah. I'm not sure how to proceed now, though
23:50 masak lue: don't feel obligated to include Perl 6 code if you can't think of any.
23:52 lue Alright (I don't have *nearly* enough P6-fu to come up with a Christmas Tree oneliner, like the one last year)
23:52 masak I didn't make that one, someone on Twitter did. :)
23:54 masak 'night, #perl6
23:55 lue rakudo: say 'a'.ord
23:55 p6eval rakudo : OUTPUT«97␤»
23:56 lue rakudo: "hello".split('') » .ord «+» 13 » .chr.join('').say # let's see if it works
23:57 p6eval rakudo : OUTPUT«===SORRY!===␤Confused at line 22, near "\"hello\".sp"␤»

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

Perl 6 | Reference Documentation | Rakudo