»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:01 sbp left 00:03 alim left, clairvy left 00:10 clairvy joined 00:15 dual left, clairvy left 00:16 clairvy joined 00:22 alim joined 00:23 replore_ joined 00:24 pmurias left 00:25 thou left, clairvy left 00:26 clairvy joined, shinobicl left 00:27 clairvy left 00:28 clairvy joined 00:30 shinobicl joined, clairvy left, clairvy joined 00:32 clairvy left, clairvy joined 00:33 clairvy left 00:56 aloha left, aloha joined 01:06 alim left, kaleem joined 01:08 kaleem left 01:15 bazqux left 01:22 hypolin joined 01:38 lestrrat left 01:40 lestrrat joined 01:53 wolfman2000 joined 01:57 Chillance left 01:58 djanatyn left 02:01 djanatyn joined
japhb std: :16<> 02:16
p6eval std be1f10e: OUTPUT«===SORRY!===␤Malformed radix number at /tmp/4Lh9hezrLS line 1:␤------> :16<⏏>␤ expecting any of:␤ number in radix notation␤ statement end␤ statement list␤Parse failed␤FAILED 00:01 118m␤»
japhb std: :16[]
p6eval std be1f10e: OUTPUT«ok 00:01 119m␤»
japhb Any reason that the first shouldn't DWIM like the second does?
02:22 f00li5h left, f00li5h joined 02:23 daniel-s joined 02:34 benabik joined 02:40 aindilis joined 02:47 Guest68707 left 02:51 \patch is now known as patch
patch nom: say [+] 1..^10 02:57
p6eval nom 198513: OUTPUT«45␤» 02:58
patch nom: say [+] (1..^10).grep(* %% (3|5)) 02:59
p6eval nom 198513: OUTPUT«23␤»
patch nom: say [+] (1, 2, * + * ... * < 100).grep(* %% 2) 03:02
p6eval nom 198513: OUTPUT«0␤»
patch nom: say join ',', (1, 2, * + * ... * < 100) 03:04
p6eval nom 198513: OUTPUT«1␤»
03:06 replore_ left
TimToady ... is an "until", not a "while" 03:10
patch nom: say [+] (1, 2, * + * ... * > 100).grep(* %% 2) 03:18
p6eval nom 198513: OUTPUT«188␤»
patch TimToady: thanks!
TimToady no, thank you! :) 03:19
patch nom: say (1..*).first( * %% all(1..4) ); 03:24
p6eval nom 198513: OUTPUT«12␤»
dalek odel: d1240fb | diakopter++ | lua/compiler/LST2Lua.pm:
typo
03:28
03:35 replore joined 03:47 odoacre joined 03:55 mkramer joined 04:01 mkramer left 04:10 envi_ joined 04:17 patch left 04:27 arnsholt left, arnsholt joined 04:29 drbean joined 04:43 f00li5h left, f00li5h joined 04:44 icwiener left 04:52 f00li5h left 04:54 Trashlord left 04:55 Trashlord joined 05:07 alim joined 05:09 patch joined
patch nom: say (2,3,5,7,11 ... 29).perl 05:11
p6eval nom 198513: OUTPUT«(2, 3, 5, 7, 11, Failure.new()).list␤»
patch nom: say join ',', (2,3,5,7,11 ... 29) 05:12
p6eval nom 198513: OUTPUT«unable to deduce sequence␤ in sub <anon> at src/gen/CORE.setting:7812␤ in sub coro at src/gen/CORE.setting:4154␤ in method reify at src/gen/CORE.setting:4128␤ in method reify at src/gen/CORE.setting:3913␤ in method reify at src/gen/CORE.setting:3913␤ in method r…
05:13 orafu left, orafu joined 05:16 sftp left 05:23 abercrombie joined 05:33 envi_ left, alim left 05:46 xinming_ joined 05:49 xinming left 05:52 worr joined
moritz patch: only arithmetic and geometric sequences are regocnized 05:54
sorear (by spec)
o/ worr 05:55
05:57 Lorn left 06:00 Lorn joined 06:02 daniel-s left 06:03 odoacre left, Yappoko___ left, odoacre joined, Yappoko___ joined 06:15 aloha left, aloha joined 06:19 koban joined 06:20 drbean left 06:24 wolfman2000 left 06:26 drbean joined
dalek p/bigint: 8534217 | moritz++ | src/ (2 files):
add nqp::radix_I alias, fix op name
06:30
06:33 alim joined, alim left
moritz perl6: say +^0xdead 06:40
p6eval pugs b927740, rakudo 198513, niecza v11-22-gbebf7a0: OUTPUT«-57006␤»
Tene jnthn: friend of mine found a bug: gist.github.com/1354278 06:44
patch moritz: has perl6-examples been abandoned? 06:48
moritz patch: mostly, yes 06:49
patch so, no use for new euler solutions or corrections to old examples? 06:50
06:51 drbean left
moritz well, you can revive it 06:54
06:54 araujo left
moritz I mostly meant that currently nobody maintains it 06:55
patch i'd like to help with that 06:56
moritz patch: do you have commit access already?
06:57 araujo joined
patch moritz: no, i'm patch on github. 06:57
moritz patch: now you have. Have fun! 06:58
06:58 drbean joined
patch moritz: thanks! 06:58
07:00 wtw joined
sorear wonders if patch is named after TimToady's program 07:00
sorear -> sleep
patch wonders if TimToady's program is named after himself 07:03
07:16 drbean left 07:24 drbean joined 07:26 Mowah_ joined 07:33 daniel-s joined 07:38 simcop2387 left 07:40 simcop2387 joined
Woodi maybe not totally of topic: www.garfield.com/comics/todayscomic.html 07:40
07:45 am0c joined 07:47 benabik left
masak morning, #perl6 07:48
07:48 benabik joined
Tene midnight, masak :) 07:48
masak :) 07:49
masak .oO( Phase Off )
moritz: #103258 looks a bit familiar. I wonder if that isn't a dupe. 08:12
[Coke]: have you seen it before?
08:18 drbean left 08:20 drbean joined 08:24 mj41 joined 08:26 wk left 08:29 icovnik joined
masak I'm still thinking about lichtkind's Documentation-Driven Development idea. 08:38
it seems a good idea to divert at least some of the initial energy of a project into writing user docs. at least as long as that itself doesn't kill the project. 08:39
after that, it seems that the challenge is to have the documentation stay in sync with user-visible redesigns.
moritz well, it seems to be prone to the same problems as waterfall development 08:40
masak I don't know about that. there's a difference between laying out the whole user experience up front and laying out the whole design up front. 08:41
the former seems to me like a net good and that it's often done too seldom -- to the detriment of UIs. 08:42
08:42 replore left 08:45 drbean left
moritz well, design first suffers from the problem that you often have an imprecise idea of what the program should do in the end 08:46
and if you don't know that (or aren't deep enough into the problem domain), how can you spec the UI with more confidence than the other parts of the software design? 08:47
masak no, one probably can't. 08:49
moritz nom: say '(a' ~~ /'(' ~ ')' <alpha> /
p6eval nom 198513: OUTPUT«=> <(>␤␤»
masak which is why I like spike solutions and prototypes as a first step.
08:49 risou_awy is now known as risou
moritz it seems ~ is just NYI in qregex 08:49
I can't find its action method
masak oh!
but the above match is strange.
moritz it's what I'd expect when the action method is missing 08:50
it just ignores the ~, goal and expression
hm
nom: say '(a)' ~~ /'(' ~ ')' <alpha> /
p6eval nom 198513: OUTPUT«=> <(>␤␤»
moritz right 08:51
08:51 ab5tract joined, drbean joined
masak I'm not so sure I like Match.gist doing something other than Match.Str 08:52
I found the former behaviour more useful.
the above => <(>␤ is just confusing to look at. 08:53
moritz masak: wait until you're developing grammars
masak well.
I tend to use regexes outside of grammars, so that argument doesn't really convince me. :/ 08:54
moritz currently it's a tradoff of which you see only the one half
masak right.
I'm saying I don't like that half.
specifically, I don't like a '=>' without an LHS.
that looks wrong and lazy.
moritz if you find a way to make it nice of regexes, and still as informative for deeper match trees, please do so 08:55
masak feels like that ought to be possible.
08:55 Moukeddar joined
moritz maybe rename the current method gist to 'pretty', and then add a .gist which does some magic check, and either delegates to .Str or to .pretty 08:59
masak right.
moritz fwiw the rationale for the => without the LHS is that we don't know (or don't have) the name of the current regex, which would be on the left of the =>
masak yes, I see that.
moritz nom: 'abc' ~~ /<alpha>+/; say $/
p6eval nom 198513: OUTPUT«=> <abc>␤ alpha => <a>␤ alpha => <b>␤ alpha => <c>␤␤»
masak er. 09:00
good example of why it doesn't work ;)
moritz huh?
please try it on a console, with proper indenting
masak should be 'alpha => [<a>, <b>, <c>]', no?
moritz should it? maybe :-) 09:01
masak or maybe you consider the present layout a feature...
masak wishes he had more time to be involved when these changes happen :/
moritz it's not like it's set in store or so 09:02
improvements are always possible
should probablye be alpha => 0 => <a> 1 => <b> 2 => <c> 09:03
masak that looks wrong, too :/
moritz why? 09:04
masak specifically, not enough grouping.
moritz I've left out the grouping by indenting here
masak the problem with having those on the same line is if they contain further subrules.
moritz yes, should have newlines
09:06 envi_ joined
masak generally, I have the feeling we're inventing Data::Dumper, and not making an excellent job at it. 09:06
moritz Data::Dumper is more about round-tripping than about presentation 09:07
masak hm.
I must confess I do not often use it for its round-tripping capabilities. 09:08
I use it quite often to look into nested data structures.
09:09 alim joined
moritz the leading $VAR1 = would be quite unnecessary for the presentation aspect 09:13
nom: my Int $x = 3; my num $y = $x; say $y 09:21
p6eval nom 198513: OUTPUT«3␤»
09:22 icovnik left 09:23 daxim joined 09:27 daniel-s left 09:34 Moukeddar left 09:37 f00li5h joined, integral joined 09:38 simcop2387 left 09:40 simcop2387 joined, robertbrook joined
masak moritz: let's try to clear up the solution space by dividing the possible solutions into Bracket Stringifications and Indented Stringifications. I agree that an indented stringification is a good thing to have. I'm not so sure I'd like it to be in .gist 09:45
moritz masak: I find bracket-only stringifications (no indention) unreadable for larger match trees 09:48
there's .perl for that already
masak good point.
mls morning! 09:49
masak morning, mls!
moritz o/
dalek p/bigint: 98cf1db | moritz++ | src/ops/nqp_bigint.ops:
correct docs for nqp_bigint_radix
masak moritz: I don't know if I'm just used to stringification of Match giving the matched substring, or if it's a genuinely useful, defendable behaviour. I do know I'll miss it. 09:50
moritz stringification of Match still gives you the matched substring.
mls (Data::Dumper uses the $VAR1 to show cyclic references)
09:50 dakkar joined
moritz ... even if there are no cyclic references 09:51
masak moritz: right, but now we have two stringifications: .Str and .gist
dalek kudo/bigint: ffa2fe7 | moritz++ | src/core/Rat.pm:
[Rat] avoid going through Num for .Int
09:52
kudo/bigint: 17b3fc8 | moritz++ | / (2 files):
use nqp::radix_I in Str.Numeric

Fixes S32-str/numeric.t again
moritz $ ./perl6 -e 'say ":16<FFFFFFFFFFFFFFFFFF>".Numeric'
4722366482869645213695
09:56 ab5tract left
moritz rakudo: say ":16<FFFFFFFFFFFFFFFFFF>".Numeric 09:56
p6eval rakudo 198513: OUTPUT«4.72236648286965e+21␤»
moritz masak: right, and .gist is supposed to provide more interesting information besides the raw stringification
which is why .gist on a type object doesn't return the empty string 09:57
but rather Int() or so
masak sure, but something like 'MATCH:[foo]' would also be more interesting information. and less verbose. 09:59
there's nothing a priori that says .gist needs to output an indented match tree.
moritz right, but people in here expressed their desire for better inspection of match trees, so it seems like a natural fit 10:00
10:00 robertbrook left 10:02 hypolin left 10:05 ab5tract joined
masak it might be a good/popular idea. we'll see. 10:08
it would be nice if it didn't make non-grammar regex .gist-ification noisy, though. 10:09
10:29 simcop2387 left 10:30 simcop2387 joined
masak egonw, jonalv: this might interest you: www.youtube.com/watch?v=vcXUrNSvjhU 10:43
a few years old, but I remember it as good.
10:44 simcop2387 left 10:48 simcop2387 joined, mkramer1 joined 10:51 mkramer1 left 10:53 wk joined
masak er. sorry, ww. 10:56
moritz still looks interesting :-)
10:57 icovnik joined
masak irssi advantage -- can handle many conversations simultaneously. disadvantage -- sometimes things end up in the wrong window... 10:57
11:05 koban left
moritz jnthn: I see some difficulties with parsing Int literals. We need to have a bigint type available in Actions.pm to create the Int constants from literals 11:05
jnthn: but of course we don't have them yet, and I guess we want to parse numbers before we set up Int. Should we create some NQPBigInt type for bootstrapping, and define some conversion to Int? 11:06
11:11 ab5tract left 11:39 nsh joined 11:40 sbp joined 11:41 sbp left 12:09 bluescreen10 joined 12:11 Psyche^ joined, benabik left 12:14 Patterner left, Psyche^ is now known as Patterner 12:16 simcop2387 left
masak xkcd tackles YAGNI: xkcd.com/974/ 12:17
12:17 mishin joined
masak I find the title attribute especially insightful. getting things right should always be done in the past, preferably :) 12:18
12:18 simcop2387 joined
moritz time machines will make it possible 12:21
OTOH the fact that we don't have time machines yet means that nobody from the future invented one, and brought them to us 12:22
so it's unlikely we'll ever get them :/
japhb: at your convenience, please review github.com/rakudo/rakudo/commit/17...73c2a3716a 12:23
12:28 ab5tract joined 12:30 sftp joined 12:31 mj41 left 12:32 ab5tract left 12:38 mj41 joined 12:46 tokuhirom joined, simcop2387 left 12:50 simcop2387 joined 12:54 benabik joined
moritz the 'Perl 6' page on wikipedia does not mention Niecza. I'd like to call the lurkers in here to action to change that :-) 13:01
masak ++lurkers 13:02
moritz perl6.wikia.com/wiki/Constructor could also use some love :-) 13:04
could link to perlgeek.de/blog-en/perl-6/object-c...ation.html for example 13:06
masak ooh - so *that's* where the idea of "a routine should only have one exit point" comes from! programmers.stackexchange.com/quest...717#118717 13:08
(I thought it was the Structured Programming movement)
moritz curious 13:10
masak yes. beware of memes that outlive their usefulness. 13:12
moritz I had my "single point of exit" epiphany with Eiffel 13:13
13:13 HarryS left
moritz I wrote a small game, and that needed a routine to verify if a move was correct 13:14
13:14 envi_ left
moritz and that's a classical case where early exit is useful 13:14
you can do thing like return False if $x1 != $x2 || $y1 != $y2;
subsequent validation might require that previous checks succeeded 13:15
but Eiffel enforces single point of exit
13:15 envi_ joined
moritz so I had to do something really ugly 13:15
a variable that remembered the check state, and doing an 'if' around each check except the first
and then I knew that it wasn't any easier to read or reason about that way 13:16
Juerd I love having multiple returns
And often I write it with "or" and "and" 13:17
sub { condition or return; condition or return; condition or return; return 1; }
masak I love multiple returns too. I'd probably lean towards statement-ending unless in that case, though. 13:18
not religious about it; just a habit.
arnsholt I'd probably go for statement-ending if with negated condition, I think 13:19
flussence I only use the "or return" thing in languages that don't have postfix conditionals :)
Juerd IIRC PBP wants you to use statement modifiers, because program flow is important and should stand out when skimming the beginnings of lines.
masak right.
that's probably where I got it from.
and it's not just routines which return booleans -- this pattern works for all kinds of case-based processing.
Juerd But to me, the condition seems more important. I've never written return unless open my $fh, "foo"; It's always open my $fh, "foo" or return; 13:20
masak for example, deciding where to line-break a long string.
13:20 shinobicl left
masak Juerd: I'd 'die' or 'fail' there, not 'return'. 13:20
flussence (having said that, I prefer use autodie; over both...)
moritz Juerd: that's because open() is not executed primary for its return value in p5
arnsholt Juerd: I feel it's more important to highlight the fact that we can return at this point 13:21
moritz that's why it feels so weird in conditions
13:21 HarryS joined
moritz I might do 13:21
my $success = open my $fh, '<', $filename; 13:22
return unless $success;
rest of the thing here
Juerd masak: In Perl 5 I can never decide between throwing exceptions and returning undef...
masak heh :) 13:23
[Coke] point to java, then. ;) 13:24
Juerd arnsholt: Hm, maybe it's because I tend to keep subs short, that it's always really obvious that there are multiple return points.
13:24 drbean left
masak niecza: grammar G { token TOP { <var> | <var> \+ \d+ }; token var { \% $<name>=[\w+] \% { say 42 } } }; say ?G.parse("%foo%+1") # matches, fine 13:28
p6eval niecza v11-22-gbebf7a0: OUTPUT«42␤42␤Bool::True␤»
masak niecza: grammar G { token TOP { <subrule> }; token subrule { <var> | <var> \+ \d+ }; token var { \% $<name>=[\w+] \% { say 42 } } }; say ?G.parse("%foo%+1") # doesn't match, and I think it's a bug
p6eval niecza v11-22-gbebf7a0: OUTPUT«42␤Bool::False␤»
masak all I've done is move the alternation down into a subrule. 13:29
that shouldn't make a difference, should it?
niecza: grammar G { token TOP { <subrule> }; token subrule { <var> \+ \d+ | <var> }; token var { \% $<name>=[\w+] \% { say 42 } } }; say ?G.parse("%foo%+1") # matches again
p6eval niecza v11-22-gbebf7a0: OUTPUT«42␤Bool::True␤»
moritz wants a word diff for IRC 13:30
masak I have no intuition for when order matters with infix:<|> in grammars.
this seems (rightly or wrongly) to be one such case.
13:31 drbean joined
masak sorear: ^^ 13:31
masak re-reads the relevant part of S05 13:32
benabik I think | is supposed to do LTM and || is supposed to try in order.
masak right. I'm with you that far.
arnsholt masak: I think the inlined code makes both branches have the same declarative prefix 13:33
masak oh!
benabik So order shouldn't matter with |, right?
masak yes.
arnsholt++ # that's it, of course
so I have to think about this from the viewpoint of the declarative prefixes of the transitive alternations.
so, no bug. 13:34
niecza: grammar G { token TOP { <subrule> }; token subrule { <var> | <var> \+ \d+ }; token var { \% $<name>=[\w+] \% } }; say ?G.parse("%foo%+1") 13:35
arnsholt Yeah, LTM is all about the prefixes (as far as I can make out)
p6eval niecza v11-22-gbebf7a0: OUTPUT«Bool::True␤»
masak right; without the code block it goes down the right branch.
question is more: why does it discard the right branch when the code block is there? 13:36
hm... maybe 'cus of the ratcheting implied by 'token'? 13:38
niecza: grammar G { regex TOP { <subrule> }; regex subrule { <var> | <var> \+ \d+ }; regex var { \% $<name>=[\w+] \% { say 42 } } }; say ?G.parse("%foo%+1") # doesn't match, and I think it's a bug
p6eval niecza v11-22-gbebf7a0: OUTPUT«42␤42␤Bool::True␤»
masak seems so.
yeah; no bugs anywhere. keep up the good work, sorear++ :) 13:39
13:42 envi_ left 13:52 drbean left
moritz perl6: say 123 ** 42 13:55
p6eval rakudo 198513: OUTPUT«-9223372036854775808␤»
..pugs b927740, niecza v11-22-gbebf7a0: OUTPUT«5970554685064519004265641008828923248442340700473500698131071806779372733915289638628729␤»
moritz has a test case for pow_I 13:56
13:56 vmspb joined 13:58 drbean joined 14:09 lucs left 14:10 shinobicl joined
masak someone could make a good blog post just by translating these Perl 5 one-liners to Perl 6: www.catonmat.net/blog/perl-one-line...-part-six/ 14:13
as a bonus, explaining on the way why certain special variables are dead and gone, and what we use instead, and why it's better. :) 14:14
dalek p/bigint: cf9144d | moritz++ | src/ops/nqp_bigint.ops:
fix spelling of base_core, though it does not seem to make a difference
14:18
p/bigint: caacd56 | moritz++ | / (3 files):
First shot at a "smart" nqp::pow_I opcode

The idea is to return either a bigint or a float (for the +-Inf case, and when the exponent is negative).
The float part isn't tested yet, so likely wrong. The part that returns bigints has sparse test coverage, so it might be not too far off.
14:18 tokuhirom left 14:21 bazqux joined
moritz www.perlmonks.org/?node_id=937320 might be fun to come up with a Perl 6 solution 14:22
14:23 localhost left 14:25 localhost joined
masak feels like a bitmask problem. 14:27
oh, but maybe you're not interested in the ways in which bases are ambiguous? 14:28
what happens in the problem if two sequences have an ambiguous base at the same locus? 14:30
moritz unspecified 14:31
erm, I meant to say: Mu
PerlJam clearly you get a junction :)
masak demons out my nose. 14:32
reason I said "bitmask problem" was that my first view of the ambiguous base specifiers was that they represented bitmasks of ACGT possibles. 14:33
and merging would then simply be some kind of joining (probably using infix:<+|>) of these.
if I were to write a solution, I'd probably write one that did that. 14:34
moritz nom: print for <A C G T> X~| <A C G T>
p6eval nom 198513: ( no output )
moritz nom: .print for <A C G T> X~| <A C G T>
p6eval nom 198513: OUTPUT«ACGUCCGWGGGWUWWT»
masak you may or may not have taken me too literally there :P
moritz nom: my %seen; %seen{$_} = 1 for (<A C G T> X~| <A C G T>); say %seen.keys.sort 14:35
p6eval nom 198513: OUTPUT«A C G T U W␤»
masak nom: say .ord.fmt("%b") for <A C G T>
p6eval nom 198513: OUTPUT«1000001␤1000011␤1000111␤1010100␤»
masak nom: say .ord.fmt("%b") for <U W> 14:36
p6eval nom 198513: OUTPUT«1010101␤1010111␤»
14:37 envi_ joined, envi_ left, envi_ joined 14:38 kst left 14:45 clsn joined 14:50 bazqux left
masak liked avdi.org/talks/confident-code-rubymidwest-2011/ 14:57
it expresses something that I've wanted to be able to express for some time now. 14:58
HN thread with link to video: news.ycombinator.com/item?id=3218882
clsn Has this problem in rakudo been noted yet? gist.github.com/1354278 14:59
moritz oh noes, not another "for loops, recursion and lexicals mix badly" bug :( 15:00
masak I thought we decided not to have any more of those 15:01
moritz clsn: please submit that as a bug report to [email@hidden.address]
15:01 simcop2387 left
clsn Maybe we just shouldn't write so much with for loops and recursion. Looping structures are for doing the same things over and over again anyway. You should just do something right once and be done. :) 15:02
moritz: Thanks for letting me know it's worth reporting.
masak waitwait.
I agree with the lower output. 15:03
moritz why? $h is declared inside sub recur
masak yeah.
on second thought, I don't.
moritz $counter is shared, $h is private
15:04 simcop2387 joined
masak rakudo: my $c = 0; sub r($n) { return if !$n; $h = $c; r($n-1); say $h }; r 3 15:04
p6eval rakudo 198513: OUTPUT«===SORRY!===␤Variable $h is not predeclared at line 1, near " = $c; r($"␤»
masak rakudo: my $c = 0; sub r($n) { return if !$n; my $h = $c; r($n-1); say $h }; r 3
p6eval rakudo 198513: OUTPUT«0␤0␤0␤»
masak er :)
rakudo: my $c = 0; sub r($n) { return if !$n; my $h = ++$c; r($n-1); say $h }; r 3 15:05
p6eval rakudo 198513: OUTPUT«3␤2␤1␤»
masak rakudo: my $c = 0; sub r($n) { return if !$n; my $h = 'h' ~ $c; $c++; r($n-1); say $h }; r 3
moritz wonders if a bisect could help
p6eval rakudo 198513: OUTPUT«h2␤h1␤h0␤»
masak hm
rakudo: my $c = 0; sub r($n) { return if !$n; my $h = 'h' ~ $c; $c++; my @k = 1, 6; r($n-1); for @k { say $h } }; r 3 15:06
p6eval rakudo 198513: OUTPUT«Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤»
masak o.O
PerlJam perhaps I've seen too many commercials for Subway because all those Any() make me expect a subsequent "5 dollar foot long"
masak rakudo: my $c = 0; sub r($n) { return if !$n; my $h = 'h' ~ $c; $c++; my @k = 1, 6; r($n-1); for @k { say "$_ and h is $h" } }; r 3 15:07
p6eval rakudo 198513: OUTPUT«Use of uninitialized value in string context␤1 and h is ␤Use of uninitialized value in string context␤6 and h is ␤Use of uninitialized value in string context␤1 and h is ␤Use of uninitialized value in string context␤6 and h is ␤Use of uninitialized value in string …
clsn I have written exactly one program more than a line or two long in perl6. Every so often rakudo changes enough to break it (or sometimes fix it), and I have to see where I went wrong.
clsn sent the email.
masak clsn: I used to feel that way about Rakudo two-three years ago. 15:08
clsn: this bug of yours is quite unusual nowadays, and I'm surprised we don't have tests catching it.
clsn Yeah, this one seemed awfully straightforward.
There's something else broken between those two rakudos; another thing making my program run wrong, but I haven't isolated the issue yet. 15:09
masak rakudo: sub r { my $h = 'h'; my @k = 1, 6; for @k { say $h } }; r
p6eval rakudo 198513: OUTPUT«h␤h␤»
clsn It's probably something exasperating with pattern-matching.
masak rakudo: my $c = 0; sub r { my $h = 'h' ~ $c; my @k = 1, 6; for @k { say $h } }; r
p6eval rakudo 198513: OUTPUT«h0␤h0␤»
moritz clsn: lots of regex things are broken in nom :(
masak is now terribly confused and needs to think before discussing further with p6eval 15:10
clsn moritz: that's almost reassuring. If people know they're broken, sooner or later they'll fix them (and my program might still be right.)
masak I've seen three behaviors in a short time: clsn's h3-h3-h3 behavior, the correct behavior, and my Any-Any-Any behavior.
I can't reproduce any of them reliably :/
clsn Otherwise, I had it coded to the wrong understanding of the language before, and I have to figure out the new specs all over again.
15:13 simcop2387 left
PerlJam Is it just me or is nqp broken on the latest parrot? 15:14
moritz in what way does it seem to be broken?
15:15 simcop2387 joined
PerlJam when compiling nqp I get: gist.github.com/1355083 15:15
moritz is that nqp's master branch? 15:16
PerlJam yes.
PerlJam needs an ever faster computer. 15:18
I no longer have the patience to wait for compiles
masak clearly you need to become a Google Go programmer. 15:19
or an assembler programmer, I guess. 15:20
moritz finds parrot and nqp compilation times acceptable 15:23
especially with ccache and parallelized make
b: gist.github.com/1354278 15:26
p6eval b 1b7dd1: OUTPUT«1 and h is h3␤6 and h is h3␤h is h3␤1 and h is h2␤6 and h is h2␤h is h2␤1 and h is h1␤6 and h is h1␤h is h1␤1 and h is h0␤6 and h is h0␤h is h0␤»
15:29 mishin left, drbean left 15:31 fsergot joined
fsergot hi perl6! :) o/ 15:32
slavik1 does the Mark L guy hang around here?
15:35 drbean joined, wolfman2000 joined
PerlJam slavik1: Lehmann ? 15:39
daxim schmorp thinks perl6 is the devil 15:40
[Coke] schmorp?
masak clsn: I just managed to reproduce your bug in nom HEAD. 15:41
slavik1 PerlJam: no, Mark Lentczner, the dude who made the periodic table of operators
masak clsn: to me it looks like a stray OUTER pointer.
PerlJam oh
clsn I was reporting it in approximately nom head; whatever the most recent I happened to have on my latest pull. 15:42
So yeah, makes sense.
15:43 sayu joined
slavik1 PerlJam: www.ozonehouse.com/mark/periodic/ 15:43
I am wondering if it's still accurate 15:44
moritz it's two years old? probably not accurate anymore 15:46
for example it misses the Z meta operator
and the sequence operator, if present at all, will be outdated 15:48
lcm and gcd are missing
masak nom: my $c; sub r($x) { my $h="h" ~ $c++; r $x-1 if $x; for 1 { say $h }; say "h is $h" }; r 3
p6eval nom 198513: OUTPUT«h3␤h is h3␤h3␤h is h2␤h3␤h is h1␤h3␤h is h0␤»
masak b: my $c; sub r($x) { my $h="h" ~ $c++; r $x-1 if $x; for 1 { say $h }; say "h is $h" }; r 3
p6eval b 1b7dd1: OUTPUT«h3␤h is h3␤h2␤h is h2␤h1␤h is h1␤hAny()␤h is hAny()␤»
masak golf'd!
nom: my $c; sub r($x) { my $h="h" ~ $c++; r $x-1 if $x; say $h for 1; say "h is $h" }; r 3
p6eval nom 198513: OUTPUT«h3␤h is h3␤h3␤h is h2␤h3␤h is h1␤h3␤h is h0␤»
masak nom: my $c; sub r($x) { my $h = $c++; r $x-1 if $x; say $h for 1; say "h is $h" }; r 3 15:49
p6eval nom 198513: OUTPUT«3␤h is 3␤3␤h is 2␤3␤h is 1␤3␤h is 0␤»
moritz nom: my $c; sub r($x) { my $h = $c++; r $x-1 if $x; 1 for 1; say "h is $h" }; r 3
p6eval nom 198513: OUTPUT«h is 3␤h is 2␤h is 1␤h is 0␤»
moritz nom: my $c; sub r($x) { my $h = $c++; r $x-1 if $x; $h for 1; say "h is $h" }; r 3 15:50
p6eval nom 198513: OUTPUT«h is 3␤h is 2␤h is 1␤h is 0␤»
15:50 thou joined
masak print $h in a for loop, and it comes out as 3 15:50
moritz nom: my $c; sub r($x) { my $h = $c++; r $x-1 if $x; say $h for 1; }; r 3
p6eval nom 198513: OUTPUT«3␤3␤3␤3␤»
sorear good * #perl6
moritz niecza: my $c; sub r($x) { my $h = $c++; r $x-1 if $x; say $h for 1; }; r 3 15:51
p6eval niecza v11-22-gbebf7a0: OUTPUT«3␤2␤1␤Any()␤»
moritz \o sorear
nom: my $t = ''; my $c; sub r($x) { my $h = $c++; r $x-1 if $x; $t ~= $h for 1; }; r 3; say $t 15:52
p6eval nom 198513: OUTPUT«3333␤»
moritz at least it's easy to turn into a test ;-)
niecza: my $t = ''; my $c = 0; sub r($x) { my $h = $c++; r $x-1 if $x; $t ~= $h for 1; }; r 3; say $t 15:53
p6eval niecza v11-22-gbebf7a0: OUTPUT«3210␤»
moritz masak: do you still remember the number of that infamous ticket?
15:54 drbean left
masak 58392_ 15:54
?
moritz nom: my $t = ''; my $c; sub r($x) { my $h = $c++; r $x-1 if $x; for 1 { $t ~= $h }; }; r 3; say $t
p6eval nom 198513: OUTPUT«3333␤»
moritz masak: indeed 15:55
masak: thanks
15:56 Trashlord left
benabik PerlJam: I was able to replicate your build failure. 15:57
15:57 Trashlord joined
masak moritz: but this one is not identical, I think. 15:57
this one is more benign and limited.
moritz masak: but it's a good inspiration for where to put the test :-) 15:58
15:58 pjcj left
moritz nom: my $t = ''; my $c; sub r($x) { my $h = $c++; r $x-1 if $x; do { $t ~= $h }; }; r 3; say $t 15:59
p6eval nom 198513: OUTPUT«3333␤»
15:59 drbean joined
moritz nom: my $t = ''; my $c; sub r($x) { my $h = $c++; r $x-1 if $x; $t ~= $h }; r 3; say $t 15:59
p6eval nom 198513: OUTPUT«3210␤»
15:59 daxim left
benabik PerlJam: My backtrace had function names inside nqp_ops though. Added it as a comment: gist.github.com/1355083#comments 16:00
moritz so it needs to be just a block, not necessarily a loop
16:00 icovnik left
dalek ast: fe4c35b | moritz++ | S04-statements/for.t:
RT #103332, for loops, lexicals and recursion
16:00
16:01 clairvy joined
masak moritz: right. it's a block, and the block gets the OUTER wrong. 16:02
16:04 vmspb left 16:07 wtw left
cognominal what is the Perl 6 equivalent of the PIR setprop? 16:08
16:08 daxim joined
moritz that is an odd question 16:08
cognominal: what do you want to accomplish?
sorear pir::setprop(...)
cognominal sorear: I forgot about pir:: :) 16:09
moritz my first reaction was "traits", because it allows you to attach additional data to objects
cognominal I don't care to expose it as an interface. 16:10
TimToady thinks complicated Match objects should probably gistify to yaml
masak sounds reasonable. 16:11
TimToady or yaml2 :) 16:12
moritz thinks complicated Match objects should .yaml to yaml
PerlJam TimToady: did you just add yaml to the perl 6 spec? :)
TimToady no, I said "probably" :P
masak if the goal is to have a readable indented structure serialization, YAML is as good as any, IMO. 16:13
no need to reinvent that wheel.
PerlJam Sure, but I'm not aware of the probability distribution that you use for "probably"
moritz somehow never found yaml very readable
TimToady it's better than the alternatives, is all 16:14
PerlJam moritz: in what context have you seen yaml? rails test fixtures? There is some fairly complicated yaml out there that tries to scuttle the readability aspect. 16:16
moritz PerlJam: catalyst config files
TBH I never read an explanation for what it does, but I didn't need that for JSON 16:17
16:17 drbean left
flussence (there's a yaml2?) 16:17
PerlJam flussence: yeah, ingy is making yaml better
moritz hopes it reduces the spec size 16:18
TimToady hopes .perl gets prettier too 16:20
16:20 pjcj joined 16:22 drbean joined
moritz in the long run it won't 16:23
for example if .perl is supposed to reproduce the difference between EnumMap and Hash, it will stay ugly, because we only have literals for one of them 16:24
16:24 clairvy left
TimToady thinks about making .perl return eval :lang(yaml) q:to /END/ ... :) 16:24
16:25 clairvy joined 16:26 alim left
TimToady I'm not really saying that matches have to gistify to yaml in a completist sense like .perl must do, but that we can gistify matches in a much more readable format than we currently do, even while throwing some info away that .perl might keep 16:30
16:30 clairvy left 16:31 clairvy joined
TimToady that's what .gist means, after all 16:31
16:31 alim joined 16:32 Sarten-X left
moritz wonders if $a.gist eq $b.gist becomes the new "loose eqv" 16:32
16:32 alim left
moritz fwiw I could build both nqp and rakudo on newest parrot 16:32
masak TimToady: speaking of throwing info away -- how are these two things reconciled: (1) a Perl 5 to Perl 6 parser promises to retain as much information as possible, including, I suppose, comments. (2) we encourage people to do <.ws> in their grammars.
TimToady well, might be the only way to compare two infinite sequences :)
16:33 alim joined
mls moritz: I wonder if Block.clone() should also clone the captured outer 16:33
TimToady masak: poorly :)
but there are some things worth doing poorly
masak I'm still at the "at all" stage with this one, though. 16:34
they seem directly at odds with one another, not just a little.
moritz ah, that's why ops2c throws away comment from my .ops files :/
TimToady are you asking about the places where the p5 programmer should have used /x but didn't?
masak no, not at all. 16:35
TimToady then I don't follow your question at all
masak I'm saying how can a p52p6 translator translate whitespace correctly if it doesn't capture it?
PerlJam moritz: I guess I'm going to with "it's just me" then. I haven't built parrot/nqp/rakudo on this machine in a while and it was recently upgraded to ubuntu 11.10 so no telling what's going on.
TimToady masak: STD can easily reproduce this info from the memos 16:36
moritz PerlJam: but benabik reproduced it...
PerlJam oh? I didn't see.
TimToady masak: and even in the absense of that, everything is marked with its .from and .to, so all you need do is substr the original string between tokens to get the whitespace, if you're interested in it 16:38
masak TimToady: hm, ok.
mls moritz: ok, now I'm confused. clone of a sub should clone the outer. I wonder why it fails here. 16:39
TimToady whether a translator should reformat whitespace/comments is, of course, a decision that has to be made differently in different situations
especially as you introducing refactoring options into your translator 16:40
and a good translator is likely to introduce comments in various spots as well, saying "# I'm not 100% sure this is what you want here" 16:41
mls moritz: ah, it doesn't work because the sub's outer is set at sub entry, but not restored at sub exit
TimToady is confused; surely an outer is set at compile tie, not run time
*time
mls yes, I meant "outer_ctx", not "outer_sub" 16:42
16:42 Sarten-X joined
TimToady is this parrotese for "dynamic context"? 16:43
mls parrot implements a capture by cloning the sub and setting an "outer_ctx" attribute in the cloned sub. 16:44
16:44 wolfman2000 left
mls when the cloned sub is called, the "outer_ctx" will be made the "outer" of the current context 16:44
16:46 simcop2387 left 16:47 simcop2387 joined
mls for some reason rakudo adds code to the beginning of every sub that calls capture_lex for every sub the code calls 16:48
(I'm not sure why it is needed, the sub's outer() parameter should normally make sure that the context gets set correctly) 16:49
moritz mls: might well be from a time when parrot's outer() handling was too buggy
mls commenting out the capture_lex breaks the code, so they seem to be needed for something 16:50
moritz mls: but I don't really grok the lexicals system, and codegen neither. So take my information with a rock of salt :-)
TimToady might relate to S04:1746 16:51
mls could be, yes. jnthn++ will know 16:52
so I can explain what's going on, but I don't know the correct fix ;( 16:53
16:54 daniel-s joined
TimToady moritz: re irclog.perlgeek.de/perl6/2011-11-10#i_4685509 this might be helped with a Go-like strategy of keeping literals as their string repr until you know what context they're actually used in 16:55
of course, that only helps if you don't actually use the literals before the type is available :) 16:57
moritz ... and that kinda is the problem :-)
Int literals are pretty much everywhere 16:58
TimToady heh, I'm definitely "a perfectionist with no ability to prioritize" :) 16:59
masak decommutes 17:01
[Coke] wonders if TimToady is committed to yaml over, say, JSON. 17:02
TimToady they both have their ups and downs
TimToady has no ability to prioritize, remember :P 17:03
[Coke] tends to prefer JSON, but Coke is ostensibly a web developer.
japhb moritz: have not backlogged, but noticed your code review request. Will look at it now.
benabik JSON is good for simple structures. YAML has nice things like types and loops.
[Coke] TimToady: Oh, I'd tend to agree. ;)
PerlJam I've found being able to refer to parts of the yaml doc in other parts of the yaml doc is quite nice 17:04
17:04 overrosy left
PerlJam [Coke]: and since ingy isn't here ... JSON *is* YAML ;) 17:05
17:05 overrosy joined
benabik I seem to recall somebody mentioning a new version of the YAML spec. Or was I hallucinating? 17:06
[Coke] Does he mean that in a literal sense or a "everything you can do, I can do better^Wtoo." ?
PerlJam benabik: github.com/yaml/YAML2
TimToady ingy-san announced the yaml2 effort a mere 2ish weeks ago
benabik PerlJam++
TimToady and I was the first to hear it, on the train to SFPM, where it was officially announced 17:08
or maybe I was second, if rafl knew it already 17:09
cognominal TimToady, not all projecta take a decade to accomplish :)
TimToady we still don't know if Perl 6 takes a decade to accomplish :)
might take two... 17:10
or ten :)
in fact, that's kinda the plan 17:11
17:12 mj41 left
TimToady c.f. "100-year language" 17:12
17:13 evhan joined
cognominal agreed, but I am hoping that by this christmas we will have a useful rakudo. What was perl 1 for the previous generation. 17:13
PerlJam rakudo isn't useful now? 17:14
TimToady um, it's already that useful
cognominal …for a larger population
beyond the current happy few.
TimToady well, you have to convert the sysadmins before you convert the webdevs, and that'll take a Perl 4 equivalent at least :) 17:15
PerlJam I never used perl 1, but I remember when perl 5 was released. It seemed like it was in flux for a year or two before it became "useful for the general population"
abercrombie When will be the next version released? Ever since 2011.07 17:16
17:16 bluescreen10 left
PerlJam abercrombie: you mean Rakudo Star? 17:16
abercrombie No, just a release version
TimToady abercrombie: try niecza if you can't wait for nom to stabiliz; it's officially released once a month 17:17
and it's pretty zippy
PerlJam abercrombie: I did the Oct release of Rakudo just a few weeks ago. 17:18
17:18 sayu left
abercrombie Oh, I didn't see it on rakudo.org 17:18
PerlJam probably because I forgot to update it.
TimToady abercrombie: also, you should not complain about the delay of a new Rakudo Star much, because it depends on health issues in pmichaud++'s family that he has no control over 17:19
and we have told him in no uncertain terms that is priority is his family, not getting the next Rakudo Star out
*his
cognominal pmichaud++
abercrombie I never complain about it. As pmichaud posted on rakudo.org, "rather than rush out a buggy release we’ve decided to spend a few more days cleaning things up a bit"
TimToady abercrombie: "Ever since 2011.07" sounds like a complaint to me :) 17:20
abercrombie Oh, I didn't mean that.
Sorry. 17:21
TimToady ah, well, human languages are always a bit lossy... 17:22
abercrombie definitely. 17:23
So now rakudo: in p6eval is 2011.10 ? 17:24
japhb moritz: In bigint's Str.Numeric(), why on lines 257-258 do you say '$base.Int'? It's already an Int, right? 17:25
And FWIW, jnthn's nqp::radix_I looked sane, though I'm not really qualified WRT tommath bits.
er, nqp_bigint_radix() 17:26
17:29 MayDaniel joined 17:31 bluescreen10 joined, clairvy left 17:32 clairvy joined
mls hah! that test case is also nice to demonstrate that parrot's auto-clone is wrong. It has exactly the same bug as in rakudo 17:33
(it stores the "latest" context in the sub and uses it for auto-close. I suspeced that this was wrong some weeks ago, but couldn't find a counter example. now I have one ;) ) 17:34
17:34 clairvy left 17:35 clairvy joined
mls (which also means that simply removing the "capture_lex" statements doesn't work. Also, because rakudo clones the sub before storing it in the lex, so the auto-close does not find the correct context) 17:36
17:37 clairvy left
mls (which also means that parrot's auto close is very broken as it can't deal with cloned subs ;( ) 17:38
17:41 lichtkind joined 17:45 clairvy joined
TimToady masak: maybe you should translate avdi.org/talks/confident-code-rubymidwest-2011/ to Perl 6 and see how it fares :) 17:47
PerlJam TimToady: including or excluding the monkey patching? :-) 17:51
17:51 clairvy left
TimToady -Ojoy 17:51
17:52 molaf joined 17:54 clairvy joined
cognominal without a bill 17:54
TimToady usually there's one bill too many... 17:55
17:57 vmspb joined 18:01 bluescreen10 left, clairvy left 18:02 daniel-s left, bluescreen10 joined 18:03 drbean left
PerlJam that whole section on null and nil reminds me of Rich Hickey's Simple Made Easy 18:03
18:03 daxim left 18:04 dakkar left, clairvy joined 18:06 alim left, kst joined, clairvy left 18:07 ab5tract joined 18:08 bluescreen10 left 18:09 bluescreen10 joined
lichtkind moritz: ping 18:09
18:10 drbean joined
lichtkind masak: cheers all changes done 18:15
18:17 clairvy joined 18:23 wk left 18:25 domm left
mls moritz: I created two PIR test cases that show both problems (the recursion problem, and the "why capture_lex is needed" problem) 18:27
18:27 clairvy left
mls I'll try to find a solution tomorrow 18:27
-> home
18:27 clairvy joined 18:33 MayDaniel left 18:34 risou is now known as risou_awy, icovnik joined
ingy perl6 + yaml == ♥ :) 18:41
ingy gets to work on it...
fyi, this is a nice little tool that some hackers who just ported YAML to JS whipped up: nodeca.github.com/js-yaml/ 18:43
the port was pyyaml to node.js originally, but now works in browser js-s 18:44
lichtkind cheers ingy 18:45
18:52 pjcj left 18:53 pjcj joined 18:55 lichtkind left 18:56 lichtkind joined 19:17 wk joined 19:18 envi_ left 19:25 am0c left
masak evening, #perl6. 20:03
diakopter o/
masak lichtkind: I've forgotten what changes you mean, but I'm glad they're all done ;) 20:04
20:05 Chillance joined
moritz japhb: ah, the .Int is a fossil 20:10
japhb gotcha 20:14
lichtkind masak: i fixed my slides and uploaded as well as added % ans %% to the tablets
masak: and fixed ** in index A and B 20:16
masak lichtkind: nice! cool! 20:18
lichtkind++
perl6: say Nil.Array
p6eval niecza v11-22-gbebf7a0: OUTPUT«Unhandled exception: Unable to resolve method Array in class Nil␤ at /tmp/hlshtujl0z line 1 (mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2224 (ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2225 (module-CORE @ 58) ␤ at /home/…
..pugs b927740: OUTPUT«*** No such subroutine: "&Nil"␤ at /tmp/18XdXUl_4K line 1, column 5 - line 2, column 1␤»
..rakudo 198513: OUTPUT«␤»
lichtkind masak: thanks but thats was the least, have to do much more
masak rakudo: say Nil.Array.perl
p6eval rakudo 198513: OUTPUT«Array.new()␤»
masak rakudo++
perl6: say Array(Nil).perl 20:19
p6eval rakudo 198513: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Array' called (line 1)␤»
..niecza v11-22-gbebf7a0: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Array␤ at /tmp/DKGliZuEi2 line 1 (mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2224 (ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2225 (module-CORE @ …
..pugs b927740: OUTPUT«*** No such subroutine: "&Array"␤ at /tmp/8aaJfwcijs line 1, column 5 - line 2, column 1␤»
dalek kudo/bigint: eab4d7a | moritz++ | src/core/Str.pm:
remove fossil noticed by japhb++
masak triple FAIL.
lichtkind: it's funny how information gets propagated. my talk wasn't even really about % and %%, I just mentioned them in passing ;) 20:21
true or false: ceteris paribus, a routine that doesn't use self shouldn't be a method. discuss. :) 20:23
moritz not true in general, because of interface consistency
ie it's an implementation detail if a method uses self or not 20:24
masak that's a fine argument in the abstract. I can't think of a concrete example, though. can you?
diakopter false, because of the convenience in accessing so-called static methods with the .methodname suffix instead of typing the class name. also, for inherited "static" methods.
masak diakopter: interesting. so -- using classes but not for their objects? 20:25
I don't think I've seen that style of coding in Perl 6.
lichtkind masak: even more funny it just started as impulse by me to talk about **, if there is any other thing happened in last 6 months?
diakopter masak: yeah, using classes for interacting with their private static data 20:26
lichtkind % is even from logic good because in math its also whats left from division
masak lichtkind: check the git log of the 'specs' repo :)
diakopter locals declared in the class body
masak diakopter: right.
perl6: class A { my $a = 42; method foo { say $a } }; class B is A {}; A.foo 20:27
er.
perl6: class A { my $a = 42; method foo { say $a } }; class B is A {}; B.foo
diakopter o_O 20:28
abercrombie niecza: say "a"
diakopter p6eval decided to take a nap. a dirt nap.
20:29 am0c joined
diakopter masak: maybe a better example would be what you wrote above but calling B.foo from a method in B that does use self 20:29
20:30 aindilis` joined
diakopter er, calling self.foo 20:30
if p6eval ever wakes up
20:31 p6eval left
masak diakopter: right. 20:31
I do see the use for it. 20:32
tadzik 'evening!
20:33 p6eval joined, ChanServ sets mode: +v p6eval, aindilis left
masak tadzik! \o/ 20:33
tadzik lol! masak! 20:34
masak lol!
perl6: class A { my $a = 42; method foo { say $a } }; class B is A { method bar { self.foo } }; B.bar
p6eval rakudo 198513, niecza v11-22-gbebf7a0: OUTPUT«42␤»
..pugs b927740: OUTPUT«␤»
masak pugs--
cognominal masak, you should respect the elders 20:37
masak indeed. slightly unfair of me. 20:40
I do plan to fix it at some point, though ;)
nom: .say for "aarrff!", { my @a = .comb; @a[(^@a).pick].=uc until @a.join ne $_; @a.join } ... { $_ eq .uc }
p6eval nom 198513: OUTPUT«aarrff!␤aarrFf!␤aaRrFf!␤aaRRFf!␤aaRRFF!␤AaRRFF!␤AARRFF!␤»
masak I'm sure there are more elegant ways to write that. 20:41
tadzik that's pretty cool
masak nom: say my $s = "aarrff!"; for (^6).pick(*) { say $s = ((my @a = $s.comb)[$_].=uc; @a.join) } 20:43
p6eval nom 198513: OUTPUT«aarrff!␤Aarrff!␤AarRff!␤AarRfF!␤AarRFF!␤AaRRFF!␤AARRFF!␤»
masak much better ;) 20:44
nom: say my $s = "aarrff!"; say $s = ((my @a = $s.comb)[$_].=uc; @a.join) for (^6).pick(*) 20:46
p6eval nom 198513: OUTPUT«aarrff!␤aarRff!␤AarRff!␤AarRfF!␤AarRFF!␤AArRFF!␤AARRFF!␤»
masak nom: say my $s = "aarrff!"; -> $i { say $s = (.[$i].=uc; .join) given $s.comb } for (^6).pick(*) 20:49
p6eval nom 198513: OUTPUT«aarrff!␤Cannot assign to a non-container␤ in method dispatch:<.=> at src/gen/CORE.setting:730␤ in block <anon> at /tmp/dhRpFnqygY:1␤ in block <anon> at /tmp/dhRpFnqygY:1␤ in method reify at src/gen/CORE.setting:4007␤ in method reify at src/gen/CORE.setting:3914␤ …
masak dang ;)
I suspected that might happen.
oh well, it wasn't really shorter anyway. 20:50
20:50 benabik left 20:51 _ilbot left, moritz left, yath left, moritz joined 20:53 benabik joined 20:59 _ilbot joined 21:01 yath joined
lichtkind masak: yes had to fic my git config but now I cat fetch specs again easily 21:02
fsergot masak, however, good job. :) 21:11
21:17 bluescreen100 joined 21:18 Mowah_ left, bluescreen100 left, bluescreen10 left
jnthn evenin', #perl6 21:30
tadzik hey, jnthn!
jnthn went to an event with free beer this evening :) 21:31
masak jnthn! \o/ 21:32
moritz \o 21:33
jnthn: irclog.perlgeek.de/perl6/2011-11-10#i_4685509 when your mind turns to p6 again :-) 21:35
21:35 krakan left
jnthn moritz: Well, it's a little distracted on @other, but I'll take a look ;) 21:36
moritz: I saw your commits :)
21:37 krakan joined
jnthn "I see some difficulties with parsing Int literals. We need to have a bigint type available in Actions.pm to create the Int constants from literals" 21:37
The point is that we *do* have them! :)
$*ST.find_symbol(['Int']) # gets the Int type object
That's why Int is set up in BOOTSTRAP :)
PerlJam jnthn is going to invent a time machine? 21:38
jnthn PerlJam: No, I just worked out the bootstrap ;) 21:39
masak \o/ 21:43
the bootstrap worked out the bootstrap!
tadzik Bootstrap's bootstraps
masak tadzik: I'M TELLIN' THE STORY! 21:44
PerlJam All I know is that none of the boots I've ever owned or used or seen have straps of any kind.
tadzik masak: I'M PLAYING THE SOUNDTRACK!
masak "we're really bad eggs..."
masak plays the soundtrack, too 21:45
tadzik oh, it's hier: www.youtube.com/watch?v=AacMBXI2tw8
oh, "I'M TELLIN' THE STORY!" is a quote 21:46
masak tadzik: yes. sorry if that wasn't clear ;) 21:47
tadzik I fail at remembering those 21:48
especially if I watched it in Polish :P
masak oh!
dubbing--
tadzik recently I'm watching films with english subtitles. I still fail at hearing
masak it's a matter of practice. 21:49
tadzik probably. I should be watching more films
or going to more conferences
masak the subtitles can be distracting, because there's always something that the translation agency gets wrong :/
tadzik oh I know that 21:50
21:51 ab5tract left 21:57 vmspb left
lichtkind o/ tadzik 21:58
21:58 thou left
tadzik hey lichtkind! 21:58
22:08 thou joined 22:16 abercrombie left, thou left 22:17 thou joined 22:39 donaldh joined, donaldh left 22:40 packetknife joined 22:41 wolfman2000 joined 22:45 cafesofie joined 22:47 packetknife left 22:57 mj41 joined, whiteknight joined 22:58 whiteknight is now known as Guest53729 22:59 alvis left 23:11 buubot_backup left, clairvy left
masak good night, #perl6 23:11
diakopter o/ 23:12
23:13 clairvy joined 23:15 alvis joined 23:16 mj41 left 23:21 donaldh joined 23:22 donaldh left 23:30 am0c left 23:31 Trashlord left, clairvy left 23:32 clairvy joined 23:33 buubot_backup joined 23:43 lichtkind left 23:47 wolfman2_ joined
[Coke] -> (16:16) From Sue D. Nymme [meh], to perl: 23:49
- Crazy Perl Idea #433: if/unless/else/elsif blocks should allow redo/next/las
- t. <redo> would jump back to the top of the <if> condition to have it
- re-evaluated; <next> would jump forward to the <else> (or next <elsif>), and
- <last> would jump out of the construct entirely (to the point right after
- the last <else>/<elsif> block).
23:50 wolfman2000 left
[Coke] here's his next crazy idea: 23:52
- YourLabel: while (condition) { say "iteration number ", YourLabel.count; if
- (foo) { YourLabel.next } etc }
flussence I've come across a few situations where being able to jump to the next of a chain of if/elsif/else would've made my code considerably less messy... 23:59