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