»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by lichtkind on 5 March 2010.
00:02 mantovani left, mantovani joined 00:09 k23z__ joined 00:14 mtnviewmark joined
mtnviewmark Hullo all - I'm wondering if it is about time to update the Periodic Table of the Operators? 00:16
Have the operators changed much in the last 9 months or so? Are they setteling down at all? 00:18
00:19 JimmyZ joined 00:21 justatheory joined
JimmyZ mtnviewmark: I am glad to see it 00:22
jnthn mtnviewmark: You've arrived at a quiet time. :-) I think something probably *has* changed, but I struggle to think of anything specific. Most of what I remember feels a bit longer ago than that. 00:23
mtnviewmark: e.g. prefix:<=> is gone
Not sure if that's on the latest one.
If so, that's one thing that went away.
There's a new S meta-operator too I guess.
mtnviewmark I can do an audit - just trying to learn if there has been any great change in general.
JimmyZ Great. 00:24
mtnviewmark Last year I thought the plan was to lock down the spec by Xmas - but I gather that didn't happen?
O noes!!! Another metaop?!?! Where ever will I fit it? 00:25
:P
jnthn Well, the trouble with locking down the spec is that those of us implementing it keep finding things that need tweaking so they're implementable/the corner cases are fleshed out etc. 00:26
It's probably fair to say that these days the focus is very much on dealing with implementability rather than creating more cool stuff. 00:27
mtnviewmark Heh! Well better found before than after.
00:28 lestrrat is now known as lest_away
mtnviewmark Sounds like then if I did. Revision to match the current Synop. It would be pretty close to done 00:28
JimmyZ phenny: tell masak Is any bug there? irclog.perlgeek.de/perl6/2010-04-24#i_2259960 00:31
phenny JimmyZ: I'll pass that on when masak is around.
sorear mtnviewmark: "Xmas" in Perl 6 land is a code word 00:34
it means "when Perl 6 is released", for variable values of "released" 00:35
mtnviewmark Oh - I was gullible enough to think it was tied to a date! :) 00:36
00:37 mtnviewmark left 00:43 sundar joined
sorear ah, Perl 5.8.0 seems to not be compatible with recent versions of gcc 00:44
the autodepend mechanism trips up
sorear fudges it and moves on
spinclad 'when?' 'by xmas.' 'oh, nice!' (goes away) -- 'he never asked which xmas, did he?' 00:46
it's better if the meaning of 'xmas' is explained _before_ the victim is gone. 00:47
jnthn rakudo: multi foo(:$a!, *%_) {}; multi foo(:$b, *%_) {}; foo(:a, :b)
p6eval rakudo e393c7: OUTPUT«Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures:␤:(Any :a($a)!, *%_)␤:(Any :b($b), *%_)␤␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
spinclad (comes back) 'it's been xmas, i don't see it!' 'well, yeah, you never asked the crucial question though.' -- some might call this less than awesome public relations... 00:51
sundar spinclad: I'm with you on this... I guess the xmas reply is better limited to intra-perl6 fun. 00:55
especially now that we're gonna have rakudo star soon, perhaps we could reply with that.
00:59 alester joined 01:02 JimmyZ left 01:09 lest_away is now known as lestrrat
colomon Z metaop is the newest of all. 01:09
01:11 JimmyZ joined
jnthn Oh, yes. 01:11
jnthn forgot that hadn't used to be meta
lisppaste3 takadonet pasted "Object What method" at paste.lisp.org/display/98297 01:12
colomon is still kind of proud of getting it implemented the same day TimToady invented it. :)
takadonet Should both $first.WHAT return 'beer()' ? 01:13
jnthn colomon++ 01:14
colomon jnthn++, as I'm pretty sure you helped.
jnthn takadonet: Probably not because it's not the same class any more
However, I suspect it currently says nothing useful...
colomon is there enough information there to say "beer does me", or something like that? 01:15
takadonet jnthn: Just double checking. Is there a way to determine if it was ever a beer object at one point? 01:16
jnthn takadonet: Smartmatch against beer
colomon: Yeah, but you'd probably want to set it up specially to give the generated subclass a name like that. 01:17
colomon: But that's not too hard.
takadonet jnthn: I believe that will work for me. Thanks
jnthn :-)
01:20 patspam1 joined
colomon Wow, I feel like Rakudo had a very productive day. 01:21
14 commits 01:22
from four different people
at least a hundred additional passing tests.
jnthn :-) 01:23
I've nearly finished a lexical roles patch too.
I'll get it in tomorrow.
JimmyZ how many tests passed now?
jnthn > 31000
JimmyZ good.
colomon > 31663 01:24
jnthn oh wow. :-)
jnthn wonders how long until 32,000
JimmyZ I guess very soon 01:25
sorear 32,768 :p 01:26
01:26 patspam left, bbkr joined
sorear jnthn: does rakudo work at all against trunk yet? 01:27
jnthn No
sorear 'k
I
JimmyZ rakudo: say Mu ~~ Object
sorear 've got plenty more to do on the pure Blizkost side
p6eval rakudo e393c7: OUTPUT«Could not find sub &Object␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sorear though eventually I'd like to implement :from<perl5>
JimmyZ rakudo: say Mu ~~ ::Object
p6eval rakudo e393c7: OUTPUT«Nominal type check failed for parameter '$topic'; expected Any but got Mu instead␤current instr.: 'perl6;Any;ACCEPTS' pc 382491 (src/gen/core.pir:33470)␤»
colomon did we ever figure out exactly how many alpha passed before it wandered away from the spectests?
I want to say it was 32,xxx, but I'm not sure. 01:28
jnthn sorear: The error looked scary and I've been wanting to get lexical classes and roles done for ages. Once I've got those in, I'll look at the trunk building issue.
sorear What does wandering away from the spectests mean?
jnthn colomon: I thought we didn't make 32,000 in alpha.
colomon: It was 31,xxx I thought.
rakudo: "foo" ~ my $a = "bar"
p6eval rakudo e393c7: ( no output )
jnthn rakudo: say "foo" ~ my $a = "bar" 01:29
colomon jnthn: oooo, that would be nice.
p6eval rakudo e393c7: OUTPUT«bar␤»
JimmyZ jnthn: it's 32731
jnthn JimmyZ: Oh?
OK.
I musta remembered wrong then.
So...still a thousand or so to go in master. 01:30
JimmyZ and then ng merged to master
jnthn To the extent that milestone means anything.
01:30 wormphlegm joined
sorear Let's add lots of new tests for the features that alpha didn't have. 01:30
jnthn sorear: Well, that's kinda happened. 01:31
Which is fine, but it does mean that you can't say "we pass as many tests as alpha did so we're now back to where it was"
616 RT tickets, though a bunch can be closed once we have test coverage. :-) 01:34
colomon sure, but you can say "we're about as functional as we were back then" -- even if it might be different functionality.
will be worth having an alcoholic beverage of your choice in celebration, at any rate. :) 01:35
01:36 araujo left
jnthn Oh yes. :-) 01:37
sorear \o/ altperl works 01:39
for 5.10.1 (/usr/bin/perl)
sorear is currently trying to build 5.8.0; it's quite bitrotted
01:40 dual joined 01:41 bbkr left 01:42 dual_ left, hercynium joined
jnthn rakudo: given 42 { when 42 { proceed }; say "OH HAI" } 01:43
p6eval rakudo e393c7: OUTPUT«OH HAI␤»
jnthn rakudo: (class { method foo() { say "OH HAI" } }).foo 01:46
p6eval rakudo e393c7: OUTPUT«OH HAI␤»
01:47 bbkr joined, araujo joined 01:52 dual_ joined
jnthn -> sleep, o/ 01:53
01:54 dual left
colomon \o 01:54
01:57 meppl joined, sundar left 01:58 Psyche^ joined 02:00 Patterner left, Psyche^ is now known as Patterner 02:07 jaldhar left 02:09 JimmyZ left 02:14 redicaps joined 02:20 dual joined
snarkyboojum std: foo class A {} 02:21
p6eval std 30474: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'foo' used at line 1␤Check failed␤FAILED 00:01 109m␤» 02:22
02:22 dual_ left
snarkyboojum std: my class A {} 02:23
p6eval std 30474: OUTPUT«ok 00:01 107m␤»
02:23 JimmyZ joined
snarkyboojum std: :: class A {} 02:24
p6eval std 30474: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/jmm30nXD42 line 1:␤------> :: ⏏class A {}␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Parse failed␤FAILED 00:01 108m␤»
snarkyboojum rakudo: :: class A {} 02:25
p6eval rakudo e393c7: OUTPUT«ResizablePMCArray: Can't pop from an empty array!␤current instr.: 'perl6;Perl6;Actions;term:sym<name>' pc 255517 (src/gen/perl6-actions.pir:9800)␤»
bbkr when i try to run "perl t/harness --fudge t/spec/S32-str/comb.t" i get "no ICU lib loaded" error. how to run this test (and what is ICU?)
snarkyboojum heh popping from an empty array!
colomon bbkr: ICU is a library for handling unicode. 02:26
snarkyboojum bbkr: site.icu-project.org/
colomon you need to install it on your machine and then rebuild parrot / rakudo to use it.
bbkr thanks! there are some tests that can be unfudged. i'll rebuild and see what works on Moscow build. 02:27
02:28 dual_ joined 02:30 dual left 02:32 mituol joined 02:35 bbkr left
lisppaste3 colomon pasted "Start to implement Church numbers in p6: colomonbug or rakudobug?" at paste.lisp.org/display/98303 02:44
02:46 dual joined, JimmyZ left 02:48 dual_ left 02:55 tylerni7 left 03:10 dual_ joined 03:12 dual left 03:15 lestrrat is now known as lest_away 03:18 fridim joined
takadonet rakudo: say "yo",graphs() 03:21
p6eval rakudo e393c7: OUTPUT«Could not find sub &graphs␤current instr.: '_block14' pc 29 (EVAL_1:0)␤» 03:22
takadonet rakudo: say "yo".graphs()
p6eval rakudo e393c7: OUTPUT«Method 'graphs' not found for invocant of class 'Perl6Str'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
takadonet !!!
not good
03:30 hercynium left
snarkyboojum rakudo: say "yo".chars 03:34
p6eval rakudo e393c7: OUTPUT«2␤»
snarkyboojum rakudo: say "yo".bytes 03:35
p6eval rakudo e393c7: OUTPUT«2␤»
snarkyboojum alpha: say "yo".graphs 03:39
p6eval alpha 30e0ed: OUTPUT«Method 'graphs' not found for invocant of class 'Str'␤in Main (file src/gen_setting.pm, line 324)␤»
03:39 dual joined 03:40 dual_ left, molaf joined
takadonet snarkyboojum: Going to be using chars instead for now 03:40
snarkyboojum looks like graphs has never been implemented 03:41
takadonet snarkyboojum: ya
03:41 meppel joined 03:45 meppl left 03:47 meppel is now known as meppl 03:54 lidden joined 03:56 k23z__ left 04:03 am0c left 04:06 Chillance left, tylerni7 joined 04:09 tylerni7 left, tylerni7 joined, araujo left 04:10 araujo joined 04:13 araujo left
snarkyboojum Parrot_str_grapheme_length is documented, but not implemented it seems 04:13
04:14 araujo joined 04:16 molaf left 04:23 jaldhar joined
sorear snarkyboojum: the String PDD is mostly not implemented. That's a major TODO front. 04:24
snarkyboojum sorear: ah cool :)
04:27 envi^home joined 04:46 patspam1 left 04:47 chitragupt joined, chitragupt left 04:48 gurjeet joined, mituol left, chitragupt joined, chitragupt left 04:52 chitragupt joined, chitragupt left 04:53 chitragupt joined 05:02 ReiniUrban joined 05:03 rurban left, ReiniUrban is now known as rurban 05:14 lest_away is now known as lestrrat 05:36 chitragupt left 05:38 nihiliad left, chitragupt joined 05:39 chitragupt left 05:51 Chitragupt joined 05:52 justatheory left, Chitragupt left, Chitragupt joined 05:53 jaldhar left, jaldhar joined 06:03 kfo_ joined 06:05 LionMadeOfLions left 06:06 gurjeet left 06:07 kfo left, kfo_ is now known as kfo 06:10 rv2733 left 06:11 Chitragupt left 06:12 iblechbot joined 06:13 guotr joined 06:14 gurjeet joined 06:19 gurjeet left, guotr left 06:21 guotr joined 06:23 gurjeet joined 06:24 guotr left, guotr joined 06:25 redicaps left
eternaleye (way, way, WAY backlogging) Regarding the people who say "that's not a real release" - such statements are the _ideal_ example of 'No true Scotsman' in its native habitat 06:26
...and I scroll one line, and masak++ has said so. eternaleye-- 06:27
06:27 finanalyst joined
finanalyst good morning. anyone around? 06:27
sorear yes
06:29 guotr left, guotr joined
finanalyst i would like to add a method to Str but not sure how 06:31
06:31 guotr left
finanalyst eg. something to encode & < > to xml 06:31
06:31 guotr joined
finanalyst i want something so that i can do { .xml-encode.say } 06:32
rakudo: sub s ( Str $s --> Str) { $s.=subs(/ \& /,'&amp;') }; my $x= 'as&a'; $x.s.say; 06:34
p6eval rakudo e393c7: OUTPUT«Any()␤»
06:35 alester left
finanalyst rakudo: sub xml-encode ( Str $s --> Str) { $s.=subs(/ \& /,'&amp;') }; my $x= 'as&a'; $x.xml-encode.say; 06:35
p6eval rakudo e393c7: OUTPUT«Method 'xml-encode' not found for invocant of class 'Perl6Str'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
finanalyst sorear: can u help? 06:36
sorear finanalyst: funny that, I proposed that exact feature on perl6-language a week ago
the ability to augment classes within lexical scopes
finanalyst i thought you were discussing the issue in relation to other languages 06:37
sorear > my method xml-encode (Str:) { self.subst('&', '&amp;'); }; "as&a".xml-encode.say;
I was
But any language feature worth having has many uses 06:38
finanalyst but here the example is purely perl6
sorear Yes
It's general that way
finanalyst it seems such a fairly useful thing that its surprising another syntax is not available 06:39
for perl6 that is
sorear I think it's a fairly useful thing.
You agree?
Maybe I should put together a prototype. 06:40
finanalyst what i am trying to do seems to be fairly common
eternaleye (still backlogging) re strftime, why not make it a grammar with pluggable actions behind the scenes? 06:41
finanalyst being able to hang on new methods to a basic type, like Str, seems useful 06:42
eternaleye And have the actions only fire for the specific rules that match valid sequences, which are short-circuted out by ('%%'||...) matches?
sorear I thought of that too, but decided not to involve myself in bikeshedding 06:44
finanalyst sorear: also it seems to be common that when extracting data from files - a very common operation - it would be useful to be able to create a filter that can be attached to Str
eternaleye finanalyst: There is always this: use MONKEY_TYPING; augment class Str { method xml-encode {...}; } 06:48
Or even augment role Stringy for maximum generality 06:49
finanalyst eternaleye: thanx
eternaleye finanalyst: BTW, role Stringi is specced but not implemented IIUC 06:50
*Stringy
finanalyst eternaleye: isnt MONKEY_TYPING considered a BAD thing
eternaleye finanalyst: Generally, yes; I personally would do it as a sub and do xml-encode(*).say 06:51
06:51 jonrafkind left
eternaleye But you asked for a way to add a method, so... 06:51
06:53 REPLeffect left
finanalyst the reason is that i then need to do for @inputlines { xml-encode($_).split etc etc 06:53
sorear eternaleye: You apparently aren't following p6l. 06:54
06:54 REPLeffect joined
sorear I proposed a mechanism for adding methods without pollution outside the current lexical scope 06:54
like the .HOW macro, but completely general and user-accessible
no pollution means no need for MONKEY_TYPING 06:55
finanalyst rakudo: use MONKEY_TYPING; augment class Str { method xml-e {self.=subs('&','&amp;')}}; my Str $x='an&sk'; $x.xml-e.say 06:58
p6eval rakudo e393c7: OUTPUT«Method 'xml-e' not found for invocant of class 'Perl6Str'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
finanalyst doesnt work yet anyway 06:59
sorear uhm 07:11
07:11 wormphlegm left
sorear rakudo: use MONKEY_TYPING; augment class Str { method xml-e() {self.=subs('&','&amp;')}}; my Str $x='an&sk'; $x.xml-e.say 07:12
p6eval rakudo e393c7: OUTPUT«Method 'xml-e' not found for invocant of class 'Perl6Str'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
moritz_ funnily these things work inside the setting
for Str
sorear moritz_: Why?
That was my objection
moritz_ sorear: dunno
sorear rakudo: my Str $x = 'an&sk'; $x.s('&', '&amp;').say;
p6eval rakudo e393c7: OUTPUT«Too many positional parameters passed; got 3 but expected 1␤current instr.: 'perl6;Str;s' pc 481174 (src/gen/core.pir:69982)␤»
sorear rakudo: my Str $x = 'an&sk'; $x.s.say; 07:13
p6eval rakudo e393c7: OUTPUT«Any()␤»
moritz_ wtf is Str.s?
sorear good question
07:34 iblechbot left 07:56 mituol joined
eternaleye sorear: re following p6l, I did read that thread, but I was responding with something that would work as of this moment 08:00
08:04 lestrrat is now known as lest_away
eternaleye Or at least, did work when I last saw it 08:05
08:09 REPLeffect left 08:11 REPLeffect joined 08:15 agentzh joined 08:17 bradb left 08:19 molaf joined, molaf left
sorear Why isn't 'my' the default for packages, classes, and roles? 08:20
08:21 molaf joined
moritz_ sorear: I've thought about it a few minutes, and didn't come up with a good answer 08:28
maybe it's because methods often expose dependent types 08:29
and if you forget to 'is export' those, it will be confusing for the user 08:30
08:33 Garen joined 08:37 molaf left
eternaleye rakudo: grammar PseudoPrintf { regex escaped-special { '%%' | '\\\\' }; regex backslash-seq { '\\n' }; regex percent-seq { '%d' }; regex other { <-[%\\]>+ }; regex TOP { (<escaped-special>||(<backslash-seq>|<percent-seq>|<other>))+ }; }; class Actions { has @!pieces; method backslash-seq( $/ ) { make( "\n" ); }; method percent-seq( $/ ) { make ~+@!pieces.shift(); }; method other( $/ ) { make ~$/; }; method escaped-special( $/ ) { make ~$/; }; 08:41
method TOP( $/ ) { make( [~] $/>>.ast ); }; method new( *@stuff ) { self.bless( :pieces( |@stuff ) ); }; }; my $foo = PseudoPrintf.parse( 'foo\\\\n\\n%%d%da', :actions( Actions.new( '007' ) ) ); say $foo;
08:41 mituol left
p6eval rakudo e393c7: OUTPUT«regex assertion not terminated by angle bracket at line 11, near "-special>|"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤» 08:41
eternaleye rakudo: grammar PseudoPrintf { regex escapedspecial { '%%' | '\\\\' }; regex backslashseq { '\\n' }; regex percentseq { '%d' }; regex other { <-[%\\]>+ }; regex TOP { (<escapedspecial>||(<backslashseq>|<percentseq>|<other>))+ }; }; class Actions { has @!pieces; method backslashseq( $/ ) { make( "\n" ); }; method percentseq( $/ ) { make ~+@!pieces.shift(); }; method other( $/ ) { make ~$/; }; method escapedspecial( $/ ) { make ~$/; }; method TOP( 08:43
$/ ) { make( [~] $/>>.ast ); }; method new( *@stuff ) { self.bless( :pieces( |@stuff ) ); }; }; my $foo = PseudoPrintf.parse( 'foo\\\\n\\n%%d%da', :actions( Actions.new( '007' ) ) ); say $foo;
p6eval rakudo e393c7: OUTPUT«Malformed parameter at line 11, near ""␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
sorear Subs are sigil-less in NQP!?
eternaleye I think I may have stumbled on a problem with grammars: regexes in them are named by identifiers, which permit hyphens... but subrules expect hyphens to mean character set theory math. Is this an actual problem, or am I mistaken? 08:44
sorear Can you golf an example for me? 08:45
eternaleye Also, I have no clue how to diagnose that last error. I'm trying to make a proof-of-concept for using a grammar for (strftime|sprintf) 08:46
rakudo: grammar Foo { regex bar-baz { . }; regex TOP { <bar-baz> }; }; say Foo.match( 'a' ); 08:47
p6eval rakudo e393c7: OUTPUT«regex assertion not terminated by angle bracket at line 11, near "-baz> }; }"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
sorear eternaleye: I recommend newlines, it will make you much saner 08:48
eternaleye sorear: Yeah, probably a good idea
I wrote that in the input widget of my IRC client
moritz_ eternaleye: it's a problem in nqp-rx 08:49
eternaleye moritz_: Okay
I just wasn't sure if the spec addressed the issue, or if it was purely implementation error
moritz_ eternaleye: afaict the spec says that if you mean character class composition, you have to start with + or - 08:51
eternaleye: so <+ foo - bar> or so
std: /<+ foo - bar>
p6eval std 30474: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/YCInv8gE0y line 1 (EOF):␤------> /<+ foo - bar>⏏<EOL>␤Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/YCInv8gE0y line 1 08:52
..(EOF):…
moritz_ std: / <+foo-bar> /
eternaleye Ah, cool. Thanks
p6eval std 30474: OUTPUT«ok 00:01 107m␤»
eternaleye OTOH, shiny bugreports for nqp-rx go where? TT or RT ?
std: grammar Foo { regex bar-baz { . }; regex TOP { <bar-baz> }; }; say Foo.match( 'a' ); 08:53
p6eval std 30474: OUTPUT«ok 00:01 108m␤»
eternaleye std: grammar PseudoPrintf { regex escaped-special { '%%' | '\\\\' }; regex backslash-seq { '\\n' }; regex percent-seq { '%d' }; regex other { <-[%\\]>+ }; regex TOP { (<escaped-special>||(<backslash-seq>|<percent-seq>|<other>))+ }; }; class Actions { has @!pieces; method backslash-seq( $/ ) { make( "\n" ); }; method percent-seq( $/ ) { make ~+@!pieces.shift(); }; method other( $/ ) { make ~$/; }; method escaped-special( $/ ) { make ~$/; }; 08:54
method TOP( $/ ) { make( [~] $/>>.ast ); }; method new( *@stuff ) { self.bless( :pieces( |@stuff ) ); }; }; my $foo = PseudoPrintf.parse( 'foo\\\\n\\n%%d%da', :actions( Actions.new( '007' ) ) ); say $foo;
moritz_ eternaleye: if they manifest in rakudo -> RT
p6eval std 30474: OUTPUT«===SORRY!===␤Unable to parse block at /tmp/yb08spaWVm line 1:␤------> nt-seq>|<other>))+ }; }; class Actions {⏏ has @!pieces; method backslash-seq( $/ ␤Couldn't find final '}'; gave up at /tmp/yb08spaWVm line 1 (EOF):␤------> hod
..escaped-sp…
eternaleye Hm, LTA error message.
..Or maybe that's because the indicators are messed 08:55
I'll try it locally
09:13 finanalyst left 09:19 M_o_C joined 09:26 _jaldhar joined, jaldhar left 09:36 cognominal left, cognominal joined 10:05 IllvilJa joined
sorear What's the best version of Parrot to use for Rakudo? 10:14
If I implement FOREIGN:: in Rakudo, should I add it to the Perl6 spec in conjectural/experimental brackets? 10:15
10:18 bbkr joined 10:25 Garen left
moritz_ sorear: currently the 2.3 release 10:35
sorear: and yes, feel free to hack the spec
sorear oh good 10:36
I was wondering if it was supposed to be an lwall-only zone
sorear wonders if downgrading the installed Parrot will break anything 10:37
Is there an up to date list anywhere of the spectests alpha passes and master doesn't? 10:38
moritz_ sorear: grep '^#' t/spectest.data # basically 10:40
bbkr how can i rebuild parrot (built with Configure.pl --gen-parrot)? if i do "make clean" and run Configure.pl again it says parrot is already built. 10:41
moritz_ bbkr: rm -rf parrot_install/ 10:42
bbkr trying..
moritz_ bbkr: then perl Configure --gen-parrot
10:42 XaeroOne joined
bbkr thanks, it works. and it detected ICU this time :) 10:44
10:47 JimmyZ joined
moritz_ :-) 10:50
sorear random thought: compiling Parrot with optimizations might make Rakudo builds even faster
moritz_ sorear: --gen-parrot already does that 10:51
10:51 Xaero joined
moritz_ uhm, at least it did that last I looked 10:51
sorear moritz_: as a blizkost hacker I need to have Parrot installed globally
also, I patch parrots 10:52
that would be very awkward to do in rakudo's lab
10:53 XaeroOne left 11:01 REPLeffect left, REPLeffect joined 11:05 agentzh left 11:22 Xaero left 11:23 XaeroOne joined
sorear 17m9s real 12m6s user \o/ 11:29
11:29 _jaldhar left 11:31 pmurias joined 11:32 XaeroOne left, _jaldhar joined 11:42 wknight8111 joined
sorear hi 11:43
moritz_ waves
11:43 ruoso left
sorear Ok, the first exception which is thrown is from Namespace.add_sub 12:00
Namespace.add_sub is called on a P6opaque object
which is not a sub, so... fail
the P6opaque object has a class of "Method" 12:03
moritz_ has blogged: perlgeek.de/blog-en/perl-6/you-are-...nough.html 12:04
sorear so Rakudo is adding a P6opaque Method to Integer named ACCEPTS 12:07
any Rakudo backend experts around? 12:09
oh, interesting 12:12
that "error" occurs even with -e ''
not my problem
moritz_ well, every Perl 6 type needs an ACCEPTS methods for smart-matching 12:15
12:16 jaffa4 joined
sorear Yet... NameSpace throws it out with an exception 12:16
jaffa4 HI
sorear ~6 of them on each Perl6 start
jaffa4 what does pugs do with perl6?
does it interpret it or compiles into something? 12:17
12:18 M_o_C left
sorear interpret 12:20
moritz_ compile 12:23
now you have two contradicting answers. Look in the source to find the truth! 12:24
12:24 M_o_C joined
moritz_ afk 12:25
jnthn o/ 6folk 12:43
sorear hello 12:48
jnthn: can you tell me if I've broken the build?
13:02 ReiniUrban joined
jnthn sorear: of blizkost? 13:03
sure, moment
13:03 rurban left, ReiniUrban is now known as rurban 13:04 JimmyZ left
jnthn sorear: immediate FAIL. 13:04
NMAKE : fatal error U1073: don't know how to make 'src\pmc\p5sv.c'
sorear rakudo: pir::load_bytecode("perl5") 13:05
er
p6eval rakudo e393c7: OUTPUT«"load_bytecode" couldn't find file 'perl5'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sorear rakudo: pir::load_bytecode("PCT.pbc")
p6eval rakudo e393c7: OUTPUT«Parent isn't a Class.␤current instr.: 'parrot;P6metaclass;add_parent' pc 224 (runtime/parrot/library/P6object.pir:232)␤»
sorear we can't use PCT from inside rakudo :/
jnthn: Huh.
jnthn sorear: We already do load_bytecode 'P6Regex.pbc' 13:06
Which pulls in the needed bits, including PCT, afaik.
sorear Huh? 13:07
13:07 k23z__ joined
sorear P6Regex is not mentioned anywhere in blizkost 13:08
Removing the load_bytecode "PCT.pbc" line from perl5.pir makes it possible to load Blizkost into Rakudo
13:08 Dunearhp joined
sorear at the cost of breaking the test suite 13:09
so I'm very tempted to fix the test suite to not depend on PCT
jnthn Well, what I'm wondering is if we're attempting to load it twice and the second time explodes. 13:10
sorear stefan@stefans:~/blizkost$ parrot-nqp -e 'pir::load_bytecode("PCT.pbc"); pir::load_bytecode("PCT.pbc")' 13:11
stefan@stefans:~/blizkost$
the actual point of failure I have traced to the 'onload' sub in compilers/pct/PCT/Grammar.pir 13:12
PGE::Grammar is evaluating to PMCNULL
jnthn Wait..PGE?!
sorear yes
jnthn Ouch. PGE is no longer used by Rakudo.
sorear PCT::Grammar extends from PGE::Grammar 13:13
jnthn OK, I thought in nqp-rx that became HLL::Grammar
sorear nqp-rx doesn't define a PCT::Grammar 13:14
Perl6::Grammar extends from HLL::Grammar
jnthn Right.
My point being that I think PCT.pbc may contain the legacy compiler toolchain stuff.
sorear so, blizkost currently depends on PGE, which has trouble loading into Rakudo
jnthn Which doesn't mix well with the new stuff.
sorear Legacy compiler toolchain stuff? 13:15
jnthn PGE was the first grammar engine that was produced. Rakudo alpha used it.
sorear NQP-rx itself can load PGE fine
PCT too
jnthn Then nqp-rx was developed. It doesn't depend on PGE - it's a standalone grammar engine.
Thus Rakudo doesn't use PGE these days. 13:16
sorear Why does trying to load PGE into Rakudo blow up, though?
jnthn No idea.
I was more suggesting that maybe you don't need to be loading PGE in Blizkost, and instead could be using the new stuff instead. 13:17
sorear So, in light of the fact that we're actually using PGE, do you think removing that dep is a good idea? Pretty much all we're using it for is the REPL
mm, I'll try 13:18
13:20 REPLeffect left
sorear rakudo: pir::load_bytecode("HLL.pbc") 13:31
p6eval rakudo e393c7: ( no output )
sorear odd 13:32
HLL uses PCT
13:33 REPLeffect joined
sorear oh hmm different components. 13:33
worth a try.
13:34 bbkr left
sorear that was easy. 13:35
I now have Blizkost loaded into Rakudo
13:36 M_o_C left
jnthn \o/ 13:38
sorear jnthn: can you test the latest patch? 13:40
jnthn sorear: Builds, installs, but almost the whole tests fail. 13:42
sorear Do any of the actual tests fail? 13:43
jnthn "actual tests"?
sorear Or just end segfaulting?
jnthn oh, looking closer... 13:44
I think maybe just end segfaults.
Yes, just end segfaults. 13:45
But much more wide-spread than previously.
sorear ok, next up: try to implement :from 13:47
jnthn \o/
pmurias is there a pretty printer for p6? 13:48
sorear yes
er
maybe
jnthn sorear: You'd want to edit src/Perl6/Module/Locator.pm
sorear I don't think we have an indent
jnthn arch
s/Locator/Loader/
Locator you probably don't need. 13:49
(need to change, that is)
sorear jnthn: rakudo build time down from 45m to 15m btw
jnthn :-)
sorear It occurred to me that building Parrot with -O might help.
13:52 masak joined
masak good day, #perl6! 13:52
phenny masak: 00:31Z <JimmyZ> tell masak Is any bug there? irclog.perlgeek.de/perl6/2010-04-24#i_2259960
masak looks
no, it looks like I'd expect. 13:53
sorear jnthn: need Foo::Bar; Foo::Bar.new; # I can't find the code that installs Foo::Bar in the lexpad
jnthn sorear: In the file I pointed you at become. 13:55
sorear: see stub_lexical_imports
And also import
(methods)
lolitsmaak!
masak jnthn: lol! 13:57
sorear How do I get adverbs into import?
masak jnthn: look! I can haz grammars in GGE! gist.github.com/378420
jnthn sorear: Already done 13:59
sorear: Well
They're passed to need 14:00
I guess you're talking about :from<...> ?
sorear Just passing them to need isn't good enough.
Or rather
I need more than just the name in import
"CGI" is an ambiguous module name without reference to the source
and, ideally, I'd get arguments too 14:01
blizkost already has support for get_exports($cgi_loaded_module_handle, ":xhtml")
jnthn Yeah, we don't handle those tags yet in Rakudo 14:03
The thing is that use is broken into two parts 14:04
need and import
Which can both be done independently.
masak jnthn: oh noes! NPW postponed! :(
jnthn masak: I just read that email. :-(
masak :(
14:04 hercynium joined
jnthn :-( 14:04
The proposed new date is...curious. 14:05
masak how so?
jnthn Immediately after YAPC::Europe
sorear Also, need() doesn't seem to handle lexical module stubbing.
masak jnthn: oh right.
jnthn sorear: It shouldn't.
need is purely "load this thing"
If the module installs things in the global namespace by virtue of being loaded, so be it. 14:06
import is the thing that actually stubs lexicals etc.
sorear: I think what you're running aginst is that as we have it now, a: 14:07
use Foo:from<perl5>;
Calls need with the :from adverb and import without it
I suspect we may need to fix that.
And maybe fix S11 along with it.
sorear jnthn: S11:222
S11:222 specifies that 'need' installs precisely one lexical 14:08
this is what makes need Foo::Bar; Foo::Bar.new work
masak hm. I think p6l has just gone from being abstraction austronauts to pinpointing the central 'paradox' of DateTime: it must be in core, but it's too complex to be in core.
that's the problem we've been trying to solve in the past few weeks, by aiming for a have-cake-eat-cake compromise. 14:09
masak jumps into the fray
14:10 JimmyZ joined
masak JimmyZ: thanks for your message. no, I didn't see any bug there. 14:11
sorear As long as Rakudo doesn't actually implement lexical modules, classes, and roles, we can get away with not injecting a lexical in 'need' 14:12
JimmyZ masak: alpha is diferent from rakudo
masak: which one is right?
masak JimmyZ: can you be more specific?
please show the difference you're asking about.
pugssvn r30475 | pmurias++ | [mildew] the perlesque backend produces code for say "Hello World" that 14:13
r30475 | parses
JimmyZ ok
rakudo: my $b = &time; say &$b; 14:14
p6eval rakudo e393c7: OUTPUT«␤»
JimmyZ alpha: my $b = &time; say &$b;
p6eval alpha 30e0ed: OUTPUT«time␤»
JimmyZ alpha: my $b = &time; say &$b();
p6eval alpha 30e0ed: OUTPUT«1272203938.46735␤» 14:15
JimmyZ rakudo: my $b = &time; say &$b();
p6eval rakudo e393c7: OUTPUT«␤»
takadonet morning all
masak takadonet: \o
jnthn sorear: Well, we do implement lexical classes (as of last night).
masak rakudo: my $b = &time; say $b();
p6eval rakudo e393c7: OUTPUT«1272203984.27821␤»
jnthn sorear: But I'd still expected them to be handled in the import
Not in need.
:/
takadonet back to bioperl6 hacking! 14:16
masak yay!
jnthn disagrees with a couple other bits on S11 too, though at least those bits are marked conjectural
masak JimmyZ: viv seems to indicate that alpha was right there. 14:17
i.e. that &$b() should be parsed as (&$b).()
masak submits rakudobug
JimmyZ++
JimmyZ rakudo: my $b = &time; say &$b; 14:18
p6eval rakudo e393c7: OUTPUT«␤»
JimmyZ alpha: my $b = &time; say &$b;
p6eval alpha 30e0ed: OUTPUT«time␤»
masak JimmyZ: I can't say anything about that one.
JimmyZ: stringification of subs may well be implementation-dependent.
JimmyZ alpha: my $b = &time; say $b;
p6eval alpha 30e0ed: OUTPUT«time␤»
jnthn rakudo: my &b = &time; say &b;
JimmyZ rakudo: my $b = &time; say $b;
p6eval rakudo e393c7: OUTPUT«time␤»
masak oh. 14:19
masak submits rakudobug
:)
jnthn is a tad confused what the &$ combination is doing.
As in, what it should do.
sorear My personal opinion is that class, module, and role should become lexical by default
then a normal Perl 6 program will often use no namespaces at all 14:20
diakopter ditto
JimmyZ masak: for these two examples, alpha is right? 14:21
masak JimmyZ: yeah, I think so.
jnthn sorear: That has been discussed before.
diakopter global-by-default is JS style
jnthn And the decision was that they remain our-scoepd by default. 14:22
sorear When? 14:23
jnthn I forget exactly; maybe search the irclogs 14:24
14:25 dual left
sorear I get it now. Import doesn't need adverbs because the module is, fully resolved, already in scope 14:27
(in the lexpad even in most cases)
jnthn sorear: That would seem to make sense, yes.
pmichaud good morning, #perl6 14:28
jnthn sorear: I hadn't envisioned import as needing them, anyways.
pmichaud: morning
JimmyZ morning && evening 14:30
pmichaud masak: (backlog) I thought what I wrote in www.perlmonks.org/?node_id=836636 is exactly what you just said.
Am I misreading?
(what you just said -- irclog.perlgeek.de/perl6/2010-04-24#i_2260517 ) 14:31
masak pmichaud: no, I think I replied before I read it all, mostly.
pmichaud okay.
but yes, I agree it's not going to happen, and I agree it really shouldn't happen.
that's what I meant by "although it might be best for Perl 5 today, it might not be best for Perl." 14:32
masak I don't feel quoted out of context or anything. and in the end, it doesn't really matter what I think about a rename. that issue is, and has always been, $Larry's decision.
sorear good morning pmichaud
masak (and I'm glad he wants to keep it "Perl 6")
sorear hmm 14:35
should modules actually go into the lexpad?
I am thinking not since they are forced to be compile time constants
jnthn my class Foo { }; # goes in the lexpad
our class Foo { }; # doesn't
sorear they need to be available to 'import' at parse time
so, instead of the lexpad, they should go into a compiler contextual or something 14:36
jnthn class Foo { }; # same as our
sorear pmichaud? 14:37
pmichaud ? 14:38
sorear pmichaud: your thoughts on my last five lines
pmichaud I think both instances probably go into the lexpad
sorear If modules only go into the lexpad, how will import know what symbols to stub? 14:40
The lexpad isn't available until run time
pmichaud it puts them into the lexpad as well.
oh, it's available at compile-time.
sorear How would I do something like that? 14:41
pmichaud what are you thinking of as being "import"?
I'm thinking along the lines of "use Module;"
sorear the import keyword as defined in S11
pmichaud checking
sorear import Module;
I'm currently working on use Module :from<perl5>; 14:42
I don't want to install a global alias; that would be horrible name pollution
which means a lexical alias, which means that the import phase of the use has to operate on a module that exists only in the lexpad
pmichaud the import keyword is for grabbing symbols from already-loaded-modules 14:43
I can't speak to how this might work with Perl 5, we haven't gotten that far yet.
sorear use Module :from<perl5>; === need Module :from<perl5>; import Module;
pmichaud right. both "need" and "import" are compile-time declarators.
sorear need Module :from<perl5>; installs Module in the lexpad as an alias to perl5;Module 14:44
import Module; finds Module in the lexpad, installs stub symbols, and compiles binding code
pmichaud I don't understand the problem you're seeing, then. 14:45
sorear The problem is that I have no clue how to implement what I just described.
pmichaud I agree that we don't have module lexicals completely implemented in Rakudo yet. 14:46
what Rakudo does now is more "just make something work" than "the right way to do it"
jnthn gotta go - back later 14:47
sorear pmichaud: I was asking how to implement module lexicals, yes
pmichaud sorear: I don't quite have that answer yet, sorry. 14:48
sorear: we have to get nested namespaces working as well.
sorear: and it's also important to remember that the true name of "our class Module { ... }" isn't "Module".
sorear the true name is Class[0x12345678] 14:49
pmichaud no, it's something like Module:auth<...>:ver<...>
what we know as "the longname"
Module is just a shortname shortcut 14:50
even with our class Module { ... } the "Module" part is just a shortname placed into the lexpad. (iiuc)
sorear yes 14:51
pmichaud anyway, Rakudo doesn't do that yet, and I don't think we're close to making that happen. I don't think it's a requirement for R*.
sorear decides to accept the horrid pollution to make his life simpler in the short term
pmichaud sorear: wfm :-)
sorear: that's what we've resorted to doing in the past.
sorear lexical module aliases are a bit big for a first project
pmichaud it's a bit big even for a second project. :) 14:52
sorear incidentally, once I get this working, what should I do with this?
github fork?
ask for a commit bit?
send a patch?
pmichaud send a patch seems most likely
commit bit requires a CLA
jaffa4 the source
14:52 mberends joined
frettled UTSL 14:52
sorear oh, I thought those were only a Parrot thing 14:53
masak signed his CLA when Rakudo was still in the Parrot repo :) 14:57
and the process hasn't changed since Rakudo left the nest.
jaffa4 perl 6 book 14:58
About perl6 book?
So can I write into in whatever style i want to write? 14:59
masak jaffa4: sorry, could you try a bit harder to make any sense?
jaffa4 I read that anyone can write into perl 6 book
that is under construction. 15:00
pmichaud probably need a commit bit
masak aye.
pmichaud and someone will likely take whatever doesn't match the overall style of the boot and edit it to match
jaffa4 I wonder how you avoid that it becomes hybrid book with different styles
pmichaud jaffa4: that's what editing is for :-)
masak jaffa4: we're not really at the point where we try to unify styles and such. but yeah... what pmichaud++ said. 15:01
pmichaud as a general rule, it's far easier to edit something that exists than it is to create something anew. So we'll happily take contributions (even if they don't match our style) and then adjust the style to what we think is best.
if someone doesn't want their contributions being heavily edited, then I recommend not contributing. :-)
(or, even better, start another book) 15:02
jaffa4 I guess so 15:05
sorear hmm 15:06
even creating a *global* package alias is harder than I thought 15:07
use Foo::Bar :from<perl5>;
I need to make perl6;Foo;&Bar to catch Foo::Bar.new
jaffa4 so what do you use for editing?
sorear I need to make perl6;Foo;Bar to catch $Foo::Bar::x
masak rakudo: my Str $x = 'an&sk'; $x.s.say; 15:09
p6eval rakudo e393c7: OUTPUT«Any()␤»
masak alpha: my Str $x = 'an&sk'; $x.s.say;
p6eval alpha 30e0ed: OUTPUT«Method 's' not found for invocant of class 'Str'␤in Main (file src/gen_setting.pm, line 324)␤»
masak submits rakudobug
jaffa4 rakudo: :g//;
sorear rakudo: my %x = :foo<bar baz quux>; say %x<foo>.WHAT;
p6eval rakudo e393c7: OUTPUT«Confused at line 11, near ":g//;"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
rakudo e393c7: OUTPUT«Seq()␤»
sorear rakudo: my %x = :foo<bar>; say %x<foo>.WHAT;
p6eval rakudo e393c7: OUTPUT«Str()␤»
masak std: :g//
p6eval std 30475: OUTPUT«===SORRY!===␤Bogus term at /tmp/DPXJBh6nds line 1 (EOF):␤------> :g//⏏<EOL>␤Parse failed␤FAILED 00:01 110m␤»
jaffa4 rakudo: m:g//; 15:10
p6eval rakudo e393c7: OUTPUT«Confused at line 11, near "m:g//;"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
jaffa4 rstd: m:g//;
std: m:g//;
p6eval std 30475: OUTPUT«===SORRY!===␤Null pattern not allowed at /tmp/SkM64pwWEW line 1:␤------> m:g/⏏/;␤Null pattern not allowed at /tmp/SkM64pwWEW line 1:␤------> m:g/⏏/;␤Null pattern not allowed at /tmp/SkM64pwWEW line 1:␤------>
..m:g/⏏[…
masak jaffa4: adverbs on m// and s/// are not implemented in Rakudo yet.
jaffa4: patches are, as usual, welcome.
colomon 15:11
loliblogged: justrakudoit.wordpress.com/2010/04/...-numerals/
sorear :foo<a> - this is a Str value
frettled uhoho!
sorear :foo<a b> - this is a Seq value
masak sorear: yes.
sorear how do I treat them the same in idiomatic perl 6?
my $fst = ... 15:12
my $snd = ... // ...;
masak colomon++ # lambda goodness 15:13
jaffa4 std: m:g/u/;
p6eval std 30475: OUTPUT«ok 00:01 107m␤»
masak sorear: not sure I understand the question. are you a Perl 6 application programmer when you ask that? 15:17
sorear rakudo: say <a>.WHAT;
p6eval rakudo e393c7: OUTPUT«Str()␤»
masak and what does 'treat them the same' mean here?
sorear masak: library programmer
I want to write a function which will work for both <x> and <x y>
masak sorear: probably loop over $a.list
or @$a
sorear even though Str and Seq have so little in common
masak that oughta cover you. 15:18
sorear rakudo: my $a = <x>; say @$a[0]
p6eval rakudo e393c7: OUTPUT«Confused at line 11, near "say @$a[0]"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
sorear rakudo: my $a = <x>; say (@$a)[0]; say (@$a)[1] // "foo";
p6eval rakudo e393c7: OUTPUT«Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
sorear rakudo: my $a = <x>; say $a.list[0]; say $a.list[1] // "foo"; 15:19
p6eval rakudo e393c7: OUTPUT«x␤foo␤»
sorear rakudo: my $a = <y z>; say $a.list[0]; say $a.list[1] // "foo";
p6eval rakudo e393c7: OUTPUT«y␤z␤»
sorear excellent.
masak \o/ 15:20
sorear rakudo: my ($a, $b) = <y z>; say $a; say $b;
p6eval rakudo e393c7: OUTPUT«y␤z␤»
sorear rakudo: my ($a, $b) = <y>; say $a; say $b;
p6eval rakudo e393c7: OUTPUT«y␤»
sorear rakudo: my ($a, $b) = <y z w>; say $a; say $b; 15:21
p6eval rakudo e393c7: OUTPUT«y␤z␤»
15:23 _buno_ joined 15:25 dual joined
masak colomon: you're an unwitting victim of rt.perl.org/rt3/Ticket/Display.html?id=73034 15:26
colomon: this works: gist.github.com/378479
JimmyZ rakudo: say &time - 1; 15:27
p6eval rakudo e393c7: OUTPUT«Method 'Num' not found for invocant of class 'Perl6Sub'␤current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)␤»
JimmyZ alpha: say &time - 1;
p6eval alpha 30e0ed: OUTPUT«get_number() not implemented in class 'Sub'␤in Main (file <unknown>, line <unknown>)␤»
JimmyZ wow, new error info.
masak JimmyZ: in Perl 6 '&time' means "the sub (object) '&time'"
JimmyZ: it's not a call to the sub; for that you need .() 15:28
takadonet stupid RT: rt.perl.org/rt3/Public/Bug/Display.html?id=74078 You block me again!
JimmyZ masak: I see, I just want to know whether the error message is right or not.
masak new error makes quite good sense to me. 15:29
you're trying to numify a sub.
it doesn't have a .Num method, because numifying a sub doesn't make much sense.
JimmyZ masak: as you saw, yestersay it was the same error message. 15:30
rakudo: say &time.() - 1; 15:31
p6eval rakudo e393c7: OUTPUT«1272208510.27513␤»
JimmyZ rakudo: say &time() - 1;
p6eval rakudo e393c7: OUTPUT«1272208522.5523␤»
masak JimmyZ: somehow I get the feeling from the past few days that you're really eager to do something which involves the time function. :) 15:32
JimmyZ masak: Nope, I just act as a Perl 6 user, and write some code to find some bugs 15:33
masak JimmyZ++
I find it's easiest to act a Perl 6 user by writing Perl 6 code to some ultimate end, though. 15:34
takadonet rakudo: role work { method x {say 'hello'}}; class me does work {}; me.new.x();
p6eval rakudo e393c7: OUTPUT«Could not find sub &say␤current instr.: 'perl6;work[];x' pc 574 (EVAL_1:222)␤»
takadonet Is there a work around that?
It's already reported as a bug
JimmyZ masak: what I think is that non-normal code is easy to find some bug. 15:35
masak takadonet: 'fraid the workaround is not to use roles... :(
JimmyZ err, bugs
masak JimmyZ: yes, that's true too.
15:35 _buno_ left
JimmyZ masak: so I like write these non-normal code. 15:35
masak thinking laterally might lead to new finds.
takadonet masak: not the answer I was looking for :(
masak takadonet: I understand that. let me know if you find a better answer. :/ 15:36
JimmyZ good night && good afternoom to masak I think. good now to all. 15:37
15:37 JimmyZ left
takadonet JimmyZ: good night 15:37
masak rakudo: our &s = &say; role A { method foo { &s("OH HAI") } }; class B does A {}; B.new.foo
p6eval rakudo e393c7: OUTPUT«OH HAI␤»
masak takadonet: that seems to work.
takadonet !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
masak: thanks! 15:38
masak I aim to please :)
takadonet I can undo 3 hacks in my code now!
masak adds that to the ticket
takadonet MUHAHAH
15:40 bbkr joined
masak rakudo: grammar G { regex TOP { <foo> a }; regex foo { a* } }; say ?G.parse("aaa") 15:50
p6eval rakudo e393c7: OUTPUT«0␤»
masak alpha: grammar G { regex TOP { <foo> a }; regex foo { a* } }; say ?G.parse("aaa")
p6eval alpha 30e0ed: ( no output )
masak locally, alpha gives me '1', which is the correct answer.
moritz_ agrees 15:51
masak there's rt.perl.org/rt3/Ticket/Display.html?id=73608 in RT already. 15:52
this one is clearly related; is it identical, or should I submit a new one for this one?
capturing parens and subrules are related but not identical.
15:53 bbkr left
masak (and given that the former doesn't work, I'm not surprised that the latter doesn't, either) 15:53
though I *am* surprised that the Perl 6 grammar in Rakudo doesn't suffer more from these bugs. 15:54
moritz_ colomon: in your last blog post, "Church Numerals" is a link to your RSS feed - is that by intention?
masak: it mostly uses tokens anyway
masak right. not much backtracking going on in the first place.
15:58 hercynium left
mberends sport the mistake in the "countdown until 4.6 M1" timer 3 minutes ago on site.icu-project.org/ : 1398 hours : 60 minutes : 23 seconds 16:02
diakopter sport? 16:03
masak '60 minutes'?
mberends gah, spot!
masak++ wins the prize!
"leap hours" ?
moritz_ leap minutes 16:04
masak well, it's a duration, so I guess '60 minutes' is not strictly wrong. that's not to say it's not odd. :)
16:05 Spreadsheet_ joined
Spreadsheet_ Has anyone been working on an interactive Perl 6 interpreter (similar to the one I suggested)? 16:06
masak you mean since you asked last time? :) 16:07
or at all?
Spreadsheet_ Since I asked last time
Hi masak
masak hi 16:08
no. that was like, a few days ago. :)
if you're so eager to see it happen, you should try writing it yourself... :)
Spreadsheet_ ok 16:09
jaffa4 masak's first rule: do it yourself.
masak Spreadsheet_: but if you're interested in what exists today, do check out Pugs and Rakudo. they both have REPLs. 16:10
moritz_ rakudo has more of a REL
masak read that as 'FAIL' :P
interesting question for when Rakudo gets the 'P' in 'REPL': should it print the .Str of the result, or the .perl? 16:12
diakopter perlesque has more of a RE, where E stands for Error
pmurias ;)
moritz_ masak: .perl is usually more interesting
masak Yapsi has a local branch on my laptop called 'repl' :)
moritz_ masak: and iirc that's what pugs does, too
masak ok.
dancing class & 16:13
16:13 masak left 16:14 rv2733 joined
diakopter TimToady: does a while () { } loop retain the inner scope across iterations (preserving contextual assignments) or does it reinitialize/revert them at the end of each iteration? 16:17
Spreadsheet_ You could find out
16:17 TiMBuS joined
diakopter Spreadsheet_: what? 16:18
lisppaste3 Spreadsheet_ pasted "while loop" at paste.lisp.org/display/98318 16:19
Spreadsheet_ You could try something like that
moritz_ that's not contextuals 16:20
Spreadsheet_ How come we're using paste.lisp.org as the nopaste, but it doesn't have Perl highlighting? :S
16:20 iblechbot joined
Spreadsheet_ What's contextual? 16:20
moritz_ see S02 (iirc)
because nearly nothing does really good Perl 6 hilighting
Spreadsheet_ Is that because Perl is hard to parse? 16:22
diakopter S04 talks about contextuals
(not really S02)
moritz_ Spreadsheet_: yes
diakopter++ 16:23
diakopter er.
diakotper--
S04 talks about dynamic scoping for contextuals 16:24
but doesn't mention "contextual"
sigh.
but I can't find them in S02 anymore, though they were once there. 16:26
Spreadsheet_ AhH!
I am in FF and try Ctrl-F for "contextual". It freezes when I get to context
diakopter it's not frozen; it's just slow 16:27
b/c it's so big
16:28 xinming_ left, nihiliad joined 16:30 xinming joined
diakopter weird. they used to be mentioned much more in S02 moritz_++ 16:31
moritz_ no, because of the hidden text and javascript fu 16:33
16:33 guotr left
colomon phenny: tell masak Good catch! 16:40
phenny colomon: I'll pass that on when masak is around.
16:49 jonrafkind joined, molaf joined 17:02 fridim left
jnthn back for a bit 17:03
colomon o/ 17:05
pmichaud "contextual" is probably a fossil... iirc they're now called "dynamic variables" 17:11
diakopter behind the times
Spreadsheet_ hmm
17:11 patrickas joined
Spreadsheet_ ok 17:11
pmichaud $*foo dynamically overridable global variable
see also S02:2507 17:12
and S02:2541
patrickas hello guys, is there some sort of (semi) official bug tracker for rakudo ? 17:13
pmichaud patrickas: rt.perl.org
patrickas thanks pmichaud
pmichaud patrickas: to submit bugs, it's [email@hidden.address]
Spreadsheet_ Does perl have "docstrings" like Python?
pmichaud see the Rakudo README
Spreadsheet_: yes, it's called POD. :-)
Spreadsheet_ I knew it
patrickas pmichaud no nothing to submit, just thought i'd waste time reading bug reports :-) 17:14
Spreadsheet_ So can I bring up something like a man page for variables?
pmichaud Spreadsheet_: we don't have it implemented yet, but S26 is working towards figuring out how that might work
Spreadsheet_ In Python you can do help("string") and it would give you the documentation for strings
pmichaud see especially the sections about '#=' markers. 17:15
moritz_ heh, all those comments on github commits suddenly :-)
Juerd Spreadsheet_: Unfortunately they do this instead of providing normal manpages.
moritz_ maybe that's because I linked to some commits in my last blog post
patrickas moritz_ no doubt about that .... 17:16
colomon moritz_++
jnthn moritz_: I noticed that. It's a good idea in that people can see, "oh, it's not actually scary at all" :-)
colomon what an awesome post! 17:17
moritz_ I have an idea to attract some more contributors
a series of articles 'this week's contribution to Perl 6'
where at the start of week we present some kind of simplish change
like, documentetion $function in place $x
or implement $small_feature
or fix LHF $bug 17:18
and post that onto a blog, perlmonks etc
patrickas moritz_ I am not sure about how easilly it can be done but maybe a list of things that need anyone to spend some time workingon
moritz_ and guide people in the right direction
Spreadsheet_ S26 hasn't been updated since 2007!
:o
17:18 bradb joined
moritz_ patrickas: something along these lines... but lists are hard to come up with, and have the problem of forcing people to chose something 17:19
pmichaud Spreadsheet_: you're looking at an outdated copy of S26 then
moritz_ so it should be tasks that we basically know how to do
pmichaud Spreadsheet_: svn.pugscode.org/pugs/docs/Perl6/Sp...tation.pod
Spreadsheet_ perlcabal.org/syn/S26.html ?
pmichaud afk, fetching lunch
moritz_ so that we can actually guide people
Spreadsheet_ oh ok
moritz_ Spreadsheet_: the .html isn't updated because we have no tool yet for parsing the new S26
patrickas yea i know ... actually that's why I am here asking about the bug tracker ... I was hoping to find a list of "aproachable" bugs if such things can be found before the fact
Spreadsheet_ There's nothing to convert perl 6 POD -> HTML? 17:20
moritz_ patrickas: some of the tickets might have an LHF (for low-hanging fruit) in the subject
patrickas: those might be good to look at
Spreadsheet_: correct
diakopter o_O perlcabal.org/svn/pugs/revision/?rev=30461
Spreadsheet_ Is POD hard to parse, like Perl?
patrickas I guess that's exactly what's needed!
Juerd Spreadsheet_: No, parsing POD is much easier. 17:21
moritz_ Juerd: don't say that
17:21 iblechbot left
moritz_ Juerd: the newest S26 requires a full Perl 6 parser 17:21
(iirc)
Juerd moritz_: If that's true then that's just insane.
moritz_ though you can go a long way without one
Juerd Not having to parse Perl is one of the great things about POD. 17:22
moritz_ Juerd: has that ever stopped Damian from doing something? :-)
Juerd moritz_: I meant the bad kind of insane
diakopter Juerd: yes, well, it is. 17:23
according to S01, S26 is still quite (relatively) speculative 17:24
moritz_ and it surely is
diakopter .. and ISTR Damian sending a message to p6l "handing over" the S26 spec to the mailing list/community, in a "here, you take it" kind of way.... maybe I misread it, though. 17:25
moritz_ diakopter: nope, you're right
diakopter therefore, no one should feel blocked on making alternative/drastic suggestions/changes themselves, imho. 17:26
(to p6l, probably)
moritz_ anyway, the "This week's contribution to Perl 6" is something I'd like to do together with others, just like the Perl 6 advent calendar
any takers?
diakopter sure 17:27
colomon moritz_: My time is going to be pretty limited for the next few weeks, but I take it you're thinking of something longer term than that? 17:28
moritz_ colomon: yes... maybe start in a week, and then every taker can come up with a challenge for one week, and everybody helps the new contributors 17:29
colomon that sounds awesome. count me in.
moritz_ count is up to three, then :-) 17:30
slavik s26 is documentation though
where can I read about exceptions in Perl? 17:32
Perl6*
moritz_ slavik: S04 17:33
slavik ty
17:33 M_o_C joined 17:35 wormphlegm joined
slavik hmm, it's an interesting twist on java's try/catch 17:35
moritz_: are exceptions in Perl6 "expensive"? 17:36
moritz_ slavik: I hope not
slavik afaik, in java/c++ they are 17:37
17:37 molaf_ joined
slavik looks like Perl6 moves the catch inside the code that can throw an exception. java appears to make the catch global for a bunc of code 17:37
am I understanding this right??
moritz_ slavik: yes. Having the CATCH inside the try has the advantage of having all the interesting variables still in scope 17:38
and thus enablling better error messages without need for making the scope larger
17:40 molaf left
diakopter moritz_: will this be published on your blog? 17:41
pugssvn r30476 | moritz++ | directory [helpnow] for "This week's contribution to Perl 6"
moritz_ diakopter: I'm not yet sure what the best way of distributing is
slavik the other question I had, is it possible for a Perl6 function to know the scope it is invoked in?
moritz_ slavik: via callframe(), yes 17:42
slavik moritz_: any such thing in Perl5?
moritz_ diakopter: if people want to see it on my blog, I'll blog it. If people want it on a more publicly writable medium, I'm fine with that too
slavik: caller()
though caller() doesn't quite have scope resolution 17:43
there's also $OUTER:: and $CALLER:: in Perl 6
slavik I see, what S is it in?
moritz_ S02 mostly
slavik and lastly (I know this is probably a bad question). How would I do a lazy list generator so that I could do: $blah <= myfunc(); for =$blah -> $i { say $i; } 17:44
moritz_ CALLER is also in S06 and a bit S04
slavik: for myfunc() -> $i { say $I }
slavik moritz_: I mean inside the function, how would I write it ...
if I have a @list or something that generates a list
python has a special keyword for such returns 17:45
moritz_ sub myfunct { gather { while True { take $thing } } }
is one possiblity
or you can map $somefunction, 1..*
slavik I am kinda lost ... which one is the magic, the take or the gather? 17:46
moritz_ slavik: both :-)
slavik err
jnthn slavik: You use them together.
slavik jnthn: ok ...
diakopter moritz_: I was thinking we draft them in svn, then you push to your blog
moritz_ slavik: take() goes outwards dynamically until it finds a take()
slavik err?
moritz_ erm, a gather block
sorry
jnthn *until it finds a gather
slavik ahh
jnthn :-)
17:46 envi^home left
slavik oh, I think I get it 17:47
moritz_ and the return value of gather { ... } is a lazy list
slavik so gather, gathers all values return to it by the appropriate take?
moritz_ so my @a = gather { ...; take $x }; is somethiing like my @a; ... @a.push($x) but lazily
slavik: yes
slavik gotcha 17:48
also, the <= is still lazy assignment, rihgt?
right*
also, inside the function, the $x is automatically static or does it have to be explicitly so? 17:49
colomon take automatically extends the life of $x.
slavik so take "turns" the $x into static?
kewl
I remembered, the python version is "yield" 17:50
moritz_ diakopter: re draft in svn, wfm
jnthn slavik: I think you're thinking of <== (pipe operators)
moritz_ slavik: take() is kind of like yield(), but it's dynamically scoped
so gather { foo() }; sub foo { take 3 }; works 17:51
slavik moritz_: only reason I brought up <== is that it was the one I remember about being a lazy assignment
colomon slavik: you actually have to be careful with that. if you say something like @a = gather { loop my $x = 0; $x < 5; $x++) { take $x; } } what you will get back is an array with five references to the same $x variable.
rakudo 17:52
rakudo: my @a = gather { loop my $x = 0; $x < 5; $x++) { take $x; } }; say @a.perl
p6eval rakudo e393c7: OUTPUT«Missing block at line 11, near "my $x = 0;"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
colomon rakudo: my @a = gather { loop (my $x = 0; $x < 5; $x++) { take $x; } }; say @a.perl 17:53
p6eval rakudo e393c7: OUTPUT«[5, 5, 5, 5, 5]␤»
colomon rakudo: my @a = gather { loop (my $x = 0; $x < 5; $x++) { my $y = $x; take $y; } }; say @a.perl
p6eval rakudo e393c7: OUTPUT«[0, 1, 2, 3, 4]␤»
slavik that's weird
colomon rakudo: my @a = gather { loop (my $x = 0; $x < 5; $x++) { take $x; } }; say @a.perl; @a>>++; say @perl; 17:54
p6eval rakudo e393c7: OUTPUT«Symbol '@perl' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
colomon rakudo: my @a = gather { loop (my $x = 0; $x < 5; $x++) { take $x; } }; say @a.perl; @a>>++; say @a.perl;
slavik @a>>++ ???
p6eval rakudo e393c7: OUTPUT«[5, 5, 5, 5, 5]␤[6, 6, 6, 6, 6]␤»
17:54 Pat__ joined
slavik increment everything? 17:54
colomon increment every element, yes. 17:55
slavik that should work though, right?
my @a = gather { loop (my $x = 0; $x < 5; $x++) { take $x; } };
that
it should do 0..4, no?
colomon no, it should do 5, 5, 5, 5, 5
it's returning the variable $x, and there's only one of those.
slavik so take returns the ref and not the value?
right
Pat__ is undef gone from perl6 ? 17:56
slavik is there a way to tell it to return the value without assigning it to a new var? (I am guessing it gets created).
jnthn Just the same as the parameters when you make a call, fwiw.
Pat__: Yes.
17:56 patrickas left, Pat__ is now known as patrickas
slavik rakudo: my @a = gather { my $x=2; loop (1..5) { take $x*$x; } }; say @a.perl; 17:57
p6eval rakudo e393c7: OUTPUT«Missing block at line 11, near "(1..5) { t"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
jnthn for 1..5 ...
slavik rakudo: my @a = gather { my $x=2; loop (1..5) { $x*=$x; take $x; } }; say @a.perl;
p6eval rakudo e393c7: OUTPUT«Missing block at line 11, near "(1..5) { $"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
slavik rakudo: my @a = gather { my $x=2; loop 1..5 ... { $x*=$x; take $x; } }; say @a.perl;
?
p6eval rakudo e393c7: OUTPUT«Missing block at line 11, near "1..5 ... {"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
jnthn no no, use for.
Not loop 17:58
colomon loop 1..5 is wrong.
patrickas rakudo: say (1, Nil, 2, 3).grep(*.defined).perl
p6eval rakudo e393c7: OUTPUT«(1, 2, 3)␤»
slavik rakudo: my @a = gather { my $x=2; for 1..5 { $x*=$x; take $x; } }; say @a.perl;
patrickas I guess ticket 68714 should be closed then ?
p6eval rakudo e393c7: OUTPUT«[4294967296, 4294967296, 4294967296, 4294967296, 4294967296]␤»
slavik what's the diff between loop and for?
colomon rakudo: my @a = gather { my $x=2; for 1..5 { $x*=$x; take $x; } }; say @a.perl;
p6eval rakudo e393c7: OUTPUT«[4294967296, 4294967296, 4294967296, 4294967296, 4294967296]␤»
colomon slavik: loop is C-style for loop (or endless loop)
for takes a list and applies each element of the list to the block. 17:59
rakudo: my @a = gather { my $x=2; for 1..5 { take $x *= $x; } }; say @a.perl;
p6eval rakudo e393c7: OUTPUT«[4294967296, 4294967296, 4294967296, 4294967296, 4294967296]␤»
slavik I see 18:00
colomon rakudo: my @a = gather { my $x=2; for 1..5 { take $x * $x; $x *= $x } }; say @a.perl;
p6eval rakudo e393c7: OUTPUT«[4, 16, 256, 65536, 4294967296]␤»
colomon rakudo: my @a = gather { my $x=2; for 1..5 { take $_; take $x * $x; $x *= $x } }; say @a.perl;
p6eval rakudo e393c7: OUTPUT«[1, 4, 2, 16, 3, 256, 4, 65536, 5, 4294967296]␤»
slavik ha, neat :) 18:01
diakopter heh
slavik kinda messed up though
that it takes the var and not the value
because you end up doing $x * $x twice
akudo: my @a = gather { my $x=2; for 1..5 { $x *= $x; take $x; } }; say @a.perl; 18:02
colomon rakudo: my @a = gather { my $x=2; for 1..5 { take $_; my $y = $x *= $x; take $y } }; say @a.perl;
p6eval rakudo e393c7: OUTPUT«[1, 4, 2, 16, 3, 256, 4, 65536, 5, 4294967296]␤»
slavik rakudo: my @a = gather { my $x=2; for 1..5 { $x *= $x; take $x; } }; say @a.perl;
p6eval rakudo e393c7: OUTPUT«[4294967296, 4294967296, 4294967296, 4294967296, 4294967296]␤»
slavik so it modifies $x in place ... 18:03
rakudo: my @a <== gather { my $x=2; for 1..5 { $x *= $x; take $x; } }; say @a.perl;
p6eval rakudo e393c7: OUTPUT«[Bool::True]␤»
slavik rakudo: my @a <== gather { my $x=2; for 1..5 { $x *= $x; take $x; } }; say @a;
p6eval rakudo e393c7: OUTPUT«1␤»
slavik rakudo: my @a <= gather { my $x=2; for 1..5 { $x *= $x; take $x; } }; say @a;
p6eval rakudo e393c7: OUTPUT«␤»
18:03 pmurias left
colomon rakudo: say [\**] 2 xx 5 18:03
p6eval rakudo e393c7: OUTPUT«241665536Inf␤» 18:04
colomon Inf?!
slavik lol
colomon rakudo: say ([\**] 2 xx 5).perl
p6eval rakudo e393c7: OUTPUT«(2, 4, 16, 65536, Inf)␤»
colomon rakudo: say ([\**] 2.Num xx 5).perl
slavik colomon: list comprehension?
p6eval rakudo e393c7: OUTPUT«(2, 4, 16, 65536, Inf)␤»
slavik or folding rather
colomon yes, folding.
slavik folding is cool :) 18:05
never quite got it though
no wait ...
I do get it :)
rakudo: say ([+] 2.Num xx 5).perl
p6eval rakudo e393c7: OUTPUT«10␤»
diakopter rakudo: say ([\**] 2.1.Num xx 4).perl
slavik w00t
p6eval rakudo e393c7: OUTPUT«(2.1, 4.74963809174224, 33.9175939121054, 84899120142.8172)␤»
slavik 2.0?
rakudo: say ([\**] 2.0.Num xx 5.Num).perl 18:06
p6eval rakudo e393c7: OUTPUT«(2, 4, 16, 65536, Inf)␤»
slavik why the backslash in square brackets though?
colomon backslash means return all the intermediate values.
leave it off and you will only get the last value on the list. 18:07
slavik ahh
kewl
moritz_ supper & 18:09
colomon rakudo: say [\**] 2, 2, 2, 2, 2 18:18
p6eval rakudo e393c7: OUTPUT«241665536Inf␤»
colomon say 65536 ** 2
diakopter you don't say 18:19
colomon oh, I see.
diakopter oh, say, can you see, now?
colomon rakudo: say 66536 ** 2
p6eval rakudo e393c7: OUTPUT«4427039296␤»
colomon rakudo: say 2 ** 66536 18:20
p6eval rakudo e393c7: OUTPUT«Inf␤»
diakopter ba-dum-ching
colomon where are bignums when you need them?
rakudo: say [\R**] 2, 2, 2, 2, 2
p6eval rakudo e393c7: OUTPUT«241625665536␤» 18:21
colomon rakudo: say ([\R**] 2, 2, 2, 2, 2).perl
18:21 gurjeet left
p6eval rakudo e393c7: OUTPUT«(2, 4, 16, 256, 65536)␤» 18:21
colomon rakudo: say ([\R**] 2 xx 6).perl
p6eval rakudo e393c7: OUTPUT«(2, 4, 16, 256, 65536, 4294967296)␤» 18:22
colomon rakudo++
18:22 lichtkind joined
jnthn -> nom 18:24
diakopter perlesque: my $a = BigInteger.Create("2"); say($a.Power(66536)) # colomon
p6eval perlesque: 18:25
..OUTPUT«214679956518623915152946787279496495055894540527774535773967947011002999053937756663794999459214265101813751968798089292812508524833946676626598138925020776609213175725932752265582465185626291637472662742303326329961657121359048754553685526486203204012942265791813633360212602562707…
colomon perlesque++
afk
diakopter perlesque: my $a = BigInteger.Create("2"); say((($a.Power(66536)).ToString()).Length) # colomon 18:26
p6eval perlesque: OUTPUT«20030␤»
diakopter that's a 20,030-digit integer
perlesquel: . 18:27
p6eval perlesquel: OUTPUT«20030␤real 0.28␤user 0.26␤sys 0.00␤»
diakopter perlesquel: .
p6eval perlesquel: OUTPUT«20030␤real 0.28␤user 0.25␤sys 0.00␤»
diakopter oh yeah, I forgot I got general CLR fields & properties working 18:28
jnthn: ^^
perlesque: my $a = BigInteger.Create("2"); say((($a.Power(166536)).ToString()).Length) 18:32
p6eval perlesque: OUTPUT«50133␤» 18:33
diakopter perlesquel: .
p6eval perlesquel: OUTPUT«50133␤real 2.11␤user 1.96␤sys 0.02␤»
diakopter 50,133 digits is a lot of digits.
18:34 meppl left
diakopter wonders what the CIL for that looks like 18:34
frame = ((_IClosure_1) this.l1).Bind(this, this.l2.Power(0x28a88).ToString().Length); 18:36
(_IClosure_1 is the "say" sub) 18:38
18:39 patrickas left 18:40 nihiliad left, nihiliad joined 18:41 patrickas joined 18:43 isBEKaml joined
takadonet patrickas: welcome back! 18:43
patrickas :-) 18:47
while browsing rt.perl.org I found a couple of rakudo bugs that I think can be closed since they seem to be fixed int the latest rakudo ... what my best course of action to be most helpful and least intrusive? 18:50
takadonet patrickas: I believe the reason they are not closed since we want to make tests to ensure we do not create the same bugs in the future 18:52
patrickas oh ok ... so i suppose my next step shoul dbe to learn how to create tests for these bugs 18:53
takadonet patrickas: Indeed which I don't know how :( 18:54
patrickas: Someone that knows will be on shortly. Normally within a few minutes
patrickas heheh seems like a case of the blind leading the blind :-) well as long as we end up somewhere interesting :-) 18:55
18:55 ruoso joined
takadonet patrickas: Well I don't have any commit bit or know where to send patches to for the spec 18:55
colomon diakopter: I should have realized that. 2 ** $n is going to have about $n / 2.5 digits, at a quick approximation... 19:00
takadonet patrickas: Here is the url for the spec tests: svn.pugscode.org/pugs/t/spec/ 19:01
spinclad 2 ** 10n is about 10 ** 3n
diakopter 2 ** 655360 timed out :) 19:02
CokeBot9000 what's the current state of rakudo on parrot trunk? should I be trying this on a branch?
slavik yeah, I've been waiting for rakudo bignum for a long time :P
diakopter oh heh; colomon's "66536" error propagated quite far till now 19:03
slavik which is why I preferred the haskel version
spinclad CokeBot9000: last i heard rakudo is still at parrot 2.3
CokeBot9000 i know it's borked, just wondering where I should be looking.
colomon spinclad: you're right, not sure how my brain made an off-by-one error there. :) 19:04
spinclad CokeBot9000: ah, dunno then
19:05 wormphlegm left
CokeBot9000 ugh. how do I tell git "I wish to hack on branch FOO that is already available from upstream?" 19:06
colomon git checkout --track -b new_feature_name origin/new_feature_name 19:07
19:07 pmurias joined
colomon I think 19:07
where new_feature_name is the branch name.
CokeBot9000 thank you. (wonder if there's a shorter way to do that.) 19:09
ok. immutable_strings gets much further...
takadonet !! 19:10
colomon CokeBot9000: quite possibly. 19:11
immutable_strings++
pmurias diakopter: who's anteus4?
slavik I think I've bothered everyone here enough that I feel I need to justify my existence. What would my time best be spent on as far as contributing? 19:13
"Complete spec" and "Complete rakudo" are not feasible ...
by me
would the book be a good starting point? 19:15
pmurias "Complete book"? ;)
slavik pmurias: if I could I would 19:16
colomon Actually, I think trying to write code using Rakudo is a great starting point.
slavik I was thinking of contributing my own version of the regex/grammar chapter ... but I hope that wouldn't undermine the work that was already done on it
speaking of which, need to install it 19:17
colomon and very useful to the project as well, we learn something with every project written.
patrickas colomon are there up to date binary rakudo build for various platforms (esp win32 ) ? 19:18
colomon patrickas: not that I know of.
slavik how can I get rakudo to build a pbc out of Perl6 code?
colomon though I think there is a cygwin port of Rakudo that should be only a few days behind at this point.
patrickas ok ... I guess that could do 19:19
takadonet patrickas: what platform are you on?
patrickas windows xp 19:20
but I could use linux if windows turns out o be much of a hassle with regards to rakudo .... 19:21
slavik rakudo, the Linux' killer app :)
finally, it will be the year of the Linux desktop ...
colomon slavik: ./perl6 --target=pir church.pl
diakopter pmurias: anteus4 is jaffa4
slavik target pir?
isn't pir like parrot's header files?
colomon generates pir to stdout instead of running the code.
pir is parrot assembly, more or less. 19:22
I don't know if you can use --target=pbc as well.
slavik how does it compare to pbc? I am confused
colomon (-target=pbc does not work -- just checked.)
I think pir is the human-readable version of pbc. but I could be wrong, I don't tweak internals that much. 19:23
slavik will ask in parrot
hmm, I spelt that wrong ... 19:24
/home/slava/src/rakudo/rakudo-2010.03/parrot_install/bin/parrot -o src/gen/perl6.pbc src/Perl6/Compiler.pir
looks like pir is parrot source code
19:25 Helios joined 19:28 bradb left
slavik slava@dogbert:~/src/rakudo/rakudo-2010.03$ ./perl6 -e 'say "hello"' 19:29
hello
:D
19:29 isBEKaml left
takadonet rakudo: say 1..{$_} 19:29
p6eval rakudo e393c7: ( no output )
takadonet rakudo: say (1, Nil, 2, 3).grep(*.defined).perl 19:30
p6eval rakudo e393c7: OUTPUT«(1, 2, 3)␤»
takadonet rakudo: say (1, Nil, 2, 3,454.3,"beer" ,4 ,"me!").grep(*.defined).perl 19:31
p6eval rakudo e393c7: OUTPUT«(1, 2, 3, 4543/10, "beer", 4, "me!")␤»
slavik alright, let's see if I remember anything
xmas: $(PERL6_EXE) ... 19:32
19:32 bbkr joined 19:34 patrickas left
diakopter sweet. indexers. next, array syntax. 19:36
perlesque: say(("hi")[0]) 19:39
p6eval perlesque: OUTPUT«h␤»
diakopter rakudo: say ("hi")[0] 19:40
p6eval rakudo e393c7: OUTPUT«h␤»
diakopter perlesquel: .
p6eval perlesquel: OUTPUT«h␤real 0.04␤user 0.03␤sys 0.00␤»
jnthn werm.
*erm.
Rakudo?!
:-/
diakopter what
jnthn That's so wrong.
diakopter it is?
jnthn Yes.
diakopter oh :|
jnthn You're not meant to be able to index into strings.
Bufs yes
But strings no.
diakopter oh. :||
jnthn Rakudo bug.
:-(
diakopter what's the negative rationale? 19:41
pmurias positions without an unit don't make much sense
in unicode
diakopter ah
well, all string literals in perlesque are hereby declared utf16 bufs :) 19:42
that was easy. 19:43
jnthn :-)
It's fine for Perlesque since it's not claiming to be a Perl 6 subset anyway, iirc.
diakopter not entirely properly anyway.
as much as reasonable.
but obviously the unicodey stuff will need to be implmemented *in* perlesque 19:44
so in that sense, its strings are a subset of unicode's :P
slavik oh man 19:45
code I had long ago does not work anymore :(
diakopter dna-rot
slavik :(
looks like it has to do with current directory 19:46
pmurias diakopter: .NET has unicode support
? 19:47
diakopter not really; its native strings are utf16, and there are helper routines for detecting/dealing with combining chars and such
and upper chars.
actually thought, perlesque's input uses 32-bit codepoints of proper unicode 19:48
so maybe... hmm. 19:49
19:49 ab5tract left
slavik rakudo: my $str2 = '265'; say "byte" if $str2 ~~ /(\d+) <?{0 <= +$0 <= 255}>/; 19:50
p6eval rakudo e393c7: OUTPUT«byte␤»
slavik that's wrong, no? or am I doing something wrong?
lichtkind where in the synopses are the filetest ops? 19:51
diakopter perlesque: say(("高橋流")[0]) 19:52
p6eval perlesque: OUTPUT«高␤»
19:52 molaf_ left
diakopter who knew 19:52
19:52 rgrau` joined 19:57 mberends left 20:07 molaf joined
diakopter lol at moritz_'s "scary low-level languages" 20:10
20:23 guotr joined
s1n i keep reading these "not production ready" statements people are making about perl6... 20:28
if java + j2ee is "production ready", so is perl6
the only counter argument needed is to ask the devil's advocate to create a hello world webapp for j2ee 20:29
20:30 molaf left
Spreadsheet_ Does perl 6 have Ruby like "blocks" (lambdas?)? Does it have Python like "decorators"? 20:30
s1n Spreadsheet_: i think you mean closures
20:30 slavik left 20:31 gurjeet joined
Spreadsheet_ huh? 20:31
Decorators are closures? :S
20:31 M_o_C left, bbkr left
Juerd Spreadsheet_: No, lambdas are closures. Blocks are closures. 20:32
Spreadsheet_ oh
it has closures
jnthn People tend to see -> as a lambda in Perl 6.
But it's not the only way to get something lambda-ish. 20:33
s1n well, python's aren't
jnthn But if you read -> as lambda it kinda reads as you'd expect.
s1n those are specific use closures, it doesn't have true closures iirc
jnthn -> $x { $x + 1 }
Juerd doesn't know what "decorators" are. Google says they're magic. 20:34
frettled Juerd: they're first up against the wall when the revolution comes ;) 20:35
diakopter decorators charge too much
frettled diakopter: o/
diakopter oL
Spreadsheet_ Decorators "enhance" a function 20:36
frettled hums: "talk like a perlician"
20:39 bbkr joined 20:43 jonrafkind left 20:47 armand_c joined 20:56 armand_c left 20:57 kensanata joined 21:02 ReiniUrban joined
diakopter 唐鳳 21:03
21:03 rurban left, ReiniUrban is now known as rurban
frettled diakopter: What does that mean? 21:03
21:05 sundar joined 21:07 ab5tract joined 21:08 plobsing joined
lichtkind good night 21:17
21:17 lichtkind left
frettled oh :) 21:17
21:19 Chillance joined 21:21 bbkr left 21:39 jonrafkind joined 21:41 pmurias left, rv2733 left 21:45 iblechbot joined 21:52 hercynium joined 21:57 iblechbot left
sorear rakudo: my ($foo, $bar = "baz") = <a>; say "$foo $bar" 22:14
p6eval rakudo e393c7: OUTPUT«Undefined value shifted from empty array␤current instr.: 'perl6;Perl6Exception;throw' pc 14877 (src/builtins/Seq.pir:28)␤»
sorear Oh now that's interesting.
jnthn bug. 22:18
sorear Bug, or LTA error? 22:19
jnthn Well
sorear The syntax for this doesn't seem quite documented, I have no idea if I'm doing it right 22:20
jnthn I think we probably should just complain at parse time actually.
We parse a signature there, but if you're starting to stick in optional parameters and stuff, we just say "oh noes, that's too complex to turn into a list".
sorear The LHS of list assignment is supposed to be a signature now
jnthn If you want full signature semantics, use binding, not assignment.
rakudo: my ($foo, $bar = "baz") := <a>; say "$foo $bar" 22:21
p6eval rakudo e393c7: OUTPUT«a baz␤»
sorear rakudolimitation?
jnthn No, spec.
Well
Us not complaining about the signature being too complex is a rakudo fail.
It's a bit annoying implementation wise.
Because you parse a signature always but in the = case you want to do list assignment.
So you need to turn the signature into a list. 22:22
Which doesn't make sense if it's anything complex.
sorear files 22:31
cognominal how to test a missing optional parameter versus an undefined parameter ? 22:36
s/parameter/argument/
jnthn cognominal: If you have a situation where it actually matters, your best bet is to look at the capture. 22:37
cognominal how so? 22:38
jnthn If you had
sub foo($a, $b?) { }
re-write to
sub foo(|$c ($a, $b?)) { }
Then you can do something like 22:39
$c.list.elems == 2
cognominal ok
jnthn There's not a way to do it just looking at $b itself though.
22:41 lidden left
cognominal I thought there was a special undefined value meaning missing argument. 22:44
jnthn No. You're not the first person to ask though - masak++ has also done so. 22:45
cognominal anyway now with your implementation of powerful signature we can test it 22:47
I am tired have headache, good night
jnthn night o/ 22:48
22:48 _jaldhar left
cognominal Also I suppose I can derive from a undef type and use an instance as a default argument value 22:50
22:51 colomon left 22:52 patspam joined
sorear I suppose either way I can't use fancy Perl6 in the compiler, huh. 22:54
jnthn Huh? 22:57
:-)
sorear: Depends where you're writing, tbh.
If you're working in bits written in NQP, then no, because you're writing in NQP rather than Perl 6. :-)
If you're working on bits in the core setting, then you pretty much have the whole language to hand but beware bootstrapping issues.
(Which, tbh, shouldn't bite you too much anyway.) 22:58
sorear jnthn: Perl6::Module::Loader 23:00
jnthn sorear: That's in NQP. 23:02
sorear I wonder why. 23:03
You don't need a functioning module loader to process the setting...
jnthn sorear: Basically, if it's in src/core/ or src/glue/ and it ends in .pm, then it's in Perl 6.
sorear: I'm not so sure that's true.
Well
The importer stuff certainly would be useful.
I think we're going to need that soon in the setting. 23:04
Working in NQP is hardly a huge problem anyway.
It's nicer than writing C. ;-) 23:05
(IMHO and all that.)
sorear nqp: my ($a, $b) = <a b>; 23:06
p6eval nqp: OUTPUT«Confused at line 1, near "my ($a, $b"␤current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)␤»
sorear nqp: my $a = <a b>.list[0]; 23:07
p6eval nqp: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 1, near " <a b>.lis"␤current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)␤»
sorear nqp: my $a := <a b>.list[0];
p6eval nqp: OUTPUT«Method 'list' not found for invocant of class 'ResizablePMCArray'␤current instr.: '_block11' pc 0 (EVAL_1:6)␤»
jnthn It already is a list, so no need to call .list.
sorear What if it's not? 23:08
jnthn nqp: my $a := <a b>[0];
p6eval nqp: ( no output )
jnthn Then you need to call .list on it.
sorear Foo :from<perl5> and Foo :from<java foo.Foo>
jnthn Though in reality, I don't find myself having to do such things so much.
sorear are both valid syntax
one is a Str, the other a Seq
jnthn I hadn't seen the second of those before.
sorear how can I destructure both?
jnthn pir::isa($thingy, 'String') 23:09
Note you don't have Seq and so on in NQP in general
23:09 orafu left
jnthn It works in terms of Parrot types. 23:09
23:09 orafu joined 23:10 patspam left, patspam joined 23:15 _jaldhar joined
sorear Why does src/old exist? 23:18
I can just checkout alpha whenever I want.
jnthn Convenience. 23:19
It's not the whole alpha
Just some bits with code we've still yet to port
I expect we'll kill src/old/ before the next relesae though.
Because I think we've moved most things over by now. :-)
23:29 patspam left 23:33 patspam joined, jonrafkind left 23:36 bradb joined, patspam left 23:51 CokeBot9000 left 23:52 ruoso left 23:53 k23z__ left 23:56 CokeBot9000 joined