The topic for #perl6 is: pugscode.org/ planetsix.perl.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by TimToady on 25 November 2008.
Juerd_ ATTN feather users: please clean homedirs 00:04
(use "ncdu" to visualise disk usage) 00:07
cspencer pugs: (1..10).reverse.WHAT.say 00:14
lambdabot cspencer: You have 1 new message. '/msg lambdabot @messages' to read it.
p6eval pugs: OUTPUT«Array␤»
pugs_svn r24592 | hinrik++ | [util/perl6.vim] timestamp 00:18
cspencer pugs: (1..10).reverse.perl.say 00:25
p6eval pugs: OUTPUT«(10, 9, 8, 7, 6, 5, 4, 3, 2, 1)␤»
cspencer should a Range reversed return another Range object? 00:26
i would think yes, since it should be lazily evaluated and not flattened to a list before reversal 00:27
TimToady yes 00:32
cspencer timtoady: thanks :)
pmichaud reversing a range also reverses its :by value, iirc. 00:39
cspencer right, that would make sense too :) 00:42
pmichaud: was the Inf you'd added the other day destined to become its own class at some point?
pmichaud I'm waiting to see how Parrot decides to handle it.
cspencer ok
pmichaud at this point it's not likely to become a separate class, unless the spec says it has to be one. 00:43
cspencer ah ok 00:43
i imagine the parrot implementors will be weighing in on that prior to the 1.0 release in the spring? 00:44
pmichaud it's slated to be address before the Jan release.
*addressed
cspencer oh, that's soon, great 00:45
meppl good night 01:12
rakudo_svn r34305 | pmichaud++ | [rakudo]: Merge 'last' and 'redo' functions from pctloop2 branch. 01:20
cspencer rakudo: (1..10).list.say 01:39
p6eval rakudo 34306: OUTPUT«12345678910␤»
rakudo_svn r34309 | pmichaud++ | [rakudo]: Correct loop_statement to execute iteration expression on 'next'. 01:40
cspencer Inf.perl.say 02:00
rakudo: Inf.perl.say
p6eval rakudo 34310: OUTPUT«inf␤» 02:02
cspencer rakudo: 1..10:by(2) 02:15
p6eval rakudo 34310: OUTPUT«Statement not terminated properly at line 1, near ":by(2)"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
cspencer rakudo: ('A'..12).perl.say 02:38
p6eval rakudo 34312: OUTPUT«"A"..12␤»
cspencer pugs: .say for ('A'..10) 02:39
p6eval pugs: OUTPUT«A␤B␤C␤D␤E␤F␤G␤H␤I␤J␤K␤L␤M␤N␤O␤P␤Q␤R␤S␤T␤U␤V␤W␤X␤Y␤Z␤»
cspencer is the Range ('A'..10) valid? if so, how should it iterate over its elements? 02:40
rakudo: .say for ('A'..12)
p6eval rakudo 34312: RESULT«Method 'perl' not found for invocant of class 'Iterator'␤current instr.: '_block14' pc 64 (EVAL_15:39)␤»
pugs_svn r24593 | pmichaud++ | [t/spec] Unfudge some redo tests. 02:48
eternaleye rakudo: say [+] ( split( "", 4150 ).map( { $_ ** 5 } ) ) 02:50
p6eval rakudo 34312: OUTPUT«4150␤»
eternaleye rakudo: subset Valid of Int where { [+] ( split( "", $_ ).map( { $_ ** 5 } ) ) == $num }; my Valid $val = 4150
p6eval rakudo 34312: OUTPUT«Scope not found for PAST::Var '$num'␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
eternaleye Are subset types implemented yet?
oh wait, pasted the wrong code 02:51
rakudo: subset Valid of Int where { [+] ( split( "", $_ ).map( { $_ ** 5 } ) ) == $_ }; my Valid $val = 4150
p6eval rakudo 34312: OUTPUT«Type mismatch in assignment.␤current instr.: 'die' pc 14790 (src/builtins/control.pir:204)␤»
eternaleye Oh, that's non-intuitive 03:02
rakudo: subset Valid of Int where { ( [+] ( split( "", $_ ).map( { $_ ** 5 } ) ) ) == $_ }; my Valid $val = 4150
p6eval rakudo 34312: RESULT«4150»
eternaleye Is [+] supposed to associate more weakly than == ? 03:03
eternaleye @tell eric256 I found a solution for Euler #30 03:20
lambdabot Consider it noted.
eternaleye @tell eric256 `sub isValid { if ( ( [+] split( "", @_[0] ).map( { $_ ** 5 } ) ) == @_[0] ) { return 1; } else { return 0; } }; say [+] map( { $_ if isValid( $_ ); } , 2 .. 100000 );`
lambdabot Consider it noted.
eternaleye @tell eric256 ( 9 ** 5 * 7 is 6 digits, so a solution must be < 100000 ) 03:21
lambdabot Consider it noted.
TimToady [+] is a list operator, so you need [+](...) == or ([+] ...) == 03:27
but you don't need the parens on the conditional 03:28
'if (' is usually wrongish in p6
and completely wrong if you omit the space 03:29
azawawi TimToady: hi
eternaleye rakudo: subset Valid of Int where { [+]( split( "", $_ ).map( { $_ ** 5 } ) ) == $_ }; my Valid $val = 4150 03:30
p6eval rakudo 34313: OUTPUT«Type mismatch in assignment.␤current instr.: 'die' pc 14790 (src/builtins/control.pir:204)␤»
eternaleye I think it's parsing as [+] ( ( split( "", $_ ).map( { $_ ** 5 } ) ) == $_ ) 03:31
azawawi TimToady: any plans to make STD.pm pass my 'make test' soon? 03:33
diakopter TimToady: ping? 03:42
dpuu rakudo: 1 X 4 03:43
p6eval rakudo 34313: RESULT«[1, 4]»
dpuu rakudo: (1 X 4).elems 03:44
p6eval rakudo 34313: RESULT«2»
diakopter syntacticosemantic and morphophonemic
eternaleye @tell eric256 Euler 29: my %nums; for map( { my $x = $_; map( { $x ** $_ }, 2 .. 100 ) }, 2 .. 100 ) -> $num { %nums{ $num } = 1; }; say %nums.keys.elems; 04:05
lambdabot Consider it noted.
bacek perl6: say elems [1,2,3,4] 04:30
p6eval pugs: OUTPUT«4␤»
..rakudo 34313: OUTPUT«1␤»
..elf 24593: OUTPUT«Undefined subroutine &GLOBAL::elems called at (eval 119) line 3.␤ at ./elf_f line 3861␤»
cspencer rakudo: loop($i=0; $i < 10; $i++) { say "i: $i" } 04:42
p6eval rakudo 34313: OUTPUT«Scope not found for PAST::Var '$i'␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
cspencer rakudo: loop(my $i=0; $i < 10; $i++) { say "i: $i" } 04:43
p6eval rakudo 34313: OUTPUT«i: 0␤i: 1␤i: 2␤i: 3␤i: 4␤i: 5␤i: 6␤i: 7␤i: 8␤i: 9␤»
bacek pugs: my %h; ++%h<$_> for <1 2 2 4 4>; say %h.perl 04:45
p6eval pugs: OUTPUT«\(\("\$_", 5),)␤»
bacek pugs: my %h; ++%h{$_} for <1 2 2 4 4>; say %h.perl
p6eval pugs: OUTPUT«\(\("1", 1), \("2", 2), \("4", 2))␤»
afterburn moritz_: I'm trying to use your irclog code and the cgi portion is giving me some trouble 04:53
dukeleto_ perl6: say NaN 05:56
p6eval elf 24593, pugs: OUTPUT«NaN␤»
..rakudo 34313: OUTPUT«nan␤»
dukeleto_ that's not quite right, is it?
dukeleto_ perl6: printf "%d", NaN; 06:11
dukeleto_ perl6: printf "%d", NaN 06:11
p6eval rakudo 34313: OUTPUT«-2147483648» 06:12
..pugs: No output (you need to produce output to STDOUT)
..elf 24593: OUTPUT«Undefined subroutine &GLOBAL::printf called at (eval 117) line 3.␤ at ./elf_f line 3861␤»
rakudo 34313: OUTPUT«-2147483648»
..pugs: No output (you need to produce output to STDOUT)
..elf 24593: OUTPUT«Undefined subroutine &GLOBAL::printf called at (eval 117) line 3.␤ at ./elf_f line 3861␤»
rakudo_svn r34314 | pmichaud++ | [rakudo]: Make sure infix:<~> and prefix:<~> return Str. 06:20
r34314 | pmichaud++ | We hopefully can get rid of this when we have HLL support, but
r34314 | pmichaud++ | let's at least get them right for now.
pugs_svn r24594 | leto++ | Tests for sprintf %s handling of NaN and Inf 07:03
rakudo_svn r34316 | pmichaud++ | [rakudo]: List methods are already in Any, no need to have them in List also. 07:10
masak rakudo: loop { last }; say "still alive" 07:20
p6eval rakudo 34317: OUTPUT«still alive␤»
Tene perl6: my @list = [] xx 10; @list[0] = 'a'; say @list.perl; 07:32
p6eval pugs: OUTPUT«\("a",)␤»
..elf 24594: OUTPUT«["a",[],[],[],[],[],[],[],[],[]]␤»
..rakudo 34317: OUTPUT«["a", [], [], [], [], [], [], [], [], []]␤»
Tene perl6: my @list = [] xx 10; @list[0].push('a'); say @list.perl;
p6eval elf 24594: OUTPUT«[["a"],["a"],["a"],["a"],["a"],["a"],["a"],["a"],["a"],["a"]]␤»
..rakudo 34317: OUTPUT«[["a"], ["a"], ["a"], ["a"], ["a"], ["a"], ["a"], ["a"], ["a"], ["a"]]␤»
..pugs: OUTPUT«\(\("a",),)␤»
masak rakudo: my @a = 1..5; shift @a; pop @a; say @a 07:33
p6eval rakudo 34317: OUTPUT«234␤» 07:34
masak rakudo: my @a = 1..5; $_(@a) for &shift, &pop; say @a
p6eval rakudo 34317: OUTPUT«234␤»
masak Rakudo++
rakudo: my @a = [&shift, &shift, &pop, &say, &say]; @a[0](@a) while @a; 07:40
p6eval rakudo 34317: OUTPUT«invoke() not implemented in class 'ResizablePMCArray'␤current instr.: '_block14' pc 202 (EVAL_12:83)␤»
masak rakudo: my @a = &shift, &shift, &pop, &say, &say; @a[0](@a) while @a; 07:41
p6eval rakudo 34317: RESULT«[]»
pmichaud it is truly scary to see some of the code snippets you all write. 07:55
masak :D
actually, I'm not quite sure why that last one terminates. 08:09
pmichaud me neither.
masak seems to me it _should_ get stuck on the last &say.
rakudo_svn r34319 | pmichaud++ | [rakudo]: Matches now produce Rakudo Match objects instead of PGE::Match. 08:10
masak rakudo: my @a = &say; @a[0](@a) while @a; # sorry, p6eval!
p6eval rakudo 34317: 08:11
..OUTPUT«say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say␤say􏿽xE2
Tene masak: the one you were confused about loops on &pop three times. 08:29
popping off &say twice and then itself.
masak oh, right.
writing self-modifying code is hard! 08:30
Tene hehe
rakudo_svn r34321 | pmichaud++ | [rakudo]: Clean up reverse methods and functions. 08:50
pmichaud glad to see rakudo got it right, though.
I'm getting to the point where I trust rakudo about such things more and more. :-) 08:51
masak me too. :)
pmichaud the eval "sub x { say <OMG> }" example had me concerned until I saw TimToady++'s reply. :-)
masak :)
pmichaud: do you think it'd be possible to add a warning against that mistake. it might become quite common. 08:52
s/\./?/
pmichaud it might be possible... but it'd also be fairly difficult unless done at the parser level. 08:53
masak ok. 08:54
well, no big deal really. I just thought it'd be a nice touch, in case it turned out to be easy.
something like "Warning: Curly block inside interpolating string argument to eval. Probably not what you meant." 08:55
rakudo_svn r34322 | pmichaud++ | [rakudo]: spectest-progress.csv update: 264 files, 5837 passing, 0 failing 09:40
rakudo_svn r34323 | pmichaud++ | [rakudo]: Refactor to simplify returning Match object from regexes. 10:00
r34324 | pmichaud++ | [rakudo]: Clean up some bugs in .subst reported by skids1++ .
r34324 | pmichaud++ | There's still a lot more that needs fixing here, though.
masak rakudo: for 1..10 { continue if $_ % 2; .say } 10:29
p6eval rakudo 34324: OUTPUT«Warning␤1␤2␤Warning␤3␤4␤Warning␤5␤6␤Warning␤7␤8␤Warning␤9␤10␤»
masak hm.
whence the warnings? 10:30
masak realizes that continue does not mean the same in Perl 6 as in Java 10:47
ah.
rakudo: for 1..10 { next if $_ % 2; .say }
p6eval rakudo 34325: OUTPUT«2␤4␤6␤8␤10␤»
masak rakudo: continue
p6eval rakudo 34325: OUTPUT«Warning␤»
rakudo_svn r34327 | bernhard++ | [codingstd] remove trailing spaces 10:50
pmurias masak: re warning i don't think such a warnning is desirable,eval is/should be uncommon 11:28
masak pmurias: if a tiny proportion of Perl 6 users use eval, and a high percentage of them fall into the eval/interpol-string/block trap, might not a warning be worthwhile? (at least if it's easy to implement, which pmichaud hinted it's not) 12:11
pmurias masak: it's hard to know upfront if that use case will be problematic 12:14
masak aye. all I know is I fell into the trap, and I consider myself a fairly seasoned Perl 6 user. 12:15
pmurias it's also depends if people will want to use {} interpolation legitimately
masak that's true. they might actually know what they want, and then the warning will need to be quiesced somehow. 12:17
pmurias masak: what do you expect the .Str method to do on a SV*? 12:22
masak what's a SV*?
pmurias a perl5 scalar 12:23
masak hm.
is there a good reason to single it out as such? otherwise I'd expect it to simply be stringified. 12:24
pmurias the perl5 object stored in that scalar might have a Str method 12:25
masak that's true.
maybe that should take precedence, then. 12:26
I'm having a hard time thinking of a sensible use case that could shed light on what a programmer expects in this case. 12:27
masak rakudo: say (1..8).reverse.WHAT 12:33
p6eval rakudo 34331: OUTPUT«Str␤»
masak submits rakudobug
masak rakudo: say (1, 2, 3, 4).reverse.WHAT 12:35
p6eval rakudo 34331: OUTPUT«List␤»
masak rakudo: say (1..8).list.reverse.WHAT # temporary workaround 12:45
p6eval rakudo 34332: OUTPUT«List␤»
pmurias @tell ruoso git clone [email@hidden.address] asks be for a password? 12:58
lambdabot Consider it noted.
literal www.reddit.com/r/programming/commen..._sublists/ 13:39
so, what's the shortest way to do this in Perl 6? 13:40
ruoso hi pmurias 14:32
lambdabot ruoso: You have 1 new message. '/msg lambdabot @messages' to read it.
ruoso pmurias, gitorious use ssh key auth 14:33
pmurias ruoso: hi
ruoso: so i have to get an account on gitorious? 14:34
ruoso yes
pmurias registered there 14:36
ruoso I presume you're going to register with pmurias as username
pmurias yes 14:37
ruoso you're a committer alread 14:38
you might want to sync with the p5 git repo also, 14:39
so you can keep the branch up-to-date
pmurias ruoso: dSP;ENTER; causes a valgrind warning any idea why? 14:55
with my_perl storing the perl5 interpreter i initialised ealier 14:56
ruoso hmm... I don't know if p5 is valgrind-clean
pmurias, my internet connection is specially slow today, would you mind sync-ing gitorious and blead? 14:57
pmurias ENTER does a segfault too 14:59
ruoso: ok i'll do it
ruoso pmurias, ok, segfault means you're doing something wrong 15:00
pmurias ruoso: how should i do the sync? 15:02
ruoso you can add a remote to .git/config 15:03
[remote "blead"] 15:04
url = git://perl5.git.perl.org/perl.git
fetch = +refs/heads/*:refs/remotes/origin/*
actually it's not exactly that
in the last line, it's refs/remotes/blead
not origin
then you can just git pull blead 15:05
and git push
ruoso is there any spec on the exceptions API? 15:12
pmurias, how is the .ri language defined? I'd like to add a %has $foo that would provide the storage and accessors for a Scalar 15:13
hmm... wait... %attr and %getter does that already... nevermind 15:16
dwhipp rakudo: sub x ($x where "x") { say "X" }; x("x") 15:22
p6eval rakudo 34337: OUTPUT«Parameter type check failed in call to x␤current instr.: 'die' pc 14690 (src/builtins/control.pir:204)␤»
dwhipp rakudo: sub x ($x where /x/) { say "X" }; x("x")
p6eval rakudo 34337: OUTPUT«Method 'push' not found for invocant of class 'Perl6;Grammar'␤current instr.: 'parrot;Perl6;Grammar;Actions;_block6895' pc 157512 (src/gen_actions.pir:19785)␤»
dwhipp rakudo: sub x ($x where { $^x eq "x" }) { say "X" }; x("x")
p6eval rakudo 34337: OUTPUT«X␤»
dwhipp seems that "where" clauses don't do smart-matching 15:23
sub x (where {/x/} $x) { say "X" }; x("x") 15:26
rakudo: sub x (where {/x/} $x) { say "X" }; x("x")
p6eval rakudo 34337: No output (you need to produce output to STDOUT)
dwhipp (that one gives a segv) 15:27
rakudo: sub x (Any where {/x/} $x) { say "X" }; x("x") 15:28
p6eval rakudo 34337: No output (you need to produce output to STDOUT)
ruoso points [email@hidden.address] to dwhipp
dwhipp thx
pugs_svn r24595 | ruoso++ | [smop] start to document how exceptions will work in SMOP 15:33
ruoso pmurias, take a look at lowdoc/04 15:34
pmichaud pugs: my $p = a => 2; say $p.perl; 15:45
p6eval pugs: OUTPUT«\\("a", 2)␤»
pmichaud pugs: my @a = (a => 1, b=>2, c=>3); say @a.perl; 15:46
p6eval pugs: OUTPUT«\(\("a", 1), \("b", 2), \("c", 3))␤»
pmurias ruoso: seems ok 16:05
ruoso: the ri language is defined by it's implementation in tool/ri 16:07
* tools/ri
dwhipp simple question: does Rakudo do coercion yet -- i.e. "5" as Int ... obviously that doesn't work, but maybe I'm getting the syntax wrong 16:18
pmichaud +"5" works :-) 16:26
we don't implement 'as' yet, no. 16:27
dwhipp rakudo: my Int $a = +"5"
p6eval rakudo 34337: OUTPUT«Type mismatch in assignment.␤current instr.: 'die' pc 14690 (src/builtins/control.pir:204)␤» 16:28
pmichaud hmm.
it must think that +"5" is a Num.
dwhipp rakudo: my Num $a = +"5"
p6eval rakudo 34337: RESULT«5»
dwhipp rakudo: my Int $a = int +"5"
p6eval rakudo 34337: RESULT«5»
pmichaud we still have some work to do to get the Int/Num mapping straight.
my Int $a = int "5"
rakudo: my Int $a = int "5"
p6eval rakudo 34337: RESULT«5» 16:29
dwhipp rakudo: my @values = <1 2 a b 3 c>.map: { /\D/ ?? ~$_ !! +$_ }; say @values.perl 16:34
p6eval rakudo 34337: OUTPUT«["1", "2", "a", "b", "3", "c"]␤»
pmichaud I don't think rakudo recognizes /\D/ as an "immediate match" yet. 16:35
and it might need to be m/\D/ (but I still don't think rakudo recognizes that.)
dwhipp rakudo: my @values = <1 2 a b 3 c>.map: { $_ ~~ /\D/ ?? ~$_ !! +$_ }; say @values.perl 16:36
p6eval rakudo 34337: OUTPUT«[1, 2, "a", "b", 3, "c"]␤»
dwhipp :-)
pugs_svn r24596 | pmichaud++ | [t/spec]: Remove a suspicious test. 16:37
rakudo_svn r34338 | pmichaud++ | [rakudo]: Adjust Pair.perl . 16:40
pugs_svn r24597 | pmichaud++ | [t/spec]: Add test for list context and infix:<Z> 17:25
kidd hi. I've just installed parrot feliz loro for first time. Is there any REPL to start messing with it?
cspencer kidd: as in a perl 6 REPL? 17:26
kidd yup, or something like parrot -e 'say "foo"' 17:28
cspencer sure
switch into languages/perl6 17:29
and run "make perl6"
kidd ah, great. thanks
cspencer (assuming you've already built parrot)
that should generate a perl6 binary that you can run as ./perl6 for a REPL or you can pass it a file to run 17:32
kidd I'm building it now. Thanks cspencer 17:35
cspencer no problem :)
dwhipp rakudo: .say for <A B>.map: { [ .split("") ] } 17:43
p6eval rakudo 34338: OUTPUT«A␤B␤»
dwhipp rakudo: .say for <A>.map: { [ .split("") ] }
p6eval rakudo 34338: OUTPUT«Method 'iterator' not found for invocant of class 'Str'␤current instr.: 'parrot;Any;map' pc 9625 (src/builtins/any-list.pir:228)␤»
pmichaud dwhipp: there are a number of people (and some tests) that claim that .map should not work on scalars. (I disagree.) 17:44
in this instance, the complaint is essentially that Str doesn't have a .map method.
dwhipp actually, my complaint would be that <...> is a list constructor -- so shouldn't behave differently when quoting only one ele, 17:46
pmichaud <...> is *not* a list constructor.
<A> is same as ('A')
which is a Str
cspencer should S05-substitution/[match | subst].t spec tests be failing at the moment? 17:47
pmichaud cspencer: I don't think they should no.
cspencer hmmm, maybe i need a parrot rebuild then
dwhipp OK ... but it still causes a nasty edge case when passed one elem -- reduces scalability of code 17:48
pmichaud dwhipp: which is why I think .map should treat a scalar as a list of one element.
.join already does this.
rakudo: say <A>.join('x');
p6eval rakudo 34338: OUTPUT«A␤»
pmichaud rakudo: say <A B>.join('x');
p6eval rakudo 34338: OUTPUT«AxB␤»
pmichaud rakudo: say <A B>.WHAT; 17:49
p6eval rakudo 34338: OUTPUT«List␤»
pmichaud rakudo: say <A>.WHAT;
p6eval rakudo 34338: OUTPUT«Str␤»
dwhipp rakudo: say <A>.elems 17:50
p6eval rakudo 34338: OUTPUT«1␤»
pmichaud I think I'll just go ahead and modify Rakudo's .map (and .grep and other list operators) to work that way, and adjust the tests to match.
dwhipp yup, I vote that it's a list of one elem
pmichaud I'm pretty sure that's the way TimToady was leaning
but it'll come after lunch.
cspencer do patches to spectests get sent to a different address than perl6 patches? 18:16
or can they be bundled up into the same diff?
dwhipp rakudo: my @primes; for 2 .. 20 -> $n { @primes.push($n) unless $n % any(@primes)==0 }; .say for @primes 18:18
p6eval rakudo 34338: OUTPUT«2␤3␤5␤7␤11␤13␤17␤19␤»
dwhipp sometimes p6 makes things too easy!
azawawi hi 18:21
cspencer dwhipp: that's really nice!
hi azawawi 18:22
[particle]1 cspenser: do you have a pugs commit bit? 18:48
[particle]1 you can commit the spectest changes directly 18:48
cspencer particle: i don't, no 18:49
how does one apply for one of those? :)
[particle]1 give me your email address, and i give you one now :) 18:51
cspencer sure: [email@hidden.address] 18:53
thanks! :)
[particle]1 the invite is on its way!
cspencer thank you very much!
icwiener Haha, I just head somebody talking about this "we don't accept patches, we grant commit access" thing. :D 19:13
TimToady would you like a commit bit? 19:14
vixey ♥ pugs
TimToady but do you ♥ Haskell? :D
vixey a little bit :)
icwiener No, I do not want a commit bit. It would make me one of those zero committers because I have no clue about language design... ;) 19:16
I could fix typos in comments though. :D
TimToady you don't need to have a clue about language design to write tests; you just need to know how to put the language through unexpected contortions, for which it's beneficial *not* to be a language designer 19:17
icwiener thinks ... 19:20
Is there a little tutorial something that explains how to write tests? Or is looking at the existing tests the way to go? 19:21
vixey hm there's no way to reset your password for pugscode? 19:22
TimToady vixey: we just send a new invite to do that
you want that?
vixey yeah please
.. again :(, I had to reset it before
TimToady what was your nick? 19:23
vixey fax
TimToady still v.s@gmail? 19:24
vixey yes
TimToady okay, sent, I suspect 19:25
vixey that's it! thank you :)
TimToady icwiener: I'd just watch masak for a while, and then do the same thing. :) 19:26
icwiener TimToady: Sounds good. :) 19:27
TimToady but it's also valuable to point out places that are difficult to get into due to lack of docs 19:28
and everyone who documents their way in is helpful to the next person trying to get in
anyway, if you /msg me an email address and a preferred nick, I can send you a commit bit 19:29
then we can at least get any administrative obstructions out of the way... :) 19:30
and there's a HOWTO doc in t/ 19:31
ruoso TimToady, btw... I agree it's a little weird that we CATCH but don't throw 19:34
TimToady so maybe just go with throw for now, esp if it's only a method 19:35
ruoso right... but that doesn't solve the problem for control exceptions 19:36
because I presume we need two different functions to that,
TimToady throw can be generic
ruoso and it checks if $_ ~~ Failure?
sounds a little bit boring to do that everytime 19:37
when you have so clear difference between the scenarios
TimToady point 19:38
ruoso 'abnormal flow' in one word?
TimToady well, .throwcontrol is dehuffmanized then 19:40
ruoso well, it certainly is dehuffmanized, it's even de-pretty-ized 19:41
not to say ugly-ized
:)
TimToady we want to encourage people to use goto instead :)
ruoso heh
what about loose ??
heh 19:42
TimToady maybe even .throw_control_exception
slightly less ugly
ruoso indeed
well
TimToady I was thinking we try to avoid _ in builtins, but there's prefix_circumfix_meta_operator 19:43
ruoso I was considering those as functions, not methods
if we consider as methods, we can just use throw
TimToady THROW_CONTROL_EXCEPTION is really hard to type without capslock
so maybe just give the CONTROL exceptions long names :) 19:44
ruoso I was assuming ControlException to be part of their name
like ReturnControlException
TimToady something to be said for ControlException in front instead
then you can line them up nicer
ruoso hm? 19:45
TimToady ControlExceptionReturn
ControlExceptionNext
ControlExceptionLast
ControlExceptionGoto
ruoso ok, got it... makes sense...
so there's no fail()-like function for control exceptions
and .throw is how you raise an exception by using its object 19:46
(being Failure or Control Exception)
pmichaud .throw was my first thought when this came up.
ruoso I had my mind looking for functions, for some reason
but making it as methods only makes much sense 19:48
fail is a conveninence function, just like return
ruoso later & (now I have no excuse to postpone implementing return in SMOP) 19:52
pugs_svn r24598 | schwarzer++ | first customary add yourself to the AUTHORS file test commit :) 19:55
TimToady welcome aboard, icwiener++
pmurias finds it confusing when people have a different irc nick and svn user name 20:06
TimToady makes a noise like a turnip 20:08
ruoso pmurias, better for us, who get more karma ;) 20:16
pmichaud turnips make noise? 20:23
azawawi yeah turnips' noise ;-) 20:24
azawawi thinks about getting a more cool nickname ;-) 20:26
cspencer if one creates a range as in: "$r = 1..10:by(2)", the the increment value available via: "$r.by" ? 20:30
pmichaud I would think so. 20:31
pugs_svn r24599 | pmurias++ | [smop] calling a argumentless perl5 subroutine works
cspencer ok
pmichaud: i saw you'd noted that the vtable('get_string') method was wrong in Mapping.pir - do you recall what was wrong with it? 20:32
pmichaud it will cause .Str to not work for any subclasses of Mapping
pmichaud (that choose to override it) 20:33
cspencer oh ok
pmichaud It's just a note to come back and fix it up later.
cspencer alright
pmichaud (also so that people don't blindly copy it to other classes w/o asking about it :-) 20:34
afk, shopping
cspencer later :) 20:35
icwiener TimToady: Thank you. :) (a bit late due to a telephone call) 20:38
dwhipp rakudo: say "improper collapse" if 10 < (5|25) < 20 20:58
p6eval rakudo 34339: OUTPUT«improper collapse␤»
ruoso Merry Christmas to you all, even if we didn't get the present we wanted this year, I'm pretty confident we're having christmass earlier next year... ;P 21:23
pmurias merry christmas 21:24
vixey hehe 21:25
pmurias relised he forgot to remove printf("DESTROY ALL HUMANS!!!n"); from P5Interpreter.DESTROYALL when commiting... ;) 21:29
vixey haha
I don't think you are the only one writing things like this when testing :)
pugs_svn r24600 | hinrik++ | [util/perl6.vim] add Q[wx], q[wx] and qq[wx] 21:30
rakudo_svn r34340 | chromatic++ | [Rakudo] Fixed some compilation warnings in MultiSub PMC. 21:40
pugs_svn r24601 | hinrik++ | [util/perl6.vim] recognize one adverb with Q[wx], q[wx] and qq[wx] 21:44
cspencer should stringifying or calling .perl on a Range output the :by increment value? ie) "$r = 1..10; $r.perl.say" would produce "1..10:by(1)" Or should that only be output in cases where the :by isn't the default value? 22:10
pmichaud I'd prefer to see it output :by only when not the default. 22:16
technically as long as it produces something that evals back to the same range, it's valid. 22:17
pmurias ruoso: what are the magic warn if refcounts are incorrect options?
cspencer pmurias: good point 22:22
pugs_svn r24602 | pmichaud++ | [t/spec]: Update map/grep/reduce/kv tests to work with scalar invocants.
rakudo_svn r34342 | pmichaud++ | [rakudo]: Fix $x.map to work as list of 1 element. 22:30
cspencer pmichaud: i resubmitted that Range patch for infinite ranges 22:34
pugs_svn r24603 | hinrik++ | [util/perl6.vim] allow any number of ignored adverbs after the first significant one 22:52