Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-08-09

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:02 Tene huf: that *is* a bug, and is *not* the desired behavior, but Rakudo doesn't do quantified zero-length matches right yet.
00:21 zorgnax joined #perl6
00:21 Visitor99 joined #perl6
00:22 risou joined #perl6
00:55 Visitor99 left #perl6
01:08 bwinkler joined #perl6
02:14 LaVolta joined #perl6
02:19 sorear Tene: Where is that specced?
02:21 Tene I don't see anything in S05.
02:37 alester joined #perl6
02:48 dduncan joined #perl6
03:05 plobsing joined #perl6
03:17 molaf joined #perl6
03:24 alester Yay, I found my first Rakudo bug.
03:25 alester pmichaud: What's the current method of submitting pathces/diffs/whatever
03:27 ashleydev joined #perl6
03:27 hercynium joined #perl6
03:28 sorear alester: send mail to rakudobug@perl.org with [PATCH] in the subject, wait 4-8 days for manual spam filtering
03:28 alester kthx
03:28 alester so we're still sending manual patches
03:29 sorear If you don't expect it to need public reveiw you can just link it here
03:31 dudulz joined #perl6
03:34 wayland76 http://www.rakudo.org/submit-a-bug-report
03:41 rwt joined #perl6
03:45 dalek rakudo: ded33e1 | pmichaud++ | docs/release_guide.pod:
03:45 dalek rakudo: Update release guide to note new publication strategy for
03:45 dalek rakudo: compiler release announcements.
03:45 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​ed33e17786b1fbc15ee3e1de3b33c192e04515f
03:45 melte alester: what's the bug
03:45 melte unless it's a secret bug
03:45 alester It might be.
03:45 alester Maybe it's my secret pmichaud bug.
03:46 melte if you share with me I'll share with you :P
03:46 alester oh, it's not a bug I'm reporting
03:46 alester I have the fix.
03:47 melte that's even better
03:52 alester I didn't even find the bug.  GCC did.
03:57 Visitor99 joined #perl6
04:01 sandra_f joined #perl6
04:14 dalek rakudo: 38f9f12 | duff++ | docs/release_guide.pod:
04:14 dalek rakudo: volunteer for the Oct release
04:14 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​8f9f12b4e7cdcb5db6a17511dc7da8d898737d5
04:16 leprevost joined #perl6
04:39 wayland76 Is this where I make comments like "secrecy bugs me"?  :)
04:39 alester It's not secret.
04:39 alester Can't git format-patch say "Just make a patch for a single commit"?  I can't see how
04:39 sorear -1 --stdout?
04:40 alester I gotta specify the commit.
04:40 sorear commit..commit^
04:41 sorear ?
05:05 Casan joined #perl6
05:09 alester joined #perl6
05:15 alester ok, patch sent
05:18 alester Should Rakudo be using PMCNULL and PMC_IS_NULL?
05:18 alester like the rest of Parrot?
05:19 gfx joined #perl6
05:28 kaare joined #perl6
05:31 [Coke] as opposed to?
05:31 LaVolta joined #perl6
05:34 simcop2387 joined #perl6
05:34 simcop2387 joined #perl6
05:41 dduncan left #perl6
05:43 ashleydev_ joined #perl6
05:45 simcop2387 joined #perl6
05:49 meppl joined #perl6
05:54 * sorear needs to overhaul the regex system, it's gotten to "AGH MY BRAIN" complexity and it can't even handle subrules properly
05:57 dalek niecza: 14e1c86 | sorear++ |  (5 files):
05:57 dalek niecza: Convert Cursor into a low-level type
05:57 dalek niecza: This will make interfacing it with the LTM engine much easier.
05:57 dalek niecza: review: http://github.com/sorear/niecza/commit/1​4e1c861d42d711d51669783994f37780e519514
05:57 dalek niecza: 0454014 | sorear++ |  (3 files):
05:57 dalek niecza: Start infrastructure for regex captures
05:57 dalek niecza: review: http://github.com/sorear/niecza/commit/0​4540146eb5e0e0936eb7ac34622d91f7fb30f1a
05:57 dalek niecza: 2925456 | sorear++ |  (3 files):
05:57 dalek niecza: Parsing for <foo> and <.foo>
05:57 dalek niecza: review: http://github.com/sorear/niecza/commit/2​925456997e45f6ccac00644ff1b5c4c1cb092e0
05:57 dalek niecza: 83b026b | sorear++ |  (5 files):
05:57 dalek niecza: Improve trace output; non-working attempt at <foo>
05:57 dalek niecza: review: http://github.com/sorear/niecza/commit/8​3b026b6aad66ebc9950d879c9002a8788ab48a9
06:08 uniejo joined #perl6
06:13 moritz_ good morning
06:16 Visitor99 hi...
06:16 Visitor99 i have a file with a line that reads "[GENERAL]" without the quotes...
06:17 Visitor99 running a program that reads that file (with the "lines" function)
06:18 Visitor99 i got Confused at line 22, near "[GENERAL]\n"
06:19 moritz_ Visitor99: show us the code, please
06:19 moritz_ it looks like you're compiling the file, not reading it
06:19 Visitor99 slurping the file on repl works, though
06:20 Visitor99 http://pastebin.ca/1913688
06:21 plobsing shouldn't that be .perl.say and not the other way around?
06:22 Visitor99 this is the file im reading: http://pastebin.ca/1913690
06:24 moritz_ Visitor99: I get no error when I run that code
06:25 moritz_ Visitor99: are you sure there's not an eval or so later in your file?
06:25 moritz_ plobsing: it will just produce .perl of True (from successful say())
06:26 Vaish joined #perl6
06:26 rcfox Is there a preferred module-starting program for Perl 6 modules?
06:26 plobsing moritz_: yes, but in void context, that's fairly useless
06:27 moritz_ Visitor99: or are you accidentally running perl6 zservrotation.conf  # instead of perl6 yourscript.pl zservrotation.conf  ?
06:27 moritz_ plobsing: useless, but harmelss
06:27 moritz_ rcfox: none at all. I plan to write one soonish though
06:30 agentzh joined #perl6
06:30 wtw joined #perl6
06:32 moritz_ Visitor99: still alive?
06:33 moritz_ phenny: tell pmichaud http://www.perlmonks.org/?node_id=853727 time to split the core compilation, no? :-)
06:33 phenny moritz_: I'll pass that on when pmichaud is around.
06:34 Visitor99 sorry i was busy.... well i can't reproduce the error either :S i'm trying to
06:35 Visitor99 no, i didn't try to run the config file... just checked the command history
06:36 moritz_ that's where I get the same error as you did
06:36 moritz_ anyway, shower &
06:38 foodoo joined #perl6
06:40 Visitor99 left #perl6
06:47 * sorear decides to take a detour into gather/take and reimplement regex using that
06:55 Casan joined #perl6
06:58 cono rakudo: my %h = <a b>; my @x .= push(1); my $l = %h; @x.push($l); @x.perl.say
06:58 p6eval rakudo 38f9f1: OUTPUT«[1, {"a" => "b"}]␤»
06:58 cono how to omit $l ?
07:02 sorear @x.push($(%h)) maybe?
07:02 rcfox Uh. I thought they were trying to get away from that?
07:04 cono sorear: thanks
07:08 melte rakudo: my %h = <a b>; my @x .= push(1); @x.push({%h}); @x.perl.say # why not?
07:08 p6eval rakudo 38f9f1: OUTPUT«[1, {"a" => "b"}]␤»
07:10 sorear because it clones the hash
07:11 sorear I think, there is an argument to be made here for push to impose scalar context
07:11 sorear since you can always use |@foo if you want to push the elements of an array
07:12 rcfox Why can't we just get a reference to the hash? :P
07:13 drrho joined #perl6
07:13 cono I guess $(%h) is a reference
07:14 sorear %h is a flattening reference
07:14 sorear $(%h) is a non-flattening reference to the same item
07:15 cono rakudo: my %h = <a b>; my @x .= push(1); @x.push(%h); @x.flat.perl.say
07:15 p6eval rakudo 38f9f1: OUTPUT«[1, "a" => "b"]␤»
07:15 cono rakudo: my %h = <a b>; my @x .= push(1); @x.push($(%h)); @x.flat.perl.say
07:15 p6eval rakudo 38f9f1: OUTPUT«[1, {"a" => "b"}]␤»
07:15 rcfox Why $(), and not \ ?
07:15 cono rakudo: my %h = <a b>; my @x .= push(1); @x.push(\%h); @x.flat.perl.say
07:15 p6eval rakudo 38f9f1: OUTPUT«[1, \("a" => "b")]␤»
07:16 melte rakudo: my $x = 5; say $($($(a)))
07:16 rcfox :\
07:16 p6eval rakudo 38f9f1: OUTPUT«Could not find sub &a␤  in main program body at line 22:/tmp/EFXYxTxDg9␤»
07:16 melte woops
07:16 melte rakudo: my $x = 5; say $($($(x)))
07:16 p6eval rakudo 38f9f1: OUTPUT«Could not find sub &x␤  in main program body at line 22:/tmp/J62xd5xIBT␤»
07:16 sorear \%h creates a capture
07:16 melte rakudo: my $x = 5; say $($($($x)))
07:16 p6eval rakudo 38f9f1: OUTPUT«5␤»
07:16 sorear a capture would do something similar, but it need to be explicitly derefernced
07:17 melte rakudo: my $x = 5; say $($($($x))).WHAT
07:17 p6eval rakudo 38f9f1: OUTPUT«Int()␤»
07:17 melte yeah.
07:17 sorear rakudo: my $x = 5; say \\\\$x.WHAT
07:18 p6eval rakudo 38f9f1: OUTPUT«Capture()<0x5ee2380>␤»
07:18 moritz_ http://www.dagolden.com/index.php/9​47/thoughts-on-perl-6-hype-and-back​lash/comment-page-1/#comment-3977 dagolden++
07:18 moritz_ and I see pmichaud and I commented nearly simulateously with similar replies :-)
07:19 melte "Rakudo is slow" implies "Rakudo is", and that's a big step forward.
07:19 melte hah, nice
07:20 moritz_ actually I meant to link to the blog post, not only my comment
07:20 moritz_ but I sure you know how to scroll up :-)
07:21 melte :P
07:31 tadzik joined #perl6
07:31 tadzik morning
07:31 moritz_ o/
07:36 pmichaud good morning, #perl6
07:36 phenny pmichaud: 06:33Z <moritz_> tell pmichaud http://www.perlmonks.org/?node_id=853727 time to split the core compilation, no? :-)
07:37 sorear I've already tried to split Rakudo's core compilation
07:37 sorear it resulted in headaches and no progress
07:38 * sorear suspects that fixing #1734 will improve the situation greatly
07:40 pmichaud sorear: hearing you say that makes me even more inclined to try to add it soon.
07:41 baest pmichaud: that's the spirit :)
07:42 rcfox Is it possible to define a coersion from one type to another?
07:42 pmichaud I'm not so sure it'll be that big of an improvement.. but you often have really good intuitions on things like that and I'm inclined to trust thie one.  :)
07:42 pmichaud rcfox: S13, "Type casting"
07:42 pmichaud er, "Type Casting"
07:42 rcfox Thanks.
07:42 pmichaud but much of type casting and coercion is NYI in rakudo, because the spec is still a bit slushy in a few areas.
07:43 pmichaud I suspect that the  TypeName(...)   syntax will survive as a casting mechanism however.
07:43 pmichaud Also,   $value.Type  is likely to survive as well.
07:43 pmichaud e.g.,  $value.Int should coerce to an Int (if $value knows how to do that)
07:44 sorear Are there any plans to make my Num $foo = 1.5 work?
07:44 pmichaud sorear: well, that's the slushy part.  :)
07:45 pmichaud I'm not sure we want autocoerce to be the default.
07:46 pmichaud some speculation has been a trait on variables that indicates coercion -- e.g.,   my Num $foo as Num   automatically coerces all foo values to Num
07:46 pmichaud I suppose we could also do   my Num $foo is coerced ...
07:46 rcfox Ew, you wouldn't want to write Num twice.
07:47 pmichaud My gut tells me that fundamentally we want to preserve some orthogonality between "type constraint" and "coercion"
07:48 pmichaud but really a programmer probably really wants
07:48 pmichaud my Real $foo = 1.5
07:48 pmichaud or
07:48 pmichaud my Numeric $foo = Num(1.5)
07:49 rcfox Perhaps Num was a poor choice for a name.
07:49 pmichaud that's one of those things that is probably not too late to change  :-)
07:49 rcfox What's the difference between Real and Num?
07:50 pmichaud Real is the generic class/role for "things that represent real numbers"
07:50 rcfox Ah.
07:50 pmichaud i.e., it excludes Complex
07:50 rcfox How about Float?
07:50 pmichaud there isn't a Float type, atm.  What we think of as Float is currently Num.
07:50 rcfox Yeah, so use that.
07:51 pmichaud I suspect calling it Float might be better.
07:51 pmichaud at one point TimToady liked to preserve the symmetry that the concrete types had 3-character names, I think
07:51 rcfox Most of the time, when I write Num, I mean Numeric.
07:52 pmichaud but given that Nums are in fact much rarer than they previously were, explicitly calling them "Float" might be much correct-er.
07:52 pmichaud of course, someone writing   my Float $foo = 1.5;  might still expect some sort of auto-coercion to take place.
07:52 pmichaud (which I think we want to avoid)
07:54 rcfox I think you'd want to avoid auto-coercion on function arguments, but probably not on lexical variables.
07:54 * rcfox probably used that term incorrectly.
07:55 rcfox I mean, if you're in the middle of writing a function, you probably want my Float $x = 1.5; to work.
07:56 pmichaud yes, but do you later want    $x = 3/4;  to work?
07:56 moritz_ is the idea that less references are kept around, so the GC can collect more?
07:56 rcfox If you're taking arbitrary values, then you probably want to make sure that your value is representable in a float.
07:56 moritz_ (wrt TT #1734)
07:56 pmichaud moritz_:  Yes.
07:56 pmichaud right now a subroutine holds on to all of the temporaries until it exists.
07:56 pmichaud *exits
07:57 pmichaud and if there's something holding on to the closure, then those temporaries exist for an even longer period of time.
07:58 pmichaud (types)  it's possible that some types imply a coercion as well as a constraint.
07:58 rcfox Is there a difference between coersion and calling the <Class Name>() method?
07:59 pmurias joined #perl6
07:59 pmichaud rcfox: that's another part of the slushiness.  The answer has varied over time and we haven't quite figured out the exact formulation.
07:59 rcfox Heh, okay.
08:00 pmichaud i.e.,  "Num" could be a type that coerces from Numeric if it can, otherwise it's a type check failure.
08:00 pmichaud i.e.,   my Num $x = 1.5   will go ahead and coerce 1.5 to a Num since a Rat is numeric,  but   my Num $x = "1.5"  might fail
08:01 moritz_ rakudo: say <a b c>[0..*-2]
08:01 p6eval rakudo 38f9f1: OUTPUT«Method 'Num' not found for invocant of class 'WhateverCode'␤  in 'Cool::Numeric' at line 1757:CORE.setting␤  in 'Cool::Numeric' at line 1758:CORE.setting␤  in 'infix:<==>' at line 6581:CORE.setting␤  in 'Range::iterator' at line 4557:CORE.setting␤  in 'Any::postcircumfix:<[
08:01 p6eval ..]>' at …
08:01 pmichaud the problem with that approach is that the programmer has to keep a mental list of which types are coercing and which are not.  and in general we try to eliminate such arbitrary lists from p6
08:02 pmichaud moritz_: I suspect that just needs a postcircumfix:<[ ]>(WhateverCode $x)   method in Any-list.pm
08:02 pmichaud oh, wait
08:02 pmichaud that's not it
08:02 pmichaud I suspect the problem is that  0..*-2  isn't coming out to be a WhateverCode
08:03 pmichaud rakudo:  say  (0..*-2).WHAT
08:03 p6eval rakudo 38f9f1: OUTPUT«Range()␤»
08:03 pmichaud aye, that's the problem.
08:03 pmichaud feel free to submit rakudobug (if not already submitted)   (more)
08:04 pmichaud I have a local branch with a Range re-implementation (that speeds them up), I can probably get the WhateverCode variant there as well.
08:05 rcfox What about something like: "my Num:coerced $foo = 1.5" ?
08:06 sorear Why would there be a WhateverCode variant?
08:06 sorear S02 is pretty clear about infix:<..> not currying Whateve4rs
08:06 moritz_ sorear: but *-2 curries
08:06 tadzik what is *-2 about to mean, in terms of (0..*-2) Range?
08:06 pmichaud From S03:  "C<Whatever> types are also supported to represent -Inf/+Inf.  If
08:06 pmichaud either endpoint is a C<WhateverCode>, the range is curried into
08:06 pmichaud another C<WhateverCode>.
08:06 pmichaud "
08:06 pmichaud so I suspect S02 is fossil.
08:07 pmichaud tadzik: (0..*-2)  in the context of  postcircumfix:<[ ]>  would mean "all elements but the last"
08:08 rcfox Does Perl 6 have heredocs?
08:08 sorear Yes.
08:09 pmichaud rcfox: yes, but NYI in rakudo.
08:09 rcfox Ah.
08:09 sorear niecza: say q:to"foo";␤Hello, world␤foo␤
08:09 p6eval niecza 8f98e61: OUTPUT«MAIN.cs(7,54): error CS1061: Type `Niecza.Frame' does not contain a definition for `DepthMark' and no extension method `DepthMark' of type `Niecza.Frame' could be found (are you missing a using directive or an assembly reference?)␤MAIN.cs(34,54): error CS1061: Type
08:09 p6eval ..`Niecza.Frame' d…
08:09 pmichaud rcfox: S02, search for "heredocs"
08:09 pmichaud (may need to go down several occurrences)
08:09 pmichaud "Heredocs are no longer written with C<<< << >>>, but with an adverb on
08:09 pmichaud any other quote construct:
08:10 pmichaud ..."
08:10 sorear moritz_: it's been more than two hours and niecza still hasn't been rebuilt
08:10 rcfox I need the synopses all on one page. :P
08:10 moritz_ sorear: ah, niecza build fails with Can't locate File/ShareDir.pm
08:10 moritz_ sorear: environment problems, I suspect
08:11 pmichaud EPERLMONKSTOOSLOW
08:11 sorear moritz_: pmurias added that as a dependency of STD
08:11 sorear it's a CPAN module
08:11 * sorear should update the README
08:12 pmurias it's used for installing data files
08:13 moritz_ sorear: it's installed, but probably not for the perl that the cron job picks up... which is why I said "environment problems"
08:13 moritz_ manually rebuilt now... try again :-)
08:13 sorear pmurias: it's also used at runtime to find them
08:13 sorear niecza: say q:to"foo";␤Hello, world␤foo␤
08:13 p6eval niecza 83b026b: OUTPUT«Hello, world␤␤»
08:16 sorear hmm
08:16 sorear should it have removed the newline?
08:16 pmichaud I would think no.
08:16 sorear wait, wait, 'take' isn't syntax?!
08:16 pmichaud it's a function, like return.
08:16 moritz_ why should it be?
08:17 moritz_ (syntactic, I mean)
08:20 d4rt joined #perl6
08:20 sorear moritz_: because it is as strongly tied to the lexical scope it is used from as, say, $foo
08:20 pmurias sorear: yes
08:21 pmichaud it is?  take can be dynamic.
08:21 moritz_ sorear: I don't see the relation to lexical scope at all
08:21 moritz_ return() has such a relation
08:22 pmichaud rakudo:  sub xyz() { take 1;  take 5;  };    say gather { xyz() };
08:22 p6eval rakudo 38f9f1: OUTPUT«15␤»
08:22 pmichaud moritz_++   # yes, it's lexotic like return
08:23 pmichaud well, actually, 'take' might be strictly dynamic.
08:23 pmichaud and not lexotic.
08:24 pmichaud that's probably why it doesn't appear in the list of lexotics in S04.
08:25 renormalist joined #perl6
08:28 TiMBuS rakudo: my @a = (1,2,3); my %h<a> = @a; @a[1] = 'foo'; %h.perl.say;
08:28 p6eval rakudo 38f9f1: OUTPUT«===SORRY!===␤Confused at line 22, near "my %h<a> ="␤»
08:28 TiMBuS oh
08:28 moritz_ rakudo: sub f(&x) { x(4) }; f(*-2)
08:28 p6eval rakudo 38f9f1:  ( no output )
08:28 moritz_ rakudo: sub f(&x) { x(4) }; say f(*-2)
08:28 TiMBuS rakudo: my @a = (1,2,3); my %h; %h<a> = @a; @a[1] = 'foo'; %h.perl.say;
08:28 p6eval rakudo 38f9f1: OUTPUT«2␤»
08:28 p6eval rakudo 38f9f1: OUTPUT«{"a" => [1, "foo", 3]}␤»
08:30 TiMBuS i guess that's intended
08:30 dakkar joined #perl6
08:34 moritz_ pmichaud: simply adding a an  our multi method postcircumfix:<[ ]>(WhateverCode $x) {  does not help, it doesn't get dispatched to
08:44 rcfox rakudo: say -sin(0);
08:44 p6eval rakudo 38f9f1: OUTPUT«-0␤»
08:44 rcfox -0. :\
08:45 sorear -0 is a great number
08:45 rcfox rakudo: say (-sin(0)).WHAT;
08:45 p6eval rakudo 38f9f1: OUTPUT«Num()␤»
08:49 pmurias sorear: did you add a debugging thing to STD recently which prints out AUTOLOAD something?
08:49 sorear I don't think so
08:49 sorear Context?
08:50 dalek rakudo: c1e19af | moritz++ | docs/ChangeLog:
08:50 dalek rakudo: update ChangeLog a bit
08:50 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​1e19af5496cb694f17b5d7029f57d08ea415f19
08:50 pmurias sorear: AUTOLOAD _SUBSUME gets printed out
08:50 alexm joined #perl6
08:51 pmurias i'll use Carp::Always to find and kill that if it's nothing obvious
08:52 sorear what are you doing to get that?
08:53 pmurias compiling things using mildew
08:54 sorear sounds like you've broken one or more of the undocumented invariants of Cursor
08:54 moritz_ rakudo: say 'Foo::Bar::Baz'.subst(:g, '::', '-')
08:54 p6eval rakudo 38f9f1: OUTPUT«Foo-Bar-Baz␤»
08:54 sorear possibly an invariant I didn't even know existed
08:54 pmurias sorear: i don't directly access cursors
08:54 sorear not directly, sure
08:55 sorear don't just remove the print statement; the fact that it's being reached is a bug
08:56 sorear _SUBSUME should only ever be called on cursors, not lazy iterators
08:56 kiithroen joined #perl6
08:57 pmurias why is there an active debugging stmt in STD?
08:59 sorear someone probably forgot to change it to a die
09:07 pmurias sorear: maybe i have old something, sometime some STD temporary files get corrupted
09:12 TiMBuS rakudo: my $a = 0..*-2; $a(5).say;
09:12 p6eval rakudo 38f9f1: OUTPUT«invoke() not implemented in class 'Range'␤  in main program body at line 22:/tmp/KKGaxQ_kIC␤»
09:12 TiMBuS oh
09:16 TiMBuS rakudo: my $a = (0..*-2); $a[1].say;
09:16 p6eval rakudo 38f9f1: OUTPUT«Method 'Num' not found for invocant of class 'WhateverCode'␤  in 'Cool::Numeric' at line 1757:CORE.setting␤  in 'Cool::Numeric' at line 1758:CORE.setting␤  in 'infix:<==>' at line 6581:CORE.setting␤  in 'Range::iterator' at line 4557:CORE.setting␤  in 'Iterable::list' at line
09:16 p6eval ..3569:…
09:17 TiMBuS oh so its parsing like (0 .. {$_ - 2})
09:18 TiMBuS but its still a range?
09:18 TiMBuS rakudo: my $a = (0..*-2); $a.to.say;
09:18 p6eval rakudo 38f9f1: OUTPUT«_block114␤»
09:23 sorear yes
09:23 TiMBuS thats not fun at all
09:23 briang joined #perl6
09:25 LaVolta left #perl6
09:37 jfried joined #perl6
09:38 moritz_ oh
09:39 moritz_ it should curry over WhateverCode, but not over Whatever
09:41 pmichaud correct
09:42 pmichaud I'm guessing
09:43 pmichaud method postcircumfix:<[ ]>(WhateverCode $x) { self.[ $x(self.elems) ] }   # or something like this
09:43 moritz_ s/WhateverCode/Callable/
09:43 pmichaud oh, I think we already have Callable, in which case it's not needed.
09:44 pmichaud so we just need the range currying
09:44 moritz_ rakudo: say <a b c>.[-> $x { $x - 1 }]
09:44 p6eval rakudo 38f9f1: OUTPUT«c␤»
09:44 moritz_ indeed
09:44 pmichaud I know we have callable -- that's how   .[*-1]   works
09:44 pmichaud our multi method postcircumfix:<[ ]>(&block) { self[&block(self.elems)]; }
09:44 pmichaud yes, already there :-)
09:45 pmichaud okay, I'll work on range currying when I pick up the range branch again.
09:45 pmichaud (probably Monday sometime)
09:45 pmichaud (yes, I know it's Monday already... but I'm still on Sunday thinking)
09:45 pmichaud my sleep schedule is soooooooo messed up
09:45 mathw You're operating in a different time zone to the one your body is in
09:46 mathw It's perfectly okay
09:46 mathw Just confusing :)
09:46 pmichaud mathw: I wish it were that simple.
09:46 sorear YAPC::NA, OSCON, and YAPC::EU all in two weeks sounds like a good excuse
09:46 sorear I don't have one.
09:46 pmichaud sorear: well, Hawai'i too (and it was six weeks)
09:46 pmichaud but yes, that's partially why
09:47 pmichaud I suspect it even goes back to not getting sufficient sleep in March and April
09:47 sorear What did you do in Hawai'i?
09:47 * mathw puts pmichaud down for hibernating in September
09:47 pmichaud family vacation :-)
09:48 sorear (Variable)th.outer.outer.outer.outer​.outer.outer.outer.outer.lex[@"Any"] // I think I need to optimize this
09:49 moritz_ you can know at compile time which outer pad holds the variable
09:49 sorear yes
09:49 pmichaud anyway, speaking of sleep, it's time for me to get some.
09:49 moritz_ 'night
09:49 sorear but not which instance of it...?
09:49 mathw sorear: also, that code's not very flexible :)
09:50 sorear mathw: generated code
09:50 sorear the compiler counts the number of outer links that need to be followed
09:50 mathw ah
09:50 mathw you're right though, still not very optimal
09:51 mathw that's potentially a lot of needless method calls
09:51 sorear field lookups only
09:51 sorear still
09:53 mathw still not great
10:08 wamba joined #perl6
10:09 sorear ok.  now, I can start handling regexes saner, maybe
10:09 araujo joined #perl6
10:10 dalek niecza: b732455 | sorear++ |  (8 files):
10:10 dalek niecza: Implement gather/take
10:10 dalek niecza: review: http://github.com/sorear/niecza/commit/b​732455e9593a14700ea40b6735302025ad9d5bb
10:10 dalek niecza: 6a1c284 | sorear++ | README:
10:10 dalek niecza: Add new dependency
10:10 dalek niecza: review: http://github.com/sorear/niecza/commit/6​a1c284d95c72266e93c69370341e6f952f0f77c
10:15 jferrero joined #perl6
10:28 patrickas joined #perl6
10:29 patrickas hello #perl6!
10:29 moritz_ hello patrickas :-)
10:32 patrickas hello moritz_ can someone take a look at a small peice of code and tell me if I am doing something horribly wrong ? http://gist.github.com/515259
10:34 moritz_ patrickas: probably needs another variant that deals with * on the RHS
10:39 patrickas moritz_ the problem is a bit weirder so I thought I was doing something wrong on a more fundamental level. let me try an example with evalbot
10:40 moritz_ patrickas: that eqv thing also won't work on  1, -2, 4 ...^32  or so
10:40 synth joined #perl6
10:43 patrickas rakudo: our sub infix:<...^> ($lhs, $rhs) {my @all := ($lhs ... $rhs);gather {loop {my $current = @all.shift();last if $current eqv $rhs;take $current;}}}; say (1 ...^ 5.5); say (1 ...^ 5.5).join(', ');
10:43 p6eval rakudo 38f9f1: OUTPUT«12345»
10:43 patrickas there ...  say (1 ...^ 5.5) works but say (1 ...^ 5.5).join(', ') gives nothing!
10:43 moritz_ rakudo: say ^5.5
10:43 p6eval rakudo 38f9f1: OUTPUT«012345␤»
10:44 Grrrr joined #perl6
10:52 azert0x joined #perl6
11:04 patrickas also I tracked the bug in MAIN reported a couple of days ago to this:
11:04 patrickas rakudo: sub foo ( $f = rand ) {}; say Capture.new() ~~ &foo.signature;
11:04 p6eval rakudo c1e19a: OUTPUT«0␤»
11:04 patrickas rakudo: sub foo ( $f = 'string' ) {}; say Capture.new() ~~ &foo.signature;
11:04 p6eval rakudo c1e19a: OUTPUT«1␤»
11:06 patrickas rakudo: sub foo ( $f = rand ) {say $f}; say Capture.new() ~~ &foo.signature; foo();
11:07 p6eval rakudo c1e19a: OUTPUT«0␤0.461541885367723␤»
11:19 thebird joined #perl6
11:30 bwinkler joined #perl6
11:35 Italian_Plumber joined #perl6
11:57 alexm left #perl6
12:00 takadonet morning all
12:02 envi^home joined #perl6
12:08 drbean joined #perl6
12:14 macroron joined #perl6
12:26 daxim joined #perl6
12:27 briang left #perl6
12:33 alester joined #perl6
12:50 bluescreen joined #perl6
12:58 alexm joined #perl6
13:17 perlygatekeeper joined #perl6
13:26 smash joined #perl6
13:26 smash hello everyone
13:27 takadonet smash:  hey
13:30 oha joined #perl6
13:38 bbkr rakudo: my $x = 1 // *; $x.WHAT.say # bug? "1" is expected
13:38 p6eval rakudo c1e19a: OUTPUT«WhateverCode()␤»
13:40 oha is there a way to put hardcode some bytes in a string in rakudo?
13:41 oha i do not really need a pack here, just a way to hardcode some bytes on a socket
13:42 mathw Strings in Perl 6 are unicode, so not really suitable for that kind of thing
13:42 mathw you'll be wanting a Buf, I think
13:42 mathw I'm not quite sure what the current state of those is in Rakudo
13:45 plobsing joined #perl6
13:46 oha i'll check about Buf, ty mathw
13:47 [particle] star: my Buf $x = qq{\d104\d105}; print $x"
13:47 p6eval star 2010.07: OUTPUT«===SORRY!===␤Unrecognized backslash sequence: '\d' at line 22, near "104\\d105};"␤»
13:47 [particle] star: my Buf $x = qq{\d104}; print $x"
13:47 p6eval star 2010.07: OUTPUT«===SORRY!===␤Unrecognized backslash sequence: '\d' at line 22, near "104}; prin"␤»
13:48 [particle] star: my Buf $x = qq{\x68\x69}; print $x"
13:48 p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "print $x\""␤»
13:48 mathw oha: Buf is designed for binary I/O, so it's just the thing you need, and it's been worked on by masak++ for GSoC
13:48 [particle] lemme see if i can remember this syntax...
13:49 [particle] star: my Buf $x = "\x{68 69}"; print $x
13:49 p6eval star 2010.07: OUTPUT«===SORRY!===␤Unrecognized backslash sequence: '\x' at line 22, near "{68 69}\"; "␤»
13:49 oha [particle], looking at the src, it seems a list of items...
13:50 d4rt joined #perl6
13:50 [particle] there's a way to list a bunch of hex, oct, whatever terms... i just can't remember it atm. sigh
13:50 moritz_ \c[...]
13:53 frettled rakudo: Buf.new([35,45]).say
13:53 p6eval rakudo c1e19a: OUTPUT«Buf()<0x5ebb4b0>␤»
13:53 oha moritz_, ty i'll check right now
13:53 [particle] star: my Buf $x = "\c{68 69}"; print $x
13:53 p6eval star 2010.07: OUTPUT«===SORRY!===␤Unrecognized \c character at line 22, near "{68 69}\"; "␤»
13:53 [particle] star: my Buf $x = \c{68 69}; print $x
13:53 p6eval star 2010.07: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<{ }>, couldn't find final '}' at line 22␤»
13:53 frettled rakudo: Buf.new(:16<6a>).say
13:54 p6eval rakudo c1e19a: OUTPUT«too many positional arguments: 2 passed, 1 expected␤  in main program body at line 1␤»
13:54 [particle] ok, so maybe that isn't yet implemented
13:54 frettled duh
13:54 moritz_ str: my $x = Buf.new([:16<68 69>]); say $x.decode
13:54 frettled rakudo: Buf.new([:16<6a>]).say
13:54 p6eval rakudo c1e19a: OUTPUT«Buf()<0x5a4c800>␤»
13:54 moritz_ star: my $x = Buf.new([:16<68 69>]); say $x.decode
13:54 p6eval star 2010.07: OUTPUT«===SORRY!===␤Malformed radix number at line 22, near "<68 69>]);"␤»
13:54 moritz_ star: my $x = Buf.new([:16(68)]); say $x.decode
13:54 p6eval star 2010.07: OUTPUT«h␤»
13:54 frettled moritz_: I think radix numbers use the <> syntax without being listy
13:55 moritz_ star: my $x = Buf.new([:16(68)]); say $x
13:55 p6eval star 2010.07: OUTPUT«Buf()<0x683eb90>␤»
13:56 frettled star: my $x = Buf.new([:16<6a>]).Str.say
13:56 p6eval star 2010.07: OUTPUT«Buf()<0x83a6c30>␤»
14:00 slavik star: for 1..10 -> $a,$b { say $a,$b; }
14:00 p6eval star 2010.07: OUTPUT«12␤34␤56␤78␤910␤»
14:01 slavik star: for 1..10 -> @a { say @a; }
14:01 p6eval star 2010.07: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional but got Int instead␤  in <anon> at line 2:/tmp/u7Lei6xv2w␤  in main program body at line 1␤»
14:01 slavik :(
14:01 moritz_ star: for 1..10 -> *@a { say @a; }
14:01 p6eval star 2010.07:  ( no output )
14:01 LaVolta joined #perl6
14:02 slavik moritz_: I am wondering how I can restrict that array to a specific number of elements
14:03 moritz_ slavik: with a 'where'-block, or with a subsignature
14:04 moritz_ rakudo: (-> @a ($, $, $) { say ~@a}).(1, 2, 3)
14:04 p6eval rakudo c1e19a: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional but got Int instead␤  in <anon> at line 22:/tmp/p7CdJJiE92␤  in main program body at line 22:/tmp/p7CdJJiE92␤»
14:04 moritz_ rakudo: (-> @a ($, $, $) { say ~@a}).([1, 2, 3])
14:04 p6eval rakudo c1e19a: OUTPUT«1 2 3␤»
14:04 moritz_ rakudo: (-> @a ($, $, $) { say ~@a}).([1, 2, 3, 4])
14:04 p6eval rakudo c1e19a: OUTPUT«Too many positional parameters passed; got 4 but expected 3 in sub-signature of parameter @a␤  in <anon> at line 22:/tmp/2aDopife1l␤  in main program body at line 22:/tmp/2aDopife1l␤»
14:04 bbkr std: s///
14:04 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Regex not terminated at /tmp/BB7W_zhx1P line 1 (EOF):␤------> [32ms///[33m⏏[31m<EOL>[0m␤    expecting quantifier␤Undeclared routine:␤ 's' used at line 1␤Parse failed␤FAILED 00:01 115m␤»
14:08 bbkr std: $_ = "0"; s/-/1/;
14:08 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤      's' used at line 1␤Check failed␤FAILED 00:01 116m␤»
14:08 bbkr who can explain this one?
14:08 moritz_ you need to escape - in a regex
14:09 moritz_ and empty regex is disallowed
14:09 moritz_ and std used to give good error messages for both, but it's borked now
14:09 bbkr moritz_: I know about escaping. but error is LTA in this case.
14:10 moritz_ bbkr: not only LTA. It sucks.
14:10 moritz_ TimToady: (see above)
14:21 ruoso joined #perl6
14:23 clintongormley joined #perl6
14:25 bbkr rakudo: $_ = ""; s/1/{foo()}/; # curious if it will find undefined sub in parsetime
14:25 p6eval rakudo c1e19a:  ( no output )
14:25 bbkr std: $_ = ""; s/1/{foo()}/; # curious if it will find undefined sub in parsetime
14:25 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤      'foo' used at line 1␤Check failed␤FAILED 00:02 116m␤»
14:25 bbkr ha!
14:26 moritz_ known limitation :(
14:26 moritz_ rakudo: $_ = 'FooBar'; s:ii/foobar/Perl6stuff/; .say
14:26 p6eval rakudo c1e19a: OUTPUT«PerL6stuff␤»
14:27 bbkr already reported?
14:27 moritz_ I think so
14:28 bbkr we're approaching 666 tickets :)
14:33 bbkr std: my %foo XX= 1;
14:33 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't cross with = because list assignment operators are too fiddly at /tmp/9tYIeXkYW5 line 1:␤------> [32mmy %foo XX=[33m⏏[31m 1;[0m␤Check failed␤FAILED 00:01 115m␤»
14:33 bbkr rakudo: my %foo XX= 1;
14:33 p6eval rakudo c1e19a:  ( no output )
14:33 * bbkr reports
14:35 bbkr std: my %foo == 1;
14:35 p6eval std 31912: OUTPUT«ok 00:01 115m␤»
14:43 bbkr rakudo: say eval eval eval eval 0.perl.perl.perl.perl.perl;
14:43 p6eval rakudo c1e19a: OUTPUT«0␤»
14:43 bbkr \o/
14:43 mac| joined #perl6
14:44 risou joined #perl6
14:46 mac| re
14:48 simcop2387 joined #perl6
14:54 Trashlord joined #perl6
14:55 tadzik joined #perl6
14:59 simcop2387 joined #perl6
15:03 tadzik what's the state of require in Rakudo?
15:04 moritz_ NYI
15:04 justatheory joined #perl6
15:04 tadzik is it close, or far in the plans?
15:04 moritz_ I tried to implement it, and didn't get the argument list to parse
15:04 moritz_ once the parsing is sorted out, should be (relative) SMOP
15:04 patch howdy
15:05 moritz_ hi
15:05 tadzik hey
15:05 patch i'm looking for real-world examples of the quote-word operators <>, such as projects on github
15:05 patch here's one: http://github.com/masak/we​b/blob/master/lib/Tags.pm
15:06 patch the coffeescript team is considering adding it but would like to see more use cases
15:06 moritz_ patch: http://github.com/moritz/svg-plot​/blob/master/lib/SVG/Plot.pm#L35
15:07 moritz_ http://github.com/moritz/Math-Model/bl​ob/master/examples/angle-throw.pl#L25
15:09 * moritz_ -> out
15:09 patch moritz_: thanks!
15:24 alester joined #perl6
15:25 LaVolta joined #perl6
15:26 molcules joined #perl6
15:26 ashleydev joined #perl6
15:27 rwt joined #perl6
15:27 ashleydev_ joined #perl6
15:28 rwt can anyone help me with some perl programming
15:29 molcules rwt: Are you looking for help with Perl 5 or with Perl 6?
15:30 rwt perl5...
15:31 rwt ilbot by mortiz
15:32 molcules rwt: The best place for that would probably be http://perlmonks.org/?node=S​eekers%20of%20Perl%20Wisdom. However, what is your question?
15:32 Getty or probably suggest him irc.perl.org ?!
15:32 Getty (sending an IRC user to a webpage... awesome ;) )
15:32 Holy_Cow joined #perl6
15:34 rwt http://github.com/moritz/ilb​ot/blob/master/ilbot2.pl#L27
15:34 rwt I wanting to only store lines that start with a certain sting into the databse
15:35 Getty rwt: i wouldnt use that one at all, its very stoneage
15:36 Getty ;)
15:36 rwt ?
15:37 literal if he just wants to store some lines in a database, then ilbot seems like an alright start
15:38 Getty literal: depending on the personal flavour, yes ;) but i still feel like that dude should first go to the right channel for it
15:38 literal perhaps
15:38 rwt mortiz page pointed here
15:39 [Coke] perl5-help is also at irc://irc.perl.org/perl-help
15:39 literal rwt: ilbot is ultimately based on POE::Component::IRC, which is what you might use to build an IRC bot, its IRC channel is #poe @ irc.perl.org
15:39 rwt k thanks ?
15:39 literal I can assist you there, if you like
15:40 rwt where
15:40 Getty lol ;)
15:40 rwt perl-help or poe
15:40 literal #poe
15:44 [Coke] current # of RT tickets: 666
15:45 cognominal std:   say :a<>
15:45 p6eval std 31912: OUTPUT«Potential difficulties:␤  Pair with <> really means a Nil value, not null string; use :a('') to represent the null string,␤  or :a() to represent Nil more accurately at /tmp/cgEjRhSp4V line 1:␤------> [32msay :a<>[33m⏏[31m<EOL>[0m␤ok 00:01 112m␤»
15:45 cognominal rakudo: say :a<>
15:45 p6eval rakudo c1e19a: OUTPUT«===SORRY!===␤Unsupported use of <>; in Perl 6 please use lines() or () at line 22, near "<>"␤»
15:46 [Coke] would it be helpful to have RT ticket status updates get sent to channel?
15:47 _macdaddy joined #perl6
15:47 [particle] like, TT#666 status from 'new' to 'open'
15:48 [particle] if it doesn't include the title, it's not helpful to me
15:48 [particle] s/TT/RT/
15:48 [Coke] rakudo: class Failure is also { method defined { True } }; say .defined
15:48 p6eval rakudo c1e19a: OUTPUT«===SORRY!===␤Illegal redeclaration of symbol 'Failure'␤»
15:48 [Coke] rakudo: class Failure is also { method perl { "HOLA!" } }; say .perl
15:48 p6eval rakudo c1e19a: OUTPUT«===SORRY!===␤Illegal redeclaration of symbol 'Failure'␤»
15:48 [particle] augment class Failure
15:49 [Coke] rakudo: use MONKEY_TYPING; class Failure is also { method defined { True } }; say .defined
15:49 p6eval rakudo c1e19a: OUTPUT«===SORRY!===␤Illegal redeclaration of symbol 'Failure'␤»
15:49 [Coke] rakudo: use MONKEY_TYPING; augment class Failure { method defined { True } }; say .defined
15:49 p6eval rakudo c1e19a: OUTPUT«===SORRY!===␤A method named 'defined' already exists in class 'Failure'. It may have been supplied by a role.␤»
15:50 [Coke] rakudo: class A { method foo { 1 } }; augment class A { method
15:50 [Coke] > foo { 2 } }; A.new.foo
15:50 p6eval rakudo c1e19a: OUTPUT«===SORRY!===␤Can't augment class A without 'use MONKEY_TYPING'␤»
15:50 [Coke] rakudo: class A { method foo { 1 } }; augment class A { method foo { 2 } }; A.new.foo
15:50 p6eval rakudo c1e19a: OUTPUT«===SORRY!===␤Can't augment class A without 'use MONKEY_TYPING'␤»
15:50 [Coke] rakudo: use MONKEY_TYPING; class A { method foo { 1 } }; augment class A { method foo { 2 } }; A.new.foo
15:50 p6eval rakudo c1e19a: OUTPUT«===SORRY!===␤A method named 'foo' already exists in class 'A'. It may have been supplied by a role.␤»
15:51 molaf joined #perl6
15:51 [Coke] [particle]++
15:52 alexm left #perl6
15:55 [Coke] given a patch, what's the proper way to attribute it to the original author?
15:55 [Coke] I can just do a patch/git commit, but I assume there is a more gitty way.
15:56 [Coke] just "git commit --author" ?
15:56 [Coke] (and what format should I use for the string in author. just email?
16:01 BinGOs usually the 'standard' git format 'Name <email@address>'
16:02 dalek rakudo: 6d9691d | petdance++ | src/binder/bind.c:
16:02 dalek rakudo: Fix a problem of setting *error with itself. (RT #77098)
16:02 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​d9691d451e39f5ee3a7f9f88c41d89a27097b94
16:02 alester my first Perl 6 fix, whee!
16:03 molcules are list generators not yet lazy in Rakudo? I get a segmentation fault for
16:03 molcules perl6 -e'my @fib = 1, 1, *+* ... *; say @fib[11];'
16:03 molcules But not for perl6 -e'my @fib = 1, 1, *+* ... 1000000; say @fib[11];'
16:04 Axius joined #perl6
16:04 [Coke] `one more question, how to make git log show me the short commit ids? (git log --abbrev doesn't seem to do it.)
16:07 patrickas molcules: I think the list generatino is lazy but the assignement to an array is eager
16:07 BinGOs git log --abbrev-commit
16:07 patrickas star: my @fib = 1, 1, *+* ... *; say @fib[11];
16:07 p6eval star 2010.07:  ( no output )
16:07 patrickas star: my @fib := 1, 1, *+* ... *; say @fib[11];
16:07 p6eval star 2010.07:  ( no output )
16:07 patrickas rakudo: my @fib := 1, 1, *+* ... *; say @fib[11];
16:07 BinGOs You could also look at '--pretty'
16:08 p6eval rakudo c1e19a:  ( no output )
16:08 * BinGOs &
16:08 [Coke] urk. what does --abbrev do, then?
16:08 patrickas rakudo: my @fib := (1, 1, *+* ... *); say @fib[11];
16:08 p6eval rakudo c1e19a: OUTPUT«144␤»
16:09 patrickas molcules there you go ^^
16:09 molcules patrickas: Thanks. So that is a feature, not a bug, right? That is, the eager list assignment?
16:10 patrickas molcules: I think so
16:10 pmichaud list assignment is eager
16:10 alester Coke, thanks for applyin' my patch. I'm working on a branch on rakudo right now to clean up the C code in there.  Consting, localizing vars, etc
16:10 [Coke] alester: it seemed about the level of C I am comfortable with!
16:11 alester I really like how Rakudo magically slurps up the GCC compile switches.
16:11 [Coke] (also, let me close a ticket. those things are sprouting again.)
16:11 pmichaud however, it should be "mostly eager" -- i.e., it should stop when it can detect or determine that the series is infinite
16:11 pmichaud I'm not quite sure how to do that in the case of a generic series, however.
16:11 pmichaud afk, errands
16:11 molcules patrickas: pmichaud: Thanks!
16:12 tadzik pmichaud: what is the status of require? Is it to be expected rather soon, or rather later?
16:13 masak joined #perl6
16:13 [Coke] ISTR someone saying require was a SMOP at this point, given use.
16:14 [Coke] .. but perhaps not.
16:14 masak oh hai! back in Sweden.
16:14 phenny masak: 08 Aug 21:34Z <frettled> tell masak The N-queen problem is not a matter of increasing/decreasing the number of nested loops, as you don't know the value of N.  N may be -12, 0, 1, 6, 8, 11, and a proper solution has no special-case code for normal values (it is usually deemed acceptable to have a cut-off and say that there are zero solutions for N ≤ 0).
16:14 tadzik Maybe a weekly challenge? :)
16:14 masak frettled: so the board is still 8x8? I think I missed that.
16:15 ashleydev joined #perl6
16:15 TiMBuS 'mostly eager' is ridiculous though.. you should be saying 'lazy --unless proven finite' and building on that philosophy, not the opposite.
16:16 araujo joined #perl6
16:17 jan joined #perl6
16:21 patrickas what should I do so that (1, 2 , 3 my-infix-operator 4 , 5 , 6) gets parsed as ((1, 2 , 3) my-infix-operator (4 , 5 , 6)) ?
16:22 masak use parentheses in the way you did to explain what you wanted to do? :P
16:22 alester So what do we have in the wya of Parrot profiling tools?
16:22 alester What are we doing to speed stuff up?
16:23 TiMBuS can you can set its precedence lower than infix:<,> somehow?
16:23 masak alester: I bet you'd get a much better answer to those two questions on #parrot.
16:23 masak TiMBuS: yes. but not right now in Rakudo, AFAIK.
16:23 alester Well, I meant for speeding up in Rakudo.
16:23 TiMBuS ah
16:23 alester I meant profiling tools for Parrot, so that we in Perl 6 can see which Parrot is getting called a lot.
16:24 masak alester: the plan for speeding up Rakudo is outlined in http://perlgeek.de/blog-en/perl-​6/notes-from-yapc-hackathon.html
16:24 fod joined #perl6
16:25 alester thanks
16:26 masak swimming &
16:26 bbkr rakudo: my $x = 0; "{$x++}" x 4; say $x # is this a bug that string is evaled once, or expected behavior?
16:26 p6eval rakudo c1e19a: OUTPUT«1␤»
16:26 alester hmmm, who's workin' on perl6doc?
16:27 tadzik I think masak++
16:28 TiMBuS rakudo: my $x = 0; "{$x++}" xx 4; say $x # just curious
16:28 p6eval rakudo c1e19a: OUTPUT«1␤»
16:28 patrickas masak: lol for your (lack of) help :-p
16:28 huf this is how i'd expect x and xx to work based on perl5's x
16:29 huf ;)
16:29 huf which isnt a good guide.
16:29 [particle] least surprising behavior surprises you?
16:30 huf no, but i dont expect it to work without checking or asking someone here
16:30 bbkr I asked because I cannot find in spec how many times left side is evaluated
16:32 oha in f()x4 i expect f() called only once. so the same for "{$x++}"
16:32 bbkr thanks, not a bug then
16:33 [Coke] alester: to get parrot-sub-level profiling, you can run "parrot -Dprofiling perl6.pbc <perl6 file or -e foo>" - this gets you a "pprof" file which you can then translate to a callgrind compatiable file and use those tools on.
16:33 alester ouch
16:33 alester I've never had happiness with callgrind
16:34 [Coke] this doesn't include the c-level calls, which you can get with cg itself. and it's slow. don't do it on a big program. :|
16:34 [Coke] alester: thought was to use an existing tool instead of rolling our own.
16:34 alester understood
16:34 [Coke] I've used that process to find one speedup (that pmichaud had to fix for me 'cause I did it wrong), so it does help.
16:35 [Coke] spectest is sooo slooow. :(
16:35 [Coke] (on a par with partcl running the tcl test suite. =-)
16:37 molcules rakudo-star-team++ Thanks everyone for your work.
16:37 molcules exit
16:39 alester masak?
16:39 alester purl, masak?
16:39 tadzik swimming
16:39 alester yeah, looking for email
16:39 tadzik 1821      masak | swimming &
16:40 alester got it.
16:40 patrickas masak so how do the already implemented operators get their precedence ? since "is equiv" is NYI ?
16:41 [Coke] patrickas: src/Perl6/Grammar.pm -
16:42 [Coke] there's a list there in precedence order.
16:42 patrickas [Coke] thx!
16:45 pyrimidine joined #perl6
16:46 takadonet hey pyrimidine
16:47 pyrimidine o/
16:49 ethel joined #perl6
16:54 [Coke] http://nopaste.snit.ch/22651 - spectest failures.
16:57 moritz_ pmichaud broke t/spec/S03-smartmatch/any-bool.t. I've assigned him a ticket
17:01 smash that's because of the message you get now, no ?
17:02 moritz_ right
17:02 moritz_ should be a warning, is fatal
17:03 * smash nods.
17:05 stephenlb joined #perl6
17:07 isBEKaml joined #perl6
17:08 isBEKaml left #perl6
17:08 isBEKaml joined #perl6
17:12 Italian_Plumber joined #perl6
17:12 pmichaud tadzik: I think 'require' is sooner rather than later.
17:13 Holy_Cow joined #perl6
17:13 tadzik pmichaud: Maybe for the nearest Rakudo release?
17:13 risou_ joined #perl6
17:14 pmichaud tadzik: maybe.
17:14 oha does the $!PIO attribute on IO.pm be very different than IO::Socket::INET?
17:14 pmichaud tadzik: there are a lot of features and bugfixes piling up, so I'm not yet sure about the order in which they'll be resolved.
17:14 tadzik pmichaud: sure thing
17:15 pmichaud tadzik: I'll probably want to get DESTDIR= working first.  :)
17:15 oha i see that IO is able to returns Buf but not Sockets, and i was not able to hack it to do it
17:15 tadzik pmichaud :)
17:15 pmichaud oha: I suspect that the current IO implementation wants a bit of a refactor
17:15 pmichaud currently the base IO class should perhaps be a role, and shouldn't be file-specific
17:16 oha i had that feeling, but also i get a bit disoriented too and i have no idea how to do it
17:16 oha i've just tried to paste something inside src/core/IO/Socket/INET.pm to make some tests, but i think the $!PIO is not the same there
17:17 oha (and i must wait about 15 minutes to make rakudo, so it's not easy to "try and conquer" here)
17:17 pmichaud what many of us do is try to write the class without compiling it into Rakudo until it works, and then see about merging it into Rakudo
17:17 pmichaud that way small changes don't require full Rakudo recompiles
17:18 oha something like making a IO2::*?
17:18 pmichaud I did that for the Range class, for example.  I created a MyRange class to do all of my testing and prototyping, and then when it was working I started to merge it into Rakudo
17:18 pmichaud oha: yes.
17:18 pyrimidine I did something like this with .trans, using MONKEY_PATCHING
17:19 oha so there are no problem using Q:PIR { ... }
17:19 tadzik loliblogged: http://ttjjss.wordpress.com/2010/08/09​/so-you-want-to-write-a-perl-6-module/
17:19 oha i'll try
17:19 [Coke] http://ttjjss.wordpress.com/2010/08/09​/so-you-want-to-write-a-perl-6-module/
17:19 [Coke] bah. ww
17:19 oha but i fear i will bug yall here a bit more than i would liked
17:20 pmichaud if Rakudo bugs you then it's okay for you to bug us :-)
17:21 isBEKaml tadzik: good post. You'll probably want to mention that this is based on PIONEER in proto docs. Seen from there, everything's optional. ;)
17:21 oha i get confused about Cool.pm but i think i could skip it, am i wrong?
17:21 PerlJam tadzik++
17:21 tadzik isBEKaml: didn't I?
17:21 tadzik must have removed it by mistake when refactoring the post
17:22 isBEKaml tadzik: oh, btw, "Go and upload You new, shiny module.." ?
17:22 tadzik oh, a typo
17:22 tadzik isBEKaml++
17:23 isBEKaml tadzik: You've sentence-cased You and Your. Was that intentional? I like to think so. :)
17:24 tadzik isBEKaml: well, I tend to use that. Not sure about English, but in Polish You always Upcase „You” in the letters, to show the respect for the reader
17:25 tadzik bugs fixed
17:25 [Coke] english, it's reserved for "proper" nouns and sentence starts.
17:25 PerlJam I think you should make "You" and "Your" bold as well  :)
17:25 tadzik :)
17:25 isBEKaml tadzik: I'm not a native speaker, but I do know that You and Your don't need to be capitalised, only proper nouns. :)
17:25 isBEKaml unless they start the sentence, of course.
17:25 tadzik will fix this in a second then
17:25 patrickas can someone review/comment a patch that adds the ...^ operator ? http://github.com/patrickas/rakudo/commit​/c5be7c7eea9ec2f0e70589b54a1f3edb18714b17
17:26 isBEKaml tadzik++
17:27 pmichaud I think I'd prefer to see $all instead of @all.  Then you can avoid the :=, too.
17:27 patrickas pmichaud ok doing that
17:28 pmichaud seems like you could avoid the @all[0] altogether
17:28 pmichaud i.e.
17:28 pmichaud my $current = $all.shift;
17:28 pmichaud last if $current eqv $rhs || !$current.defined;
17:29 patrickas that's how it started ... But I had some errors ... let me get the exact case
17:29 pmichaud even better would probably be to change loop { ... }  into a while
17:29 pmichaud while $all { ... }
17:30 patrickas ok maybe coupled with the while it could work
17:30 pmichaud I'm not entirely sure why the undefined check is needed
17:30 patrickas I hate it ... plus the fact that I had to do it twice huge code smell :-) I'll try to do without
17:31 PerlJam What's the relationship between ...^ and ...  ?
17:31 pmichaud ...^ doesn't include its rhs as part of the list
17:32 isBEKaml pmichaud: does that mean, x ...^y === x <= t < y ?
17:32 PerlJam So ... this is just an incomplete implementation?
17:32 isBEKaml t being any item inbetween x and y.
17:33 pmichaud isBEKaml: no, I don't think that's what it means
17:33 pmichaud PerlJam: I don't understand.
17:33 isBEKaml rakudo: 1...^5 { .say }
17:33 p6eval rakudo 6d9691: OUTPUT«===SORRY!===␤Confused at line 22, near "1...^5 { ."␤»
17:34 janosik joined #perl6
17:34 isBEKaml PerlJam: NYI.
17:34 isBEKaml pmichaud: the above should print 1 to 4, right?
17:34 pmichaud isBEKaml: yes.
17:35 PerlJam pmichaud: ... sometimes needs more than one element from the list on the left
17:35 pmichaud PerlJam: it does?
17:35 pmichaud oh, from the left
17:35 pmichaud sure
17:35 isBEKaml pmichaud:  that's what I meant when I said, x <= t < y. left inclusive but not right.
17:36 pmichaud PerlJam: in this case, $x probably ends up being the lhs list
17:36 pmichaud er, $lhs
17:36 pmichaud i.e.,   1,2,3 ...^ $foo  ends up being invoked as    &infix:<...^>( (1,2,3), $foo )
17:37 patrickas pmichaud applied your comments, compiling and testing before pushing to my repo.
17:37 * PerlJam doubts
17:37 pmichaud PerlJam: why do you doubt this?
17:37 patrickas PerlJam it does ...
17:37 pmichaud infix:<...^> has lower precedence than infix:<,>
17:38 patrickas that's why I was asking about how to set the precedence ... to make sure it does
17:38 PerlJam ah ...  okay.
17:38 PerlJam maybe
17:39 PerlJam something is niggling the back of my brain, which means I need to see it in action  :)
17:39 pmichaud I need to add operator precedence to the roadmap
17:39 pmichaud I guess it's a priority 2
17:39 patrickas PerlJam unfortunately it needs a rakudo recompile since there are changes in grammar.pm (for the precedence)
17:40 tadzik pmichaud: so about that DESTDIR, is the postpone the module compilation and installation for after installing rakudo and parrot?
17:41 pmichaud tadzik: I'll have to review where we left off last week.  Right now I'm trying to get re-settled in at home after being basically absent for a month
17:41 tadzik a'right
17:41 pmichaud I do plan to fix it before the next Star release
17:42 tadzik again, ready for testing and helping, to what extend I'd be able to
17:42 dalek rakudo: 4bd4783 | pmichaud++ | docs/ROADMAP:
17:42 dalek rakudo: Add operator precedence traits to ROADMAP.
17:42 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4​bd4783b86a264d981782919f3448da74a510b9d
17:42 pmichaud I just need a day or two to get caught up at home.  A lot of home-maintenance tasks have stacked up.  :-)
17:43 isBEKaml pmichaud: I have already submitted slackbuild scripts separately for rakudo and parrot to slackbuilds.org site pending upload(parrot's approved, though). So, I'm only looking to be able to package modules and docs in the star release. I can help too.
17:43 isBEKaml pmichaud: for slackware linux.
17:43 ruoso joined #perl6
17:43 snearch joined #perl6
17:43 patrickas pmichaud: applied your comments ... http://github.com/patrickas/rakudo/commit​/dff60d6b3d863d1f1450a701f3a7bc3ab0385d28
17:44 Exodist wow, slackware, thats what I learned on... ah nastalgia :-D
17:44 isBEKaml Exodist: nice, I started off on ubuntu, finally stuck to slackware. :D
17:45 Exodist switched to gentoo when they removed a couple packages I needed in 7.2 or semothing, don't recall anymore
17:45 Exodist *when slack removed tha packages.
17:46 Exodist that was a long time ago.
17:46 isBEKaml Exodist: oh, you've been at it far longer than I do. I only started off from the Gutsy days. Settled on Slack since 12.1. :)
17:47 Exodist isBEKaml, awesome. ubuntu always breaks on me or keeps me from doing things I need to do, so I could never get into it.
17:47 isBEKaml Exodist: 7.x was so long ago. :)
17:47 Exodist heh, I remember spending 3 days w/ a download continuer to get the slacx iso on my 56k modem.
17:47 Exodist *slack
17:48 Exodist I was in highschool... now I feel old
17:48 Exodist (26)
17:48 moritz_ Exodist: most p6 hackers at YAPC::EU were older than that
17:48 PerlJam Exodist: 26 is old for highschool  :)
17:48 isBEKaml Exodist: in my case, firefox just went into a loop in ubuntu. I gave up, dabbled in various other distros. Slack gave me some slack! :)
17:49 isBEKaml Exodist: in highschool at 26? ;)
17:49 Exodist I am 26 now...
17:49 Exodist I was in highschool when I dropped slack for gentoo.
17:50 isBEKaml :D
17:50 Exodist maybe a year out of HS.
17:50 patrickas and were in highschool 3 days ago when you started slack download ? :-O ! :-P
17:50 Exodist whatever the case I am still with gentoo, nothing else makes me happy.
17:50 Exodist patrickas, that jokes a stretch.
17:50 patrickas sorry cnr :)
17:51 molecules joined #perl6
17:51 PerlJam Exodist: you've only lived approximately 2/3 as long as I have.  You don't *really* feel old yet ... just "older"
17:51 isBEKaml patrickas: maybe he's time travelling? SCNR!! :P
17:51 Exodist are there ebuilds for parrot and rakudo?
17:52 Exodist PerlJam, heh, gat married in December, that made me feel growed up,2 I think old comes next right?
17:52 Exodist where the hell did that 2 come from?
17:52 Exodist ... oh yah, dvorak.
17:53 isBEKaml Exodist: ah, you feel old, alright. :D
17:53 Exodist ,2 is easy to do.
17:53 PerlJam Exodist: i'm married with 4 kids.  Occasionally I feel "old", but then I realize a good chunk of the population is older than me  :)
17:53 PerlJam Exodist: and trust me ... kids will *really* make you feel old.
17:54 Exodist I finally fullfilled a desire I had in highschool, did it last night, dyed my beard blue :-D
17:54 Exodist PerlJam, my wife and I are warking on kids, we both really want to.
17:55 Exodist Blue Beard: http://www.facebook.com/#!/photo.php?pid=5285867&op=1&o=global&view=​global&subj=1639369107&id=536320835
17:56 Exodist crappy iphone photo, oh well.
17:56 pugssvn r31934 | moritz++ | [evalbot] add partcl-nqp target
17:58 p6eval joined #perl6
17:59 oha i have a method which expect 1 Int, when i use it rakudo say: too many positional arguments: 2 passed, 1 expected
17:59 pmichaud how are you using it?
17:59 oha if i add another argument (2 Int now): Not enough positional parameters passed; got 2 but expected 3
18:00 oha i can't replicate it in a minimal class, and i have no idea what's wrong around
18:00 tadzik oh, I got reddited
18:00 pmichaud oha: it would help if we could see some code.  :)
18:00 patrickas what you you pass one extra argument ? do you get "got 3 but expected 3"
18:00 oha i'm calling it: my $buff = $sock.read(12);
18:00 moritz_ is $sock some weird, low-level parrot object?
18:00 oha nope
18:01 pugssvn r31935 | moritz++ | [evalbot] filter PCT backtraces from partcl-nqp
18:01 oha too many positional arguments: 2 passed, 1 expected
18:01 oha in 'IO2::Socket::INET::read' at line 85:IO2.pm
18:02 oha changing the name of the method make the same result
18:02 ashleydev joined #perl6
18:02 oha maybe there is some unicode invisible char on the signature?
18:02 pmichaud 18:00 <pmichaud> oha: it would help if we could see some code.  :)
18:02 moritz_ that would probably produce a parsing error
18:02 patrickas oha can you no paste the code ?
18:02 moritz_ or push it as a repo somewhere?
18:03 oha ok pasting it
18:04 oha http://pastebin.com/j5KM7eWk
18:04 oha calling write works correctly, not for the read tout
18:05 [Coke] partcl-nqp: puts moritz_++
18:05 p6eval partcl-nqp: OUTPUT«moritz_++␤»
18:05 tylercurtis joined #perl6
18:05 [Coke] BOOYAH.
18:06 pmichaud oha: how is $sock being initialized?
18:06 oha default constructor
18:06 pmichaud code, please.
18:06 oha all the code is pasted
18:06 oha ohh ok
18:06 oha use IO2;
18:06 oha my $sock = IO2::Socket::INET.new();
18:06 oha $sock.open('127.0.0.1', 4730);
18:06 oha $sock.write(Buf.new([0,82,69,81,0,0,0,16,0,0,0,2, 79,75]));
18:06 oha my $buff = $sock.read(12);
18:07 oha (sorry didn't toug the use was an issue, cauz write() call worked)
18:09 pmichaud I think it's the call to recv() that is giving you the problem, not the call to read()
18:09 pmichaud #
18:09 pmichaud $S0 = pio.'recv'(nbytes)
18:10 pmichaud If I'm reading correctly,  Parrot's 'recv' method doesn't accept an argument.
18:10 pmichaud i.e., it's  pio.'recv'()
18:10 oha yes
18:10 pmichaud and that's why it's complaining about 2 arguments instead of 1
18:10 oha i had to findout by myself
18:10 pmichaud (the other argument being the invocant)
18:10 oha and also explain why the error message is different
18:10 tadzik that's a bit misleading
18:13 leprevost joined #perl6
18:14 leprevost joined #perl6
18:14 oha well thank you pmichaud++
18:14 jferrero joined #perl6
18:14 leprevost left #perl6
18:14 leprevost joined #perl6
18:17 patrickas what a missed opportunity for some cool psychic debugging :-)
18:22 Acer_ joined #perl6
18:24 Acer_ Hello, how can I generate pbc output from a perl6 source file via perl6
18:24 oha @a[$x..*] isn't working, right?
18:25 moritz_ Acer_: compile --target=pir, and then use the parrot executable to compile to pbc
18:25 moritz_ *compile with
18:28 patrickas moritz_ I was telling you earlier today that I tracked the MAIN bug reported not long ago to
18:28 patrickas rakudo: sub foo ( $f = rand ) { say $f; }; say Capture.new() ~~ &foo.signature; foo();
18:28 p6eval rakudo 6d9691: OUTPUT«0␤0.949168307331519␤»
18:28 Acer_ generation of pir file worked, how can I generate a pbc file from the pir file using parrot ?
18:29 patrickas Am I matching the sig correctly? I think I got the way to do it from jnthn++
18:35 Acer_ moritz: thank's - generation of pir file worked fine, how can I generate the pbc file from the pir file using parrot ?
18:38 [Coke] parrot -o foo.pbc foo.pir ?
18:39 [Coke] (you might need more options depending on the PIR and things it includes, etc.)
18:40 patrickas [Coke] --output-pbc is not needed ?
18:41 [Coke] my line works. yours is more verbose and doesn't rely on the file extension.
18:42 patrickas oh ok ... "works" beats "more verbose" ;-)
18:42 Acer_ parrot -o foo.pbc foo.pir outputs error:imcc:syntax error, unexpected PREG ... running perl6 foo.pl worked
18:43 [Coke] Acer_: what version are you using?
18:43 Acer_ Raduko Star on windows
18:44 [Coke] ISTR pmichaud++ recently fixed this.
18:44 [Coke] I think it's broken in star, but working in rakudo-compiler-latest.
18:44 Acer_ parrot 2.6.0
18:45 Acer_ is this fix already available?
18:46 tadzik Acer_: what if You run parrot code.pir?
18:46 tadzik (bah, this "You" again :))
18:47 Acer_ get the same error: eror:imcc:syntax error ...
18:47 tadzik then yes, it's fixed in upstream
18:47 tadzik I remember the commit
18:48 Acer_ is a windows binary available or is it in the next release?
18:48 tadzik I think You'll have to wait for the next Star release, or You can try building the recent Rakudo from git
18:48 tadzik I'm not familiar with windows though
18:49 Acer_ thanks - i am looking forward to the next release
18:53 slavik I come from future ...
18:53 slavik Perl6 has been released
18:53 slavik and Christmas has been moved to that day
18:53 slavik hooray!
18:53 slavik I have no idea why ... but felt the need to do that
18:53 tadzik are you sure you didn't come from the past? :)
18:54 slavik tadzik: I don't know anymore
18:54 tadzik :)
18:54 slavik tadzik: if the futurama principle is right, time wraps around
18:55 tadzik slavik: never seen any futurama
18:55 slavik *gasp*
18:55 slavik oh, nvm ... you live under a represive regime
18:55 tadzik excuse me?
18:55 tadzik I just don't watch television, that's all
18:56 slavik D:
18:56 tadzik trust me or not, I find it pretty boring
18:56 tadzik I barely stand films
18:56 slavik that's because you need to watch the good stuff
18:56 slavik but you get formula1 on tv, no?
18:57 tadzik I wouldn't like to insult anyone, but formula1 seems pretty boring to me
18:57 slavik :(
18:57 tadzik damn, they're just riding in circles, how many times? Few dozens or something
18:57 slavik tadzik: no ... NASCAR is circles
18:57 tadzik oh
18:58 tadzik but they are doing a few dozens rounds, aren't they?
18:58 slavik and people think that's exciting
18:58 slavik yes
18:58 tadzik so that't kinda repetitive :)
18:59 tadzik but at least that's not surrounded by ads all the time
18:59 tadzik ads are like if someone was chopping my brain into pieces and sucking the juice out of ti
18:59 tadzik like the music in the supermarkets
18:59 slavik tadzik: our national past time is hitting a ball with a stick and running around in a circle
19:00 tadzik baseball? :)
19:00 tadzik well, there's some variety :)
19:00 slavik yes, we even have a name for it
19:00 slavik tadzik: it's because italy didn't win the world cup
19:00 slavik isn't it?
19:00 tadzik I've never seen baseball too I must say. Is it exciting?
19:00 slavik hell no
19:00 slavik 3 hours of just sitting there
19:00 slavik or something
19:01 slavik it's like tennis, but worse
19:01 tadzik trust me or not, but I prefer tennis to voleyball
19:01 tadzik and table tennis. Maybe because I can play table tennis
19:02 slavik table tennis is teh awesome
19:02 slavik but here it is "ping pong" ...
19:02 slavik silly americans
19:02 oha i've always thought about that: is the people enjoy what they know, or know what they enjoy?
19:02 tadzik but that's basically two guys pushing the ball to the other side, isn't it? Watching it must be boring
19:02 Axius_ joined #perl6
19:03 tadzik oha: philosophic
19:03 tadzik and interestingt
19:03 slavik Brazil is playing US in a friendly tomorrow, but nobody wants to come see it :(
19:03 tadzik football?
19:03 frettled masak: no, the board is also NxN
19:03 masak frettled: hm.
19:03 slavik yes
19:03 tadzik oh, masak. I wrote this blog post
19:03 rokoteko tadzik: isnt ping-pong one of the first computer games?
19:03 masak tadzik: url?
19:04 tadzik rokoteko: that's just "pon"
19:04 tadzik * pong
19:04 slavik ping is the player, pong is the game
19:04 rokoteko .. the idea is the same :)
19:04 tadzik masak: http://ttjjss.wordpress.com/2010/08/09​/so-you-want-to-write-a-perl-6-module/
19:04 frettled masak: The 8-queen problem isn't particularly interesting, but the N-queen problem is a challenge in algorithm efficiency :)  (http://www.math.utah.edu/~​alfeld/queens/queens.html has something about it)
19:05 tadzik rokoteko: ping-pong is 3-dimensional
19:05 frettled masak: Oh, I have some fugly C code for it.
19:06 literal related: http://youtube.com/watch?v=Pj2NOTanzWI#t=4m08
19:06 rokoteko tadzik: ah. I was only reacting to your comment which mention 'to the other side' .. it doesnt mention the concept of 3rd dimension.
19:06 rokoteko tadzik: :)
19:06 tadzik rokoteko: oh, that idea :)
19:07 tadzik well, even volleyball is the same idea, but they have plenty of guys, or girls
19:07 tadzik but shh, there's a Perl 6 discussion now, they might accuse us of offtopic
19:08 frettled masak: This _must_ be possible to do in a prettier way: http://pastebin.com/4TPTP8AD
19:08 frettled That code is legal in Norway, BTW (over 16 years old) ;)
19:08 moritz_ frettled: yes, recursion :-)
19:09 rokoteko hmm. quite switch back to perl. where was it, what I was wondering about. the example in S04. what goes wrong here:
19:09 rokoteko rakudo: my @list = <a b a c d>; { my $previous; my @uniq = gather for @list { $previous = take $_; next if $_ === $previous; $previous = take $_ }; @uniq.perl.say }
19:09 p6eval rakudo 4bd478: OUTPUT«["a", "b", "a", "c", "d"]␤»
19:10 moritz_ why do you think anything goes wrong?
19:10 rokoteko and even if its <a a b c d> (which the code above suggests, *to me*) it doesn't return a list with unique items.
19:10 rokoteko moritz_: I assumed it returns unique items of the item passed in. am I wrong?
19:10 moritz_ rokoteko: you are wrong
19:11 moritz_ rokoteko: what the code does is filter out subsequent identical items
19:11 rokoteko rakudo: my @list = <a a b c d>; { my $previous; my @uniq = gather for @list { $previous = take $_; next if $_ === $previous; $previous = take $_ }; @uniq.perl.say }
19:11 frettled moritz_: that C code _does_ use recursion.  It's just cleverly hidden.  ;)
19:11 p6eval rakudo 4bd478: OUTPUT«["a", "a", "b", "c", "d"]␤»
19:11 rokoteko moritz_: nope. it does not.
19:11 moritz_ rokoteko: ok, it's supposed to :-)
19:11 moritz_ wait
19:11 moritz_ that is weird
19:12 rokoteko I thought so also. Tried to ask here earlier but got no comments.
19:12 rokoteko ... been going, slowly but surely, through the synopsis.
19:12 moritz_ rakudo: my @list = <a a b c d>; { my $previous; my @uniq = gather for @list { next if $_ == $previous; $previous = take $_ } }
19:12 p6eval rakudo 4bd478: OUTPUT«Use of uninitialized value in numeric context␤Use of uninitialized value in numeric context␤Use of uninitialized value in numeric context␤Use of uninitialized value in numeric context␤Use of uninitialized value in numeric context␤»
19:13 rokoteko rakudo: my @list = <a a b c d>; { my $previous; my @uniq = gather for @list { $previous = take $_; next if $_ eq $previous; $previous = take $_ }; @uniq.perl.say }
19:13 p6eval rakudo 4bd478: OUTPUT«["a", "a", "b", "c", "d"]␤»
19:13 rokoteko still wrong.
19:13 PerlJam rokoteko: just get rid of the first "$previous = take $_"
19:14 perimosocordiae joined #perl6
19:14 rokoteko rakudo: my @list = <a a b c d>; { my $previous; my @uniq = gather for @list { $previous = take $_; next if $_ eq $previous; }; @uniq.perl.say }
19:14 p6eval rakudo 4bd478: OUTPUT«["a", "a", "b", "c", "d"]␤»
19:14 rokoteko ahh.
19:14 rokoteko rakudo: my @list = <a a b c d>; { my $previous; my @uniq = gather for @list { next if $_ eq $previous; $previous = take $_ }; @uniq.perl.say }
19:14 p6eval rakudo 4bd478: OUTPUT«["a", "b", "c", "d"]␤»
19:14 rokoteko PerlJam: so it's an error in S04 then. ok thanks :)
19:15 rokoteko PerlJam: I was very puzzled when reading this example.
19:16 rokoteko PerlJam: now I can continue with the synopsis. hurray! \o/
19:20 rokoteko .. or does calling state do something I dont quite understand? it's NYI, so couldnt test. :)
19:24 oha i hate ugly code!
19:24 oha i have @a; i need to "shift" $n items from @a to @b
19:25 PerlJam rokoteko: in the S04 example,  they use state on the first call to $previous = take $_  ?
19:25 masak oha: splice
19:25 ktne joined #perl6
19:26 masak oha: perldoc -f splice
19:26 oha masak, googling ty
19:26 rokoteko PerlJam: it's available at http://perlcabal.org/syn/S04.html .. search for "uniq = gather for"
19:27 PerlJam rokoteko: S04 is fine then.
19:27 rokoteko PerlJam: ok. what I don't understand?
19:27 PerlJam state $previous = take $_;  # this assignment only happens once.
19:28 rokoteko PerlJam++: hmm. yes. if it's like my example above, it should act like that. very true. thanks for explanation, I was very sure there's something I just dont get here. :)
19:31 dsrogers joined #perl6
19:31 dsrogers greetings.  I see noise about tail call elimination in perl6.
19:31 dsrogers is that implemented yet in raduko star?
19:31 dsrogers err, rakudo rather.
19:31 sorear no
19:32 dsrogers ok.
19:32 dsrogers what about threads?
19:32 dsrogers I think not, as well...
19:32 tadzik they're not in Parrot, iirc
19:32 sorear threads haven't even been specced
19:32 tadzik (yet)
19:32 dsrogers ok
19:32 dsrogers is fork available?
19:33 tadzik Yep
19:33 rokoteko when it is implemented (tail call elimination), what is the syntax supposed to look like (also a link to a synopsis is ok)?
19:33 tadzik But not sure if natively, I know you can use it through Zavolaj
19:33 sorear rokoteko: not yet decided
19:33 rokoteko sorear: ok.
19:35 dsrogers is there a CPS transform available (like a for comprehension or something)?
19:35 dsrogers or do blocks maybe?
19:36 Casan rakudo: my @a = <1 2 3 4 5 6>; my @b = <7 8 9>; unshift(@b, splice(@a, 0, 2)).say;
19:36 p6eval rakudo 4bd478: OUTPUT«12789␤»
19:36 Casan works, but ugly.
19:37 Casan depending on taste. oha. try to make it more beautiful.
19:38 oha right now i've used: @b = @a[0..^$n]; @a=@a[$n..@a.elems];
19:40 thebird joined #perl6
19:44 dsrogers are there list comprehensions in perl6 ?
19:46 masak dsrogers: my @primes = $_ if isprime($_) for 1..100;
19:48 [Coke] is dsrogers a new perl6 implementation? =-)
19:49 REPLeffect joined #perl6
19:49 [particle] ooh, a wetware p6 compiler!
19:49 * dsrogers has been upgraded
19:50 [particle] i wonder how well laziness is implemented
19:52 melte only problem is he's a little slow right now. but with practice we're sure he'll be optimized
19:54 dsrogers naw, the problem is that isprime() is not defined.
19:55 masak it might be, in some Perl 6 implementations :P
19:58 dsrogers are source filters planned for perl6?
19:59 dsrogers (i.e. can we add more sugar?)
20:00 oha i want to write a signature for a function, which must accept a callback which have as signature an Int
20:00 darkop joined #perl6
20:01 squeeky dsrogers: source filters, aka giving either damian conway or someone equally as mad a good reason to port Acme::Bleach over?
20:01 dsrogers lol
20:02 oha it seems to me that foo($code(Int $x)) is working, but i was not able to invoke it using a pointy block
20:02 dsrogers no, I just like my haskell do blocks (aka scala for comprehesions, aka compiler CPS transform)
20:03 x3nU joined #perl6
20:03 gfldex oha: http://perlcabal.org/syn/S​06.html#Closure_parameters
20:03 oha gfldex ty
20:05 gfldex std: sub foo(&block:(Int --> Str)){}
20:05 p6eval std 31912: OUTPUT«ok 00:01 116m␤»
20:05 gfldex rakudo: sub foo(&block:(Int --> Str)){}
20:05 p6eval rakudo 4bd478: OUTPUT«===SORRY!===␤traits specified as colon pairs not yet understood at line 22, near "){}"␤»
20:05 dalek yapsi: b3af4ad | masak++ | lib/Yapsi.pm:
20:05 dalek yapsi: [Yapsi] fixed faulty <!after> workaround
20:05 dalek yapsi: Always take care when you deploy your workarounds, so that they retain the
20:05 dalek yapsi: original meaning of the thing being replaced. Otherwise, things will start
20:05 dalek yapsi: to fail, and you'll have to debug them.
20:05 dalek yapsi: review: http://github.com/masak/yapsi/commit/b3​af4adae429f869c04180f0a286bf65962b2e1a
20:05 Casan Here is some p6 OO I'm troubling with..  proper problem description in the pastebin. I'm still struggling, maybe someone has a great hint? http://pastebin.org/462763
20:08 oha Casan, one thing i noticed is that you declares has @students[*] and iirw the * there is not working on rakudo
20:08 Casan I want to have the Student objects added to the Students container automatically as they are constructed/instantiated as part of the Student constructor which I've overriden to achieve this feature.
20:08 oha but you can just skip it
20:08 oha has Student @students;
20:08 Casan oha. yep it can just be ignored, just did it to be as explicit as possible.
20:09 oha Casan, but Student istance can't know in which container instance it must add itself
20:10 oha it is more straight if, having a Students $list you: $list.newStudent(...);
20:10 oha and it first invoke the new in Student, then add the result to himself and return it
20:11 oha Casan, does it make sense to you or i completely misunderstood what you were asking?
20:14 Casan oha: I guess what I want is something similar to an ArrayList in java, and collections. this time it is specific, but maybe later I want it to be generic.  but maybe a Students $list would be more appropriate I don't know, right now I'm just experimenting, and wanted to start out with using an Array.
20:14 gfldex Casan: as i understand it your problem is that you need a singleton for Students that is declared in Student.pm6
20:14 dsrogers is >> parallelized in rakudo?
20:14 gfldex or you have to hand a reference to that container to each Student.new
20:14 Casan thanks, brb, phone.
20:16 hercynium joined #perl6
20:18 gfldex dsrogers: all hyper operators are candidats for autothreading, but given that there are no threads in rakudo yet, i doubt you will see much in parallel
20:24 sorear dsrogers: No source filters in perl 6 (yet).  But macros are available.
20:24 dsrogers ooo
20:24 dsrogers macros.
20:24 dsrogers yum
20:24 sorear Perl 6 is parsed using a Perl 6 grammar
20:25 sorear you can already do the equivalent of an "augment grammar Perl6::Grammar" to add syntactic productions in Rakudo
20:25 sorear although this is highly implementation specific
20:25 sorear implementation-independant macros are still being designed
20:27 sorear rakudo: use MONKEY_TYPING; augment grammar Perl6::Grammar { token comment:sym<.oO> { <sym> <quote_EXPR> } }; Perl6::Grammar!protoregex_generation(); eval(' say 42; .oO( heh heh ); say 42;');  # from jnthn
20:27 p6eval rakudo 4bd478: OUTPUT«42␤42␤»
20:28 sorear rakudo: BEGIN { use MONKEY_TYPING; augment grammar Perl6::Grammar { token comment:sym<.oO> { <sym> <quote_EXPR> } }; Perl6::Grammar!protoregex_generation(); }; say 42; .oO( heh heh ); say 42;
20:28 p6eval rakudo 4bd478: OUTPUT«===SORRY!===␤A method named '!PREFIX__comment:sym<.oO>' already exists in class 'Perl6;Grammar'. It may have been supplied by a role.␤»
20:28 sorear rakudo: use MONKEY_TYPING; augment grammar Perl6::Grammar { token comment:sym<.oO> { <sym> <quote_EXPR> } }; BEGIN { Perl6::Grammar!protoregex_generation(); }; say 42; .oO( heh heh ); say 42;
20:29 p6eval rakudo 4bd478: OUTPUT«42␤Could not find sub &heh␤  in main program body at line 22:/tmp/8qCmAqm9tf␤»
20:32 Casan thanks for the feedback, I'll spend a few days(patience is a virtue) thinking more about it and consider your input, and we'll see where that leads me.
20:42 Mowah joined #perl6
20:43 Guest15939 joined #perl6
20:47 REPLeffect joined #perl6
20:51 whiteknight joined #perl6
20:52 squeeky MUHAHAHAHA! IT WORKS! I AM ONE CAN SHORT OF A SIX PACK!
20:54 [Coke]
21:00 squeeky http://github.com/squeeks/homebrew/commit​/2b94403cb510d4a89e0460ef070460de986e7084
21:05 simcop2387 joined #perl6
21:20 REPLeffect joined #perl6
21:32 briang joined #perl6
21:32 [Coke] joined #perl6
21:38 masak joined #perl6
21:38 masak ahoy!
21:39 squeeky avé!
21:40 masak :)
21:40 * masak does some late-night Perl 6 hacking
21:44 dalek yapsi: bf1964c | masak++ | lib/Yapsi.pm:
21:44 dalek yapsi: [Yapsi] updated comment to fit with reality
21:44 dalek yapsi: review: http://github.com/masak/yapsi/commit/bf​1964cf3703707dd2d365976d3ab5006d7ab79d
21:44 imarcusthis joined #perl6
21:45 masak "They’re based on the proto PIONEER document, but remember, there’s no standard. It’s just a convention, You can accept it or ignore it." -- http://ttjjss.wordpress.com/2010/08/09​/so-you-want-to-write-a-perl-6-module/
21:45 masak tadzik++
21:46 frettled masak: yay
21:47 alester hey masak.
21:48 alester got a few minutes?
21:48 masak I do.
21:48 alester let's talk u4x
21:48 masak yes, let's.
21:48 alester in about 5 mins when I get back from the john.
21:48 masak overshare :P
21:49 melte it'd be worse if it was "in about 5 mins when I get back ON the john."
21:49 masak let's not dwell on what would be worse...
21:50 dalek yapsi: e668b7d | masak++ | lib/Yapsi.pm:
21:50 dalek yapsi: [Yapsi] saner naming: renamed sub
21:50 dalek yapsi: review: http://github.com/masak/yapsi/commit/e6​68b7d05e00a0b44407670713050a6c12a0eedf
21:50 alester Yeah, you don't know how often I'm on perl6 doing number2.
21:51 masak we need to get rules or something on this channel. :)
21:51 masak a standard, perhaps.
21:51 alester I thought #1 and #2 were standard.
21:51 alester OK, so, u4x.
21:51 alester it's a little project in pugs
21:51 alester and it's documentation
21:51 alester and I'm reading the README
21:52 masak so far, so good.
21:52 mikehh joined #perl6
21:53 pyrimidine left #perl6
21:53 ashleydev joined #perl6
21:54 masak alester: if you start wondering "but where's the contents?", it's because there's precious little of it so far.
21:56 dalek yapsi: ea9058b | masak++ | lib/Yapsi.pm:
21:56 dalek yapsi: [Yapsi] whitespace therapy
21:56 dalek yapsi: review: http://github.com/masak/yapsi/commit/ea​9058b902d31b00a882ec0444b1a37750b6e9e1
21:56 alester hold on, fire
21:57 masak in the john?
21:57 masak by all means, put it out and then we can talk.
21:57 masak I respect when people have their priorities down.
21:57 alester oh, I got it.
21:57 alester I am enjoying the idea of "grok" as a tool.
21:58 masak literal++ did a GSoC and wrote grok last summer.
21:58 alester Do we actually want this to stay in pugs?
21:58 masak though it's far from done, and the content needs to be written.
21:59 masak alester: it's more like "do we actually want to call that repo 'pugs'?"
21:59 masak Pugs is not even in there anymore.
21:59 alester because the repo is now the general "everything that's perl 6 that isnt just Rakudo"
21:59 masak well, kinda.
21:59 alester I am not seeing grok in here
21:59 frettled masak: it will be a nice mystery for code archaeologists in half a century.
21:59 masak grok is not in there, correct.
21:59 alester where is it
21:59 masak it has its own github repo, ISTR.
21:59 * masak looks
22:00 alester I'm thinking u4x ought to as well
22:00 masak alester: http://github.com/hinrik/grok/
22:00 alester hinrik = literal?
22:00 masak aye.
22:01 alester I can't keep people stragiht.
22:01 frettled alester: not your problem ;)
22:01 masak alester: one nice thing about having u4x in the Mu repo (as moritz_++ calls it nowadays) is that very many people have commit bits to it, and it's easy to hand them out.
22:01 alester true
22:02 masak that's why I put it there.
22:02 alester oh wait, grok isn't in p6?
22:03 alester that's crazy
22:03 alester but ok
22:03 dalek yapsi: c0dc9f1 | masak++ | lib/Yapsi.pm:
22:03 dalek yapsi: [Yapsi] used delegation instain copy-paste
22:03 dalek yapsi: Who kill their babbies, because they cannot frigth back?
22:03 dalek yapsi: review: http://github.com/masak/yapsi/commit/c0​dc9f1aeff559358a5967b7039b4d4fb89af876
22:03 * masak should probably stop coding for the night :)
22:03 alester masak: "Who kill their babbies, because they cannot frigth back?" is not a question.
22:03 masak alester: it is in the source of that quote.
22:04 alester No, it's a statement.
22:04 * masak checks
22:04 avuserow it's a meme, don't worry about it
22:04 alester They need to way instain mother who kill their baby because these baby can't frigth back.
22:04 alester now i'm gonna have to go watch it a dozen more times.
22:04 masak alester: no, it's a question. http://www.somethingawful.c​om/flash/shmorky/babby.swf
22:05 masak I thought I remembered the inflection right.
22:05 alester ok, ok, you're right
22:05 alester I thought it was a statemnet.
22:05 frettled To question or not to question the question, that's the question's question of the question.
22:05 alester I am truely sorry.
22:05 masak :D
22:05 masak for your lots.
22:06 lue hello o/
22:06 masak lue: hi!
22:07 frettled \o/
22:08 masak alester: about literal's grok being written in Perl 5: I was the mentor on that project, and I didn't want the resulting product to be too slow to be usable. therefore I actually suggested Perl 5 as the implementation language. it also makes a lot of sense from a modules perspective.
22:08 alester ok, so what we need in u4x is the docs.
22:08 alester not code
22:08 masak yes.
22:08 masak happily, people seem to be converging on helping with u4x after the Star release.
22:09 masak I have been waiting for that, almost to the point of forgetting I was waiting for that.
22:09 masak now all we need is to scale up the structures for helping in pace with the number of helpers :)
22:12 lue .oO(If only there was a good foss CAD program)
22:13 d4rt joined #perl6
22:13 masak lue: while OT is tolerated on this channel, it helps if the things mentioned bear even a teeny relation to Perl 6, Perl, or programming. even the things in thought bubbles. :)
22:14 meppl joined #perl6
22:15 avar rakudo: my @a; push @a, (00..99, 111, 222, 777, 666, "XXXX").pick for 1..10; @a.perl
22:15 p6eval rakudo 4bd478:  ( no output )
22:15 avar rakudo: my @a; push @a, (00..99, 111, 222, 777, 666, "XXXX").pick for 1..5; @a.perl
22:15 lue Sorry. It was a... pun.
22:15 p6eval rakudo 4bd478:  ( no output )
22:16 avar that's slooow in a shell
22:16 avar $ time perl6 -e 'my @a; push @a, (00..99, 111, 222, 777, 666, "XXXX").pick for 1..10; say @a.perl'
22:16 avar [36, 27, 80, 32, 8, 13, 91, 72, 10, 91]
22:16 masak lue: oh. I missed the pun.
22:16 avar real    0m3.500s
22:16 masak avar: I think it was discovered recently that lists are unnecessarily slow.
22:17 avar no kidding :)
22:17 mj41 joined #perl6
22:17 lue Well, something like it. I'm looking for CAD/Architecture right now, so it's a pun-thing for me.
22:17 sjohnson afternoon #p6
22:17 masak sjohnson! \o/
22:18 lue hai o/
22:18 sjohnson hi guys
22:18 araujo joined #perl6
22:18 Grrrr joined #perl6
22:18 renormalist joined #perl6
22:18 wooden joined #perl6
22:18 mutewit joined #perl6
22:18 36DAAC9QV joined #perl6
22:18 aesop joined #perl6
22:18 estrabd joined #perl6
22:18 rokoteko joined #perl6
22:18 betterworld joined #perl6
22:18 Tene joined #perl6
22:18 masak lue: still don't see the pun. but that's OK.
22:21 tadzik joined #perl6
22:21 tadzik 'evening
22:21 masak tadzik: \o
22:21 masak tadzik: kudos on the blog post.
22:21 masak tadzik: fwiw, I think you got the tone just right about what PIONEER is.
22:21 tadzik masak: I tried not to make You angry :)
22:22 masak heh.
22:22 tadzik so no "standard" is mentioned ;)
22:22 masak sorry for shouting "NO!" at you last time. :P
22:22 tadzik oh come on ;)
22:22 tadzik although there are some specs on the module case
22:23 tadzik someone even reddited me ;)
22:24 lue masak: I used the word 'pun' in the "I don't know what to call it" sense. (Like in the Monty Python `Dead Parrot' sketch)   </offtopic>
22:24 masak tadzik: url?
22:24 tadzik masak: http://www.reddit.com/r/perl/comments/cz5​b0/so_you_want_to_write_a_perl_6_module/
22:25 masak lue: ok.
22:26 masak tadzik: nice!
22:26 tadzik masak: I wasn't planning to reddit this actally, but as long as people are upvoting, I'm glad
22:26 sjohnson masak: what part of the world are ya in?
22:26 sjohnson always curious about your timezone :)
22:27 * masak upvotes tadzik
22:27 masak sjohnson: CET. I should be sleeping by now; for once I have a sane sleeping cycle going.
22:27 tadzik I wish I was writing such valuable Perl
22:28 sjohnson ahh cool
22:30 perimosocordiae left #perl6
22:31 masak sjohnson: where are you?
22:33 alester masak: So really, theres' not much here AT ALL
22:33 alester is there any reason to not start stealing from the perl5 docs as starting points?
22:33 masak alester: as long as it checks out with licenses, that's fine.
22:34 masak might even be a really good idea.
22:34 araujo joined #perl6
22:34 alester and all this is perl 5 pod
22:34 alester so really I don't care about perl6.pod
22:35 masak yes. until we get a decent enough Pod (6) parser, it's Perl 5 POD.
22:35 frettled Perl 6 documentation should be called "pnd" (plain new documentation)
22:35 frettled :)
22:35 tadzik :)
22:36 huf or ancient. after all, the hidden knowledge of the ancients is always better than the new stuff
22:36 frettled Taking it one step further, as I feel I must: pwnd (plain worldclass new documentation)
22:36 huf ;)))
22:36 araujo yeah, those ancient guys really knew lot of stuff
22:37 sjohnson masak: western canada
22:37 sjohnson BC
22:37 masak araujo: those ancient were way before their time.
22:37 frettled araujo: they were a bit rusty concerning Duff's device, but who can blame'm?
22:37 araujo heh
22:37 pugssvn r31936 | andy++ | fixed whitespace and set the filetype to pod, not perl6, which it certainly is not
22:37 huf araujo: the ancients have foretold the coming of perl6. they knew enough. ;)
22:38 * frettled stops fooling around and heads for that firm, comfortable bed.
22:38 * masak is tempted, too
22:40 frettled masak: you haven't been fooling around enough yet ;)
22:40 frettled 'night!
22:40 tadzik 'night
22:42 masak frettled: 'night!
22:43 masak I didn't know there was a fooling-around quota one had to fill before going to bed...
22:45 alester masak: Will start looking tonight
22:45 masak \o/
22:45 alester thinking maybe wikifying might be helpful at first
22:45 alester dunno
22:45 alester rolling around ideas.
22:45 alester ttyl
22:45 masak properly used, the pugs/Mu repo is a wiki.
22:46 masak that's how I've always thought about it, anyway.
22:52 NOTevil joined #perl6
22:53 dalek yapsi: f469702 | masak++ | lib/Yapsi.pm:
22:53 dalek yapsi: [Yapsi] corrected recent change
22:53 dalek yapsi: In other news, always run the test suite before committing changes, even
22:53 dalek yapsi: trivial ones. That's what it's there for.
22:53 dalek yapsi: review: http://github.com/masak/yapsi/commit/f4​6970298c0c77a68b4f524d9dd9dc64f078360f
23:00 tadzik goodnight
23:00 masak Living, baby!
23:01 sorear yapsi has a testsuite now?
23:03 tylercurtis rakudo: my $x = Mu // Whatever; for 1 ... $x -> $i { say $i; last if $i == 10 }
23:03 p6eval rakudo 4bd478: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
23:03 sorear Whatever is undefined
23:03 sorear * is defined
23:04 masak sorear: Yapsi has had a test suite from the start. it has decent coverage. this month's release had three regressions, one of which I fixed today.
23:09 masak sorear: the other two regressions are because I found a nicer way to create the static lexical scopes, but that made it more difficult to detect use-before-declaration. kind of a waterbed effect there.
23:13 waste joined #perl6
23:19 masak zzz &
23:22 waste anyone know which file implements the REPL?
23:28 IllvilJa joined #perl6
23:30 alester joined #perl6
23:38 sorear waste: mostly HLL/Compiler.pm in the nqp-rx repo
23:44 Italian_Plumber joined #perl6
23:45 REPLeffect joined #perl6
23:47 tylercurtis sorear: does the spec say that? Or is it just that way in Rakudo? Are there any particular implications of that(other than for things that check $foo.defined)?
23:58 ashleydev_ joined #perl6
23:59 Psyche^ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo