Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-12-28

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:08 HarryS joined #perl6
00:26 lichtkind joined #perl6
00:26 lichtkind on my way to bed but... why Complex is uc and conjugate lc , see http://perlcabal.org/syn/S32/Numeric.html
00:27 benabik Complex is a type?
00:28 lichtkind no a method
00:28 lichtkind Str also
00:28 lichtkind maybe reminder that it converts to a type
00:28 benabik They are typecasting methods.
00:28 lichtkind but feels inconsistant with a lot of things
00:28 benabik Methods such as .Str, .Complex, .Int are designed to be type conversions.
00:28 lichtkind they are all uc?
00:29 lichtkind ah
00:33 lichtkind thank you
00:42 donri any particular reason those methods are stringly typed instead of a single multi?
00:42 donri multi method to(Str)...
01:01 leprevost joined #perl6
01:09 khisanth_ joined #perl6
01:13 [Coke] donri: how would you say "I want Str" ?
01:13 [Coke] You'd need a string first...
01:15 jaldhar joined #perl6
01:16 colomon [Coke]: well, you could just say to(Str), like he says.
01:16 colomon but
01:16 colomon 1. it's ugly, IMO
01:16 colomon 2. how do you know what conversions a given class supports?  .Int, .Str, etc let you use p6's normal introspection to figure it out
01:17 colomon 3. it amounts to making the class author duplicate p6's dispatch method internally -- and there are probably better chance for the standard dispatch to be optimized
01:17 jaldhar joined #perl6
01:19 benabik On a bike shedding note, to is a horrible choice.  Too many other people are going to want it.  Email.to should probably be an address not a conversion.
01:20 colomon seriously, I can't think of any advantage to saying .to(Int) instead of .Int
01:27 sorear niecza has several classes with "has Bool $.list"
01:28 sorear this has bitten me once or twice
01:31 benabik .list vs .List ?
01:33 abercrombie joined #perl6
01:34 sorear benabik: no, shadowing Any.list
01:54 overrosy joined #perl6
02:26 wolfman2000 joined #perl6
02:34 overrosy joined #perl6
02:50 Trashlord joined #perl6
03:12 ruoso perl6: my $a = [1,2,3]; say $a == 3;
03:12 p6eval rakudo 5f7f4d, niecza v13-3-gd8f1334: OUTPUT«Bool::True␤»
03:12 p6eval ..pugs b927740: OUTPUT«1␤»
03:16 alc joined #perl6
03:20 overrosy joined #perl6
03:35 nek joined #perl6
03:42 Psyche^ joined #perl6
03:46 alvis joined #perl6
04:21 [Coke] niecza: say (1..Inf).elems
04:21 p6eval niecza v13-3-gd8f1334: OUTPUT«(timeout)»
04:22 [Coke] niecza: say (1..Inf).pop
04:22 p6eval niecza v13-3-gd8f1334: OUTPUT«Unhandled exception: Unable to resolve method pop in class Range␤  at /tmp/eizI9fdC_8 line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2573 (ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2574 (module-CORE @ 61) ␤  at /home/p…
04:33 sudokode joined #perl6
04:34 dalek roast: c55e401 | Coke++ | S05-capture/caps.t:
04:34 dalek roast: niecza fudges
04:34 dalek roast: review: https://github.com/perl6/roast/commit/c55e401fce
04:36 tokuhirom joined #perl6
04:38 dalek roast: d69e5a8 | Coke++ | S05-grammar/parse_and_parsefile.t:
04:38 dalek roast: niecza fudging
04:38 dalek roast: review: https://github.com/perl6/roast/commit/d69e5a8b3a
04:48 dalek niecza: 04c162f | Coke++ | t/spectest.data:
04:48 dalek niecza: run more tests
04:48 dalek niecza: review: https://github.com/sorear/niecza/commit/04c162fea6
04:52 Trashlord joined #perl6
04:56 brxue joined #perl6
04:58 [Coke] masak: what implementation supports "perl6 -c" ?
04:58 [Coke] phenny: ask masak what implementation supports "perl6 -c", so I can have a prayer of passing the tests? ;)
04:58 phenny [Coke]: I'll pass that on when masak is around.
05:00 [Coke] (I'm using rakudo at the moment because it supports MAIN)
05:00 [Coke] (but not -c)
05:07 moritz moritz-- # not reviewing the test harness properly
05:07 moritz b supports -c
05:07 moritz but I'm pretty sure we won't disallow nom for that reason
05:08 tokuhirom joined #perl6
05:10 moritz neither niecza
05:11 sorear niecza has a -c option.  What is -c *supposed* to do?
05:22 [Coke] verify that the code is compilable.
05:22 [Coke] (running as little of it as necessary)
05:30 packetknife joined #perl6
05:30 sorear hrm, niecza sort of does have that
05:31 sorear except niecza's -c has the side effect of saving a .exe file for your program
05:35 [Coke] every time I try to write "real" perl6 code, I am bitten by flattening.
05:35 [Coke] at least I am at the point now where I know to go to http://perl6advent.wordpress.com/2011/12/16/where-have-all-the-references-gone/
05:35 [Coke] moritz++
05:40 Timbus i like that article, but it doesn't show any binding
05:40 Timbus which is a pity
05:59 kaleem joined #perl6
06:07 [Coke] masak++, moritz++;
06:14 cognominal joined #perl6
06:31 zostay joined #perl6
06:32 zostay joined #perl6
06:33 mkramer joined #perl6
06:33 zostay joined #perl6
06:42 mkramer left #perl6
06:50 [Coke] is there a way to override gist in Rakudo so that say uses it?
06:50 [Coke] (for a class) - method gist() {return "foo"} doesn't work unless you say $foo.gist
07:03 sorear strange!
07:18 molaf joined #perl6
07:22 koban joined #perl6
07:23 agentzh joined #perl6
07:30 mishin joined #perl6
07:33 mkramer joined #perl6
07:34 moritz nom: class A { method gist() { 'bar!' } }; say A.new
07:34 p6eval nom 5f7f4d: OUTPUT«bar!␤»
07:34 moritz seems to work
07:35 sayu joined #perl6
07:41 [Coke] nom: class A { method gist {return 'an A'}} ; $a = A.new; say $a
07:41 p6eval nom 5f7f4d: OUTPUT«===SORRY!===␤Variable $a is not predeclared at line 1, near " = A.new; "␤»
07:41 [Coke] nom: class A { method gist {return 'an A'}} ; my $a = A.new; say $a
07:41 p6eval nom 5f7f4d: OUTPUT«an A␤»
07:41 [Coke] interesting.
07:41 [Coke] I'll see if I can golf down my situation.
07:42 moritz note that if you write 'method gist', you also kill say()ing the type object
07:42 rsimoes1 joined #perl6
07:42 sorear I thought we made method invocants :D by default
07:42 moritz to preserve that, you need to write   multi method gist(A:D:) { 'bar!' }
07:42 sorear rsimoes1: ping
07:42 rsimoes1 pong
07:42 moritz sorear: yes, but nom doesn't implement that yet
07:43 sorear rsimoes1: you sent me a bunch of pms full of garbage characters earlier.  what's up?
07:43 rsimoes1 garbage characters?
07:43 sorear dozens of trailing spaces and tabs, etc
07:44 moritz I've seen that from certain IRC clients
07:44 rsimoes1 irssi?
07:44 sorear _I'm_ using irssi
07:44 moritz irssi doesn't do that
07:44 rsimoes1 right
07:44 rsimoes1 ummm
07:45 rsimoes1 I think I was hypomanic this morning
07:45 rsimoes1 and telling everybody stupid jokes
07:45 rsimoes1 I don't really remember what I wanted
07:45 rsimoes1 PS, uri hates jokes
07:45 sorear what's that?
07:45 rsimoes1 don't tell uri jokes
07:45 * sorear isn't much of a fan of stupid jokes either
07:46 rsimoes1 =[
07:46 rsimoes1 he must have that turkish telepathy
07:46 rsimoes1 shut me down early
07:46 rsimoes1 oh but hey
07:46 rsimoes1 I saw unicode set operators somewheres in perl 6 docs
07:47 rsimoes1 how are sets stored underneath the hood?
07:47 sorear *checks logs*
07:47 sorear uri must be going soft
07:48 sorear knowing Rakudo, probably as unsorted lists :|
07:48 moritz rsimoes1: usually in UTF-8
07:48 rsimoes1 I told him it was a perl joke, but then he burned me hard and said that's obviously me
07:48 sorear check for files with names like Set.pm in src/core/
07:48 rsimoes1 oh ok, cool
07:49 koban left #perl6
07:49 sorear wait, do you mean unicode set operators like ∪ ?
07:49 sorear or like <:AHex + :Punct> ?
07:50 rsimoes1 the unicode range
07:50 [Coke] any suggestions on how to debug this stacktrace?
07:50 [Coke] https://gist.github.com/1527017
07:51 sorear rsimoes1: niecza uses a piecewise category filter representation that's quite compact
07:51 moritz [Coke]: is that b?
07:51 sorear Rakudo doesn't represent them at all
07:52 sorear in Rakudo <:AHex + :Punct> is translated to [ <:AHex> || <:Punct> ]
07:52 [Coke] moritz: no, nom.
07:52 sorear ...I'm losing my focus
07:52 * sorear -> sleep
07:52 rsimoes1 Oh, I meant what the list structure is for sets in perl 6
07:52 rsimoes1 does the spec require something?
07:52 [Coke] nom: say NaN==3 && 2==2;
07:52 p6eval nom 5f7f4d: OUTPUT«Bool::False␤»
07:53 moritz [Coke]: in 'Nines::hasNine' at line 82:t1-code gives you the most infromation, I guess
07:54 moritz and there's a prefix ? somewhere
07:54 moritz I can't say more without seeing the code
07:55 [Coke] the code is for the first task, so I'd rather not share it. Just wondering if there was a generic toolkit for "Where the hell did that Failure come from"
07:56 moritz not yet :(
08:00 [Coke] :facepalm: Pretty sure I know where it came from.
08:01 * [Coke] wonders why some math operations generate Failures and others, just NaN.
08:13 mkramer left #perl6
08:14 moritz [Coke]: you might prefer to  use fatal;  to get quick-and-hard failures
08:21 [Coke] where is :D in spec?
08:21 [Coke] [5~[6~[5~[6~
08:23 moritz S12:1598
08:30 [Coke] not a lot of spec there. Should I be able to use MyClass:D in a multi method?
08:30 [Coke] (or a method) ?
08:31 moritz sure; in every place where you can use a type name
08:31 moritz and if you say  class A { multi method gist(A:D:) { ... } }   then the final : marks it as the type constraint of the invocant
08:32 moritz which means you can only call that method on defined objects of type A
08:34 [Coke] odd. I get a syntax error trying to add ":D" to a method.
08:34 [Coke] er, to the first parameter of a method.
08:35 [Coke] (end up with "invalid typename in parameter declaration..."
08:35 moritz did you repeat the type name before the :D ?
08:35 moritz nom: class A { multi method gist(A:D:) { 'foo!' } }: say A; say A.new;
08:35 p6eval nom 5f7f4d: OUTPUT«===SORRY!===␤Confused at line 1, near "class A { "␤»
08:35 [Coke] nom: class A {}; class B { method stuff(A: $foo) {} };
08:35 p6eval nom 5f7f4d:  ( no output )
08:36 [Coke] again, will try to golf it.
08:36 moritz std: class A { multi method gist(A:D:) { 'foo!' } }: say A; say A.new;
08:36 p6eval std dc62e1d: OUTPUT«[31m===[0mSORRY![31m===[0m�Illegal use of colon as invocant marker at /tmp/1sT7DVg7NZ line 1:�------> [32m { multi method gist(A:D:) { 'foo!' } }:[33m�[31m say A; say A.new;[0m�Check failed�FAILED 00:01 126m�»
08:36 moritz nom: class A { multi method gist(A:D:) { 'foo!' } }; say A; say A.new;
08:36 p6eval nom 5f7f4d: OUTPUT«A()␤foo!␤»
08:49 [Coke] moritz: aha. my installed rakudo is not as up to date as the one here.
08:50 [Coke] It may even be of b vintage.
08:50 [Coke] *sigh*
08:52 [Coke] I wish I had double checked your suggestion before getting 169 lines in. ;)
08:56 baest joined #perl6
08:57 [Coke] moritz++
08:59 moritz [Coke]: ah, if it's b, then it doesn't even use gist in say()
09:01 [Coke] yah, it explains so many problems :)
09:02 [Coke] I had installed rakudo, of course. but it installs to $BUILD/install/bin by default, and I was running the perl6 in my path, which doesn't have that by default. (and on feather is based on parrot 2.7)
09:02 moritz ouch
09:03 [Coke] I got pretty far, though. ;)
09:06 drbean joined #perl6
09:08 [Coke] \o/
09:26 masak morning, #perl6
09:26 phenny masak: 04:58Z <[Coke]> ask masak what implementation supports "perl6 -c", so I can have a prayer of passing the tests? ;)
09:26 masak oh dear, nom doesn't have -c ? :(
09:26 baest joined #perl6
09:26 * masak really hates regressions caused by switching out the internals and frontend
09:27 masak is there any chance we could add back -c into nom in the very near future?
09:28 masak moritz: this definitely goes into our conjectural NOTES file.
09:29 drbean joined #perl6
09:32 * masak goes ahead and creates it
09:33 dalek roast: 4dde3c7 | (Helmut Wollmersdorfer)++ | S05-mass/named-chars.t:
09:33 dalek roast: added char-names special cases
09:33 dalek roast: added some TODOs
09:33 dalek roast: review: https://github.com/perl6/roast/commit/4dde3c7e76
09:39 araujo joined #perl6
09:39 araujo joined #perl6
09:39 mkramer joined #perl6
09:39 [Coke] \o/ Segmentation fault.
09:39 [Coke] I feel like masak 4 years ago. ;)
09:40 * [Coke] saves this particular incarnation of the first task for later segfault undoing.
09:40 masak [Coke]++
09:40 masak make sure to golf things for our enjoyment and RT-submitting, too :)
09:43 fsergot joined #perl6
09:43 cognominal_ joined #perl6
09:44 fsergot hi o/
09:46 moritz nom: multi infix:<xx>(str $x, int $i) { nqp::x($x, $i) }; say 'foo' x 3
09:46 p6eval nom 5f7f4d: OUTPUT«foofoofoo␤»
09:46 moritz nom: multi infix:<xx>(str $x, int $i) { nqp::x($x, $i) }; say (my $ = 'foo') x 3
09:46 p6eval nom 5f7f4d: OUTPUT«foofoofoo␤»
09:47 moritz something like that segfaults when done in the setting
09:48 masak fsergot: \o hi
09:49 sayu_ joined #perl6
09:53 cognominal___ joined #perl6
09:56 * [Coke] has a solution to task 1 that he could turn in now. yay.
10:01 dalek roast: 5ecb85e | (Helmut Wollmersdorfer)++ | S05-mass/named-chars.t:
10:01 dalek roast: added TODOs for corner cases
10:01 dalek roast: review: https://github.com/perl6/roast/commit/5ecb85e101
10:01 mkramer joined #perl6
10:04 drbean joined #perl6
10:19 mkramer joined #perl6
10:22 masak std: my (@a, @b); push @a, $@b
10:22 p6eval std dc62e1d: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Invalid hard reference syntax at /tmp/eEzxSA3mdU line 1:â�¤------> [32mmy (@a, @b); push @a, $[33mâ��[31m@b[0mâ�¤    expecting any of:â�¤        desigilnameâ�¤    twigilâ�¤Parse failedâ�¤FAILED 00:01 125mâ�¤Â»
10:22 masak I'm with moritz++ on this one. allow it, and have it mean $(@b)
10:26 masak moritz: that post has an excess semicolon in 'sub set_five; {'
10:27 masak (and by the way, it's a very good post. it looks past the individual features, and focuses on how they interact to create a user experience. I hope we'll see more such posts next Advent.)
10:27 mkramer joined #perl6
10:29 dalek roast: cd67f6e | (Helmut Wollmersdorfer)++ | S05-mass/properties-derived.t:
10:29 dalek roast: added TODO properties broken in Perl 5.10
10:29 dalek roast: review: https://github.com/perl6/roast/commit/cd67f6eb8d
10:37 [Coke] nom: 9%99
10:37 p6eval nom 5f7f4d:  ( no output )
10:37 [Coke] nom: say 9%100.234
10:37 p6eval nom 5f7f4d: OUTPUT«9␤»
10:39 [Coke] masak: rules clarification: are we allowed to use only the number 9, or any number whose digits are all 9?
10:39 [Coke] (I'm assuming the former.)
10:39 masak the former.
10:40 tokuhirom joined #perl6
10:41 masak actually, hm, let me re-read the problem specification myself :)
10:42 masak I'd say the problem specification allows the latter. good catch :)
10:47 eiro hello guys
10:48 mkramer joined #perl6
10:50 masak eiro! \o/
10:50 eiro wasa masak ?
10:52 masak eiro: enjoying the fallout so far of p6cc :)
10:52 masak eiro: how're you?
10:52 [Coke] masak: my copy of t1 now deals with that. yay.
10:53 masak \o/
10:54 moritz [Coke], masak: I disagree
10:54 moritz I intentionally wrote "number 9" and not "digit 9"
10:55 mj41 joined #perl6
10:55 moritz using 99 doesn't contain the number 9 at all, only the digit
10:55 masak fair enuf.
10:56 mkramer joined #perl6
10:57 [Coke] ... thankfully it's a simple change to undo that. :P
10:57 [Coke] I'll let you stew on it for a day. ;)
10:57 masak heh :)
11:02 eiro masak, back from costa teguise (canarians island): x-mass wearing t-shirt was good
11:02 eiro 1 week break is good too.
11:03 masak eiro: yeah :) I did a trip to similarly warm places in early December. nice to get a bit of a natural tan in winter, too :)
11:03 eiro \o/
11:04 eiro about perl6: someone working on asn1 compiler ?
11:04 eiro (would be nice to have full perl6 implementations of ldap and z3950
11:22 fsergot nom: my $s = "test\n"; say 1 if $s ~~ /test/;
11:22 p6eval nom 5f7f4d: OUTPUT«1␤»
11:30 fsergot what to do if slurp gives "malformed utf8 string"? :)
11:30 tadzik look twice at your file :)
11:31 tadzik is it a binary file maybe?
11:31 fsergot No, but there can be some error in.
11:32 fsergot But i dont know where.
11:32 fsergot ::)
11:32 huf iconv and check where it breaks;)
11:34 fsergot great! thanks :)
11:34 fsergot huf++
11:34 fsergot tadzik++
11:36 fsergot it works! :)
11:36 masak fsergot++
11:37 masak maybe we should give a more informative error message when file input chokes on some non-UTF-8.
11:37 fsergot will be great :)
11:39 fsergot maybe line number? :)
11:41 masak the only reason there isn't already a line number is that it's an error emitted by Parrot.
11:41 masak we should catch it and re-package it.
11:41 * masak submits rakudobug
12:03 mkramer joined #perl6
12:07 cosimo joined #perl6
12:12 shaowei joined #perl6
12:14 shaowei echo
12:16 pochi joined #perl6
12:19 ruoso joined #perl6
12:22 leprevost joined #perl6
12:29 masak getting some coverage here: http://www.i-programmer.info/news/98-languages/3536-perl-6-contest.html
12:37 colomon nom: say (1, 1).list.elems
12:37 p6eval nom 5f7f4d: OUTPUT«2␤»
12:38 colomon nom say (1, 1).list.elems == 2
12:38 colomon nom: say (1, 1).list.elems == 2
12:38 p6eval nom 5f7f4d: OUTPUT«Bool::True␤»
12:40 masak nom: say ((1, 1).list.elems == 2) === Bool::True
12:40 p6eval nom 5f7f4d: OUTPUT«Bool::True␤»
12:40 * masak grins
12:42 colomon nom: say "+" ~~ 9
12:42 p6eval nom 5f7f4d: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(Mu $v, Mu %_)␤␤  in method Numeric at src/gen/CORE.setting:648␤  in sub infix:<==> at src/gen/CORE.setting:2214␤  in sub infix:<==> at src/gen/CORE.setting:2214␤  in method ACCEPT…
12:42 colomon that's my problem
12:42 colomon known bug?
12:43 colomon nom: say "9" ~~ 9
12:43 p6eval nom 5f7f4d: OUTPUT«Bool::True␤»
12:43 colomon niecza: say "9" ~~ 9
12:43 p6eval niecza v13-4-g04c162f: OUTPUT«Bool::True␤»
12:43 colomon nom: say "blue" ~~ 9
12:43 p6eval nom 5f7f4d: OUTPUT«Bool::False␤»
12:43 colomon very specialized bug
12:45 colomon nom: say +'+'
12:45 p6eval nom 5f7f4d: OUTPUT«Failure.new(exception => Exception.new())␤»
12:45 colomon nom: say +'blue'
12:45 p6eval nom 5f7f4d: OUTPUT«0␤»
12:46 colomon my son is sitting upstairs in his bed alternating between singing softly to himself and pretending to be a loud train whistle.
12:48 masak :D
12:48 masak not a known bug, to my knowledge.
12:48 masak nom: say '-' ~~ 9
12:48 p6eval nom 5f7f4d: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(Mu $v, Mu %_)␤␤  in method Numeric at src/gen/CORE.setting:648␤  in sub infix:<==> at src/gen/CORE.setting:2214␤  in sub infix:<==> at src/gen/CORE.setting:2214␤  in method ACCEPT…
12:48 masak nom: say '*' ~~ 9
12:48 p6eval nom 5f7f4d: OUTPUT«Bool::False␤»
12:49 colomon yeah, I think it's in Str.Numeric, but the source is kind of hard to follow
12:49 masak possible internals "explanation": it tries to numify, but a sign symbol makes it partly match some rule and then fail more loudly than intended.
12:49 * masak submits rakudobug
12:51 drbean joined #perl6
12:51 colomon masak++
12:52 masak nice find. colomon++
12:52 masak colomon: are you by any chance working on the four-nines task? :)
12:54 loz_ joined #perl6
12:54 alvis joined #perl6
12:54 colomon what could make you think that?
12:56 danishman joined #perl6
12:57 MayDaniel joined #perl6
12:57 mkramer joined #perl6
12:58 bluescreen10 joined #perl6
12:59 masak the 9. :)
13:05 masak sorear: it could be argued, from a Perl 5/S19 perspective, that the '-c' flag shouldn't produce an exe file in Niecza.
13:06 cedric joined #perl6
13:07 cedric hello #perl6
13:07 tadzik hello cedric
13:08 cedric o/ tadzik
13:08 cedric rakudo: 'abc' ~~ /.{ $¢ }/
13:08 p6eval rakudo 5f7f4d: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 1, near "$\x{a2} }/"␤»
13:08 masak hello cedric
13:09 cedric o/ masak
13:09 masak b: 'abc' ~~ /.{ $¢ }/
13:09 p6eval b 1b7dd1: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "$\x{a2} }/"␤»
13:09 cedric there's a conflict between the current match state $¢ and the ¢ sigil
13:09 cedric i guess
13:09 masak ¢ isn't a sigil...
13:10 masak it's just a funky character.
13:10 masak .u ¢
13:10 phenny U+00A2 CENT SIGN (¢)
13:10 cedric masak: S08-capture.pod:  my ¢a = (1, (2, (3, 4)));
13:10 masak o.O
13:10 * masak reads S08
13:10 tadzik nom: my $€ = 5; say $€
13:10 p6eval nom 5f7f4d: OUTPUT«===SORRY!===␤Confused at line 1, near "my $\u20ac = 5;"␤»
13:11 tadzik looks like Euro is too confusing for Rakudo
13:11 tadzik niecza: my $€ = 5; say $€
13:11 p6eval niecza v13-4-g04c162f: OUTPUT«[31m===[0mSORRY![31m===[0m��Confused at /tmp/2FafRo9CLi line 1:�------> [32mmy $[33m�[31m€ = 5; say $€[0m��Parse failed��»
13:11 masak cedric: I call fossil. never even seen that bit of spec before.
13:12 masak it's dated ruoso 2009-09-21.
13:13 masak color me highly doubtful. there are four sigils for *very* central data types in the language: $ @ % &
13:13 masak capture is important, but not that important.
13:13 tadzik Ditto
13:14 tadzik (I like this word since I know what it means)
13:14 masak you're just not spelling it correctly :P
13:14 tadzik aw
13:14 tadzik ain't I?
13:14 masak http://en.wiktionary.org/wiki/dito
13:15 masak tadzik: to be fair, that's the US spelling of UK/Latin "dito"
13:15 tadzik oh, I see now
13:15 masak so it's not wrong, "per say" :P
13:15 tadzik then: Dito
13:15 masak \o/
13:16 cedric I would like to push that commit https://github.com/cedric-vincent/roast/commit/dbd529b2c0b217e802f894533efef56ec5d3f4a2 on roast
13:19 cedric std: my ¢a = (1, (2, (3, 4)));
13:19 p6eval std dc62e1d: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Malformed my at /tmp/FLW1Bxny0W line 1:â�¤------> [32mmy [33mâ��[31m¢a = (1, (2, (3, 4)));[0mâ�¤    expecting scoped declaratorâ�¤Parse failedâ�¤FAILED 00:01 118mâ�¤Â»
13:20 daxim joined #perl6
13:21 masak the fact that STD doesn't recognize the sigil is a sign of how slushy that bit of spec is.
13:22 masak the roast commit looks fine to me.
13:22 masak (though I've never liked the variable $¢)
13:26 cedric masak: it seems I don't have write access to roast, do you prefer a pull request?
13:28 masak that would do it.
13:39 dalek roast: dbd529b | (Cedric VINCENT)++ | S05-capture/match-object.t:
13:39 dalek roast: add tests for checking $¢, the current match state.
13:39 dalek roast: review: https://github.com/perl6/roast/commit/dbd529b2c0
13:39 dalek roast: c1dacca | (Carl Mäsak)++ | S05-capture/match-object.t:
13:39 dalek roast: Merge pull request #11 from cedric-vincent/master
13:39 dalek roast:
13:39 dalek roast: add tests for checking $¢, the current match state.
13:39 dalek roast: review: https://github.com/perl6/roast/commit/c1dacca3ff
13:40 masak cedric++
13:40 tadzik niecza 3 todo '$¢ is still named $/'
13:40 tadzik ...$/ should be named $¢?
13:44 masak as I understand it, $¢ is what you inspect during an ongoing grammar match, and $/ is what you inspect afterwards.
13:44 cedric niecza: 'abc' ~~ /.{ say $/.WHAT}/
13:44 p6eval niecza v13-4-g04c162f: OUTPUT«Cursor()␤»
13:44 masak $¢ is mutable, $/ is immutable.
13:44 masak or something.
13:44 lutok joined #perl6
13:45 cedric moreover, as of my understanding, $/ is a Match object, not a Cursor object
13:45 cedric hence my comment "$¢ is still named $/"
13:45 tadzik mhm
13:46 cedric these tests actually pass if you replace $¢ with $/
13:46 cedric ... with Niecza
13:50 masak nod
13:50 masak ...aaaaand we have just accepted our 18th contestant to p6cc!
13:50 tadzik woot
13:51 masak this is three days after the announcement. same level as we achieved in two weeks last year :P
13:51 masak this will be awesome.
13:51 Mowah joined #perl6
13:51 cedric masak++: is the list of contestants public?
13:51 masak nope.
13:52 masak contestant can consider themselves to be published after the first solution they send in. :)
13:52 masak contestants*
13:52 tadzik masak: there were 18th contestants last year?
13:52 masak yes, as far as I recall.
13:53 masak yes, 18: http://strangelyconsistent.org/blog/the-perl-6-coding-contest-is-now-closed
13:53 masak (that's LAST year's contest that's closed. this year's is still open. still time to sign up!)
13:57 cedric yesterday moritz++ said me "you can always .encode to Buf if you want to match bytes".  Do you know how to translate this sentence in Perl6 code? :)
13:58 cedric rakudo: "café".encode ~~ /.**5/
13:58 p6eval rakudo 5f7f4d: OUTPUT«Cannot use a Buf as a string, but you called the Str method on it␤  in method Str at src/gen/CORE.setting:5549␤  in <anon> at src/gen/Metamodel.pm:2639␤  in !cursor_init at src/stage2/QRegex.nqp:831␤  in method reify at src/gen/CORE.setting:4352␤  in method reify a…
14:00 masak cedric: I'm afraid he might've mean "match bytes" in a sense that doesn't involve regexes...
14:00 masak rakudo: say "café".encode.perl
14:00 p6eval rakudo 5f7f4d: OUTPUT«Buf.new()␤»
14:00 masak rakudo: say "café".encode.contents.perl
14:00 p6eval rakudo 5f7f4d: OUTPUT«Method 'contents' not found for invocant of class 'Buf'␤  in block <anon> at /tmp/di4SmRaNMn:1␤  in <anon> at /tmp/di4SmRaNMn:1␤»
14:00 masak meh. :)
14:01 masak rakudo: say "café".encode.list.perl
14:01 p6eval rakudo 5f7f4d: OUTPUT«Array.new(99, 97, 102, 195, 169)␤»
14:01 cedric Is there a way to get "." matching a single byte? (I heard that the ":bytes" modifier might be deprecated)
14:02 masak rakudo: say "café".encode
14:02 p6eval rakudo 5f7f4d: OUTPUT«Buf:0x<63 61 66 c3 a9>␤»
14:04 cedric I definitevely want to use Perl6 Grammar to parse binary files :)
14:05 masak me too!
14:05 masak wow, that'd be *awesome*.
14:05 masak or at least slightly grand.
14:06 masak well, you could always convert everything to hex numbers, and parse that :P
14:07 kaleem joined #perl6
14:07 cedric yeah I'm doing so: http://irclog.perlgeek.de/perl6/2011-12-20#i_4857347 :)
14:07 cedric it works like a charm!
14:08 masak heh! and here I thought I was being original... :)
14:08 masak yeah, I'm planning to do the same with a binary format I want to understand.
14:10 cedric masak: please, keep me informed if you find a way to parse binary files directly.
14:12 masak cedric: will do.
14:18 moritz if you want to match bytes, you can use an evil trick:
14:19 moritz rakudo: say "café".encode.decode('Latin-1')
14:19 p6eval rakudo 5f7f4d: OUTPUT«café␤»
14:19 moritz since you can take every byte as a Latin-1 character, that's a way to match regexes on it etc.
14:23 cedric this isn't straightforward: binary format -> Str (from slurp) -> encode -> decode
14:24 cedric maybe a Buf.Match() could default to the Unicode level :bytes?
14:24 moritz you can .read in the first place, to get a Buf straight from the file handle
14:24 masak I was thinking I'd build a small API around grammars that did the conversion to binary.
14:24 masak but we'll see.
14:25 cedric \o/
14:25 masak would be neat to just supply a flag to MyGrammar.parse -- something like :binary
14:25 masak but, hm, that's the wrong peg.
14:25 moritz I'm not convinced by the current vague approaches to unify multiple Unicode levels within a single type
14:26 masak should be more like 'grammar MyGrammar does Binary {}'
14:26 moritz MyGrammar.parsefile($filename, :binary) # thinkable
14:26 masak do we generally use :bin, not :binary?
14:27 gfldex joined #perl6
14:28 * moritz wouldn't know
14:29 cedric S32 and S16 use :bin
14:37 mj41 joined #perl6
14:39 masak cedric: you're about a week new to the channel. a belated welcome to you, sir! :)
14:42 cedric Thanks! :D
14:47 moritz cedric: I've given you a commit bit to roast and many other repos under the perl6 organization. Have fun!
14:47 masak moritz++
14:48 cedric Thanks, I'll be careful :)
14:48 masak cedric: out of curiosity, how did you find #perl6?
14:50 cedric my first contact with Perl6 was the French Perl Workshop 2007. jnthn++ made a wonderful presentation (as usual). From that time, I keep a close eye on Perl6 :)
14:51 moritz cedric: everything is under version control. If you accidentally push something, the biggest damange you can make is that we have to revert it. No real trouble :-)
14:51 huf is the version control under version control? are there turtles all the way down? :)
14:52 huf what about the version control that stores all things not under version control? does that store itself? :)
14:52 moritz huf: no; a git push --force can actually create confusion (though if you have a local copy, you still ahve all the data that the push overwrote)
14:53 huf nice thing about dvcs, everybody's constantly making distributed backups
14:54 moritz though I'd still love an option in github that disables forced pushes
14:55 ausias joined #perl6
14:57 cedric masak: the public IRC logs (http://irclog.perlgeek.de/perl6) are really valuable to help Perl6 newbies to talk with Perl6 masters (from my POV) :)
14:57 cedric we can see how nice you are :)
14:58 masak we are, aren't we? :P
14:58 cedric for sure!
14:58 * masak purrs
14:59 cedric :)
15:01 am0c joined #perl6
15:28 raiph joined #perl6
15:28 sorear good * #perl6
15:32 masak sorear! \o/
15:40 colomon \o/
15:45 TimToady perl6: 'blogs'.flip.succ.flip.say
15:45 p6eval pugs b927740: OUTPUT«*** No such method in class Str: "&flip"␤    at /tmp/hHe7ygBLyN line 1, column 1 - line 2, column 1␤»
15:45 p6eval ..rakudo 5f7f4d, niecza v13-4-g04c162f: OUTPUT«clogs␤»
15:46 dalek rakudo/nom: a9bead6 | moritz++ | src/ (2 files):
15:46 dalek rakudo/nom: reimplement -c command line option
15:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a9bead6d48
15:48 moritz masak: there you go
15:48 masak moritz++
15:52 masak I updated http://strangelyconsistent.org/p6cc2011/NOTES to reflect this.
15:54 masak by the way, that commit is pleasing to read, as well. one can tell that the Rakudo architecture has been through a couple of iterations.
15:55 moritz to me it felt a bit like a cheat
15:55 moritz because there is already some mechanism for specifying the target stage
15:56 moritz but it's too tightly coupled to the output from the existing stages to be easily usable
15:56 moritz so I feel like hijacking an existing mechanism
15:57 masak I guess.
15:58 masak in some sense, "checking syntax" isn't so much of a compiler stage as... a decision not to go past a certain compiler stage.
15:59 TimToady in a sense, -c adds the final CHECK, that just exits with status
15:59 masak right.
16:00 TimToady it can even be implemented that way, since CHECKS do lifo order
16:00 masak "everything turns out to be yet another setting" :)
16:01 TimToady if you assume all compile errors do their own exit $code, then it's just CHECK exit 0
16:02 TimToady yes, it could also be done with a variant setting, but that seems a bit heavyweight
16:02 * sorear wonders what the compile-to-exe option in niecza should be called
16:02 TimToady otoh, it would be possible to sneak CHECK pushes in before the -c, so maybe a setting is the cleaner way
16:03 masak sorear: --compile-to-exe ? :)
16:03 TimToady what if the backend doesn't use .exe?  :P
16:05 * TimToady supposes that if you follow *cc style, it's just -o
16:06 tadzik or --target=exe
16:08 masak what tadzik said.
16:09 tadzik that'd be Rakudo-style
16:09 tadzik or maybe Parrot-style
16:09 tadzik it's definitely something with style
16:13 * TimToady generally prefers not to use nouns to indicate relationships that are better served with prepositions (or postpositions) or a case system, linguistically speaking
16:14 TimToady it's huffmanly inefficient to encode valency with nouns
16:15 TimToady that's why we don't have switch/case, after all
16:16 dalek roast: 8d3c723 | sorear++ | S05-capture/match-object.t:
16:16 dalek roast: [S05-capture/match-object] Niecza unfudges
16:16 dalek roast: review: https://github.com/perl6/roast/commit/8d3c723e5a
16:18 * masak decommutes
16:25 cognominal joined #perl6
16:27 dalek niecza: 52411f8 | sorear++ | lib/CORE.setting:
16:27 dalek niecza: Ensure Match.{kv,keys,values} flattens
16:27 dalek niecza: review: https://github.com/sorear/niecza/commit/52411f8c1d
16:43 JimmyZ joined #perl6
16:43 lrnperl6 joined #perl6
16:50 lrnperl6_ joined #perl6
16:51 thou joined #perl6
17:01 lucas_ joined #perl6
17:01 sorear #phasers in 29?
17:19 sorear no #phasers today?
17:21 kaare_ joined #perl6
17:22 TimToady well, we'll see...
17:34 Chillance joined #perl6
17:52 [Coke] sorear; is MAIN support on your short list?
17:54 sorear Not yet
17:56 [Coke] hokay.
17:56 fglock joined #perl6
17:57 bluescreen100 joined #perl6
17:57 bluescreen__ joined #perl6
17:58 bluescreen10 joined #perl6
18:03 * [Coke] ponders polishing task 1 until it's shiny, or jumping into task 2 immediately.
18:13 drbean joined #perl6
18:19 kaleem joined #perl6
18:19 fglock o/
18:19 sorear o/ fglock
18:35 ashleydev fglock: is perlito 6 going to make it to the perl6 features matrix?
18:36 ashleydev or may I suggest it?
18:45 masak that's an excellent suggestion.
18:46 masak sorear: is there some technical blocker to MAIN in Niecza, or do you just have other priorities right now?
18:47 [Coke] masak,sorear: I asked, btw, because it would be helpful for the contest. ;)
18:48 masak yes, and cool in general. multi MAIN is very nice-to-have.
18:48 masak I suppose sorear has held off so far because there are still open spec questions in that area.
18:49 drbean joined #perl6
18:51 sorear no real technical blockers.  Mostly I haven't _needed_ it, and the spec has been awkward to interpret in the past, and niecza didn't have signature introspection yet so it would need a lot of C# code
18:54 Util perl6: sub foo ( $a is rw, $b is rw, $c is rw ) { $a = 2; $b = 4, $c = 7;}; my %hash; foo( |%hash<X Y Z> ); say %hash.perl;
18:54 p6eval niecza v13-5-g52411f8: OUTPUT«{"X" => 2, "Y" => 4, "Z" => 7}.hash␤»
18:54 p6eval ..rakudo a9bead: OUTPUT«("X" => 2, "Y" => 4, "Z" => 7).hash␤»
18:54 p6eval ..pugs b927740: OUTPUT«*** No compatible multi variant found: "&foo"␤    at /tmp/AE2xCEnkl5 line 1, column 80-100␤»
18:56 masak \o/
19:02 Util someday, this should work, with the benefit of restricted keys! : foo( |(my %hash<X Y Z>) );
19:11 masak nice!
19:11 masak want S09 now :)
19:33 fglock joined #perl6
19:33 fglock ashleydev: what is the perl6 features matrix?
19:34 * [Coke] finds himself writing perl6 like java. hurm.
19:34 ashleydev fglock: http://perl6.org/compilers/features
19:35 tadzik [Coke]: I frequently try to write C++ Like Perl 6. I always fail :)
19:38 fglock hmm - that's hard to classify, "Basic file IO" -> perlito has slurp(), but that's all
19:38 fglock it is not ... feature oriented
19:40 moritz so what's its orientation?
19:41 fglock small core, provide basic stuff that allows for extensibility
19:41 fglock I can't say if it succeeds at that, but that's the idea
19:43 fglock so you can write perl6 in perl6
19:44 [Coke] http://arstechnica.com/business/news/2011/12/huge-portions-of-web-vulnerable-to-hashing-denial-of-service-attack.ars - yay perl.
19:44 fglock small core also means "incomplete" of course - so it's kind of a chicken/egg problem
19:46 fridim_ joined #perl6
19:46 kensanata joined #perl6
19:54 ashleydev so maybe that'd be analogus to putting NQP on the chart?
19:55 tadzik oh, masak
19:56 fglock for example, "token" is implemented in Perl6, and the perlito grammar uses "token" - but the core perlito doesn't have a token primitive
19:56 fglock hmm - probably not, because the final product for nqp is rakudo
19:56 fglock while the final product for perlito is itself
19:57 fglock it's a bit different
19:57 tadzik I fixed Ratel to work on nom yesterday, now I wonder: if I wanted to use it as a templating engine in Bailador, I'd now need to add Web as a dependency, which is a so-so idea, as Web doesn't pass its tests and is generally a big beast
19:57 [Coke] nom: my %foo; %foo<a><b><c> = 3;
19:57 p6eval nom a9bead: OUTPUT«Method 'at_key' not found for invocant of class 'Any'␤  in method postcircumfix:<{ }> at src/gen/CORE.setting:1155␤  in block <anon> at /tmp/5HdvM_g6N2:1␤  in <anon> at /tmp/5HdvM_g6N2:1␤»
19:57 moritz fwiw once we have a nom-based rakudo star release, we'll remove the rakudo 2011.07 from feature map, so then there'll be more visual space
19:57 moritz [Coke]: IMHO that's the major remaining nom regression (autovivification)
19:57 fglock it would be more like using rakudo to write itself
19:57 masak tadzik: yeah. put Ratel in it's own repo, is probably the best solution.
19:58 masak tadzik: in general we should probably organ-harvest the Web.pm repo for the good bits.
19:58 tadzik masak: okay. Want to do it?
19:58 tadzik if I do, I'd need to add a clause that my "beer for unreadable Perl" challenge does not apply to it :P
19:58 ashleydev fglock: so perlito is just going to grow right? or does it aim to stay minimal?
19:59 fglock yes, it is growing
19:59 masak tadzik: you have a "beer for unreadable Perl" challenge? :)
19:59 kensanata left #perl6
20:00 ashleydev fglock: so maybe it would be good to get it in the matrix -- it would encourage others to work on it and give it some viz
20:00 tadzik yeah, against the stupid Line Noise stereotype. I always say that if one can find a single line of unreadable Perl on my github, I'm buying a beer
20:00 tadzik on last LUG two Pythoners and one Node.js guy tried, and the latter even declared Perl "not that bad after all"
20:01 tadzik and I didn't buy a single beer yet ;)
20:02 fglock ashleydev: how does that work?
20:02 ashleydev well people see it on the matrix and say, "what's that? I want to play with it."
20:03 moritz fglock: there's a .json file in the feature repo
20:03 ashleydev and besides it has the petegree as beign the oldest implementation in the matrix, no?
20:03 moritz you can add perlito to it... but please wait one or two weeks until we have a nom-based star release
20:03 ashleydev *being
20:04 moritz oldest? depends on how you count :-)
20:04 fglock ok - I don't have a commit bit, I think
20:04 fglock perlito has changed names a few times, the original bootstrap is 2005-ish with "lrep"
20:05 masak awful name :P
20:05 fglock it descends from miniperl6+kindaperl6, but much simplified
20:05 masak "perlito" is cute, though.
20:06 fglock :)
20:06 masak it's the Latin Lover of Perl implementations.
20:06 masak it will seduce you in the night.
20:06 awoodland joined #perl6
20:06 fglock keeping perlito simple is the biggest challenge
20:06 fglock perlito comes from the name of my cat, Pirulito
20:07 tadzik heh, it's similar to Panda then :P
20:07 fglock pirulito is lollipop in portuguese
20:09 moritz fglock: you now have commit access to perl6/feature, and about 20 other repos in the perl6 organization
20:10 fglock moritz++
20:12 moritz (including roast, specs, modules.perl6.org and ecosystem)
20:13 fglock perlito6 provides the backend for v6.pm (perl6 in perl5) and perl6-in-browser;
20:13 fglock perlito5 could be used to implement Perl5 support in Perl6 implementations
20:14 ashleydev fglock: maybe v6.pm should be in the matrix?
20:14 PacoLinux joined #perl6
20:14 fglock v6.pm is just perlito inside
20:15 fglock it used to be a separate implementation - very hard to maintain
20:16 fglock otoh, maybe v6.pm is the actual "product", and perlito is just a library :)
20:17 ashleydev does perlito/v6.pm intend to use STD?
20:19 fglock in an ideal world, perlito + modules = perl6
20:20 fglock while STD is "monolithic"
20:20 drbean joined #perl6
20:22 fglock I don't know if this is doable - so far it just seems to be a lot of extra work
20:34 fglock re oldest: I think parrot "perl6" is oldest (much before rakudo), and then pugs
20:47 moritz parrot "perl6" evolved into rakudo
20:47 moritz much like lrep evolved into perlito
20:47 fglock yes
20:48 cognominal joined #perl6
20:49 * moritz -> sleep
20:49 fglock me too - I think we are at the same timezone
20:50 fglock left #perl6
21:03 masak nom: class A { has $x }; say A.new
21:03 p6eval nom a9bead: OUTPUT«A.new()␤»
21:03 masak nom: class A { has $x = 5; method foo { say $x } }; A.new.foo
21:03 p6eval nom a9bead: OUTPUT«5␤»
21:03 masak nom: class A { has $x = 5; method foo { my $x = 42; say $x } }; A.new.foo
21:03 p6eval nom a9bead: OUTPUT«Cannot assign into a PMCNULL container␤  in method foo at /tmp/GFI8HyML4y:1␤  in block <anon> at /tmp/GFI8HyML4y:1␤  in <anon> at /tmp/GFI8HyML4y:1␤»
21:04 masak huh :)
21:04 * masak submits rakudobug
21:04 masak I... I wasn't even trying! :)
21:04 masak b: class A { has $x = 5; method foo { my $x = 42; say $x } }; A.new.foo
21:04 p6eval b 1b7dd1: OUTPUT«Any()␤»
21:04 masak niecza: class A { has $x = 5; method foo { my $x = 42; say $x } }; A.new.foo
21:04 p6eval niecza v13-5-g52411f8: OUTPUT«42␤»
21:04 masak niecza++
21:04 masak niecza: class A { has $x = 5; method foo { my $x = 42; say $!x } }; A.new.foo
21:04 p6eval niecza v13-5-g52411f8: OUTPUT«Potential difficulties:â�¤  $x is declared but not used at /tmp/g5b1hwzx2V line 1:â�¤------> [32mclass A { has $x = 5; method foo { my [33mâ��[31m$x = 42; say $!x } }; A.new.foo[0mâ�¤â�¤5â�¤Â»
21:04 masak also correct.
21:05 bbkr1 Are Num values in rakudo stored internally in IEEE754 format? I need to get raw byte Buf (same as pack/unpack "d" pattern in P5) and I'm not sure if I need to search how to nqp::box/unbox them or do I need something more sophisticated.
21:09 bluescreen100 joined #perl6
21:09 masak blog post! http://strangelyconsistent.org/blog/the-c-flag
21:10 drbean joined #perl6
21:13 MayDaniel joined #perl6
21:18 benabik masak: para 1: s/bast-test/base-test/
21:18 masak thanks, fixing
21:19 benabik masak: Interesting post, as usual.  :-)
21:20 masak \o/
21:26 thou are grammars known broken in current nom? e.g. this works in rakudo-ng and not in rakudo-nom, for me:  https://gist.github.com/1529700
21:29 benabik It seems to work if I set $/ to the return value of parse
21:29 benabik Perhaps there's a bug with $/ ?
21:31 masak yes, seems that way.
21:31 masak all the .parse calls come out as True in nom.
21:32 masak nom: grammar G { rule TOP { a } }; say so G.parse("a"); say so $/; say $/.perl
21:32 p6eval nom a9bead: OUTPUT«Bool::True␤Bool::False␤Any␤»
21:32 * masak submits rakudobug
21:32 masak benabik++
21:32 masak b: grammar G { rule TOP { a } }; say so G.parse("a"); say so $/; say $/.perl
21:32 p6eval b 1b7dd1: OUTPUT«Bool::True␤Bool::True␤Match.new(␤ from => 0,␤ orig => "a",␤ to   => 1,␤)␤»
21:33 molaf joined #perl6
21:36 thou thanks, masak!
21:37 * masak .= sleep
21:41 donri joined #perl6
21:44 snearch joined #perl6
22:08 awoodland joined #perl6
22:20 drbean joined #perl6
22:31 cognominal what is b?
22:31 tadzik old branch of Rakudo, before nom
22:32 packetknife joined #perl6
22:39 sorear bbkr1: internal format is whatever your C compiler uses for double, unless you compiled Parrot with a different NUMVAL define
22:39 sorear bbkr1: there's (probably) no way to difrectly get at it, except maybe zavolaj stuff
22:41 mj41 joined #perl6
22:48 abercrombie joined #perl6
22:58 drbean joined #perl6
23:02 bbkr1 sorear: thanks, I've found conversion algorithms on the internet so I'll try to implement it without pack/unpack stuff.
23:08 fsergot good night o/
23:51 whiteknight joined #perl6

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

Perl 6 | Reference Documentation | Rakudo