»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by Juerd on 28 August 2009.
00:00 araujo joined
wayland76 donri: Yes. There's also a way of pairing an action class with a grammar, and that may be a more useful way of doing things 00:01
donri i have yet to find information on what actions are supposed to be
also wondering, can grammars give you a parse tree automatically, e.g. based on which rules matched? 00:02
wayland76 Well, in this context, you have a grammar and a class, and when certain things are triggered in the grammar, it calls methods on the class 00:03
Yes
araujo hello
wayland76 Well, kind of. They give you a match object, which points at other match objects
You can call that a parse tree if you want
araujo: o/
donri depends what information match objects carry 00:04
00:04 Caliginous_ left
donri actions: ah. but i was thinking it could be useful to add methods directly that are not specifically actions for a running parse. perhaps you want to add a parse_from_foo method that gets a string from foo and calls the internal parse, etc. 00:05
00:07 japhb joined
wayland76 I'm pretty sure you can add methods to a grammar too 00:07
00:07 brunov left
wayland76 If not, you can make your own custom dialect of Perl 6 where that's possible :) 00:07
araujo hi wayland76 00:09
:)
donri STD.pm does it, although it's not using block syntax for the grammar, if now that matters (shouldn't, right?) 00:10
wayland76 That shouldn't matter 00:11
donri are grammars fundamentally PEGs, or is there a fundamental difference? 00:12
sorry for all the questions, i try to google but i find mostly basic usage syntax examples and the like 00:13
00:13 M_o_C left
wayland76 Keep in mind that I'm no expert (with the questions you're asking, TimToady is the expert) 00:14
Also, everything I know about PEGs comes from a skim over the Wikipedia article just then 00:16
Basically, their description sounds about right, but I don't understand enough of the nuances to be able to answer your question :)
donri aye :)
00:24 sm` joined 00:25 brunov joined 00:34 sharada left 00:44 charsbar left, charsbar_ joined 00:52 jaldhar left 01:07 shinobi-cl joined 01:20 staykov joined 01:21 shinobi-cl left, nihiliad joined 01:36 Chillance left
donri what is the motivation behind requiring <> around character classes? 01:41
01:41 bgs100 joined 01:50 sri_kraih_ joined
diakopter lambdabot had 3m-old msgs for me 01:51
TimToady donri: two reasons, mainly 01:52
first, we wanted to steal bare [...] for grouping without capturing, which I felt was more important
we have that in Perl 5, but it's really ugly: (?:...)
that's just [...] in p6 01:53
donri aha, [] is (?:)
TimToady second
character classes are getting to be "wronger" these days
it was already wrong in the age of Latin-1 to say [a-z]
donri i use (?:) *alot* in any regex machine. and character classes less so.
TimToady now that we have unicode
you should almost always be using a named character class like <alpha> 01:54
01:54 devin joined
TimToady so it was basically a matter of huffman coding the more common feature to use [...], and discouraging character classes by demoting them to <[...]> 01:54
on the other hand
it's also a feature 01:55
because it gives us a composition notation
<+[a..z]-[aeiou]> and such
01:55 sevvie joined
TimToady so you can build up character classes with set operations inside the <> 01:55
which wouldn't work outside as well, since + means something else there 01:56
donri i don't know compositions yet
TimToady basically, lets you rough in the set of characters, and then define exceptions or extensions to the character class
so things like <+alpha-vowels> become possible 01:57
anyway, that's why it's <[ a .. z ]> now
01:57 rdice left
TimToady note that ranges are now .. instead of - 01:57
since there's no reason to ever use .. it's obviously "meta" 01:58
and it's consistent with ranges elsewhere in Perl 6
also whitespace is allowed for clarity
so that's probably a longer answer than you wanted :) 01:59
but most of the design features of p6 have complicated answers like that, with multiple reasons contributing
because we almost never changed anything for a single reason
donri why is there no reason to use ..? 02:00
TimToady because a character class only needs each character listed once 02:03
if you were wanting to match . then there's no reason to add another .
so it's naturally out-of-band, as it were
unlike -, which you might actually want to match
anyway, S05 discusses a lot of this, if you're interested 02:04
decommuting &
donri oh, i thought you meant the actual range syntax 02:05
like, [az] would be the same as [a..z], which would surprise me 02:06
02:06 sri_kraih left, sri_kraih_ is now known as sri_kraih
donri TimToady: is a grammar more like a class or a role, or can i use it like either, or, uh. 02:10
02:21 rhr_ joined 02:28 justatheory left
wayland76 He's decommuted. That & means he's away from his keyboard 02:30
02:30 bgs100 left
wayland76 roles can always be used as classes. 02:30
02:31 carlin joined 02:34 brunov left 02:35 rhr left 02:43 staykov left 02:49 jaldhar joined
carlin rakudo: class Alpha { has @!a = < beta gamma >; method postcircumfix:<[ ]>($key) { return @!a[$key]; }; }; my $a = Alpha.new; say $a[1]; 02:49
p6eval rakudo 446d49: OUTPUT«No such attribute '@!a'␤in method Alpha::postcircumfix:[ ] (/tmp/7AR5tMc3Jx:2)␤called from method Alpha::postcircumfix:[ ] (/tmp/7AR5tMc3Jx:2)␤called from Main (/tmp/7AR5tMc3Jx:2)␤»
carlin rakudo: class Alpha { has @!a = < beta gamma >; method postcircumfix:<{ }>($key) { return @!a[$key]; }; }; my $a = Alpha.new; say $a{1}; 02:51
p6eval rakudo 446d49: OUTPUT«gamma␤»
02:54 synth left
carlin should that first one have worked? If not, does that error make sense? 02:56
03:07 justatheory joined 03:08 justatheory left 03:09 Whiteknight left 03:12 synth joined 03:14 brunov joined 03:15 allbery_b is now known as eviltwin_b, eviltwin_b is now known as allbery_b 03:38 mepplock joined 03:52 synth left, synth joined 03:53 Tene left, JimmyZ joined, meppl left
JimmyZ rakudo: Str.^method(); 03:54
p6eval rakudo 446d49: OUTPUT«Method 'method' not found for invocant of class 'ClassHOW'␤»
JimmyZ rakudo: Str.^methods();
p6eval rakudo 446d49: ( no output )
JimmyZ rakudo: Str.^methods().join(', ').say; 03:57
p6eval rakudo 446d49: OUTPUT«pred, encode, succ, ACCEPTS, perl, WHICH, sprintf, Scalar, 1, map, cis, comb, 1, min, max, bytes, chop, sin, 1, 1, values, 1, end, ceiling, p5chomp, keys, kv, unpolar, floor, ord, capitalize, pick, round, 1, 1, split, 1, words, p5chop, lc, join, srand, reduce, trim, reverse, 03:58
..isa, 1…
03:58 JimmyZ left 04:18 payload left 04:32 mrsaturn joined
mrsaturn Don't worry! I'm here. Hi everyone. 04:33
04:39 drbean_ joined 04:41 synth left 04:45 jaldhar left 04:46 cotto joined
wayland76 What if I want to worry? :) 04:50
04:51 jaldhar joined 04:52 drbean left
mrsaturn Well then it is permitted 04:56
04:57 mrsaturn left 04:59 synth joined
donri how is "temp $x" different from "my $x = $x"? 04:59
TimToady well, for one, the 2nd won't work, since $x is already redefined by the time it hits the = 05:10
wayland76 donri: Answer is in S02. Search for "temp " 05:11
(that's "temp" with a space after it)
TimToady and temp will change $x in whatever scope it already exists, while my $x makes a new $x in the current scope
wayland76 TimToady++ :)
TimToady (you'd have to say "my $x = OUTER::<$x>" or some such
but nobody implements temp yet, actually 05:12
donri ah. thanks for all your answers btw, people.
TimToady we've tended to move more to contextual variables from temp, because they're safer for threading
05:13 mrsaturn joined
TimToady though if you use temp on a context var, it actually declares a new var in the current scope, because that's how contextuals work 05:13
so "temp %*ENV;" for instance makes a local copy of the global environment, and anything in the current dynamic scope will see that %*ENV instead 05:14
05:14 mrsaturn left
TimToady whereas "my %*ENV;" would make a new environment with nothing in it, rather than copying in the outer environment 05:15
so "temp %*ENV" is more or less what every Unix process does
05:21 zloyrusskiy joined 05:23 mrsaturn joined 05:33 payload joined
donri oh fun; larry has the same birth day as me. :D 05:41
mrsaturn I have the same birthday as julius caesar 05:44
wait, no i don't
colomon Errrr.... anyone out there having trouble with t/spec/S32-io/IO-Socket-INET ? I did a make spectest to make sure my recent changes didn't break anything, and it's broken -- but I can't see what it has to do with trig functions....
s1n pmichaud: mini 10v with 16g ssd shipped this afternoon 05:45
pmichaud: hopefully it'll be here for this month's hackathon 05:46
mrsaturn I have the same birthday as Gaius Julius Caesar Augustus Germanicus
donri Although I have taken the form of Gaius Caligula, I am all men as I am no man and therefore I am a god! *throwing around random only-obscurely relevant quotes* 05:54
how close are PGE to perl 6 rules, and does rakudo use them so that regexes in rakudo are compiled not merely interpreted? 05:57
pugs_svn r28221 | jimmy++ | [t/spec/S04-statements/gather.t]fix typo 06:01
wayland76 methinks Gaius Caligula needed to read Manalive by G. K. Chesterton :) 06:03
donri: I think Perl6 uses the PGE stuff, but not sure -- ask pmichaud for a definitive answer 06:04
06:22 jhuni joined 06:30 mepplock left 06:37 payload left 06:40 redicaps joined, orafu left 06:41 orafu joined 07:03 nihiliad left 07:08 masak joined
masak @@summon messages 07:09
phenny masak: 11 Sep 18:04Z <TimToady> tell masak I particularly like the slide with "(this step requires ingenuity)" which is obviously the ??? before Profit!
masak: 11 Sep 18:10Z <TimToady> tell masak also, we're missing the list split primitive; I wonder if two more or slurpy arrays in a binding should auto-split a list
masak I'm on a bus.
I won't stay online for long, because the wifi is eating too much battery.
I just stopped by to say hi, because I like saying hi from a bus. :) 07:10
wayland76 masak: Hi to a bus!
masak :)
another slogan for Perl 6:
"Perl 6 - bringing you the singularity since 2001"
07:11 [particle]1 joined
wayland76 s/2001/2010/ :) 07:11
masak wayland76: heh, you're just a late adopter, then. :P 07:12
wayland76 Good idea though :)
masak now, if you'll excuse me, I'll go offline to figure out how to hack continuations into Perl 6. :P
07:12 masak left 07:15 zloyrusskiy left 07:18 [particle] left 07:19 ejs joined 07:27 c9s_ joined, c9s_ is now known as cornelius 07:31 carlin left 07:41 meppl joined 08:04 Su-Shee joined
Su-Shee good morning. :) 08:04
phenny Su-Shee: 09 Sep 20:22Z <moritz_> tell Su-Shee rakudo.spreadshirt.net/de/DE/Shop/Index/ Perl 6 goodies without horrible shipping costs. Sadly spreadshirt.de doesn't allow images on dark t-shirts (wtf?)
lambdabot Title: Rakudo
Su-Shee *hrhrhr* :)
08:16 Jedai joined 08:25 mrsaturn left 08:28 carlin joined 08:51 abra joined 08:54 sundar_ joined 08:59 |Jedai| joined 09:02 sundar_ left, jauaor joined 09:03 Jedai left 09:05 sundar_ joined 09:25 sharada joined 09:28 cornelius is now known as c9s__ 09:29 JimmyZ joined 09:34 abra left
mikehh rakudo (3b63817) builds on parrot r41223 - make test PASS / make spectest (up to 28221) FAIL - Ubuntu 9,04 i386 (gcc) 09:36
rakudo - 1 direct fail - t/spec/S12-introspection/walk.rakudo - Non-zero exit status: 1 - Parse errors: Bad plan. You planned 10 tests but ran 8.
rakudo - ./perl6 t/spec/S12-introspection/walk.rakudo - fails with (after ok 8): set_pmc() not implemented in class 'Failure' 09:37
09:37 JimmyZ left
mikehh rakudo - t/spec/S03-operators/arith.rakudo - TODO passed: 131 09:37
rakudo - t/spec/S12-attributes/class.rakudo and t/spec/S14-roles/basic.rakudo - Non-zero wait status: 11 (Segfault after passing tests)
09:40 sm` left, nsh_ joined, nsh_ is now known as nsh-
wayland76 Su-Shee: On a dark shirt, you first have to print the whole image with white paint, then put the other on top. On a light shirt, you just apply one batch of colour. 09:45
09:46 M_o_C joined
Su-Shee I'll make me a "rakudo starlet" shirt in april. :) 09:46
carlin I want a Perl 6 shirt, but, as much as I like Camelia, I'm not wearing one with a butterfly on it ;) Maybe the Rakudo one though 09:50
10:00 carlin left 10:02 sharada left
Patterner I'm man enough to wear it :) 10:03
Su-Shee *haha* :) 10:04
10:06 carlin joined 10:14 brunov left 10:16 sundar_ left, JimmyZ joined 10:18 abra joined 10:22 Whiteknight joined
Juerd carlin: What's wrong with wearing a shirt with a butterfly? 10:28
carlin Juerd: Nothing, but since other people don't realise that, it would garner funny looks 10:31
10:32 nsh- left
Juerd It'll give you and them something to talk about :) 10:32
10:32 |Jedai| left 10:33 |Jedai| joined 10:36 jferrero joined
Patterner It's a chick magnet for sure. 10:48
10:50 nsh- joined
carlin Indeed 10:55
If only it was also wearable by males ...
10:57 icwiener joined 11:03 masak joined
masak a t-shirt with a large hen on it might also be a chick magnet... 11:03
wayland76 ...if the chick in question has imprinted on t-shirts instead of hens 11:05
JimmyZ rakudo: while (1,2,3) -> $foo { ($foo * 2).say; } 11:06
p6eval rakudo 446d49:
..OUTPUT«6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6␤6􏿽xE2
Juerd JimmyZ: for, perhaps?
masak imagines 10 chicklets following some t-shirt around wherever it goes
JimmyZ rakudo: while (1,2,3) -> $foo { ($foo.say; }
p6eval rakudo 446d49: OUTPUT«Unable to parse block; couldn't find final '}' at line 2, near "($foo.say;"␤in Main (src/gen_setting.pm:3469)␤»
JimmyZ rakudo: while (1,2,3) -> $foo { $foo.say; }
p6eval rakudo 446d49: 11:07
..OUTPUT«123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123􏿽xE2
JimmyZ rakudo: sub bar { return 1,2,3 }; while bar() -> $foo { $foo.say; } 11:08
p6eval rakudo 446d49: OUTPUT«too many arguments passed (3) - at most 1 param expected␤in sub bar (/tmp/kLEpvj1H79:2)␤called from Main (/tmp/kLEpvj1H79:2)␤»
masak JimmyZ: (1) parens not needed, (2) the list will scalarify into $foo
um, strike 'scalarify'. it'll simply be stored in $foo. of course.
JimmyZ: that's 'return' complaining.
JimmyZ Juerd: I just test while;
rakudo: sub bar { 1,2,3 }; while bar() -> $foo { $foo.say; }
p6eval rakudo 446d49:
..OUTPUT«123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123􏿽xE2
masak JimmyZ: Rakudo's version of return is multival-challenged.
JimmyZ masak: I can't understand how to use while someting() -> thing { ... } 11:09
rakudo: sub bar { 1,2,3 }; while bar() { $^foo.say; } 11:10
masak JimmyZ: why, like you just did.
p6eval rakudo 446d49:
..OUTPUT«123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123􏿽xE2
JimmyZ rakudo: sub bar { 1,2,3 }; while bar() { $^foo.say; $^baz.say; }
masak JimmyZ: but it doesn't seem to do what you want, which is another thing.
Juerd I don't understand why you'd use while with a constant :)
p6eval rakudo 446d49: OUTPUT«too few arguments passed (1) - 2 params expected␤in Main (/tmp/HS4jUTj9Vc:2)␤»
JimmyZ masak: yes.
masak JimmyZ: 'while' works just like the English word 'while'. it continues looping while some condition is true. 11:11
JimmyZ Juerd: That is from S04.
masak JimmyZ: the condition in your case is the list 1,2,3. as such, it is a constant, like Juerd said.
avar Odd. I hadn't noticed those semantics in the English word "while" :)
masak JimmyZ: and that constant is always true.
JimmyZ masak: how to use while someting() -> thing { ... } correctly? 11:12
avar rakudo: sub bar { 1,2,3 }; for bar() { .say; }
p6eval rakudo 446d49: OUTPUT«1␤2␤3␤»
masak avar: 'make the beds while I do the dishes' means 'as long as I keep doing the dishes, keep making the beds'. roughly. :)
avar perhaps you want this?
JimmyZ avar: not, I think.
masak JimmyZ: your question is strange, because you're obviously creating compiling code already.
JimmyZ: thus, for any definition of 'correctly' that I can think of, you're already doing it. 11:13
JimmyZ: could you not just explaing what it is you want to do instead?
s/ng/n/
Juerd masak: It gets interesting if you add "While you're at it, do the laundry"
JimmyZ masak: that is, It didn't work as I expected. 11:14
masak rakudo: my ($you, $it, $laundry); while ($you.at($it)) { $laundry.do };
p6eval rakudo 446d49: OUTPUT«Method 'at' not found for invocant of class 'Failure'␤»
masak JimmyZ: it worked as I expected.
Juerd Keep making the beds, and doing the laundry, in parallel, as long as I'm doing the dishes. Weird! 11:15
masak JimmyZ: what were your expectations?
JimmyZ masak: or I don't know what is the meaning about "while something() -> $thing { .... }"
masak JimmyZ: no, I don't think you do.
JimmyZ: the crucial question is what ends up in $thing, right?
JimmyZ: now what ends up in $thing is the value of something().
JimmyZ: in your case, the list 1,2,3. 11:16
JimmyZ: every... single... time. :)
JimmyZ yes
Juerd Confused by Perl 5's weird while-readline?
masak JimmyZ: why wasn't that what you expected?
Juerd: ah! that might be it! :)
a war veteran.
11:17 jferrero left
JimmyZ masak: because the output has no meaning. 11:17
11:17 jferrero joined
Juerd I've never liked iterators. 11:17
Except for :)
JimmyZ masak: Is there a meanging example for use it? 11:18
masak JimmyZ: that's the same as saying it's not what you expected.
JimmyZ: by the way, you still haven't spelled out what it was you expected from your program.
JimmyZ masak: I expected a meaningful example. 11:19
masak: not just my program. 11:20
masak rakudo: my $a = 0; while $a < 10 { say $a++ }; say "presto!" 11:21
p6eval rakudo 446d49: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤presto!␤»
masak JimmyZ: that's how 'while' works.
JimmyZ rakudo: my $a = 0; while $a < 10 { say $a++; $^foo.say };
p6eval rakudo 446d49: OUTPUT«0␤1␤1␤1␤2␤1␤3␤1␤4␤1␤5␤1␤6␤1␤7␤1␤8␤1␤9␤1␤» 11:22
JimmyZ rakudo: my $a = 8; while $a < 10 { say $a++; $^foo.say };
masak JimmyZ: now, the clue to what each '1' means there...
p6eval rakudo 446d49: OUTPUT«8␤1␤9␤1␤»
11:22 Chillance joined
masak JimmyZ: ...is realizing that the value of '$a < 10' is True (or 1) as long as the loop runs. 11:22
JimmyZ masak: It bind the result to any $^foo var. 11:23
masak JimmyZ: 对
does that make sense to you?
JimmyZ masak: just like while ( $result = func() ) { $result.say; }
masak right.
no need for the parens. 11:24
JimmyZ rakudo: my $a =8; while my $b = $a < 10 { $b.say; } 11:25
p6eval rakudo 446d49:
..OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1􏿽xE2
JimmyZ rakudo: my $a =8; while my $b = $a++ < 10 { $b.say; }
p6eval rakudo 446d49: OUTPUT«1␤1␤»
JimmyZ masak: thanks ;) 11:26
masak any time. :)
JimmyZ rakudo: my $a =8; while $a++ < 10 { $^_.say; }
p6eval rakudo 446d49: OUTPUT«1␤1␤»
11:27 agentzh joined 11:29 JimmyZ left, l3thal joined 11:30 l3thal left 11:32 jhuni left
masak rakudo: sub han-numeral-to-digit($h) { '一二三四五六七八九'.index($h) }; say han-numeral-to-digit('七') 11:35
p6eval rakudo 446d49: OUTPUT«6␤»
masak oops. off-by-one.
rakudo: sub han-numeral-to-digit($h) { '〇一二三四五六七八九'.index($h) }; say han-numeral-to-digit('七') 11:36
p6eval rakudo 446d49: OUTPUT«7␤»
masak :)
carlin bah, putty + screen + irssi = utf-8 fail 11:40
11:40 Chillance left 11:41 M_o_C left, Chillance joined 11:45 icwiener_ joined 11:46 masak` joined 11:53 masak`` joined 12:01 icwiener left 12:06 masak left 12:09 Chillance_ joined 12:10 Zloyrusskiy joined 12:13 masak` left 12:14 masak``` joined 12:23 masak`` left, masak``` left 12:25 Chillance left
jnthn oh hai 12:37
12:42 sharada joined, abra_ joined, abra left, abra_ left, abra_ joined 12:43 JimmyZ joined, abra_ left 12:45 Zloyrusskiy left 12:48 abra joined 12:53 pmurias joined
lisppaste3 colomon pasted "Patch that breaks t/spec/S32-io/IO-Socket-INET.t" at paste.lisp.org/display/86974 12:53
JimmyZ rakudo: my $a = 1; repeat while $a< 10 { $a++.say; }
p6eval rakudo 446d49: OUTPUT«Confused at line 2, near ".say; }"␤in Main (src/gen_setting.pm:3469)␤»
jnthn std: my $a = 1; repeat while $a< 10 { $a++.say; } 12:54
p6eval std 28221: OUTPUT«===SORRY!===␤(Possible runaway string from line 1)␤Unable to parse quote-words subscript; couldn't find right angle quote at /tmp/ICI0C9bqJD line 1 (EOF):␤------> a = 1; repeat while $a< 10 { $a++.say; }⏏<EOL>␤FAILED 00:03 38m␤»
JimmyZ rakudo: my $a = 1; repeat while $a< 10 { ($a++).say; }
p6eval rakudo 446d49: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤»
colomon Does anyone out there see why that patch would break IO-Socket-INET.t?
JimmyZ rakudo: my $a = 1; while $a< 10 { ($a++).say; }
p6eval rakudo 446d49: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤»
colomon Maybe there's another sec command out there somewhere? 12:55
I will be afk for an hour or so.
jnthn colomon: Does it make it fail consistently? I occasionally see randm fails on that test file.
12:55 redicaps left
JimmyZ rakudo: my $a = 1; repeat while $a< 10 { $^a.say; } 12:56
12:56 zloyrusskiy joined
p6eval rakudo 446d49: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/D6TEWetACE:2)␤» 12:56
12:56 zloyrusskiy left
JimmyZ rakudo: my $a = 1; while $a< 10 { $^a.say; } 12:56
p6eval rakudo 446d49: OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤»
JimmyZ rakudo: my $a = 1; while $a++< 10 { $^a.defined.say; } 12:57
p6eval rakudo 446d49: OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤»
12:57 zloyrusskiy joined
JimmyZ rakudo: my $a = 1; repeat while $a< 10 { $^a.defined.say; } 12:59
p6eval rakudo 446d49: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/UO6woc3c4r:2)␤»
JimmyZ std: my $a = 1; repeat while $a< 10 { $^a.defined.say; } 13:00
p6eval std 28221: OUTPUT«===SORRY!===␤(Possible runaway string from line 1)␤Unable to parse quote-words subscript; couldn't find right angle quote at /tmp/XQYRGb8Eox line 1 (EOF):␤------> repeat while $a< 10 { $^a.defined.say; }⏏<EOL>␤FAILED 00:03 38m␤»
13:14 rdice joined 13:15 nsh- left 13:19 Chillance joined 13:21 jaldhar left 13:22 zloyrusskiy left 13:25 pmurias left 13:29 pmurias joined 13:31 jaldhar joined 13:36 sm joined, Chillance_ left, sm is now known as Guest44537 13:44 M_o_C joined 13:46 masak joined
masak I smell a Null PMC access in the Force... 13:46
13:46 masak left, masak joined
masak rakudo: repeat while True {} 13:46
p6eval rakudo 446d49: ( no output ) 13:47
masak rakudo: my $a = 1; repeat while $a< 10 { $^a.defined.say;
oops.
rakudo: my $a = 1; repeat while $a< 10 { $^a.defined.say; }
p6eval rakudo 446d49: OUTPUT«Unable to parse block; couldn't find final '}' at line 2, near ""␤in Main (src/gen_setting.pm:3469)␤» 13:48
rakudo 446d49: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/cBCo5MtLpF:2)␤»
masak submits rakudobug
phenny: tell jnthn Please put your "Solved in Perl 6" talk slides online soon, so that those of us who weren't fortunate enough to be in Japan at the time can enjoy it, too! 13:49
phenny masak: I'll pass that on when jnthn is around.
edenc seen ruoso?
masak @seen ruoso 13:50
lambdabot I saw ruoso leaving #perl6 3m 16d 15h 37m 55s ago, and .
13:50 masak left
edenc blargh 13:50
13:51 sm` joined 13:53 patspam joined, Whiteknight left
JimmyZ masak: Do you hide yourself? 13:56
14:00 Guest44537 left 14:01 rdice left
pmurias edenc: do you need any smop help/info? 14:02
edenc pmurias: not really, I'm just chasing ruoso down 14:03
pmurias: actually, I do, but not right this moment :) 14:04
JimmyZ rakudo: my $a = 1; repeat while $a< 10 -> $b { $b.defined.say; }
p6eval rakudo 446d49: OUTPUT«Confused at line 2, near "$b { $b.de"␤in Main (src/gen_setting.pm:3469)␤»
JimmyZ masak: Is it a bug?
TimToady I will be offline most of today; driving to SoCal 14:05
colomon Update on my own issue: The problem is apparently defining Any.sec as a trig function.
JimmyZ rakudo: my $a = 1; while $a< 10 -> $b { $b.defined.say; } 14:06
p6eval rakudo 446d49: OUTPUT«Confused at line 2, near "$b { $b.de"␤in Main (src/gen_setting.pm:3469)␤»
JimmyZ rakudo: my $a = 1; while $a<10{ $^b.defined.say; } 14:07
p6eval rakudo 446d49: OUTPUT«too few arguments passed (0) - 1 param expected␤in Main (/tmp/4dbj4yEVuE:0)␤»
carlin rakudo: my $a = 1; while ($a < 10) -> $b { say $b.defined; $a++; }; 14:08
p6eval rakudo 446d49: OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤»
carlin JimmyZ: Is that what you wanted?
JimmyZ rakudo: my $a = 1; while $a< 10 -> $b { $b.defined.say; };
p6eval rakudo 446d49: OUTPUT«Confused at line 2, near "$b { $b.de"␤in Main (src/gen_setting.pm:3469)␤» 14:09
14:10 zloyrusskiy joined
JimmyZ carlin: yes 14:14
rakudo: my $a = 1; while $a<2 { $a++ } 14:15
p6eval rakudo 446d49: ( no output )
JimmyZ rakudo: my $a = 1; repeat while $a<2 { $a++ }
p6eval rakudo 446d49: ( no output )
JimmyZ rakudo: my $a = 1; repeat while $a<2 -> $b { $a++ }
p6eval rakudo 446d49: OUTPUT«Confused at line 2, near "$b { $a++ "␤in Main (src/gen_setting.pm:3469)␤»
JimmyZ rakudo: my $a = 1; repeat while $a < 2 -> $b { $a++ }
p6eval rakudo 446d49: OUTPUT«Confused at line 2, near "-> $b { $a"␤in Main (src/gen_setting.pm:3469)␤»
JimmyZ rakudo: my $a = 1; repeat while $a < 2 -> $b { $a++ }; 14:16
p6eval rakudo 446d49: OUTPUT«Confused at line 2, near "-> $b { $a"␤in Main (src/gen_setting.pm:3469)␤»
JimmyZ rakudo: my $a = 1; repeat while $a < 2 -> $b { $a++; }
p6eval rakudo 446d49: OUTPUT«Confused at line 2, near "-> $b { $a"␤in Main (src/gen_setting.pm:3469)␤»
JimmyZ rakudo: my $a = 1; repeat while $a < 2 -> $b { $a++; };
p6eval rakudo 446d49: OUTPUT«Confused at line 2, near "-> $b { $a"␤in Main (src/gen_setting.pm:3469)␤»
JimmyZ rakudo: my $a = 1; repeat while ($a<2) -> $b { $a++; };
p6eval rakudo 446d49: OUTPUT«Confused at line 2, near "$b { $a++;"␤in Main (src/gen_setting.pm:3469)␤»
JimmyZ rakudo: my $a = 1; repeat while ($a < 2) -> $b { $a++; };
p6eval rakudo 446d49: OUTPUT«Confused at line 2, near "-> $b { $a"␤in Main (src/gen_setting.pm:3469)␤»
14:17 justatheory joined 14:22 pmurias left
carlin rakudo: repeat while something() -> $thing { say 'NYI?'; }; 14:25
p6eval rakudo 446d49: OUTPUT«Confused at line 2, near "-> $thing "␤in Main (src/gen_setting.pm:3469)␤»
carlin std: repeat while something() -> $thing { say 'NYI?'; };
p6eval std 28221: OUTPUT«Undeclared routine:␤ something used at 1␤ok 00:03 38m␤»
carlin ah, yes, the test is fudged in rakudo 14:28
14:30 zloyrusskiy left
JimmyZ a example: 14:31
rakudo: my $a = 1; while ($a<10) -> $b { say $b.defined; $a++; }
p6eval rakudo 446d49: OUTPUT«Confused at line 2, near "$b { say $"␤in Main (src/gen_setting.pm:3469)␤»
JimmyZ rakudo: my $a = 1; while ($a < 10) -> $b { say $b.defined; $a++; }
p6eval rakudo 446d49: OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤»
14:31 jferrero left
JimmyZ another: 14:32
rakudo: my $a = 1; while $a<10{ $^b.defined.say; };
p6eval rakudo 446d49: OUTPUT«too few arguments passed (0) - 1 param expected␤in Main (/tmp/gUZ1M5sNW3:0)␤»
JimmyZ rakudo: my $a = 1; while $a<10 { $^b.defined.say; };
14:32 jferrero joined
p6eval rakudo 446d49: 14:32
..OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1􏿽xE2
JimmyZ that may be a bug. 14:33
14:38 zloyrusskiy joined
JimmyZ rakudo: my $a = 1; while $a<10 -> $b { say $b.defined; $a++; } 14:43
p6eval rakudo 446d49: OUTPUT«Confused at line 2, near "$b { say $"␤in Main (src/gen_setting.pm:3469)␤»
JimmyZ rakudo: my $a = 1; while $a < 10 -> $b { say $b.defined; $a++; }
p6eval rakudo 446d49: OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤»
14:44 JimmyZ left 14:45 c9s__ left, c9s_ joined 14:47 Psyche^ joined, osvaldo joined 14:58 patspam left 15:00 __ash__ joined 15:02 fridim_ joined, nihiliad joined 15:03 Patterner left, Psyche^ is now known as Patterner 15:07 wlamagna joined 15:08 Guest44537 joined 15:19 sm` left, JimmyZ joined 15:24 carlin left
JimmyZ rakudo: my $a = 1; repeat while $a < 10 { $a++.say; } 15:25
p6eval rakudo 446d49: OUTPUT«Confused at line 2, near ".say; }"␤in Main (src/gen_setting.pm:3469)␤»
JimmyZ std: class Alpha { has @!a = < beta gamma >; method postcircumfix:<[ ]>($key) { return @!a[$key]; }; }; my $a = Alpha.new; say $a[1]; 15:29
p6eval std 28221: OUTPUT«ok 00:03 40m␤»
JimmyZ rakudo: class Alpha { has @!a = < beta gamma >; method postcircumfix:<[ ]>($key) { return @!a[$key]; }; }; my $a = Alpha.new; say $a[1];
p6eval rakudo 446d49: OUTPUT«No such attribute '@!a'␤in method Alpha::postcircumfix:[ ] (/tmp/gxkKQ4x8zm:2)␤called from method Alpha::postcircumfix:[ ] (/tmp/gxkKQ4x8zm:2)␤called from Main (/tmp/gxkKQ4x8zm:2)␤»
JimmyZ rakudo: class Alpha { has @!a = < beta gamma >; method postcircumfix:<{ }>($key) { return @!a[$key]; }; }; my $a = Alpha.new; say $a{1};
p6eval rakudo 446d49: OUTPUT«gamma␤»
JimmyZ A bug? 15:30
15:31 abra left
JimmyZ rakudo: class Alpha { has @!a = < beta gamma >; method postcircumfix:<( )>($key) { return @!a[$key]; }; }; my $a = Alpha.new; say $a(1); 15:33
p6eval rakudo 446d49: OUTPUT«gamma␤»
JimmyZ rakudo: class Alpha { has @!a = < beta gamma >; method infix:<~>($key) { return @!a[$key]; }; }; my $a = Alpha.new; say $a~1;
p6eval rakudo 446d49: OUTPUT«Alpha()<0xb689c8c8>1␤»
15:39 abra joined 15:43 zamolxes left 15:45 silug left
osvaldo hi everyone, i'm trying to run some examples and keep on getting this error message: 15:48
perl6 examples/files/read_file.p6
Method 'readline' not found for invocant of class 'IO'
any idea what might be happening?
s1n osvaldo: doesn't look like readline is in the spec anymore 15:51
avar I think it's .get now 15:52
ol .getline
osvaldo ah, ok, so the examples might just be too old then? s1n?
15:52 jonathanturner left
s1n osvaldo: yes, the standard is a moving target 15:52
osvaldo s1n: thks!! 15:53
JimmyZ osvaldo: that might be not implemented .
s1n osvaldo: perlcabal.org/syn/S32/IO.html#IO%3A...%3AEncoded 15:54
looks like avar is right
lambdabot Title: S32::IO, tinyurl.com/oox6bm
osvaldo thks! i'll check that 15:55
15:57 abra left 16:00 silug joined 16:05 zamolxes joined 16:09 cmv joined 16:13 mberends joined 16:21 PacoLinux left, diakopter left, carlin joined, PacoLinux joined 16:24 synth^2 joined 16:25 synth left 16:30 agentzh left 16:35 diakopter joined 16:36 diakopter left 16:38 diakopter joined, diakopter left, frew_ joined 16:42 diakopter joined 16:43 diakopter left 16:44 diakopter joined 16:45 diakopter left 16:46 diakopter joined, diakopter left 16:52 JimmyZ left 16:56 sevvie left 17:00 wtgee joined 17:02 meppl left 17:13 snearch joined 17:15 ejs left, sevvie joined 17:17 mikehh left 17:19 Whiteknight joined 17:24 explorer__ joined, zamolxes left 17:26 frew_ left 17:28 mikehh joined 17:32 snearch left 17:39 jferrero left, synth^2 left 17:40 Guest44537 left 17:45 synth joined 17:47 zamolxes joined, Zloy_russkiy joined 17:55 yath joined
yath heya 17:55
mberends hi yath
yath hi mberends 17:56
17:57 frew_ joined 17:58 diakopter joined
diakopter rakudo: say "\" 17:59
p6eval rakudo 446d49: OUTPUT«say requires an argument at line 2, near " \"\\\""␤in Main (src/gen_setting.pm:2565)␤»
colomon You, doing big compiles in a Windows virtual machine while running Rakudo spectests in another window really eats the laptop's battery...
diakopter std: say "\" 18:00
colomon s/You/You know/ # apparently losing ability to type
p6eval std 28221: ( no output )
colomon rakudo: say "\"" 18:02
18:02 Whiteknight left
p6eval rakudo 446d49: OUTPUT«"␤» 18:02
diakopter rakudo: say ""
p6eval rakudo 446d49: OUTPUT«␤» 18:03
diakopter "\"
18:03 iblechbot left
diakopter rakudo: "\" 18:03
p6eval rakudo 446d49: OUTPUT«Syntax error at line 2, near "\"\\\""␤in Main (src/gen_setting.pm:3469)␤»
mberends heh, say "\\" segfaults here after printing a \ 18:04
diakopter I wonder what it parsed "\" as
colomon It's an incomplete parse, right?
diakopter rakudo: say "\\"
p6eval rakudo 446d49: OUTPUT«\␤»
mberends probably escaped the second " and then had a runaway string
diakopter it got to "say requires an argument at line 2" with an incomplete parse? 18:05
mberends yeah
colomon Runaway string, as mberends says... maybe Rakudo just throws it away? 18:06
Certainly should be a better error message.
mberends like an EOF while trying to finish the string for the say
diakopter rakudo: say "
p6eval rakudo 446d49: OUTPUT«say requires an argument at line 2, near " \""␤in Main (src/gen_setting.pm:2565)␤»
diakopter rakudo: say "\
p6eval rakudo 446d49: OUTPUT«say requires an argument at line 2, near " \"\\"␤in Main (src/gen_setting.pm:2565)␤»
diakopter rakudo: say("\)
p6eval rakudo 446d49: OUTPUT«say requires an argument at line 2, near "(\"\\)"␤in Main (src/gen_setting.pm:2565)␤» 18:07
mberends diakopter you are becoming evil
diakopter ok... 18:08
rakudo: say( 18:09
p6eval rakudo 446d49: OUTPUT«say requires an argument at line 2, near "("␤in Main (src/gen_setting.pm:2565)␤»
diakopter rakudo: say()
p6eval rakudo 446d49: OUTPUT«say requires an argument at line 2, near ""␤in Main (src/gen_setting.pm:2582)␤»
diakopter rakudo: say(()) 18:10
p6eval rakudo 446d49: OUTPUT«␤»
mberends hah!
diakopter rakudo: say(().perl)
p6eval rakudo 446d49: OUTPUT«undef␤»
18:12 fridim_ left
mikehh rakudo (3b63817) builds on parrot r41237 - make test PASS / make spectest (up to 28221) FAIL - Ubuntu 9,04 amd64 (g++) 18:15
rakudo - 1 direct fail - t/spec/S12-introspection/walk.rakudo - Non-zero exit status: 1 - Parse errors: Bad plan. You planned 10 tests but ran 8.
rakudo - ./perl6 t/spec/S12-introspection/walk.rakudo - fails with (after ok 8): set_pmc() not implemented in class 'Failure'
rakudo - t/spec/S03-operators/arith.rakudo - TODO passed: 120, 131-132
18:16 payload joined
mikehh also note no segfaults for me on amd64 and also on i386 - t/spec/S03-operators/arith.rakudo - TODO passed: 131 18:17
colomon hey, sweet, I just passed the spectest for the first time in days. Today's git pull cleared up the lingering errors... 18:18
donri why isn't "my" the default in perl6? it must be the most common scope? 18:20
pugs_svn r28222 | colomon++ | [t/spec] Unfudge now-working tests, overhauled tests for sec and cosec.
dalek kudo: 0f1edeb | (Solomon Foster)++ | src/setting/ (3 files):
Remove Any.sec because of conflicts with S32-io/IO-Socket-INET.t, and add Rat.sec and Int.sec to replace it.
18:21
kudo: 3a48086 | (Solomon Foster)++ | src/setting/Any-num.pm:
Implement Any versions of the basic forward trig functions.
lambdabot Title: Commit 0f1edeb0959e62338bed60e9e87b5bed65488cc7 to rakudo's rakudo - GitHub, tinyurl.com/oaq2l4
kudo: 186cf24 | (Solomon Foster)++ | src/setting/Num.pm:
Add Num.Num method which simply returns self.
lambdabot Title: Commit 3a480865f6df73ec9e17edd52773aff9fbf0e059 to rakudo's rakudo - GitHub, tinyurl.com/p2kqht
lambdabot Title: Commit 186cf24ba3a32d0e9f75eceb89ce76a1a2b945b4 to rakudo's rakudo - GitHub, tinyurl.com/r2ywl4
diakopter hrm
colomon donri: Not sure what you mean? How would you default my? 18:22
(Geez, I think perhaps I need to learn how to compress commits into one before pushing....)
donri "$x = foo" is automatically "my $x = foo"
colomon donri: But then how do you know whether $x was intended to be a new variable or an existing one? 18:23
donri didn't know that was relevant :P
wait, undeclare "$x = foo" is not meaningful in perl6? iirc in perl5 it is a global declaration? 18:24
vaguely recalling global in perl6 needs a * twigil 18:25
mberends donri: Perl 6 defaults to Perl 5's 'use strict', although in future the immediate execution mode will get a 'no strict'
colomon If you say "$x = foo" in Perl 5 it declares a global, yes. Though that is *highly* frowned upon today -- the widely used "use strict" forbids it.
But you couldn't default "$x = foo" to be a my declaration. It would make all sorts of common things ambiguous or just plain wrong. 18:26
donri immediate execution mode, is that -e? 18:27
mberends yes, and Rakudo has that
donri aye, sounds all good then. :) 18:28
18:29 sevvie left, sevvie joined 18:31 Zloy_russkiy left 18:33 synth left 18:34 abra joined 18:35 patspam joined 18:37 c9s_ left 18:38 wlamagna1 joined, icwiener_ left 18:39 wlamagna1 left 18:40 c9s_ joined 18:45 tak11 joined 18:51 jauaor left 18:55 wlamagna left 18:56 wtgee left 18:58 wlamagna1 joined 18:59 wlamagna1 left 19:07 M_o_C left 19:11 jferrero joined, rhr joined 19:12 synth joined 19:21 patspam left 19:23 frew_ left, rhr_ left, frew_ joined 19:26 jaldhar left, jaldhar joined 19:27 donri left 19:28 explorer__ left, REPLeffect left 19:33 c9s_ left, dolmen joined 19:34 synth^2 joined 19:35 DakeDesu joined 19:41 KatrinaTheLamia left 19:42 dolmen left 19:43 jaldhar left, jaldhar joined 19:51 synth left 19:59 cmv left 20:00 osvaldo left 20:04 DakeDesu is now known as KatrinaTheLamia 20:11 donri joined 20:24 bgs100 joined 20:36 rdice joined, PZt left 20:44 abra left 20:52 zloyrusskiy left 20:53 frew_ left 21:03 jaldhar left 21:06 jaldhar joined 21:12 zloyrusskiy joined
colomon @karma 21:14
lambdabot You have a karma of 1
colomon @karma all
lambdabot all has a karma of 0
frettled colomon++
colomon :) 21:15
21:17 Su-Shee left
__ash__ @karma 21:17
lambdabot You have a karma of 0
__ash__ lol
frettled @karma moritz_
lambdabot moritz_ has a karma of 69
frettled @karma moritz
lambdabot moritz has a karma of 655
frettled Just a little bit more work needed to get there. ;)
__ash__ hmmmm 21:19
diakopter link on rakudo.org/how-to-get-rakudo broken
lambdabot Title: How to get Rakudo Perl 6 | Rakudo.org
diakopter url is github.com/rakudo/downloads
should be github.com/rakudo/rakudo/downloads 21:20
lambdabot Title: Downloads for rakudo's rakudo - GitHub
21:22 frew_ joined
__ash__ rakudo: role A { method a { say 'hi'; } }; class B does A is also { }; my $b = B.new; $b.B::a; $b.A::a; 21:23
p6eval rakudo 446d49: OUTPUT«Cannot use 'is also' on non-existent class B at line 2, near "; my $b = "␤in Main (src/gen_setting.pm:1654)␤»
__ash__ akudo: role A { method a { say 'hi'; } }; class B does A { }; my $b = B.new; $b.B::a; $b.A::a; 21:24
helps when you spell rakudo right... 21:25
rakudo: role A { method a { say 'hi'; } }; class B does A { }; my $b = B.new; $b.B::a; $b.A::a;
p6eval rakudo 446d49: OUTPUT«hi␤Method '!select' not found for invocant of class 'B'␤»
__ash__ does anyone here know much about how rakudo pun's stuff internally? roles that is 21:26
21:27 payload left, alester joined 21:31 SmokeMachine joined
diakopter alester: broken link on /how-to-get-rakudo (first github url has too few rakudo/) 21:31
alester ok 21:32
donri just installed rakudo and parrot for the first time. :) 21:33
alester which link? 21:34
oh, i see
fixed 21:35
mberends rakudo: class A { method a { say "hi A"; } }; class B is A { method a { say "hi B"; } }; my $b = B.new; $b.a; $b.A::a; # __ash__: works with class, not with role 21:39
p6eval rakudo 446d49: OUTPUT«hi B␤hi A␤»
donri why does rakudo freeze on "my @L = 0..Inf", is it not supposed to be lazy? 21:43
or is it because i'm in the interpreted shell where it wants to print the list or something 21:44
mberends donri: laziness is Not Yet Implemented
donri aha
21:45 alester left
__ash__ mberends i know it works with a class, but it _should_ work with roles too, but there is a problem with how it pun's the role into an object, or thats what I have been lead to believe 21:45
mberends __ash__, you're probably right. this is the sort of thing jnthn++ usually takes care of 21:47
__ash__ he's the one that told me it was a problem with how its punned 21:48
mberends rakudo: my $L = 0..Inf; $L.WHAT.say; # donri: not quite the same thing, but may be useful to you 21:50
p6eval rakudo 446d49: OUTPUT«Range()␤»
donri thanks, though i'm just playing 21:51
21:51 frettled sets mode: +oo mberends Matt-W
mberends oh hai frettled 21:51
mikehh rakudo (0f1edeb) builds on parrot r41241 - make test PASS / make spectest (up to 28222) FAIL - Ubuntu 9.04 amd64
rakudo - t/spec/S12-introspection/walk.rakudo FAILS and t/spec/S03-operators/arith.rakudo - TODO passed: 120, 131-132
frettled good evening, mberends :D
mberends is hacking a (broken) installed-modules branch of proto 21:53
frettled is doing nothing useful, just browsing websites for possible euroshopping of bicycle and/or parts -- I'll be visiting Abigail in a week. 21:54
21:55 markmont joined
donri is perl6 intended to have open classes? 21:55
frettled Open classes -- as in everything being public by default? If so, no. 21:56
You have to specify whether something is public.
donri i mean, you can reopen an existing class to add methods and whatnot to it
mberends the 'augments' keyword allows you to add more to a class definition. The old syntax was 'is also' and has not been replaced in Rakudo afaik 21:57
donri rakudo: class Test {} class Test { method foo() { return "ok!" } } Test.new.foo
p6eval rakudo 446d49: OUTPUT«Confused at line 2, near "class Test"␤in Main (src/gen_setting.pm:3469)␤» 21:58
mberends Less Than Awesome error message :/
donri how do you use augments(is also?
s/(/\//
mberends rakudo: class Test {}; class Test is also { method foo() { return "ok!" } }; Test.new.foo.say 22:00
p6eval rakudo 446d49: ( no output )
mberends try it locally with perl6 -e, it was ok here 22:01
donri can you add your own "instructions" for class bodies, like class Foo is InheritingSomething { do_this_thing args...; } 22:02
mberends that would behave as if InheritingSomething is another class or role 22:04
donri: you may want www.perlcabal.org/syn/S14.html
lambdabot Title: S14
donri the idea is that InheritingSomething defines do_this_thing as a class method and class bodies are executable so in the context of Foo it knows do_this_thing
(ruby does this alot. i'm looking for arguments to convince ruby folk of perl6 awesomeness. :)) 22:05
mberends donri: fine examples www.jnthn.net/papers/2009-yapc-eu-r...slides.pdf 22:06
lambdabot Title: Microsoft PowerPoint - 2009-yapc-eu-roles 22:07
mberends all of jnthn++'s talks: www.jnthn.net/articles.shtml 22:08
lambdabot Title: Jonathan Worthington :: Articles And Papers
22:23 M_o_C joined, tak11 left, tak11 joined 22:25 frew_ left 22:32 sharada left 22:38 rdice left 22:43 frew_ joined 23:10 frew_ left 23:13 dukeleto left 23:21 tak11 left 23:24 tak11 joined 23:27 zloyrusskiy left 23:36 M_o_C left
donri something neat in ruby is File.open{} ensures the handle is closed after the block, will perl6 have something like that? 23:37
something neat in haskell is getContents which corresponds to slurp is lazy so you can use it on a big file and it only reads what you request, will slurp do that? 23:40
TimToady you can close a handle with a 'will leave' trait on the declaration 23:44
does getContents break into lines?
donri huh, how does that work
no (though maybe there is something for that too) 23:45
TimToady okay, but it's a string represented as a list, right?
we don't have lazy strings in Perl 5, but if you want to read a file char by char, that could be done lazily 23:46
donri well, strings in haskell are lists of Char
TimToady lines() is lazy
and I think .comb on a filehandle should be lazy eventually
though I doubt rakudo does that
donri how does 'will leave' work? 23:47
TimToady my $fh will leave {.close} = open $file; 23:48
is equiv to
my $fh = open $file;
LEAVE { $fh.close }
donri and, sorry, what is LEAVE{}?
TimToady S04 is where these are discussed
donri aye 23:49
TimToady always executes on leaving the current block
there are many variants
see the section labelled "Closure traits"
donri so you could simply scope it with {} attach to nothing in particular
and it would correspond to the ruby way?
though abit verbose for that 23:50
TimToady if you don't do anything with a filehandle, and don't care exactly when it closes, it we close when the filehandle is garbage collected 23:53
you only have to close it explicitly if you care about the exact timing
donri but it's good practice to make sure it's closed when you don't need it right?
23:54 dukeleto joined
donri or i don't really know why that would be important 23:54
an open handle isn't really blocking is it?
TimToady well, you might have race conditions if you want to reopen the file