»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:09 HarryS joined 00:26 lichtkind joined
lichtkind on my way to bed but... why Complex is uc and conjugate lc , see perlcabal.org/syn/S32/Numeric.html 00:26
benabik Complex is a type? 00:27
lichtkind no a method 00:28
Str also
maybe reminder that it converts to a type
benabik They are typecasting methods.
lichtkind but feels inconsistant with a lot of things
benabik Methods such as .Str, .Complex, .Int are designed to be type conversions.
lichtkind they are all uc?
ah 00:29
00:32 ksi left
lichtkind thank you 00:33
00:34 lichtkind left
donri any particular reason those methods are stringly typed instead of a single multi? 00:42
multi method to(Str)...
00:53 fsergot left 01:01 leprevost joined 01:09 khisanth_ joined 01:10 khisanth_ is now known as Khisanth
[Coke] donri: how would you say "I want Str" ? 01:13
You'd need a string first...
01:15 jaldhar joined 01:16 Radv_AWAY left
colomon [Coke]: well, you could just say to(Str), like he says. 01:16
but
1. it's ugly, IMO
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 jaldhar left
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
01:17 jaldhar joined
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:19
colomon seriously, I can't think of any advantage to saying .to(Int) instead of .Int 01:20
sorear niecza has several classes with "has Bool $.list" 01:27
this has bitten me once or twice 01:28
benabik .list vs .List ? 01:31
01:33 abercrombie joined
sorear benabik: no, shadowing Any.list 01:34
01:50 overrosy left 01:54 overrosy joined 02:22 overrosy left 02:26 wolfman2000 joined 02:34 overrosy joined 02:49 Trashlord left 02:50 Trashlord joined 02:51 overrosy left 03:03 Guest90895 left
ruoso perl6: my $a = [1,2,3]; say $a == 3; 03:12
p6eval rakudo 5f7f4d, niecza v13-3-gd8f1334: OUTPUT«Bool::True␤»
..pugs b927740: OUTPUT«1␤»
03:16 alc joined 03:20 overrosy joined 03:35 nek joined 03:38 alc left 03:41 Patterner left 03:42 Psyche^ joined, Psyche^ is now known as Patterner 03:45 alvis left 03:46 alvis joined
[Coke] niecza: say (1..Inf).elems 04:21
p6eval niecza v13-3-gd8f1334: OUTPUT«(timeout)»
[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
dalek ast: c55e401 | Coke++ | S05-capture/caps.t:
niecza fudges
04:34
04:36 tokuhirom joined
dalek ast: d69e5a8 | Coke++ | S05-grammar/parse_and_parsefile.t:
niecza fudging
04:38
04:38 Trashlord left
dalek ecza: 04c162f | Coke++ | t/spectest.data:
run more tests
04:48
04:52 Trashlord joined 04:56 brxue joined
[Coke] masak: what implementation supports "perl6 -c" ? 04:58
phenny: ask masak what implementation supports "perl6 -c", so I can have a prayer of passing the tests? ;)
phenny [Coke]: I'll pass that on when masak is around.
[Coke] (I'm using rakudo at the moment because it supports MAIN) 05:00
(but not -c)
moritz moritz-- # not reviewing the test harness properly 05:07
b supports -c
but I'm pretty sure we won't disallow nom for that reason
05:07 tokuhirom left 05:08 tokuhirom joined
moritz neither niecza 05:10
sorear niecza has a -c option. What is -c *supposed* to do? 05:11
05:12 tokuhirom left
[Coke] verify that the code is compilable. 05:22
(running as little of it as necessary)
05:25 Chillance left 05:28 stepnem left 05:30 packetknife joined
sorear hrm, niecza sort of does have that 05:30
except niecza's -c has the side effect of saving a .exe file for your program 05:31
[Coke] every time I try to write "real" perl6 code, I am bitten by flattening. 05:35
at least I am at the point now where I know to go to perl6advent.wordpress.com/2011/12/1...nces-gone/
moritz++ 05:36
Timbus i like that article, but it doesn't show any binding 05:40
which is a pity
05:59 kaleem joined
[Coke] masak++, moritz++; 06:07
06:13 cognominal left 06:14 cognominal joined 06:31 zostay joined, zostay left 06:32 zostay joined 06:33 zostay left, mkramer joined, zostay joined 06:42 mkramer left
[Coke] is there a way to override gist in Rakudo so that say uses it? 06:50
(for a class) - method gist() {return "foo"} doesn't work unless you say $foo.gist
sorear strange! 07:03
07:18 molaf joined 07:22 koban joined 07:23 agentzh joined 07:30 mishin joined 07:33 mkramer joined
moritz nom: class A { method gist() { 'bar!' } }; say A.new 07:34
p6eval nom 5f7f4d: OUTPUT«bar!␤»
moritz seems to work
07:35 sayu joined
[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 donri left
[Coke] nom: class A { method gist {return 'an A'}} ; my $a = A.new; say $a 07:41
p6eval nom 5f7f4d: OUTPUT«an A␤»
[Coke] interesting.
I'll see if I can golf down my situation.
moritz note that if you write 'method gist', you also kill say()ing the type object 07:42
07:42 rsimoes1 joined
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!' }
sorear rsimoes1: ping
rsimoes1 pong
moritz sorear: yes, but nom doesn't implement that yet
sorear rsimoes1: you sent me a bunch of pms full of garbage characters earlier. what's up? 07:43
rsimoes1 garbage characters?
sorear dozens of trailing spaces and tabs, etc
moritz I've seen that from certain IRC clients 07:44
rsimoes1 irssi?
sorear _I'm_ using irssi
moritz irssi doesn't do that
rsimoes1 right
ummm
I think I was hypomanic this morning 07:45
and telling everybody stupid jokes
I don't really remember what I wanted
PS, uri hates jokes
sorear what's that?
rsimoes1 don't tell uri jokes
sorear isn't much of a fan of stupid jokes either
rsimoes1 =[ 07:46
he must have that turkish telepathy
shut me down early
oh but hey
I saw unicode set operators somewheres in perl 6 docs
how are sets stored underneath the hood? 07:47
sorear *checks logs*
uri must be going soft
knowing Rakudo, probably as unsorted lists :| 07:48
moritz rsimoes1: usually in UTF-8
rsimoes1 I told him it was a perl joke, but then he burned me hard and said that's obviously me
sorear check for files with names like Set.pm in src/core/
rsimoes1 oh ok, cool
07:49 koban left
sorear wait, do you mean unicode set operators like ∪ ? 07:49
or like <:AHex + :Punct> ?
rsimoes1 the unicode range 07:50
[Coke] any suggestions on how to debug this stacktrace?
gist.github.com/1527017
sorear rsimoes1: niecza uses a piecewise category filter representation that's quite compact 07:51
moritz [Coke]: is that b?
sorear Rakudo doesn't represent them at all
in Rakudo <:AHex + :Punct> is translated to [ <:AHex> || <:Punct> ] 07:52
[Coke] moritz: no, nom.
sorear ...I'm losing my focus
sorear -> sleep
rsimoes1 Oh, I meant what the list structure is for sets in perl 6
does the spec require something?
[Coke] nom: say NaN==3 && 2==2;
p6eval nom 5f7f4d: OUTPUT«Bool::False␤»
moritz [Coke]: in 'Nines::hasNine' at line 82:t1-code gives you the most infromation, I guess 07:53
and there's a prefix ? somewhere 07:54
I can't say more without seeing the code
[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:55
moritz not yet :( 07:56
[Coke] :facepalm: Pretty sure I know where it came from. 08:00
[Coke] wonders why some math operations generate Failures and others, just NaN. 08:01
08:13 mkramer left
moritz [Coke]: you might prefer to use fatal; to get quick-and-hard failures 08:14
[Coke] where is :D in spec? 08:21
[5~[6~[5~[6~
moritz S12:1598 08:23
[Coke] not a lot of spec there. Should I be able to use MyClass:D in a multi method? 08:30
(or a method) ?
moritz sure; in every place where you can use a type name 08:31
and if you say class A { multi method gist(A:D:) { ... } } then the final : marks it as the type constraint of the invocant
which means you can only call that method on defined objects of type A 08:32
[Coke] odd. I get a syntax error trying to add ":D" to a method. 08:34
er, to the first parameter of a method.
(end up with "invalid typename in parameter declaration..." 08:35
moritz did you repeat the type name before the :D ?
nom: class A { multi method gist(A:D:) { 'foo!' } }: say A; say A.new;
p6eval nom 5f7f4d: OUTPUT«===SORRY!===␤Confused at line 1, near "class A { "␤»
[Coke] nom: class A {}; class B { method stuff(A: $foo) {} };
p6eval nom 5f7f4d: ( no output )
[Coke] again, will try to golf it. 08:36
moritz std: class A { multi method gist(A:D:) { 'foo!' } }: say A; say A.new;
p6eval std dc62e1d: OUTPUT«===SORRY!===␤Illegal use of colon as invocant marker at /tmp/1sT7DVg7NZ line 1:␤------> { multi method gist(A:D:) { 'foo!' } }:⏏ say A; say A.new;␤Check failed␤FAILED 00:01 126m␤»
moritz nom: class A { multi method gist(A:D:) { 'foo!' } }; say A; say A.new;
p6eval nom 5f7f4d: OUTPUT«A()␤foo!␤»
[Coke] moritz: aha. my installed rakudo is not as up to date as the one here. 08:49
It may even be of b vintage. 08:50
*sigh*
I wish I had double checked your suggestion before getting 169 lines in. ;) 08:52
08:56 baest joined
[Coke] moritz++ 08:57
moritz [Coke]: ah, if it's b, then it doesn't even use gist in say() 08:59
09:00 drbean left
[Coke] yah, it explains so many problems :) 09:01
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
[Coke] I got pretty far, though. ;) 09:03
09:06 drbean joined
[Coke] \o/ 09:08
09:19 baest left 09:24 drbean left
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? ;)
masak oh dear, nom doesn't have -c ? :(
09:26 baest joined
masak really hates regressions caused by switching out the internals and frontend 09:26
is there any chance we could add back -c into nom in the very near future? 09:27
moritz: this definitely goes into our conjectural NOTES file. 09:28
09:29 drbean joined
masak goes ahead and creates it 09:32
dalek ast: 4dde3c7 | (Helmut Wollmersdorfer)++ | S05-mass/named-chars.t:
added char-names special cases
09:33
09:39 araujo joined, araujo left, araujo joined, mkramer joined
[Coke] \o/ Segmentation fault. 09:39
I feel like masak 4 years ago. ;)
09:39 molaf left
[Coke] saves this particular incarnation of the first task for later segfault undoing. 09:40
masak [Coke]++
make sure to golf things for our enjoyment and RT-submitting, too :)
09:43 fsergot joined, cognominal_ joined 09:44 cognominal left
fsergot hi o/ 09:44
moritz nom: multi infix:<xx>(str $x, int $i) { nqp::x($x, $i) }; say 'foo' x 3 09:46
p6eval nom 5f7f4d: OUTPUT«foofoofoo␤»
moritz nom: multi infix:<xx>(str $x, int $i) { nqp::x($x, $i) }; say (my $ = 'foo') x 3
p6eval nom 5f7f4d: OUTPUT«foofoofoo␤»
moritz something like that segfaults when done in the setting 09:47
masak fsergot: \o hi 09:48
09:49 sayu_ joined 09:51 sayu left 09:53 cognominal___ joined 09:56 cognominal_ left
[Coke] has a solution to task 1 that he could turn in now. yay. 09:56
09:56 drbean left 10:00 mkramer left
dalek ast: 5ecb85e | (Helmut Wollmersdorfer)++ | S05-mass/named-chars.t:
added TODOs for corner cases
10:01
10:01 mkramer joined 10:04 drbean joined 10:12 nek left 10:18 mkramer left 10:19 mkramer joined
masak std: my (@a, @b); push @a, $@b 10:22
p6eval std dc62e1d: OUTPUT«===SORRY!===␤Invalid hard reference syntax at /tmp/eEzxSA3mdU line 1:␤------> my (@a, @b); push @a, $⏏@b␤ expecting any of:␤ desigilname␤ twigil␤Parse failed␤FAILED 00:01 125m␤»
masak I'm with moritz++ on this one. allow it, and have it mean $(@b)
moritz: that post has an excess semicolon in 'sub set_five; {' 10:26
10:26 mkramer left
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
10:27 mkramer joined, mkramer left
dalek ast: cd67f6e | (Helmut Wollmersdorfer)++ | S05-mass/properties-derived.t:
added TODO properties broken in Perl 5.10
10:29
[Coke] nom: 9%99 10:37
p6eval nom 5f7f4d: ( no output )
[Coke] nom: say 9%100.234
p6eval nom 5f7f4d: OUTPUT«9␤»
[Coke] masak: rules clarification: are we allowed to use only the number 9, or any number whose digits are all 9? 10:39
(I'm assuming the former.)
masak the former.
10:40 tokuhirom joined
masak actually, hm, let me re-read the problem specification myself :) 10:41
I'd say the problem specification allows the latter. good catch :) 10:42
eiro hello guys 10:47
10:48 mkramer joined
masak eiro! \o/ 10:50
eiro wasa masak ?
masak eiro: enjoying the fallout so far of p6cc :) 10:52
eiro: how're you?
[Coke] masak: my copy of t1 now deals with that. yay.
masak \o/ 10:53
moritz [Coke], masak: I disagree 10:54
10:54 mkramer left
moritz I intentionally wrote "number 9" and not "digit 9" 10:54
10:55 mj41 joined
moritz using 99 doesn't contain the number 9 at all, only the digit 10:55
masak fair enuf.
10:56 mkramer joined
[Coke] ... thankfully it's a simple change to undo that. :P 10:57
10:57 mishin left
[Coke] I'll let you stew on it for a day. ;) 10:57
masak heh :)
eiro masak, back from costa teguise (canarians island): x-mass wearing t-shirt was good 11:02
1 week break is good too.
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/
about perl6: someone working on asn1 compiler ? 11:04
(would be nice to have full perl6 implementations of ldap and z3950
fsergot nom: my $s = "test\n"; say 1 if $s ~~ /test/; 11:22
p6eval nom 5f7f4d: OUTPUT«1␤»
11:23 leprevost left
fsergot what to do if slurp gives "malformed utf8 string"? :) 11:30
tadzik look twice at your file :)
is it a binary file maybe? 11:31
fsergot No, but there can be some error in.
But i dont know where. 11:32
::)
huf iconv and check where it breaks;)
fsergot great! thanks :) 11:34
huf++
tadzik++
it works! :) 11:36
masak fsergot++
maybe we should give a more informative error message when file input chokes on some non-UTF-8. 11:37
fsergot will be great :)
maybe line number? :) 11:39
masak the only reason there isn't already a line number is that it's an error emitted by Parrot. 11:41
we should catch it and re-package it.
masak submits rakudobug
12:01 mj41 left, mkramer left 12:03 mkramer joined 12:07 cosimo joined 12:12 shaowei joined
shaowei echo 12:14
12:14 shaowei left 12:16 pochi joined 12:19 ruoso joined 12:22 leprevost joined
masak getting some coverage here: www.i-programmer.info/news/98-langu...ntest.html 12:29
12:37 alvis left
colomon nom: say (1, 1).list.elems 12:37
p6eval nom 5f7f4d: OUTPUT«2␤»
colomon nom say (1, 1).list.elems == 2 12:38
nom: say (1, 1).list.elems == 2
p6eval nom 5f7f4d: OUTPUT«Bool::True␤»
12:39 drbean left
masak nom: say ((1, 1).list.elems == 2) === Bool::True 12:40
p6eval nom 5f7f4d: OUTPUT«Bool::True␤»
masak grins
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…
colomon that's my problem
known bug?
nom: say "9" ~~ 9 12:43
p6eval nom 5f7f4d: OUTPUT«Bool::True␤»
colomon niecza: say "9" ~~ 9
p6eval niecza v13-4-g04c162f: OUTPUT«Bool::True␤»
colomon nom: say "blue" ~~ 9
p6eval nom 5f7f4d: OUTPUT«Bool::False␤»
colomon very specialized bug
nom: say +'+' 12:45
p6eval nom 5f7f4d: OUTPUT«Failure.new(exception => Exception.new())␤»
colomon nom: say +'blue'
p6eval nom 5f7f4d: OUTPUT«0␤»
colomon my son is sitting upstairs in his bed alternating between singing softly to himself and pretending to be a loud train whistle. 12:46
masak :D 12:48
not a known bug, to my knowledge.
nom: say '-' ~~ 9
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…
masak nom: say '*' ~~ 9
p6eval nom 5f7f4d: OUTPUT«Bool::False␤»
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.
masak submits rakudobug
12:51 drbean joined
colomon masak++ 12:51
masak nice find. colomon++ 12:52
colomon: are you by any chance working on the four-nines task? :)
12:54 loz_ joined, alvis joined
colomon what could make you think that? 12:54
12:56 danishman joined, mkramer left 12:57 MayDaniel joined, mkramer joined, mkramer left 12:58 bluescreen10 joined
masak the 9. :) 12:59
sorear: it could be argued, from a Perl 5/S19 perspective, that the '-c' flag shouldn't produce an exe file in Niecza. 13:05
13:06 cedric joined
cedric hello #perl6 13:07
tadzik hello cedric
cedric o/ tadzik 13:08
rakudo: 'abc' ~~ /.{ $¢ }/
p6eval rakudo 5f7f4d: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 1, near "$\x{a2} }/"␤»
masak hello cedric
cedric o/ masak 13:09
13:09 kaleem left
masak b: 'abc' ~~ /.{ $¢ }/ 13:09
p6eval b 1b7dd1: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "$\x{a2} }/"␤»
cedric there's a conflict between the current match state $¢ and the ¢ sigil
i guess
masak ¢ isn't a sigil...
it's just a funky character. 13:10
13:10 MayDaniel left
masak .u ¢ 13:10
phenny U+00A2 CENT SIGN (¢)
cedric masak: S08-capture.pod: my ¢a = (1, (2, (3, 4)));
masak o.O
masak reads S08
tadzik nom: my $€ = 5; say $€
p6eval nom 5f7f4d: OUTPUT«===SORRY!===␤Confused at line 1, near "my $\u20ac = 5;"␤»
tadzik looks like Euro is too confusing for Rakudo 13:11
niecza: my $€ = 5; say $€
p6eval niecza v13-4-g04c162f: OUTPUT«===SORRY!===␤␤Confused at /tmp/2FafRo9CLi line 1:␤------> my $⏏€ = 5; say $€␤␤Parse failed␤␤»
masak cedric: I call fossil. never even seen that bit of spec before.
13:12 baest left
masak it's dated ruoso 2009-09-21. 13:12
color me highly doubtful. there are four sigils for *very* central data types in the language: $ @ % & 13:13
capture is important, but not that important.
tadzik Ditto
(I like this word since I know what it means) 13:14
masak you're just not spelling it correctly :P
tadzik aw
ain't I?
masak en.wiktionary.org/wiki/dito
tadzik: to be fair, that's the US spelling of UK/Latin "dito" 13:15
tadzik oh, I see now
masak so it's not wrong, "per say" :P
tadzik then: Dito
masak \o/
cedric I would like to push that commit github.com/cedric-vincent/roast/co...6ec5d3f4a2 on roast 13:16
std: my ¢a = (1, (2, (3, 4))); 13:19
p6eval std dc62e1d: OUTPUT«===SORRY!===␤Malformed my at /tmp/FLW1Bxny0W line 1:␤------> my ⏏¢a = (1, (2, (3, 4)));␤ expecting scoped declarator␤Parse failed␤FAILED 00:01 118m␤»
13:20 daxim joined
masak the fact that STD doesn't recognize the sigil is a sign of how slushy that bit of spec is. 13:21
the roast commit looks fine to me. 13:22
(though I've never liked the variable $¢)
cedric masak: it seems I don't have write access to roast, do you prefer a pull request? 13:26
masak that would do it. 13:28
dalek ast: dbd529b | (Cedric VINCENT)++ | S05-capture/match-object.t:
add tests for checking $¢, the current match state.
13:39
ast: c1dacca | (Carl Mäsak)++ | S05-capture/match-object.t:
Merge pull request #11 from cedric-vincent/master

add tests for checking $¢, the current match state.
masak cedric++ 13:40
tadzik niecza 3 todo '$¢ is still named $/'
...$/ should be named $¢?
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}/
p6eval niecza v13-4-g04c162f: OUTPUT«Cursor()␤»
masak $¢ is mutable, $/ is immutable.
or something.
13:44 lutok joined
cedric moreover, as of my understanding, $/ is a Match object, not a Cursor object 13:45
hence my comment "$¢ is still named $/"
tadzik mhm
cedric these tests actually pass if you replace $¢ with $/ 13:46
... with Niecza
masak nod 13:50
...aaaaand we have just accepted our 18th contestant to p6cc!
tadzik woot
masak this is three days after the announcement. same level as we achieved in two weeks last year :P 13:51
this will be awesome.
13:51 Mowah joined
cedric masak++: is the list of contestants public? 13:51
masak nope.
contestant can consider themselves to be published after the first solution they send in. :) 13:52
contestants*
tadzik masak: there were 18th contestants last year?
masak yes, as far as I recall.
yes, 18: strangelyconsistent.org/blog/the-pe...now-closed 13:53
(that's LAST year's contest that's closed. this year's is still open. still time to sign up!)
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:57
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…
masak cedric: I'm afraid he might've mean "match bytes" in a sense that doesn't involve regexes... 14:00
rakudo: say "café".encode.perl
p6eval rakudo 5f7f4d: OUTPUT«Buf.new()␤»
masak rakudo: say "café".encode.contents.perl
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␤»
masak meh. :)
rakudo: say "café".encode.list.perl 14:01
p6eval rakudo 5f7f4d: OUTPUT«Array.new(99, 97, 102, 195, 169)␤»
cedric Is there a way to get "." matching a single byte? (I heard that the ":bytes" modifier might be deprecated)
masak rakudo: say "café".encode 14:02
p6eval rakudo 5f7f4d: OUTPUT«Buf:0x<63 61 66 c3 a9>␤»
cedric I definitevely want to use Perl6 Grammar to parse binary files :) 14:04
masak me too! 14:05
wow, that'd be *awesome*.
or at least slightly grand.
well, you could always convert everything to hex numbers, and parse that :P 14:06
14:07 kaleem joined
cedric yeah I'm doing so: irclog.perlgeek.de/perl6/2011-12-20#i_4857347 :) 14:07
it works like a charm!
masak heh! and here I thought I was being original... :) 14:08
yeah, I'm planning to do the same with a binary format I want to understand.
cedric masak: please, keep me informed if you find a way to parse binary files directly. 14:10
14:12 abercrombie left
masak cedric: will do. 14:12
moritz if you want to match bytes, you can use an evil trick: 14:18
rakudo: say "café".encode.decode('Latin-1') 14:19
p6eval rakudo 5f7f4d: OUTPUT«café␤»
moritz since you can take every byte as a Latin-1 character, that's a way to match regexes on it etc.
cedric this isn't straightforward: binary format -> Str (from slurp) -> encode -> decode 14:23
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
masak I was thinking I'd build a small API around grammars that did the conversion to binary.
but we'll see.
cedric \o/ 14:25
masak would be neat to just supply a flag to MyGrammar.parse -- something like :binary
but, hm, that's the wrong peg.
moritz I'm not convinced by the current vague approaches to unify multiple Unicode levels within a single type
masak should be more like 'grammar MyGrammar does Binary {}' 14:26
moritz MyGrammar.parsefile($filename, :binary) # thinkable
masak do we generally use :bin, not :binary?
14:27 gfldex joined
moritz wouldn't know 14:28
cedric S32 and S16 use :bin 14:29
14:37 mj41 joined
masak cedric: you're about a week new to the channel. a belated welcome to you, sir! :) 14:39
14:40 agentzh left
cedric Thanks! :D 14:42
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++
cedric Thanks, I'll be careful :) 14:48
masak cedric: out of curiosity, how did you find #perl6?
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:50
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? :)
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)
huf nice thing about dvcs, everybody's constantly making distributed backups 14:53
moritz though I'd still love an option in github that disables forced pushes 14:54
14:55 ausias joined 14:56 ausias left
cedric masak: the public IRC logs (irclog.perlgeek.de/perl6) are really valuable to help Perl6 newbies to talk with Perl6 masters (from my POV) :) 14:57
we can see how nice you are :)
masak we are, aren't we? :P 14:58
cedric for sure!
masak purrs
cedric :) 14:59
15:01 am0c joined 15:02 tokuhirom left 15:10 cedric left 15:28 raiph joined
sorear good * #perl6 15:28
masak sorear! \o/ 15:32
colomon \o/ 15:40
15:43 kaleem left
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␤»
..rakudo 5f7f4d, niecza v13-4-g04c162f: OUTPUT«clogs␤»
dalek kudo/nom: a9bead6 | moritz++ | src/ (2 files):
reimplement -c command line option
15:46
moritz masak: there you go 15:48
masak moritz++
I updated strangelyconsistent.org/p6cc2011/NOTES to reflect this. 15:52
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:54
moritz to me it felt a bit like a cheat 15:55
because there is already some mechanism for specifying the target stage
15:56 danishman left
moritz but it's too tightly coupled to the output from the existing stages to be easily usable 15:56
so I feel like hijacking an existing mechanism
15:56 mj41 left
masak I guess. 15:57
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:58
TimToady in a sense, -c adds the final CHECK, that just exits with status 15:59
masak right.
TimToady it can even be implemented that way, since CHECKS do lifo order 16:00
masak "everything turns out to be yet another setting" :)
TimToady if you assume all compile errors do their own exit $code, then it's just CHECK exit 0 16:01
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
TimToady otoh, it would be possible to sneak CHECK pushes in before the -c, so maybe a setting is the cleaner way
masak sorear: --compile-to-exe ? :) 16:03
TimToady what if the backend doesn't use .exe? :P
TimToady supposes that if you follow *cc style, it's just -o 16:05
tadzik or --target=exe 16:06
masak what tadzik said. 16:08
tadzik that'd be Rakudo-style 16:09
or maybe Parrot-style
it's definitely something with style
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:13
it's huffmanly inefficient to encode valency with nouns 16:14
that's why we don't have switch/case, after all 16:15
dalek ast: 8d3c723 | sorear++ | S05-capture/match-object.t:
[S05-capture/match-object] Niecza unfudges
16:16
masak decommutes 16:18
16:19 cognominal___ left 16:25 cognominal joined
dalek ecza: 52411f8 | sorear++ | lib/CORE.setting:
Ensure Match.{kv,keys,values} flattens
16:27
16:29 raiph left 16:43 JimmyZ joined, lrnperl6 joined 16:50 lrnperl6_ joined 16:51 lrnperl6 left, thou joined 17:01 lucas_ joined
sorear #phasers in 29? 17:01
17:06 am0c left
sorear no #phasers today? 17:19
17:21 kaare_ joined
TimToady well, we'll see... 17:22
17:29 sayu_ left 17:34 Chillance joined 17:41 JimmyZ left 17:44 jaldhar left 17:46 lucas_ left
[Coke] sorear; is MAIN support on your short list? 17:52
sorear Not yet 17:54
[Coke] hokay. 17:56
17:56 fglock joined 17:57 bluescreen100 joined, bluescreen__ joined, bluescreen100 left, bluescreen__ left, bluescreen10 left 17:58 bluescreen10 joined
[Coke] ponders polishing task 1 until it's shiny, or jumping into task 2 immediately. 18:03
18:08 drbean left 18:13 drbean joined 18:15 lrnperl6_ left 18:19 kaleem joined
fglock o/ 18:19
sorear o/ fglock
18:35 fglock left
ashleydev fglock: is perlito 6 going to make it to the perl6 features matrix? 18:35
or may I suggest it? 18:36
18:39 kaleem left 18:43 drbean left
masak that's an excellent suggestion. 18:45
sorear: is there some technical blocker to MAIN in Niecza, or do you just have other priorities right now? 18:46
[Coke] masak,sorear: I asked, btw, because it would be helpful for the contest. ;) 18:47
masak yes, and cool in general. multi MAIN is very nice-to-have. 18:48
I suppose sorear has held off so far because there are still open spec questions in that area.
18:49 drbean joined
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:51
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␤»
..rakudo a9bead: OUTPUT«("X" => 2, "Y" => 4, "Z" => 7).hash␤»
..pugs b927740: OUTPUT«*** No compatible multi variant found: "&foo"␤ at /tmp/AE2xCEnkl5 line 1, column 80-100␤»
masak \o/ 18:56
Util someday, this should work, with the benefit of restricted keys! : foo( |(my %hash<X Y Z>) ); 19:02
masak nice! 19:11
want S09 now :)
19:12 daxim left 19:33 fglock joined
fglock ashleydev: what is the perl6 features matrix? 19:33
[Coke] finds himself writing perl6 like java. hurm. 19:34
ashleydev fglock: perl6.org/compilers/features
tadzik [Coke]: I frequently try to write C++ Like Perl 6. I always fail :) 19:35
fglock hmm - that's hard to classify, "Basic file IO" -> perlito has slurp(), but that's all 19:38
it is not ... feature oriented
moritz so what's its orientation? 19:40
fglock small core, provide basic stuff that allows for extensibility 19:41
I can't say if it succeeds at that, but that's the idea
so you can write perl6 in perl6 19:43
[Coke] arstechnica.com/business/news/2011/...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, kensanata joined 19:50 PacoLinux left
ashleydev so maybe that'd be analogus to putting NQP on the chart? 19:54
tadzik oh, masak 19:55
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
hmm - probably not, because the final product for nqp is rakudo
while the final product for perlito is itself
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
[Coke] nom: my %foo; %foo<a><b><c> = 3;
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␤»
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
[Coke]: IMHO that's the major remaining nom regression (autovivification)
fglock it would be more like using rakudo to write itself
masak tadzik: yeah. put Ratel in it's own repo, is probably the best solution.
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?
if I do, I'd need to add a clause that my "beer for unreadable Perl" challenge does not apply to it :P
ashleydev fglock: so perlito is just going to grow right? or does it aim to stay minimal?
fglock yes, it is growing 19:59
masak tadzik: you have a "beer for unreadable Perl" challenge? :)
19:59 kensanata left
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
on last LUG two Pythoners and one Node.js guy tried, and the latter even declared Perl "not that bad after all"
and I didn't buy a single beer yet ;) 20:01
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."
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?
moritz you can add perlito to it... but please wait one or two weeks until we have a nom-based star release
ashleydev *being
moritz oldest? depends on how you count :-) 20:04
fglock ok - I don't have a commit bit, I think
perlito has changed names a few times, the original bootstrap is 2005-ish with "lrep"
masak awful name :P 20:05
fglock it descends from miniperl6+kindaperl6, but much simplified
masak "perlito" is cute, though.
fglock :) 20:06
masak it's the Latin Lover of Perl implementations.
it will seduce you in the night.
20:06 awoodland joined
fglock keeping perlito simple is the biggest challenge 20:06
perlito comes from the name of my cat, Pirulito
tadzik heh, it's similar to Panda then :P 20:07
fglock pirulito is lollipop in portuguese
moritz fglock: you now have commit access to perl6/feature, and about 20 other repos in the perl6 organization 20:09
fglock moritz++ 20:10
moritz (including roast, specs, modules.perl6.org and ecosystem) 20:12
fglock perlito6 provides the backend for v6.pm (perl6 in perl5) and perl6-in-browser; 20:13
perlito5 could be used to implement Perl5 support in Perl6 implementations
20:13 drbean left
ashleydev fglock: maybe v6.pm should be in the matrix? 20:14
20:14 PacoLinux joined
fglock v6.pm is just perlito inside 20:14
it used to be a separate implementation - very hard to maintain 20:15
otoh, maybe v6.pm is the actual "product", and perlito is just a library :) 20:16
ashleydev does perlito/v6.pm intend to use STD? 20:17
fglock in an ideal world, perlito + modules = perl6 20:19
while STD is "monolithic" 20:20
20:20 drbean joined
fglock I don't know if this is doable - so far it just seems to be a lot of extra work 20:22
20:27 leprevost left
fglock re oldest: I think parrot "perl6" is oldest (much before rakudo), and then pugs 20:34
moritz parrot "perl6" evolved into rakudo 20:47
20:47 cognominal left
moritz much like lrep evolved into perlito 20:47
fglock yes
20:48 cognominal joined
moritz -> sleep 20:49
fglock me too - I think we are at the same timezone
20:50 fglock left
masak nom: class A { has $x }; say A.new 21:03
p6eval nom a9bead: OUTPUT«A.new()␤»
masak nom: class A { has $x = 5; method foo { say $x } }; A.new.foo
p6eval nom a9bead: OUTPUT«5␤»
masak nom: class A { has $x = 5; method foo { my $x = 42; say $x } }; A.new.foo
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␤»
masak huh :) 21:04
masak submits rakudobug
I... I wasn't even trying! :)
b: class A { has $x = 5; method foo { my $x = 42; say $x } }; A.new.foo
p6eval b 1b7dd1: OUTPUT«Any()␤»
21:04 drbean left
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␤»
masak niecza++
niecza: class A { has $x = 5; method foo { my $x = 42; say $!x } }; A.new.foo
p6eval niecza v13-5-g52411f8: OUTPUT«Potential difficulties:␤ $x is declared but not used at /tmp/g5b1hwzx2V line 1:␤------> class A { has $x = 5; method foo { my ⏏$x = 42; say $!x } }; A.new.foo␤␤5␤»
masak also correct.
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:05
21:09 bluescreen100 joined
masak blog post! strangelyconsistent.org/blog/the-c-flag 21:09
21:10 bluescreen10 left, bluescreen100 left, drbean joined 21:13 MayDaniel joined 21:14 Mowah left
benabik masak: para 1: s/bast-test/base-test/ 21:18
masak thanks, fixing
benabik masak: Interesting post, as usual. :-) 21:19
masak \o/ 21:20
thou are grammars known broken in current nom? e.g. this works in rakudo-ng and not in rakudo-nom, for me: gist.github.com/1529700 21:27
benabik It seems to work if I set $/ to the return value of parse 21:29
Perhaps there's a bug with $/ ?
masak yes, seems that way. 21:31
all the .parse calls come out as True in nom.
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␤»
masak submits rakudobug
benabik++
b: grammar G { rule TOP { a } }; say so G.parse("a"); say so $/; say $/.perl
p6eval b 1b7dd1: OUTPUT«Bool::True␤Bool::True␤Match.new(␤ from => 0,␤ orig => "a",␤ to => 1,␤)␤»
21:33 molaf joined
thou thanks, masak! 21:36
masak .= sleep 21:37
21:41 donri joined 21:44 snearch joined 21:55 awoodland left 22:04 MayDaniel left 22:08 awoodland joined 22:11 snearch left, awoodland left 22:14 drbean left 22:20 drbean joined, molaf left 22:24 packetknife left
cognominal what is b? 22:31
tadzik old branch of Rakudo, before nom
22:32 packetknife joined
sorear bbkr1: internal format is whatever your C compiler uses for double, unless you compiled Parrot with a different NUMVAL define 22:39
bbkr1: there's (probably) no way to difrectly get at it, except maybe zavolaj stuff
22:41 mj41 joined 22:43 kaare_ left 22:48 abercrombie joined 22:51 drbean left 22:58 drbean joined
bbkr1 sorear: thanks, I've found conversion algorithms on the internet so I'll try to implement it without pack/unpack stuff. 23:02
fsergot good night o/ 23:08
23:08 fsergot left 23:14 fridim_ left 23:20 mj41 left 23:25 packetknife left 23:26 wolfman2000 left 23:32 loz_ left 23:51 whiteknight joined, whiteknight is now known as Guest91030