Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-12-21

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:03 masak rakudo: class A::C {}; A::B
00:03 p6eval rakudo 8dc189:  ( no output )
00:03 zaslon lolperl6adventhazblogged! perl6advent++ 'Day 21, Grammars and Actions': http://perl6advent.wordpress.com/2009/12/21/day-21-grammars-and-actions/
00:03 masak locally, "invoke() not implemented in class 'Undef'"
00:03 * masak submits rakudobug
00:05 masak rakudo: A::B
00:05 p6eval rakudo 8dc189: invoke() not implemented in class 'Undef'␤in Main (file <unknown>, line <unknown>)␤
00:05 masak that's better :)
00:13 Tene lol I blogged!
00:13 soupdragon lol
00:14 masak Tene++
00:15 arnsholt Is mberends Europe-based?
00:16 Tene and I was on time, too!
00:19 masak arnsholt: he's .nl-based.
00:20 arnsholt Right. I'll try to catch him tomorrow, then
00:20 arnsholt Just too bad my sleep rythm is a bit non-CET at the moment
00:28 masak speaking of that...
00:28 masak I think I'll be going to bed.
00:28 masak I got backtracking to work! \o/ http://gist.github.com/260695
00:29 diakopter bed or bust
00:29 soupdragon oh sweet
00:29 masak diakopter: see that? that's the TreeSpider in GGE!!!1!
00:29 diakopter ooo
00:30 masak so far in a local branch, but still.
00:30 diakopter masak: how does it parse the regex pattern
00:30 masak diakopter: with the OPTable parser.
00:31 masak just like PGE.
00:31 diakopter pge or gge
00:31 masak GGE.
00:31 diakopter oh
00:32 diakopter masak: oh
00:32 diakopter masak: where's yer OPTable code; I'm gonna gank it
00:32 masak :) stand by for URL.
00:32 masak http://github.com/masak/gge/blob/master/lib/GGE/OPTable.pm
00:33 nihiliad1 joined #perl6
00:33 masak see also tests: http://github.com/masak/gge/blob/master/t/03-optable.t
00:33 * diakopter wants someone to comment how fully this covers the expressivity/semantics of the OPTabley thing in STD
00:34 masak no idea.
00:34 masak I expect to be able to grok/review STD.pm in six months or so.
00:34 diakopter have you done any performance comparisons with pge? I mean..
00:34 masak no, but you have my guarantee it's slower.
00:35 diakopter I mean, I assume it's slower than pge, but by how much?
00:35 diakopter oh
00:35 diakopter what's the time on that gist you pasted
00:35 diakopter without the debug output
00:35 masak 2.7 seconds, it seems.
00:36 diakopter how long with single-char pattern and single-char input
00:36 masak but some of that is parse time of the script that runs it.
00:36 diakopter (succeeding)
00:36 masak 2.4 seconds.
00:36 diakopter ok
00:36 diakopter thanks
00:37 masak I'm not optimizing for speed. I'm glad it's as responsive as it is.
00:37 diakopter yer OPTable code, what's the license under which you're publishing it, so I can credit you
00:37 masak Artistic 2.0.
00:37 diakopter ok
00:37 masak and most of the credit goes to pmichaud_++, because I wrote that while reading his PIR code.
00:37 diakopter how closely does it derive from pge's optable code
00:38 masak very, very closely.
00:38 diakopter oh
00:38 masak so closely that I've made comments where it doesn't.
00:38 diakopter .oO( perhaps I was reading the wrong things when I was looking for the PAST::Regex impl )
00:38 masak the biggest difference is that I have to use loops and conditionals where pmichaud_ does gotos.
00:38 arnsholt Hmm. Parrot's NFG sounds a bit complicated
00:39 diakopter NFG?
00:39 diakopter oh yeah.... /me forgot
01:22 ash___ ummm how do you leave a message for someone again?
01:26 arnsholt ash___: "phenny: tell $name $msg", I think
01:26 eternaleye o/
01:26 arnsholt Sans quotes, of course
01:52 agentzh joined #perl6
01:52 eternaleye joined #perl6
02:01 eternaleye joined #perl6
02:21 diakopter whee
02:22 diakopter ww
02:22 _jaldhar joined #perl6
02:30 JimmyZ joined #perl6
02:32 brrant joined #perl6
02:43 JimmyZ_ joined #perl6
03:24 colomon_ joined #perl6
03:30 tempire joined #perl6
03:40 ihrd joined #perl6
03:40 ihrd left #perl6
03:53 holli joined #perl6
03:54 buubot joined #perl6
04:10 meppel joined #perl6
04:15 cognominal joined #perl6
04:15 protospork joined #perl6
04:17 C8H10N4O2 joined #perl6
04:23 C8H10N4O2 joined #perl6
04:27 patspam joined #perl6
04:29 ActionBastard joined #perl6
05:21 ihrd1 joined #perl6
05:21 ihrd1 left #perl6
07:18 kaare joined #perl6
07:24 tempire left #perl6
07:33 Su-Shee joined #perl6
07:33 Su-Shee good morning
07:52 Baggio_ joined #perl6
07:58 iblechbot joined #perl6
07:59 flip214 joined #perl6
07:59 flip214 morning
08:00 flip214 I've got a new Null PMC access ... but I'm not sure whether it's my fault (wrong syntax or something like that)
08:00 flip214 rakudo: my $a=":"; my $b="aa:a:ag.:f"; $b.subst( /$a/, "-"); say $b;
08:00 p6eval rakudo 8dc189: Null PMC access in get_string()␤in Main (file <unknown>, line <unknown>)␤
08:03 flip214 ok, filed
08:11 carlin flip214: that's known, variable interpolation in regexes
08:11 carlin rakudo: my $x = 'a'; $x ~~ /$a/;
08:11 p6eval rakudo 8dc189: Null PMC access in get_string()␤in Main (file <unknown>, line <unknown>)␤
08:14 flip214 ok
08:14 flip214 my bad
08:15 spinclad flip214: otoh, Null PMC access is always a compiler bug
08:15 spinclad pmurias: re r29385: CORE.js:355: return ??>>interpreter,<<?? this[storage];
08:18 carlin trying to find the ticket number... RT is painful to work with :/
08:20 spinclad rakudo: my $a = /'a'/; my $x = 'a'; $x ~~ / <$a> /;
08:20 p6eval rakudo 8dc189: Confused at line 2, near "$a> /;"␤in Main (file <unknown>, line <unknown>)␤
08:20 cognominal joined #perl6
08:20 spinclad rakudo: my $a = /'a'/; my $x = 'a'; $x ~~ / $a /;
08:20 p6eval rakudo 8dc189: Null PMC access in get_string()␤in Main (file <unknown>, line <unknown>)␤
08:20 spinclad rakudo: my $a = /'a'/; my $x = 'a'; $x ~~ $a;
08:20 p6eval rakudo 8dc189:  ( no output )
08:21 spinclad rakudo: my $a = /'a'/; my $x = 'a'; $x ~~ $a; say $/;
08:21 p6eval rakudo 8dc189: a␤
08:23 rgrau joined #perl6
08:28 carlin It's RT #61960
08:36 mariuz joined #perl6
08:36 Baggio_ joined #perl6
08:47 tempire joined #perl6
09:28 mathw I'm down for Advent tomorrow aren't I
09:35 eternaleye rakudo: my $x = 'a'; $x ~~ /"$a"/;
09:35 p6eval rakudo 8dc189: Confused at line 2, near "~~ /\"$a\"/;"␤in Main (file <unknown>, line <unknown>)␤
09:35 eternaleye ng: my $x = 'a'; $x ~~ /"$a"/;
09:35 p6eval ng 9d5018:  ( no output )
09:35 eternaleye ng: my $x = 'a'; $x ~~ /"$a"/; say ~$/
09:35 p6eval ng 9d5018: ␤
09:35 eternaleye ng: my $x = 'a'; $x ~~ /"$a"/; say $/.perl
09:35 p6eval ng 9d5018: Method 'perl' not found for invocant of class 'Regex;Match'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
09:43 jferrero joined #perl6
09:48 spinclad ng: my $x = '$a'; $x ~~ /"$a"/; say $/;
09:48 p6eval ng 9d5018: $a␤
09:48 spinclad ng: my $x = '$a'; $x ~~ /'$a'/; say $/;
09:48 p6eval ng 9d5018: $a␤
09:49 spinclad no interpolation yet
10:00 meneldor joined #perl6
10:07 pmurias joined #perl6
10:43 clintongormley joined #perl6
11:21 Calimbeul joined #perl6
11:30 moritz_ good day
11:43 clintongormley good day to you too sir
11:43 clintongormley quiet in here today
11:44 * moritz_ slept until 12 in the "morning" :-)
11:45 * clintongormley is familiar with that of late
11:46 clintongormley moritz_: you do stuff in C, no?
11:46 moritz_ well, I spent 7 hours on the road yesterday, though snow and ice
11:46 moritz_ clintongormley: seldomly
11:46 clintongormley going 5 km?
11:47 clintongormley but perhaps you can answer a query
11:47 moritz_ between 5 and 105 km/h
11:47 clintongormley i never do stuff in C - just compiling packages
11:47 clintongormley but compilers emit SOOo many warnings etc
11:47 clintongormley some of which look serious
11:47 clintongormley is that just lazy programming, or expected?
11:48 moritz_ surely depends on context
11:48 moritz_ do you mean while compiling rakudo?
11:48 clintongormley no, other libraries, nothing to do with rakudo etc
11:48 clintongormley just C libraries in general
11:48 moritz_ it is often a result of different compiler versions
11:48 clintongormley ok
11:48 moritz_ people compile with -Wall
11:49 moritz_ and then the next compiler version introduces new warnings that are included in -Wall
11:49 clintongormley right
11:49 clintongormley things like cast pointer to different integer size
11:49 clintongormley or incompatible pointer type
11:49 moritz_ that can also be a 32bit vs 64bit problem
11:50 moritz_ people just assume that sizeof(int) == sizeof(int*)
11:50 jnthn omg new laptop is arrive!
11:50 clintongormley but that's a problem then, surely
11:50 clintongormley w000t
11:50 clintongormley christmas is here early!
11:50 moritz_ or late :-)
11:50 jnthn Finally I can hack on Rakudo at a decent pace again. ;-)
11:50 clintongormley heh
11:50 jnthn ...once I get all the compiler tools installed.
11:56 Baggio_ joined #perl6
12:04 meneldor joined #perl6
12:04 meneldor guys does perl6 have function like in javascript setInterval() or setTimeout() ?
12:05 moritz_ since nobody implemented a threading or event-model yet... don't think so
12:06 meneldor in perl5 i realise this using signals but this is a bit hackish
12:06 meneldor and dangerous
12:07 moritz_ and only with resolution of one second
12:07 moritz_ or more sophisticated with POE
12:08 meneldor not only one second
12:11 bluescreen joined #perl6
12:12 meneldor with  select(undef, undef, undef, 0.5) for example
12:25 Juerd You best bet is to write your own event loop, I think
12:34 meneldor i used it in perl5 to realise a object animation with easing
12:35 meneldor and the only way was with select() time fragments and signals
12:42 pmurias joined #perl6
12:48 JimmyZ joined #perl6
12:57 takadonet joined #perl6
12:58 takadonet morning all
13:05 masak joined #perl6
13:06 masak greetings gentlemen.
13:06 masak (and butterflies)
13:10 kensanata joined #perl6
13:11 frettled Mellow greetings, citizen!
13:11 masak be vigilant!
13:13 mathw Greetings, citizen. Are you happy?
13:13 masak surprisingly, yes. :)
13:13 masak mathw: what about you, citizen?
13:13 masak frettled: and you?
13:14 mathw I am as happy as I would usually expect to be at this time on a Monday afternoon in the office.
13:14 frettled masak: Not entirely, but I'm content, thank you :)
13:14 masak aren't you both enjoying the freedom and high standard of living granted to you by your government? remember, this is a democracy!
13:16 mathw Most of the time, that's not something I actively think about enjoying.
13:16 frettled masak: you're forgetting that we're living in "the last communist state"
13:16 mathw Being human, I tend to end up worrying about how it might be eroded rather than enjoying its current state.
13:16 frettled masak: the Chinese recently took offense, and decided to fix their bureaucracy to something similarly obnoxious, though :)
13:17 masak frettled: I forget who said that thing about the 'last communist state'. it was some Swedish politician, right?
13:18 mathw A lot of people here think Sweden's some kind of utopian paradise
13:18 mathw ...apart from the snow
13:18 masak we're pretty happy about the snow.
13:18 mathw ...and the naked girls
13:18 * araujo likes that part
13:19 masak mathw: a utopian paradise -apart- from the naked girls?
13:19 frettled masak: Yup, that's right
13:19 frettled masak: the irony :D
13:19 mathw masak: some people are very prudish
13:19 mathw Think of the children!
13:19 frettled mathw: Have you seen "Sicko"?
13:19 mathw frettled: no
13:19 mathw The title does not suggest to me that I might like it
13:20 frettled mathw: During the research (yeah, he did research) for that movie, Michael Moore investigated the health care in various European countries.
13:20 frettled mathw: he chose France as the counter-example to USA because he didn't think anyone would believe the arrangements in Norway.
13:20 mathw Oh it's that film
13:20 moritz_ lol
13:20 frettled We're living in "Scandivegian Libertopia"
13:20 mathw I thought that would be quite dull
13:21 mathw After all, I grew up with the NHS
13:21 mathw And I find the US system horrifying
13:21 mathw We don't even have the best national health care system
13:21 mathw Good enough, though
13:21 mathw Most of the time
13:22 frettled mathw: UK, right?  The UK's NHS is the largest employer in the world, you know that?
13:22 slavik joined #perl6
13:22 Su-Shee what? they beat the german tax department? impossible! ;)
13:23 frettled "That word doesn't quite mean what you think it does."  ;)
13:23 mathw frettled: yeah I'd heard that
13:23 mathw It's also widely considered to be staggeringly inefficient
13:24 mathw But somehow, each day they treat thousands of patients
13:24 mathw And most of them don't even die
13:24 frettled Every health system in the world seems staggeringly inefficient until you see the US health chaos.
13:24 frettled mathw: \o/
13:25 payload joined #perl6
13:28 moritz_ wow, ng's spectest looks rather messy
13:28 takadonet moritz_: how so?
13:28 moritz_ takadonet: two tests segfault, one dies
13:30 takadonet ouch
13:30 frettled whoopsie
13:31 moritz_ and it runs only 75 files all in all
13:37 jan_______ joined #perl6
13:40 mathw ouch
13:40 mathw somebody slipped up there
13:41 colomon_ No, that's just the way ng is.
13:41 colomon_ It randomly segfaults.
13:42 jnthn moritz_: I think there are some roaming segfaults.
13:42 jnthn moritz_: Heisenbug. :-/
13:42 colomon_ The tests in question actually pass, when they're not segfaulting.
13:42 colomon_ And the seg faults varies from computer to computer and build to build.
13:43 colomon_ but moritz_, if it really bothers you, feel free to take a stab at tracking it down.  :)
13:43 moritz_ lol
13:44 colomon_ maybe you'll think of something jnthn and I have missed repeatedly.  :)
13:47 mathw Oh no
13:47 mathw One of those
13:47 mathw I hate those
13:47 mathw It's usually something very small, miles away from anywhere it ever crashes
13:48 mathw Suddenly a nasty bug report my boss decided to forward to me seems pleasant...
13:48 iblechbot joined #perl6
13:52 orafu joined #perl6
13:59 patspam joined #perl6
14:05 c1sung joined #perl6
14:06 cls_bsd joined #perl6
14:25 PerlJam good morning
14:27 takadonet PerlJam:morning
14:29 arnsholt How do you get git to follow the ng branch?
14:29 moritz_ git checkout -b ng --track origin/ng
14:29 arnsholt I don't seem to get along very well with git, and have failed completely at doing it myself
14:31 arnsholt No more magic required to get it to update the files in my working copy and such?
14:31 moritz_ no
14:32 moritz_ (and then simply `git pull' to update it again)
14:32 arnsholt Cool. Thanks a bunch
14:34 takadonet Anyone got time to help debug my parser? Not sure if I ran into a bug or not
14:35 PerlJam takadonet: you probably did run into a bug, but it may just be *your* bug ;)
14:35 takadonet PerlJam: hopefully
14:35 lisppaste3 takadonet pasted "Fasta Grammar" at http://paste.lisp.org/display/92423
14:36 PerlJam takadonet++ bioperl6  :)
14:37 takadonet PerlJam: Have you used bioperl before?
14:37 PerlJam not really.  Just when I run across people who need help on IRC
14:39 * moritz_ builds rakudo master to try
14:39 PerlJam takadonet: so ... what's the problem exactly?
14:39 takadonet Well my issue is that I cannot modify the match object '$/' in my method Sequence. Trying to remove all the new line characters using subst. When I do, it seems that it ignores it
14:40 PerlJam takadonet: subst() doesn't do an inplace substitution.  you need to assign the result.
14:40 mberends joined #perl6
14:40 moritz_ he calls make()
14:40 takadonet make $/.subst(rx/ \n /, '',:g);
14:40 PerlJam takadonet: also, make needs an AST yes?
14:41 moritz_ make sets an AST
14:41 PerlJam moritz_: aye, I'm slow this morning :)
14:41 moritz_ here to a string
14:41 * PerlJam needs to context-switch his brain to Perl 6
14:42 moritz_ takadonet: it seems to be related to .subst
14:42 moritz_ takadonet: when I replace the make $/.subst... line with   make 'foo'  , it works as expected
14:43 takadonet mortiz_: That what I did and realized I needed #perl6 help
14:43 moritz_ rakudo: say "ABC\nDEF\nGHI".subst(rx/ \n /, '', :g)
14:43 moritz_ p6eval: ping
14:43 Gothmog_ joined #perl6
14:44 moritz_ ng: say 'alive'
14:44 takadonet not good
14:45 r0bby joined #perl6
14:47 PerlJam weird
14:47 y3llow joined #perl6
14:48 mathw freenode's still having problems I see
14:49 takadonet hmm
14:49 takadonet guess I have to wait for an answer :(
14:49 cls_bsd joined #perl6
14:49 jan_______ joined #perl6
14:49 JimmyZ joined #perl6
14:49 bluescreen joined #perl6
14:49 buubot joined #perl6
14:49 rachelBROWN joined #perl6
14:49 LionMadeOfLions joined #perl6
14:49 yahooooo joined #perl6
14:49 p6eval joined #perl6
14:49 moritz_ ng: say "alive"
14:51 p6eval joined #perl6
14:51 p6eval ng 9d5018: alive␤
14:51 p6eval joined #perl6
14:54 jaldhar_ joined #perl6
14:56 moritz_ takadonet: when I call $/.subst(something), then make(123) doesn't have an effect anymore
14:56 PerlJam yeah, subst() is somehow screwing things up.
14:56 moritz_ or even my $x = "$/"; $x.subst(...)
14:57 PerlJam Calling subst() on anything prior to make causes fail
14:57 takadonet Ya I tried that as well
14:57 moritz_ rakudo: my $x = ("ab\ncd" ~~ /.*/); say $x.subst(/\n/, '', :g)
14:57 p6eval rakudo 8dc189: abcd␤
14:58 moritz_ maybe the regex engine is not reentrancy safe?
14:58 PerlJam could be
14:58 moritz_ ng: say (1, 2, 3)>>.abs
14:58 p6eval ng 9d5018: 123␤
15:01 moritz_ takadonet: I'll submit a bug report
15:02 takadonet moritz_ : Thanks
15:02 PerlJam Doing non-subst regex doesn't seem to affect anything
15:03 takadonet So anyone know another way to remove all '\n' characters ?
15:03 PerlJam oh wait, it does.
15:03 masak takadonet: .trans?
15:03 takadonet masak: never heard of that one...
15:04 masak it's in S05.
15:04 * takadonet starts looking at the spec
15:04 masak near the bottom.
15:04 takadonet thanks
15:04 * masak winks
15:04 masak no problem.
15:04 moritz_ it's like tr/// on crack
15:04 takadonet lol
15:04 moritz_ make  $/.trans(/\n/ =>  '');
15:04 moritz_ works
15:04 takadonet !!!!!
15:04 moritz_ actually "\n" => '' also works
15:05 moritz_ and is probably a bit faster
15:05 masak I'd use that latter one. yes.
15:05 moritz_ erm, excuse me, fasta :-)
15:05 frettled I'm a bit disappointed that the bug report wasn't a masakbug.  ;)
15:05 PerlJam Hmm.
15:05 masak frettled: :)
15:05 takadonet frettled: Why you give me +o mode?
15:06 moritz_ "why not"?
15:06 masak he likes to do that.
15:07 Psyche^ joined #perl6
15:07 frettled takadonet: you're a regular, I kinda know who you are, and you're apparently trustworthy, and I remembered to do it.
15:08 takadonet frettled: thanks
15:08 frettled takadonet: it's insurance in case there is a netsplit, so that we have enough people that there is an op available, just in case some idiot decides to enter and flood the channel, a bot has lost its voice (+v) etc.
15:09 arnsholt takadonet: Thanks for asking. I've been curious about my +o as well =)
15:09 meneldor guys is this FAQ updated http://www.programmersheaven.com/2/Perl6-FAQ
15:09 frettled TimToady is also quite generous with kanelbullar, that's why I have one, and I suspect that I mustn't be too wrong in my assessment.  ;)
15:09 JimmyZ I've been curious about xinming's +o as well :)
15:09 PacoLinux joined #perl6
15:10 frettled FAQ Last Updated: 14th November 2007
15:10 meneldor i have some strange output trying this: my Cat @basket;
15:10 takadonet Last time I was an op was.... 2001 so no idea what command I can do or how!
15:10 frettled meneldor: anything that hasn't been updated in over two years is outdated :)
15:10 * frettled doesn't know who xinming is, hee-hee.
15:10 meneldor oh every time i read old info :(
15:10 mathw takadonet: in emergencies, just remember /kick :)
15:10 takadonet mathw: hehe
15:10 moritz_ meneldor: rakudo doesn't have a Cat type yet :/
15:11 mathw although the only time I ever wanted to use it, I wasn't an op
15:11 meneldor o.O
15:11 frettled meneldor: use www.perl6.org as a basis, there is better and more up-to-date information there
15:11 meneldor tnx
15:11 frettled np
15:11 frettled (af
15:11 meneldor and what about http://perlcabal.org/syn/
15:12 arnsholt Those are the definitive specs
15:12 moritz_ that's up-to-date, but it documents the should-be status, not the "is" status
15:12 arnsholt And they're not always easy to follow
15:12 mathw If you need any clarification, ask us :)
15:13 meneldor ok :) im still on "perl5 to perl6 faq"
15:16 arnsholt Are the C portions of Rakudo compiled with -g by default?
15:16 mberends arnsholt: pong (you were looking for me?)
15:16 payload joined #perl6
15:16 arnsholt mberends: Indeed
15:17 arnsholt I was just curious if you'd given any more thought to the grammar/LLVM thing you mentioned?
15:18 meneldor i love those who had introduced the junctions into p6 :)
15:19 meneldor no more: if ($a ==1) or ($a == 2) ....
15:19 mathw junctions are very handy
15:19 mathw yeah
15:19 mathw I wrote about that for the advent calendar
15:19 mathw it seems to have gone down quite well
15:20 meneldor i loose too much time to write tons of  if and and and
15:20 moritz_ mberends: which version of llvm is required for vill?
15:20 mberends arnsholt: yes, though about it not enough yet. In principle, the general way Q:PIR is implemented should map to a Q:C, but the devil is in the details. One not so slight problem is that LLVM is not C, although it is modelled to be a very efficient backend for C style compilers.
15:21 mberends moritz_: llvm 2.6 (latest stable)
15:21 * moritz_ looks at backports.org if they have llvm-2.6
15:22 moritz_ nope
15:22 moritz_ :(
15:22 meneldor guys the thing i didnt understand yet is am i able to complite p6 script to bytecode ?
15:22 mberends meneldor: give me 5 years and it will be done ;)
15:23 moritz_ meneldor: rakudo can compile modules to PIR, but (afaik) not scripts
15:23 * meneldor going for beer
15:23 moritz_ don't know if compiling modules to bytecode works
15:24 mberends moritz_: you did write about making .pbc files once
15:24 moritz_ mberends: yes. And at that time it worked
15:24 meneldor well is there any way that i can contribute to p6 if the only language i know is p5 ?
15:24 moritz_ meneldor: if you learn Perl 6, yes :-)
15:24 meneldor i mean i dont know C
15:25 moritz_ that's fine
15:25 moritz_ that shouldn't stop you from writing Perl 6 modules and reporting rakudobugs
15:26 meneldor yes
15:26 mathw knowledge of C is far from necessary
15:26 mathw It's needed for certain things, but there's a lot to do in Perl 6 or NQP or PIR...
15:26 mathw even some Perl 5!
15:27 meneldor i tryed to learn C after perl5 but... i dropped it :)
15:28 mberends meneldor: it helps a lot to try implementing Perl 6 versions of algorithms you already know.  They sometimes point out omissions in Perl 6, and give the developers valuable feedback (and encouragement).
15:28 plainhao joined #perl6
15:28 arnsholt Bah! Compiling Parrot with -g makes the NULL pointer deref go away
15:28 * moritz_ wonders why gcc tries to continue compilation even after include files were not found
15:28 moritz_ it only generates a bunch of obscure error messages, usually
15:28 meneldor mberends: you mean modules?
15:29 mberends meneldor: yes, mainly modules, and then small driver programs that use the modules
15:30 meneldor hmm the last 2 years i've worked only with catalyst/dbix::class
15:30 meneldor i mean web things
15:32 mberends meneldor: (maybe relevant) admittedly self centred example: http://gitorious.com/http-daemon has a webserver module, and a small httpd script to launch it
15:32 Su-Shee implement a nice form handler, extent the css grammar and the html grammar to css 3 and html 5, write a rss/atom module, start implementing the tons of APIs to all the fancy web services..
15:33 meneldor nice!
15:33 mberends Su-Shee: I thought you had done that already ;)
15:34 Su-Shee mberends: yeah, but never finished. My new job got in the way.
15:34 Su-Shee meneldor: implement a basic untaint for security stuff..
15:34 meneldor :) ok, but im in the beginning of p6
15:34 meneldor let me understand it
15:35 meneldor the difference is bigger that i've though
15:35 moritz_ .oO( has anybody here understood Perl 6? :-)
15:35 Su-Shee meneldor: I've started with an idiot's Atom class which essentially just contained a bunch of "add_title" "add_entry" and so on methods which actually generated a valid atom feed.
15:35 meneldor but the important here is that im starting to love p6
15:36 PerlJam meneldor++ important indeed
15:36 mberends hugme: hug meneldor
15:36 * hugme hugs meneldor
15:36 Su-Shee moritz_: I've started to try to do a short reference and gave up :/
15:37 payload joined #perl6
15:37 moritz_ :-)
15:38 jaldhar_ joined #perl6
15:42 meneldor :D
15:42 Su-Shee well it would be helpful to have one. which automatically would contain a niy list.
15:45 meneldor guys do we really need "my" and "our" if there are types like Int ?
15:45 meneldor like: my Int $a
15:45 moritz_ yes
15:45 moritz_ to make clear it's a type declaration
15:45 Su-Shee my and our is about scoping. Int, String and so on is what type you have.
15:45 moritz_ and not a subroutine definition
15:47 meneldor i mean to write only Int $a instead of my Int $a
15:47 meneldor may be im reading obsolete info again :)
15:47 mberends commute & # most Dutch trains stopped because "maintenance free" points/junctions are frozen :-/
15:47 Su-Shee but my is essentially the same as in Perl 5, isn't it?
15:48 moritz_ yes
15:48 meneldor yes it is but its additional word :)
15:48 meneldor or may be im too lazy :P
15:48 PerlJam meneldor: then why even say "Int"?
15:49 PerlJam it's an additional word too
15:49 meneldor is that possible when use local Int to avoid my?
15:49 moritz_ meneldor: I see it the other way round - 'my' tells you what's going on (and is mandatory), while Int is optional, additional information
15:49 meneldor Int to mean: my Int
15:49 nihiliad joined #perl6
15:50 moritz_ meneldor: a type object can also stand alone, without a declaration
15:50 moritz_ afk
15:50 mberends left #perl6
15:50 PerlJam meneldor: you think that typed variables should be lexically scoped by default?
15:51 meneldor yes
15:51 PerlJam What about untyped vars?  Should they have a default scope?
15:51 meneldor im alwayz using strict+my by default
15:52 Su-Shee I would have liked if my wouldn't be necessary, because the scoping is similar to other languages. (whatever this scoping style is called)
15:53 PerlJam Su-Shee: except that the "my" supplies useful information (to Perl) that helps the perl compiler to save you from your own errors.
15:54 jaffa8 joined #perl6
15:54 jaffa8 hi
15:54 Su-Shee well, I still don't really like it and would have wished for it to go away in 6.
15:54 jaffa8 Ia there any news concerning rakudo?
15:54 jaffa8 Is it getting faster?
15:55 PerlJam jaffa8: There was a release last week.  That's news :)
15:55 meneldor i dont like 'my' so much  too
15:56 justatheory joined #perl6
15:58 PerlJam If you can come up with a convincing argument why typed variables should be lexically scoped by default, maybe that could be added to the spec.
15:59 PerlJam But even still, for untyped vars, you need the "my".  And, of course, non-lexicals need explicit scoping.
16:00 frettled . o O ( my:Int, local:Int )
16:00 frettled . o O ( Int, Int:local, … )
16:00 frettled The barf box is over there =>
16:00 mdxi i like "my"
16:01 abra joined #perl6
16:02 PerlJam It's not a popularity contest though.  It's a "is this thing useful" and "should we elide it in certain circumstances" and  "does the intent stay clear"  contest :)
16:02 arnsholt Does the local declaration still exist?
16:02 PerlJam arnsholt: it's called temp now
16:03 jaffa8 Has anyone tested the compiler speed recently?
16:03 PerlJam jaffa8: I think most of the speed issues are being addressed at the Parrot level rather than the Rakudo level.
16:04 arnsholt PerlJam: Thanks. Dynamic scope is a bit obscure (not to mention arcane), but very useful in certain cases
16:04 jaffa8 PerlJam, ok
16:07 mdxi well, when i said "i like 'my'", what i was actually thinking (but did not say) was "as someone who has been for a long while -- and still mostly is -- a Perl 5 programmer, 'my' reduces cognitive load by continuing to do what it has always done, and in a language oft-criticized by outsiders for having a surfeit of implicitness, is this tiny but of explicitness really worth trying to optimize away?"
16:07 mdxi but that seemed kinda wordy. so i just said the other thing.
16:08 PerlJam mdxi++
16:09 PerlJam arnsholt: you know that Perl 6 has a few more scoping declarators?
16:09 PerlJam C<state> and C<let> come to mind.
16:10 Juerd I think the explicit environment thingies are incredibly useful.
16:10 Juerd I've often abused %_ for that.
16:12 arnsholt PerlJam: state I know (from Perl 5.10 =), but let has escaped my attention. What does it do?
16:12 takadonet Which Synopsis is 'gather' in?
16:12 Juerd arnsholt: state keeps the variable scoped like a lexical, but extends the duration until forever. :)
16:13 Juerd arnsholt: So next time the closure's called, it'll still have the same value.
16:13 PerlJam arnsholt: It hypotheticalizes a value.  If the block that the C<let> is in succeeds, then the variable keeps the value assigned;  if the block fails, then the value reverts back to whatever it was before.
16:14 arnsholt Right. Now that you mention it, I think I've read about it once before
16:14 Juerd Oh, I didn't read arnsholt's question correctly and I explained state.
16:14 arnsholt An excellent idea
16:14 PerlJam takadonet: S04
16:14 takadonet PerlJam: thanks
16:15 lqdai joined #perl6
16:20 arnsholt The S02 POD has a couple of missing closing brackets. Who do I talk to about that?
16:25 [particle] joined #perl6
16:30 masak arnsholt: do you have a Pugs commit bit?
16:32 cognominal_ joined #perl6
16:40 nbrown joined #perl6
16:42 colomon_ ng: say (1, 2, 3)>>.abs
16:42 p6eval ng 9d5018: 123␤
16:42 colomon_ since when does that work?
16:42 colomon_ in ng, I mean.
16:43 colomon_ ng: say (1, 2, 3) >>+<< (2, 3, 1)
16:43 p6eval ng 9d5018: Confused at line 1, near "say (1, 2,"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (src/stage0/HLL-s0.pir:328)␤
16:44 moritz_ colomon_: quite long, for method calls
16:45 colomon_ and here I've been struggling along with map.... :)
16:47 jnthn colomon_: It's parsed / handled differently to hypers in general. I popped it in a while back while trying to get towards another passing test.
16:50 perlsyntax joined #perl6
16:50 perlsyntax left #perl6
16:51 * jnthn wonders if the Cool class is considered likely enough to be staying around to add it into ng.
16:53 colomon_ jnthn: I was wondering how hard that would be to do.
16:53 PerlJam jnthn: It's too bad there's not some easy measure of volatility you can use (other than asking TimToady)
16:54 colomon_ If the idea is stable but not the name, that's no biggie.
16:54 colomon_ And the idea seems pretty solid...
16:54 PerlJam colomon_: really?  I can never tell.
16:54 colomon_ PerlJam: well, it's been mulled over for nearly a month now, I think.
16:54 colomon_ and it seems to make sense.
16:54 jnthn My gut feeling is that it'll live.
16:55 PerlJam jnthn: always trust your gut.
16:55 masak jaffa8: I think I have been feeling Rakudo speedups in the past few months. nothing dramatic, to be sure. but slight speedups.
16:56 colomon_ "Cool" might not survive, but name changes are easy to deal with.
16:56 moritz_ jnthn: I think it's meant to stay, in some form or another. Maybe it's going to get renamed or so, but something along its lines has to exists, IMHO
16:56 jnthn moritz_: Yes, I like the concept.
16:56 jnthn The name works for me too.
16:56 jnthn My name complaining is with Mu. ;-)
16:56 moritz_ and using a class is better than a role (as I initially proposed=
16:56 jnthn Aye
16:56 moritz_ s:P5/=/)/
16:57 moritz_ colomon_: I got a 91x91 colored mandelbrot fractal from Rakudo without segfaulting :-)
16:57 colomon_ \o/
16:57 PerlJam moritz_: how long did it take?  :)
16:58 arnsholt masak: No, I don't have a commit bit
16:58 moritz_ arnsholt: time to change that
16:58 masak arnsholt: ok. privmsg me your email address, and I'll see what I can do.
16:58 moritz_ PerlJam: no idea :-)
17:00 harovali joined #perl6
17:00 moritz_ public service announcement to all pugs committers: you can add new committers at https://commitbit.pugscode.org/admin/project/Pugs/people (SSL cert expired, but works if you add an exception=
17:00 moritz_ and again s:P5/=/)/
17:00 moritz_ it seems aI have more trouble switching between US and DE keyboards than I'd like
17:00 [particle] you should alias that
17:04 arnsholt And all of a sudden I have to go
17:04 masak arnsholt: welcome aboard! you can make a test commit by adding yourself to the AUTHORS file.
17:04 masak ...when you have time.
17:04 arnsholt Yeah. Sorry, 'bout that
17:04 arnsholt I'll be back to ask questions about that later =)
17:05 colomon_ PerlJam: 91x91 color segfaults for me in 1 min and 9 seconds.  :)
17:05 arnsholt But thanks for the commit bit. Hopefully I can contribute more than just proof-reading with time
17:06 masak arnsholt++ # I like having you aboard already!
17:07 harovali left #perl6
17:08 [particle] moritz_: in your parrot-dev mail, s/pnm/png/
17:10 masak is mandelprot in proto's projects.list?
17:17 * PerlJam boggles at how fast 9GB is transferred over a network these days.
17:20 takadonet what does this error mean: invoke() not implemented in class 'Undef'?
17:21 masak I just had a Twitter discussion starting on 'vapor' and ending on 'tutorials'. success! \o/
17:21 masak takadonet: it means you used a class but did not declare it (yet).
17:21 PerlJam masak++
17:21 masak takadonet: it's one really LTA error.
17:22 takadonet masak: thanks
17:22 takadonet masak: url for twitter?
17:22 masak takadonet: twitter.com
17:22 takadonet ...
17:22 masak :P
17:22 masak takadonet: my nick is 'carlmasak', and the other guy is 'campbellmichael'.
17:22 takadonet thanks
17:23 cdarroch joined #perl6
17:23 masak you'll have to piece together the order of the tweets yourself.
17:23 masak swimming &
17:24 ash___ jnthn: i figured out a way of getting the RoleHOW.methods to work
17:25 thowe joined #perl6
17:25 ash___ without having to replace the method
17:26 jnthn ash___: oh?
17:27 ash___ jnthn: added a try catch and made it try to make an Array and if i get the class undefined error I make a ResizablePMCArray instead
17:28 jnthn ash___: Ah, that can work too ;-)
17:28 ash___ although i wanted to make sure it can do all the other stuff ClassHOW does, so i am still adding that stuff to it, then i'll send you a patch
17:29 jnthn Well, the one for roles should be simpler, I guess.
17:29 ash___ as in being able to say :local, :private, :parent
17:29 jnthn I don't think :parent makes sense for a role.
17:29 ash___ well a role can does other roles, right?
17:29 jnthn Yes, but composition is flattening.
17:29 takadonet I can read a single/multiple Fasta file using a grammar !!!!
17:30 ash___ ah, okay
17:30 takadonet also returns Sequence objects as well!
17:30 jnthn So post-composition, we don't know if the methods were defined in that role or in another role.
17:30 PerlJam takadonet++ awesome
17:30 jnthn ash___: But :private you can certainly do, yes. :-)
17:31 ash___ jnthn: k, well, then local doesn't make sense either since all the methods would be local
17:31 jnthn ash___: Yeah.
17:31 jnthn That's true.
17:32 ash___ well, i already did private so, yeah, ima just added a few more tests then send it to you to see how badly i am breaking the coding standards
17:32 * jnthn is just installing a C compiler at the moment on $new-laptop :-)
17:32 moritz_ [particle]: no, it's really PNM format
17:33 [particle] oh, i'm not familiar with that, i guess
17:34 moritz_ it's a very simplistic format that allows plaintext
17:34 moritz_ no need for binary output
17:34 TimToady hmm, slight inaccuracy Day 21, it's like the /x and /s mods are turned on, not /x and /m
17:35 TimToady the /m merely makes ^ and $ match like ^^ and $$, which isn't what's going on here
17:36 PerlJam well, /s just makes . match any character and that's not really relevant to the text either.
17:36 TimToady and there's no use of . so it probably makes sense to just drop the mention of /x
17:36 TimToady er, /m
17:37 moritz_ I'll s/m/s/
17:40 moritz_ http://moritz.faui2k3.org/tmp/mandel-color.png # 91x91 colored mandelbrot fractal, made with Rakudo
17:41 jnthn pretty :-)
17:52 ash___ jnthn: should i send you the patch?
18:00 stephenlb joined #perl6
18:20 colomon joined #perl6
18:22 rgrau joined #perl6
18:23 * colomon is trying a 501x501 color Mandelbrot set.  He can already hear the MacBook Pro fans revving up...
18:24 * TimToady thinks about O(n²)
18:25 colomon Rakudo avoids O(n^2) in this case by simply giving a Bus Error a few minutes into the run.
18:29 colomon phenny: tell masak Feel free to add github colomon / mandelbrot to proto.   Though I don't know that the format is right to be installed (it's just two scripts unless moritz_++ has been fiddling with it since the last time I looked).
18:29 phenny colomon: I'll pass that on when masak is around.
18:38 cotto joined #perl6
18:39 zibri stick off
18:39 zibri oops :(
18:45 Intensity joined #perl6
19:03 mberends joined #perl6
19:07 nihiliad joined #perl6
19:12 jonasbn joined #perl6
19:28 japhb joined #perl6
19:30 itnac joined #perl6
19:49 snearch_ joined #perl6
19:52 ShaneC joined #perl6
20:01 moritz_ http://dev.perl.org/perl6/ much improved, IMHO
20:02 payload joined #perl6
20:09 pmurias joined #perl6
20:12 nihiliad joined #perl6
20:13 cognominal joined #perl6
20:14 tempire joined #perl6
20:16 pmurias joined #perl6
20:17 Su-Shee joined #perl6
20:22 pmurias joined #perl6
20:23 TimToady yes, it is
20:23 jaffa8 moritz_,
20:23 jaffa8 hi
20:23 jaffa8 is the compiler faster now?
20:24 TimToady which compiler?
20:24 jaffa8 rakudo
20:24 mberends masak noted a slight subjective speedup
20:24 TimToady it's been getting a bit faster over time as parrot optimizes things
20:25 jaffa8 I see
20:27 xenoterracide joined #perl6
20:51 pmurias joined #perl6
20:54 synth joined #perl6
20:54 jaffa8 I get this error
20:54 jaffa8 Unable to find Perl 6 dynops and dynpmcs library.
20:54 jaffa8 Do you know how to fix it?
20:55 mberends jaffa8: did you 'make install' latest rakudo?
20:55 jaffa8 no
20:55 jaffa8 I downloaded the binaries
20:56 mberends jaffa8: which OS and which download URL?
20:57 jaffa8 this is one http://sourceforge.net/projects/parrotwin32/
20:58 * mberends looks
20:59 jaffa8 this two http://switch.dl.sourceforge.net/project/parrotwin32/parrot-rakudo%20addon/Parrot-1.9.0-Rakudo-24/setup-parrot-1.9.0-rakudo-24.exe
20:59 mberends the big green button seems to be for the docs only
20:59 jaffa8 on windows.
21:01 mberends jaffa8: it's possible you installed only the parrot docs, not the parrot runtime.  The second URL is Rakudo *for* Parrot 1.9, but *without* Parrot 1.9
21:02 jaffa8 to be more exact,http://switch.dl.sourceforge.net/project/parrotwin32/parrot-rakudo%20addon/Parrot-1.9.0-Rakudo-24/setup-parrot-1.9.0-rakudo-24.exe
21:02 mberends yeah, that one does *not* include parrot
21:03 jaffa8 but this is http://freefr.dl.sourceforge.net/project/parrotwin32/parrotwin32%20setup/Parrot-1.9.0/setup-parrot-1.9.0.exe
21:03 mberends ah, that makes more sense :)
21:03 jaffa8 less sense because it aint working.
21:04 mberends :(
21:04 pmurias joined #perl6
21:05 mberends jaffa8: which Perl 5 do you have installed? Strawberry or ActiveState?
21:06 jaffa8 What difference does it make?
21:06 jaffa8 Activestate.
21:06 diakopter I think: one is compiled with gcc; one is compiled with msvc
21:06 mberends :( if it was Strawberry, I would suggest re-building the rest from source
21:07 mberends but ActiveState does not include a C compiler
21:07 mberends what diakopter++ says is also a possible cause or errors
21:07 diakopter actually, I think the recent ones are set up to use msvc in cpan client if you have it installed
21:08 diakopter (and it's free)
21:08 diakopter (the express edition, at least)
21:08 diakopter ones==activeperl
21:08 BinGOs the last I recall the compiler tools came with the platform SDK
21:10 diakopter jaffa8: do you happen to have the binaries from mingw, msys, cygwin, or gnuwin32 in your %PATH% ?  any of those *might* be gumming it up
21:11 mberends jaffa8: in any case, re-building everything from source will give you a more reliable setup and better support from #perl6. I suggest you pick yourself one of the compiler toolchains and then re-build everything.
21:11 pmurias joined #perl6
21:12 mberends (we're not that good at providing or supporting binaries yet)
21:12 jaffa8 there are binaries
21:12 jaffa8 and there was no warnig
21:13 jaffa8 bad PR
21:13 jaffa8 very bad.
21:13 diakopter no warning for what?
21:13 jaffa8 that binaries do not work
21:13 jaffa8 do not download them
21:13 mberends sorry, whoever publishes the binaries is responsible
21:14 mberends some member of sourceforge.net
21:14 diakopter jaffa8: setup-parrot-1.9.0-rakudo-24.exe didn't work?
21:14 jaffa8 set up ruins
21:15 jaffa8 it does not install some fiels I think
21:15 jaffa8 Unable to find Perl 6 dynops and dynpmcs library.
21:15 jaffa8 I cannot see dynpmc library
21:15 jaffa8 How does that look like?
21:15 diakopter which windows do you have? 32-bit? 64-bit? which version?
21:15 jaffa8 WHat extension does it have?
21:16 * mberends cannot help that part - working in Linux today
21:17 diakopter jaffa8: I don't know where it thinks it's installing them
21:17 diakopter if you're on x64, my guess is that it wasn't tested ultra-thoroughly there
21:17 diakopter also Vista, Win7
21:18 * diakopter tries it on Win7 x64
21:19 jaffa8 EInfoed 7
21:19 jaffa8 Windows 7
21:19 diakopter 32-bit I guess?
21:19 jaffa8 x32
21:20 diakopter the account as which you ran the installer - was that an Administrator account?
21:20 mberends :) Einfoed 7 # blind typist
21:21 diakopter setup-parrot-1.9.0.setup installed to C:\Parrot-1.9.0
21:21 pmurias joined #perl6
21:21 mathw Aaaaah
21:21 colomon joined #perl6
21:21 mathw I believe I'm down for advent tomorrow and I've not written it!!
21:22 diakopter then when I ran setup-parrot-1.9.0-rakudo-24.exe, it says "the folder C:\Parrot-1.9.0 already exists; Would you like to install to that folder anyway?"
21:22 jaffa8 diakopter,no
21:22 mberends mathw: there have been a few juggles of the schedule, you could apply for an extension of time ;)
21:23 diakopter jaffa8: I'm just reporting what it's doing on my machine
21:23 jaffa8 diakopter, Iguess the answer is yes,
21:23 jaffa8 diakopter,you follow my path so it seems.
21:23 diakopter then I opened a cmd.exe
21:24 diakopter and typed  cd \Parrot-1.9.0\bin
21:24 jaffa8 perl6
21:24 diakopter and typed  perl6 -e "say ""hi"""
21:24 jaffa8 and?
21:24 diakopter and it outputted
21:24 diakopter hi
21:24 diakopter how many files are in your bin\
21:24 diakopter (under the parrot install dir)
21:25 diakopter mine has 26
21:25 jaffa8 miracle!
21:25 mberends \o/
21:25 diakopter jaffa8: how many files?
21:26 diakopter I mean
21:26 * mberends didn't know about that quote trick in cmd.exe :)
21:26 jaffa8 interesting
21:26 jaffa8 it works for me too in that way,.
21:26 diakopter the quoting rules for cmd.exe are................................... .................  ........... icky
21:26 mathw mberends: this has already been juggled once. And, actually, what I really need is somebody else to do it for me. I do not have time to write it anymore :(
21:27 diakopter you can escape a line break with ^
21:27 jaldhar joined #perl6
21:27 jaffa8 it looks like the current directory has to be the bin directory
21:27 diakopter jaffa8: ah
21:27 diakopter good discovery
21:27 jaffa8 yes, this works in this say
21:27 jaffa8 way
21:27 mberends mathw: what was your topic?
21:27 jaffa8 that is was the problem
21:27 diakopter also, you could try adding the bin\ dir to your %PATH%; I'm curious whether it works that way
21:28 mathw mberends: traits
21:28 diakopter set PATH=C:\Parrot-1.9.0\bin;%PATH%
21:28 mberends mathw: I know too little about traits to be of help, sorry :(
21:28 diakopter jaffa8: yes, that works too
21:29 mathw mberends: part of the problem is the amount of research I haven't done
21:29 mathw hardest of my three topics, and I've just been unable to sit down and write it
21:29 mathw I should have done it at the weekend, but other things intervened
21:29 mberends there's only so much procrastination that a project can take
21:29 mathw yes because then the deadline arrives
21:30 mathw I wonder if there's something else I could write it on which I could produce in time
21:30 mathw I've got a bit of time now...
21:30 mberends mathw: probably a better option, yes
21:32 mathw not that I can think of one
21:32 mathw fortunately for our completeness, masak's got gather/take sorted for tomorrow
21:32 mathw or rather, the next day
21:32 mathw bum bum bum
21:32 jaffa8 what is this Embedded comments now require backticks at line 379, near "{\r\n       "?
21:32 mathw anybody got any topic ideas?
21:33 mberends not yet
21:33 rjbs Is it possible for users to easily make new operators in Rakudo yet?
21:33 rjbs I would be interested to see that.
21:34 mberends jaffa8: usually there is something like #[ on the line
21:34 Tene Yes, that's possible in rakudo master.
21:34 mathw rjbs: overloading existing ones is possible
21:34 mathw adding new ones should be possible, although I'm not sure if I know that completely yet
21:34 rjbs That would be fun to read about.
21:34 mathw and we've not had it!
21:34 mathw operator overloading
21:34 mathw much easier to write about
21:34 mathw I shall do that
21:35 mberends :)
21:37 colomon \o/
21:37 colomon operator overloading is good.
21:37 colomon I already mentioned it in day 17, but I didn't really explain it at all.
21:38 rjbs can you recover from exceptions in p6?
21:38 colomon rjbs: p6 has try { }
21:38 jaffa8 ok, problems , problems
21:38 jaffa8 in Main (file <unknown>, line <unknown>)
21:38 rjbs Right, but can you recover?
21:38 rjbs not handle and continue, but return to the point of throw, a-la lisp conditions
21:38 colomon mathw: adding new operators is exactly the same as overloading existing ones.
21:39 colomon rjbs: I'd assume no, but that's not my area of expertise in the least.
21:39 Tene rjbs: yes.
21:39 rjbs Doing so would also be interesting to read about.
21:40 Tene it's implemented and functional in rakudo-ng, at least.  don't remember about master.
21:40 mathw colomon: excellent of course, it has 'is equal' 'is tighter' etc.
21:40 colomon mathw: but that isn't implemented yet (as far as I know) so I haven't bothered to learn about it.  :)
21:41 mathw it's certainly not completely implemented
21:41 colomon mathw: (I mean the "is equal" stuff, creating new operators works.)
21:43 diakopter jaffa8: if you nopaste your code, we can try to reproduce/diagnose the errors you're getting
21:45 jaffa8 how would you convert this into perl 6?
21:45 jaffa8 -->/(?:(?:^\s*PL = (\d+)\n)|^\s*PV = \(BLONG\)\n<<\"\n(.+)\">>\n|([^\n]+)\n)/gsm
21:46 mberends carefully
21:46 jaffa8 P5: is supposed to work
21:46 mberends jaffa8: it did in Pugs, but not in Rakudo
21:47 jaffa8 I rogot
21:47 jaffa8 I forgot
21:48 TimToady m:g/ [ [ ^^ \s* 'PL = ' (\d+)\n || ^^ \s* 'PV = (BLONG)' \n '<<"' \n (.+) '">>' \n || (\N+)\n/
21:48 jaffa8 I wrote a perl 5 regular expression converter
21:48 mberends I remember :)
21:48 zaslon lolfrettledhazblogged! frettled++ 'Dice Roller Deconstructed': http://howcaniexplainthis.blogspot.com/2009/12/dice-roller-deconstructed.html
21:48 diakopter carlin: mubot quit
21:49 diakopter zaslon: mubot?
21:49 zaslon Sorry, I don't understand that command
21:50 diakopter TimToady: :) was that from gimme6
21:54 jaffa8 conversion:m:g/[[^^\s*PL\ \=\ (\d+)\n]||^^\s*PV\ \=\ \(BLONG\)\n\<\<\"\n(.+)\"\>\>\n||(<-[\n]>)\n]/
21:54 diakopter I don't think you can escape a space
21:55 jferrero joined #perl6
21:55 diakopter std: /[[^^\s*PL\ \=\ (\d+)\n]||^^\s*PV\ \=\ \(BLONG\)\n\<\<\"\n(.+)\"\>\>\n||(<-[\n]>)\n]/
21:55 p6eval std 29385: [31m===[0mSORRY![31m===[0m␤No unspace allowed in regex (for literal please quote with single quotes) at /tmp/XLIv0lwFDD line 1:␤------> [32m/[[^^\s*PL\[33m⏏[31m \=\ (\d+)\n]||^^\s*PV\ \=\ \(BLONG\)\n\[0m␤FAILED 00:01 108m␤
21:56 jaffa8 rakudo: m:g/[[^^\s*PL\ \=\ (\d+)\n]||^^\s*PV\ \=\ \(BLONG\)\n\<\<\"\n(.+)\"\>\>\n||(<-[\n]>)\n]/
21:56 p6eval rakudo 8dc189: Colons cannot be used as delimiters in quoting constructs at line 2, near ":g/[[^^\\s*"␤in Main (file <unknown>, line <unknown>)␤
21:57 jaffa8 rakudo: $r=m:g/[[^^\s*PL\ \=\ (\d+)\n]||^^\s*PV\ \=\ \(BLONG\)\n\<\<\"\n(.+)\"\>\>\n||(<-[\n]>)\n]/;
21:57 p6eval rakudo 8dc189: Colons cannot be used as delimiters in quoting constructs at line 2, near ":g/[[^^\\s*"␤in Main (file <unknown>, line <unknown>)␤
21:57 diakopter rakudo: /[[^^\s*PL\ \=\ (\d+)\n]||^^\s*PV\ \=\ \(BLONG\)\n\<\<\"\n(.+)\"\>\>\n||(<-[\n]>)\n]/
21:57 p6eval rakudo 8dc189:  ( no output )
21:58 diakopter rakudo: say "hi" ~~ /[[^^\s*PL\ \=\ (\d+)\n]||^^\s*PV\ \=\ \(BLONG\)\n\<\<\"\n(.+)\"\>\>\n||(<-[\n]>)\n]/
21:58 p6eval rakudo 8dc189: ␤
21:58 diakopter ok
21:58 jaffa8 rakudo: say "PL =(8)\n"~~/[[^^\s*PL\ \=\ (\d+)\n]||^^\s*PV\ \=\ \(BLONG\)\n\<\<\"\n(.+)\"\>\>\n||(<-[\n]>)\n]/;
21:58 p6eval rakudo 8dc189: )␤␤
21:58 diakopter rakudo: say " " ~~ /^^\ /
21:59 p6eval rakudo 8dc189:  ␤
21:59 diakopter rakudo allows escaped space, I guess (but it shouldn't)
21:59 diakopter ng: say " " ~~ /^^\ /
21:59 p6eval ng 9d5018:  ␤
22:00 diakopter masakbot: rakudobug (though I'm guessing it's already reported/known)
22:00 frettled diakopter: the masakbot has quit :(
22:00 PerlJam I believe not allowing a backwhacked space is a relatively recent change.
22:00 jaffa8 Why not?
22:00 PerlJam (the rakudobug might not be reported)
22:01 diakopter PerlJam: that errormsg was added in July 09
22:02 diakopter http://perlcabal.org/svn/pugs/revision?rev=27770
22:05 mberends jaffa8: the reason for the change was a number of inconsistencies about the optionality of quoting in different parts of a regex. The changes resulted in a simpler, clearer set of rules.
22:08 pmurias joined #perl6
22:10 jaffa8 I think it made it somewhat worse.
22:10 PerlJam jaffa8: explain.
22:10 jaffa8 \ is one character
22:11 jaffa8 ' ' is 2.
22:11 jaffa8 in plus.
22:11 mberends jaffa8: the full discussion was very deep, trust me. the space was a kind of special case, or exceptions, and too many exceptions are bad for a language.
22:12 jaffa8 \ was familiar to me in a way
22:12 jaffa8 What is an exception?
22:12 mberends jaffa8: a situation where the normal processing does not occur
22:13 PerlJam mberends: well, to be fair, not being able to write "\ " for a space in the regex is an exception too  :)
22:13 mberends sorry about the inconvenience to you; it's for the greater good
22:13 synth joined #perl6
22:14 diakopter luckily for you, Perl 6 will let you change the regex syntax if you like
22:14 mberends PerlJam: yes, such points were made too istr :)
22:14 jaffa8 how?
22:15 bryan[c1] joined #perl6
22:15 mberends carefully
22:15 diakopter deriving a Grammar from the Perl6 Grammar
22:15 jaffa8 mberends is a careful man.
22:16 jaffa8 diakopter, I see what you mean
22:16 lisppaste3 bryan[c1] pasted "simple example" at http://paste.lisp.org/display/92448
22:17 bryan[c1] can someone help me understand the point of the $who - shift;?
22:17 bryan[c1] errr $who = shift;
22:17 bryan[c1] why is it declared first in the subroutine and how is it getting it's values?
22:18 jaffa8 qhat is this wrong?
22:18 PerlJam bryan[c1]: that certainly doesn't look like perl6 code :)
22:18 jaffa8 $timestr .= "' '||"; <---
22:18 bryan[c1] 2(PerlJam2): sorry banned from #perl
22:18 PerlJam bryan[c1]: perldoc -f shift  # tells you where it gets its value from
22:19 jaffa8 bryan[c1], it gets the first parameter from list of a parameters array @_ which is invisible but there.
22:19 bryan[c1] thats what i thought jaffa8
22:19 bryan[c1] but why doesnt he have to declare @_?
22:20 jaffa8 it is done by the interpreter automatically in the background I guess.
22:20 PerlJam bryan[c1]: you never have to declare @_
22:20 PerlJam bryan[c1]: why are you banned from #perl?
22:20 bryan[c1] well i asked a question
22:20 bryan[c1] a simple one
22:20 bryan[c1] and they were trying to be smartasses
22:21 jaffa8 I guess they are.
22:21 bryan[c1] so i told them they were trying to be smartassses instead of actually helping
22:21 bryan[c1] and of course the new guy that just /j the channel is always wrong
22:21 bryan[c1] but on any note
22:22 PerlJam bryan[c1]: antagonizing people and then expecting them to help you doesn't seem like a good plan.
22:22 PerlJam (even if they are being smartasses.)
22:22 bryan[c1] i asked "is there anyone that could help me understand blah blah"
22:22 bryan[c1] and they said yes
22:22 bryan[c1] and i asked for an explanation on the problem
22:23 bryan[c1] and they said "you didnt ask for an explanation, you asked if someone could help you, and the answer is yes"
22:23 bryan[c1] how immature is that?
22:23 bryan[c1] only children say things like that
22:23 jaffa8 or smartasses.
22:23 PerlJam No, bored pedants say things like that all the time too.
22:23 bryan[c1] pretty lame if you ask me
22:24 bryan[c1] so does that mean any variables initialized with shift; in a subroutine gets its values from the parameter list?
22:24 PerlJam True, but you are the one looking for help in their environment.  If you want it, you'll have to accept their culture.
22:24 PerlJam bryan[c1]: the docs for shift explain it all, read perldoc -f shift
22:24 jaffa8 PerlJam, I mean he may get lucky once
22:24 PerlJam (type that on your command line)
22:24 bryan[c1] perl never even works for me
22:24 bryan[c1] i cant even run perl scripts
22:24 jaffa8 he may meet humorous people.
22:25 bryan[c1] my computer magically hates it
22:25 mdxi social graces also don't work for you, apparently
22:25 PerlJam (or you could go to perldoc.perl.org to read the docs)
22:25 bryan[c1] thanks guys
22:26 bryan[c1] its not THAT hard to help someone out, now is it?
22:27 jonasbn bryan[c1], #perl is sort of a special case
22:27 jaffa8 bryan[c1], what if they have been helping all day
22:27 jaffa8 and they are full.
22:27 bryan[c1] then a simple question like mine should be a blessing
22:27 PerlJam jaffa8: then they are helpfull  :)
22:27 bryan[c1] you guys have it all wrong
22:27 bryan[c1] people shouldnt have to adapt to their channel and the way they speak
22:27 bryan[c1] and that applies to everybody
22:27 PerlJam bryan[c1]: why?
22:28 bryan[c1] because asking help for a problem shouldnt lead to an argument about the question and then a ban
22:28 bryan[c1] especially when they instigated it
22:28 PerlJam bryan[c1]: when traveling to foreign countries do you always expect the locals to speak your language?
22:28 mdxi the internet is not your free tech support call-center
22:28 mdxi and programmers are prickly
22:28 bryan[c1] thats a bad anology, PerlJam
22:29 bryan[c1] and im not treating it that way mdxi
22:29 PerlJam bryan[c1]: There are cultural differences.  Not recognizing them and adapting to them is *your* fault .
22:29 mdxi you're not listening to anyone, either
22:29 PerlJam bryan[c1]: I'm not saying they were right and you were wrong.
22:29 PerlJam bryan[c1]: I'm saying that together you and #perl made the situation worse.
22:29 jaffa8 PerlJam, I cannot say his fault, but then he has to face the consequences.
22:29 bryan[c1] why are you guys defending them?
22:29 bryan[c1] you're just as bad as them now
22:30 PerlJam bryan[c1]: No one needs defense here.
22:30 bryan[c1] i would assume it to be that way
22:31 jaffa8 what is .= in perl 6?
22:31 PerlJam bryan[c1]: btw, are we "just as bad"?  Did someone kick and ban you from #perl6?   :)
22:31 PerlJam jaffa8: ~=
22:31 PerlJam jaffa8: ~ is string concatenation.
22:31 PerlJam (assuming that's what you meant)
22:31 jaffa8 yes
22:31 bryan[c1] no, but if i wanted to defend my points i would already be gone
22:31 bryan[c1] and that = #perl
22:32 mberends bryan[c1]: I have witnesses the "smartass" treatment of visitors in #perl and personally I would not behave that way. However, it is their patch and is known as such. They are actually *very* smart people responsible for some awesome Perl 5 code, and their channel title warns you that it's not #perl-help or #perl-newbies. Sometimes they're polite enough to tell you that, and sometimes not.
22:32 PerlJam bryan[c1]: again, no one needs defense here.
22:32 PerlJam bryan[c1]: even you.
22:32 PerlJam bryan[c1]: we accept you.  We'll even give you hugs if you need them.
22:32 PerlJam :)
22:32 jonasbn mmmm hugs
22:32 PerlJam hugme hug bryan[c1]
22:32 * hugme hugs bryan[c1]
22:33 bryan[c1] all im trying to say is that people should be respectful
22:33 bryan[c1] even on the internet
22:34 bryan[c1] even to newbies
22:34 bryan[c1] everyone had to start somewhere
22:34 bryan[c1] it would have been easier for them to just not respond
22:34 stephenlb joined #perl6
22:36 eiro joined #perl6
22:37 mberends agreed. there are 30 channels about perl on freenode today
22:38 PerlJam More of them need to follow Postel's Law though  :)
22:38 jonasbn PerlJam, Postel's Law?
22:39 PerlJam (paraphrasing) "be strict in what you emit and liberal in what you accept"
22:39 PerlJam google it for a better treatment
22:40 PerlJam It's typically known as a design principle called "robustness"  :)
22:40 PerlJam (google "robustness principle" and you'll get some good links)
22:40 jonasbn PerlJam, found it on Wikipedia, thanks for the insight - never heard about it before
22:41 PerlJam jonasbn: have you read http://www.wall.org/~larry/natural.html  ?
22:42 jonasbn no
22:43 mathw hmm
22:43 mathw overriding infix:<==> seems to cause a segfault
22:43 cotto_w0rk joined #perl6
22:46 rjbs Another potentially interesting article would be on Pod6 and the $= variables.
22:53 mathw Could someone proofread my day 22 please
22:53 mathw it's quite short, but operators are actually very easy to explain
22:53 sjohnson mathw: i will, if you give me a url plz :)
22:54 * PerlJam is reading it now
22:55 sjohnson oh
22:55 * mathw wonders what's taking wordpress.com so long
22:56 PerlJam mathw: you've got a typo on "infix;:&lt+>:"  looks like just a misplaced semicolon
22:56 mathw damn
22:57 PerlJam mathw: in general, I dislike the "unfortunately this is broken in rakudo" sentences.
22:57 PerlJam the point of the advent calendar in my mind is to highlight was *is* working.
22:57 jaffa8 what about come back in half a year, things will be better?
22:57 PerlJam (not to hightlight was doesn't work)
22:57 PerlJam s/was/what/
22:58 mathw unfortunately there are obvious things here which don't work
22:58 soupdragon joined #perl6
23:02 PerlJam my only other comment is that it would be nice to have a unicode example at the end or maybe just a pointer to day 17 where colomon has a snowman operator
23:03 jaffa8 how would you write this @{ $table{"$0$1"} } in Perl 6?
23:04 Tene %table{"$0$1"}
23:05 jaffa8 %table can refer to an array?
23:05 PerlJam jaffa8: Did you want the perl 6 version of perl 5's $0 ?
23:05 mathw or %table«$0$1»
23:05 jaffa8 perl 6
23:05 jaffa8 I converter that alreaday.
23:05 Tene jaffa8: sigils in Perl 6 aren't used for context.
23:05 PerlJam okay, just checkign
23:06 Tene "my %table" approximately means "my Hash $table", kinda
23:07 mathw Tene: did you ever find that Lojban grammar?
23:07 Tene mathw: I think it's on the hard drive of my dead laptop.
23:07 mathw aaaw
23:07 mathw would you be interested in doing it again?
23:07 Tene It's currently in a usb enclosure that I don't have a cable for.
23:07 Tene mathw: right now, or eventually?
23:07 mathw eventually
23:08 Tene Yes.
23:08 mathw not like this minute
23:09 mathw hurrah
23:09 mathw I think it might be useful, that's all
23:09 Tene Sure.
23:09 Tene mathw: treed wrote a grammar for lojban mekso, iirc.
23:10 Tene He even got it performing math on Parrot, I think.
23:12 mathw nice
23:13 jaffa8 so what does $table{$prep} mean in Perl6?
23:13 rjbs looks up the entry for $prep in $table
23:13 rjbs which is presumably a thing that does named lookup
23:13 mathw it calls $table.postcircumfix:<{ }>($prep)
23:14 mathw if $table has a hash in it, that does a hash lookup
23:14 jaffa8 $table is a reference or is it taken as a string?
23:15 Tene jaffa8: it's an object.
23:15 rjbs ng:  my $x = Hash.new; my $y = 'foo';  $x{$y} = 'bar'; $x<foo>.say
23:15 p6eval ng 9d5018: sh: ./perl6: No such file or directory␤
23:15 rjbs rakudo:  my $x = Hash.new; my $y = 'foo';  $x{$y} = 'bar'; $x<foo>.say
23:15 p6eval rakudo 8dc189: bar␤
23:16 rjbs but $x doesn't need to be a hash; just needs to have the right interface.
23:16 Tene trailing <> is just the autoquoting form of {}
23:17 jaffa8 is {foo} gone?
23:17 mberends jaffa8: it became {'foo'}
23:18 rjbs or <foo> :-)
23:18 mathw barewords don't autoquote anymore. Too many headaches.
23:18 rjbs makes things simpler, yeah.
23:19 jaffa8 I see
23:20 jaffa8 rakudo: $r=\@b;
23:20 p6eval rakudo 8dc189: Symbol '$r' not predeclared in <anonymous> (/tmp/PL5jobC8Vb:2)␤in Main (file <unknown>, line <unknown>)␤
23:20 jaffa8 rakudo: @b=(1,2,3); $r=\@b;
23:20 p6eval rakudo 8dc189: Symbol '@b' not predeclared in <anonymous> (/tmp/biqDzXMaXO:2)␤in Main (file <unknown>, line <unknown>)␤
23:21 rjbs You need 'my'
23:21 jaffa8 rakudo: my @b=(1,2,3); $r=\@b;
23:21 p6eval rakudo 8dc189: Symbol '$r' not predeclared in <anonymous> (/tmp/Rn1UjgtLcc:2)␤in Main (file <unknown>, line <unknown>)␤
23:21 rjbs rakudo: my @b = (1,2,3); @b.WHAT.say
23:21 p6eval rakudo 8dc189: Array()␤
23:21 rjbs rakudo: my @b = (1,2,3); @b.WHAT.say; my $r = \@b; $r.perl.say; $r.WHAT.say
23:21 p6eval rakudo 8dc189: Array()␤[1, 2, 3]␤Array()␤
23:22 jaffa8 rakudo: my @b=(1,2,3); my $r=\@b; say $r[0];
23:22 p6eval rakudo 8dc189: 1␤
23:22 rjbs IS YOUR MIND BLOWN?
23:22 jaffa8 what is wrong?
23:23 rjbs Nothing.
23:23 rjbs Sorry, it's an expression.
23:23 rjbs It means: Are you amazed and confused yet?
23:23 jaffa8 not.. It seems to be similar to perl 5.
23:24 jaffa8 \ still makes a reference.
23:24 rjbs not really...
23:24 rjbs rakudo: my @a = (1,2,3); my $b = @a; $b[1].say
23:24 p6eval rakudo 8dc189: 2␤
23:24 rjbs If I recall correctly, \ is actually for making Captures.
23:25 jaffa8 rakudo: my @b=(1,2,3); my $r=\@b; say $r[2];
23:25 p6eval rakudo 8dc189: 3␤
23:25 jaffa8 rakudo: my @b=(4,7,9); my $r=\@b; say $r[2];
23:25 p6eval rakudo 8dc189: 9␤
23:26 jaffa8 rjbs, it seems to be working.
23:26 rjbs Note that you can *omit* the \
23:26 rjbs It isn't creating an extra reference with any value.
23:27 rjbs by which I mean, with any worth
23:27 jaffa8 rakudo: my @b=(4,7,9); my $r=\@b; $r[2]=99; say @b;
23:27 p6eval rakudo 8dc189: 4799␤
23:27 rjbs See?  They both refer to the same object.
23:27 rjbs I can't remember enough about \ to give a demonstration.
23:27 jaffa8 yes
23:28 jaffa8 rakudo: my @b=(4,7,9); my $r=@b; $r[2]=99; say @b;
23:28 rjbs Maybe somebody else could help. :)
23:28 p6eval rakudo 8dc189: 4799␤
23:28 jaffa8 rjbs, I heard you.
23:28 Tene rakudo: my @b=(4,7,9); my $r=@b; $r[2]=99; say @b.perl;
23:28 p6eval rakudo 8dc189: [4, 7, 99]␤
23:29 rjbs Tene: Can you demonstrate the utility of \ ?
23:29 Tene No.
23:29 rjbs Ok. :)
23:29 mathw \ makes a Capture now doesn't it
23:29 rjbs That's my recollection.
23:29 rjbs but I forget almost all of their semantics, just remember the theory
23:33 jaffa8 bye, thanks
23:34 Younder joined #perl6
23:35 vamped joined #perl6
23:36 vamped I'm wondering: how often the main branch of rakudo is updated, aside from the monthly release. Is it beneficial (to a non-developer) to git the new version more frequenlty than monthly?
23:40 arnsholt vamped: I think most of the development is taking place in the ng branch these days
23:40 arnsholt But if you want to really track Rakudo, having your own git copy isn't a bad idea
23:40 jaldhar joined #perl6
23:46 vamped k. thanks. I saw the Str.eval added, and wondered how much else they add. But prob not much in main.
23:51 colomon mathw: In the last paragraph, you might want to say something about the informal idiom of having both Unicode and "Texas" versions of operators.

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

Perl 6 | Reference Documentation | Rakudo