»ö« 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:11 rlb3 left 00:12 perlhack joined
perlhack i came here quiety 00:12
:-)
i'm trying to learn English ...haha 00:19
00:22 Sarten-X left 00:28 Sarten-X joined 00:33 drbean joined 00:41 icwiener left 00:55 molaf joined 00:58 thou joined 01:00 jferrero left
jnthn morning, #perl6 01:04
01:06 tokuhirom left 01:07 drbean left
offby1 Good moooorning Vietnam! 01:11
01:14 drbean joined 01:21 daniel-s joined
Util Hi, jnthn 01:22
01:26 thou left 01:30 felliott_ joined 01:33 felliott left, felliott_ is now known as felliott 01:37 woosley joined
lichtkind moin jnthn 01:41
jnthn lichtkind: You're either up very late or very early :) 01:45
lichtkind jnthn: late
01:48 [particle]1 is now known as [particle]
soh_cah_toa is it possible to use prove w/ perl6? since i 'use v6;', i get the error about needing perl 6. i've just been running tests w/ the perl6 binary instead 01:49
jnthn prove --exec=perl6 t
is another way
soh_cah_toa ah yes 01:50
lichtkind jnthn: for first time i have an installed current rakudo on my linux :) 01:51
good night 02:00
02:00 lichtkind left 02:15 envi joined 02:21 PhatEddy left
dalek kudo/nom: 3d623cd | jonathan++ | src/core/Str.pm:
Fix chomp on Win32, thus fixing basic-open.t.
02:23
02:27 whiteknight left 02:37 test joined 02:39 test left 02:46 [particle] left 02:47 [particle] joined 03:09 cooper joined 03:14 f00li5h left 03:17 Chillance joined 03:20 thou joined 03:26 Su-Shee left 03:28 Su-Shee joined 03:29 Chillance left 03:35 bluescreen10 left 03:39 ingyfoo is now known as ingy 03:40 agentzh joined 03:44 [perlhack] joined
[perlhack] hello friends 03:45
03:54 felliott left 03:56 JimmyZ joined
JimmyZ \o 03:58
03:58 satyavvd joined
[perlhack] :-) 03:58
03:59 Zapelius joined 04:07 f00li5h joined 04:16 araujo left 04:19 [perlhack] left 04:29 [particle] left 04:35 Zapelius left 05:04 [perlhack] joined, aloha left
[perlhack] :-) 05:05
05:05 aloha joined
[perlhack] this is civilized place. 05:06
05:13 [perlhack] left 05:24 aloha left 05:25 aloha joined 05:41 soh_cah_toa left 05:46 koban joined 05:51 zby_home left 05:55 f00li5h left 05:58 birdwindupbird joined 06:09 wtw joined 06:25 perlhack left 06:28 Chillance joined 06:52 cooper left 07:04 araujo joined 07:16 birdwindupbird left 07:20 aloha left 07:26 bakedb joined 07:27 wamba joined 07:34 ab5tract joined
tadzik good morning #perl6 07:34
07:34 aloha joined
kthakore tadzik: good afternoon 07:39
07:45 Mowah joined
thou good night, tadzik 07:45
07:48 daxim joined
mathw Good morning #perl6 08:00
08:04 [perlhack] joined
[perlhack] :-) 08:07
what are you doing 08:08
08:09 [perlhack] left
moritz_ nom: say nqp::atkey(pir::getinterp, 'context').backtrace 08:13
p6eval nom: OUTPUT«Method 'gist' not found for invocant of class 'Hash'␤current instr.: 'gist' pc 322896 (src/gen/CORE.setting.pir:89051) (:1626)␤»
moritz_ nom: my Mu $bt = nqp::atkey(pir::getinterp, 'context').backtrace; say $bt
p6eval nom: OUTPUT«Method 'gist' not found for invocant of class 'Hash'␤current instr.: 'gist' pc 322896 (src/gen/CORE.setting.pir:89051) (:1626)␤» 08:14
moritz_ nom: my Mu $bt = nqp::atkey(pir::getinterp, 'context').backtrace; say $bt.elements
p6eval nom: OUTPUT«Method 'elements' not found for invocant of class 'Parcel'␤current instr.: '_block1002' pc 105 ((file unknown):42115263) (:1)␤»
moritz_ why is it suddenly a Parcel when I call a method on it_
s/_/?/
jnthn moritz_: It may be coming back as one and it's the recursive gisting into it that finds the hash. 08:16
moritz_ jnthn: but why would a pure parrot-internal thing return a Parcel?
jnthn moritz_: We map such things. 08:17
moritz_ or is that an RPA, which automagically gets Parcel'ed in some way?
jnthn But only one level deep at the momnt
Yeah
it's magic :)
nom: my $bt = nqp::atkey(pir::getinterp, 'context').backtrace; say $bt.elems 08:22
p6eval nom: OUTPUT«12␤»
jnthn nom: my $bt = nqp::atkey(pir::getinterp, 'context').backtrace; say $bt[0].WHAT 08:23
p6eval nom: OUTPUT«Hash()␤»
jnthn nom: my $bt = nqp::atkey(pir::getinterp, 'context').backtrace; say $bt[0]
p6eval nom: OUTPUT«Hash<34017312>␤»
jnthn nom: my $bt = nqp::atkey(pir::getinterp, 'context').backtrace; say $bt[0].keys
p6eval nom: OUTPUT«Segmentation fault␤»
jnthn ouch!
moritz_ nom: my $bt = nqp::atkey(pir::getinterp, 'context').backtrace; for $bt.list { say nqp::p6box_s(nqp::atkey(pir::perl6_decontainerize($_), 'line')) } 08:24
p6eval nom: OUTPUT«error:imcc:The opcode 'perl6_decontainerize_p' (perl6_decontainerize<1>) was not found. Check the type and number of the arguments␤ in file '(file unknown)' line 175␤»
moritz_ nom: my $bt = nqp::atkey(pir::getinterp, 'context').backtrace; for $bt.list { say nqp::p6box_s(nqp::atkey(pir::perl6_decontainerize__PP($_), 'line')) }
p6eval nom: OUTPUT«Segmentation fault␤»
moritz_ nom: my $bt = nqp::atkey(pir::getinterp, 'context').backtrace; for $bt.list { say nqp::p6box_s(pir::perl6_decontainerize__PP($_)) }
p6eval nom: OUTPUT«Segmentation fault␤»
jnthn I don't think it's a list of strings. 08:25
moritz_ nom: my $bt = nqp::atkey(pir::getinterp, 'context').backtrace; for ^$bt.elems { say $bt[$_] }
p6eval nom: OUTPUT«Hash<98870152>␤Hash<93252088>␤Hash<92173920>␤Hash<91073584>␤Hash<89936288>␤Hash<88873464>␤Hash<87771608>␤Hash<86695888>␤Hash<85550760>␤Hash<84468792>␤Hash<83332704>␤Hash<82246024>␤»
jnthn It's turned those into Perl 6 hashes
moritz_ nom: my $bt = nqp::atkey(pir::getinterp, 'context').backtrace; for ^$bt.elems { say nqp::atkey($bt[$_], 'line') }
jnthn So in theory you can use <foo> if you know what key should be there
p6eval nom: OUTPUT«get_pmc_keyed_str() not implemented in class 'Hash'␤current instr.: '_block1011' pc 463 ((file unknown):28769796) (:1)␤»
moritz_ nom: my $bt = nqp::atkey(pir::getinterp, 'context').backtrace; for ^$bt.elems { say $bt[$_]<line> } 08:26
p6eval nom: OUTPUT«Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤»
jnthn It's a Perl 6 hash due to the marshalling. atkey is only for Parrot hashes.
nom: my $bt = nqp::atkey(pir::getinterp, 'context').backtrace; for ^$bt.elems { say $bt[$_]<annotations><line> }
p6eval nom: OUTPUT«1␤1␤1287␤1280␤1446␤1390␤1385␤26␤1␤Any()␤Any()␤Any()␤»
moritz_ nom: my $bt = nqp::atkey(pir::getinterp, 'context').backtrace; for ^$bt.elems { say $bt[$_]<annotations><flie> }
p6eval nom: OUTPUT«Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤»
moritz_ nom: my $bt = nqp::atkey(pir::getinterp, 'context').backtrace; for ^$bt.elems { say $bt[$_]<annotations><file> }
p6eval nom: OUTPUT«␤␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤» 08:27
moritz_ jnthn: thank you, I think that should be enough to get me started
jnthn I think actually we're not setting file properly yet
moritz_ right, that's what my experiments with interp['annotations'; 1] etc also showed 08:28
08:28 noganex_ is now known as noganex
jnthn I think I may know how to fix that... 08:29
nqp: die "oh noes" 08:30
p6eval nqp: OUTPUT«Confused at line 1, near "die \"oh no"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6372)␤»
moritz_ list ops
jnthn nqp: die("oh noes")
p6eval nqp: OUTPUT«Could not find sub die␤current instr.: '_block1000' pc 30 ((file unknown):32)␤»
jnthn ah, of course it's file unkown there :)
moritz_ nqp: nqp::die('oh noez')
p6eval nqp: OUTPUT«Unrecognized nqp:: opcode 'nqp::die' at line 1, near ""␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6372)␤»
jnthn oh, no, it shoulda been the p6eval temp file name
moritz_ rakudo: die 08:31
p6eval rakudo 72d158: OUTPUT«Died␤␤ in main program body at line 22:/tmp/6WXL11CRGG␤»
08:31 mj41 joined
jnthn nqp: my $?foo: = 42; 08:32
p6eval nqp: OUTPUT«Confused at line 1, near "my $?foo: "␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6372)␤»
jnthn nqp: my $?foo := 42;
p6eval nqp: ( no output )
08:37 pernatiy joined
dalek p: 26dd00c | jonathan++ | src/HLL/Compiler.pm:
Get file name annotations working again for moritz++.
08:44
thou good bye, #perl6 08:46
tadzik o/
08:46 thou left 08:50 mj41 left 08:51 Jackneill joined 09:00 dakkar joined
moritz_ \o 09:00
jnthn++
tadzik oh, my pod grammar is flawed when put into Rakudo 09:04
09:04 bakedb left
tadzik in theory, it should be capable of slurping the entire source code and treating it as pod, and that might even happen if we had LTM :) 09:05
09:07 buubot_backup left
jnthn Time to go play with P6opaque.c... 09:07
moritz_ in master, Perl6::BacktracePrinter uses pir::isnull(pir::getprop__psp('$!p6code', $_<sub>)) to identify intermediate blocks 09:09
grepping thought the current source I only see p6code mentioned in old/ and in the backtrace printer 09:10
does that mean this possibility is gone? any alternatives?
jnthn Yeah, there is a backlink from Parrot sub to Perl 6 code object 09:13
Though everything has one now
So you need to ~~ Routine
lemme check if we have a way to get at it
d'oh, there's not 09:15
09:15 drbean left
moritz_ huh? 09:15
so the Perl 6 code object has-a parrot sub, and that's it?
jnthn moritz_: No, the Parrot sub has a link back to the Perl 6 one, but at the moment you can only get there in C land 09:16
moritz_ jnthn: what's the link? 09:17
jnthn moritz_: I, er, found a spare pointer in the Parrot sub PMC and (ab)used it :) 09:18
moritz_ /o/
jnthn moritz_: Writing a dynop now so you can do what you're after :)
moritz_ jnthn: thank you, I thought I might have to write such a thing :-) 09:19
jnthn my $perl6_code_object = pir::perl6_code_object_from_parrot_sub($parrot_sub_here) 09:25
moritz_ \o/ 09:26
09:29 buubot_backup joined
dalek kudo/nom: 6893932 | jonathan++ | LHF.markdown:
Add a LHF.
09:29
kudo/nom: 8555c62 | jonathan++ | src/ops/perl6.ops:
Add (untested) perl6_code_object_from_parrot_sub op for moritz++.
09:37 wamba left
tadzik Files=148, Tests=3227, 303 wallclock secs 09:38
nice!
moritz_ gist.github.com/1064564 # also nice :-) 09:40
tadzik git question: how can I edit a commit I did a couple dozen of commits ago
jnthn How many days ago was it when we were being happy about 1000 test mark having been passed? :)
tadzik I accidentally did -am and commited something like: my $name := $*ST.add_constant('Str', 'str', 'bacon'); as a stub
jnthn: like, two? :) 09:41
moritz_ tadzik: git rebase -i HEAD~15
jnthn tadzik: bacon FTW!
tadzik where ~15 is "15 commits ago"?
moritz_ tadzik: then pick the commit in question, and put an 'e' in the first column
tadzik okay, will look into it
moritz_ tadzik: yes... or just screw it, and make a commit that corrects it 09:42
tadzik: we're all not perfect, and sometimes leave debugging output in files etc.
arnsholt I usually leave all the embarrasing details in my git history
And scatter it with "Remove forgotten debug code" commits and the like
moritz_ same here 09:43
arnsholt Although the fact that I donæt know how to rewrite history may be a contributing factor =)
jnthn tadzik: btw, don't edit history that was already pushed somewhere 09:44
09:44 JimmyZ left
moritz_ gist.github.com/1064564 # non-routines successfully hidden. The segfault is a bit of a downer though :/ 09:45
09:46 f00li5h joined
moritz_ gist updated with bracktrace 09:46
tadzik I don't know what I did, let's see what happens...
okay, could be worse 09:47
dalek Heuristic branch merge: pushed 29 commits to rakudo/podparser by tadzik
jnthn moritz_: pir::perl6_code_object_from_parrot_sub__PP($bt[$_]<sub>) 09:48
moritz_: That could return null
moritz_ jnthn: ah, will catch that
jnthn moritz_: Sure, or we diddle the op to hand back Mu instead :)
moritz_ jnthn: that would be easier, because then I don't have to fetch twice (once for isnull, once for storing) 09:49
09:49 am0c joined
jnthn changing 09:51
dalek p: 5efb646 | jonathan++ | src/6model/knowhow_bootstrapper.c:
Add .^mro method to core KnowHOW.
09:54
p: a957601 | jonathan++ | src/how/NQPClassHOW.pm:
Add .^mro for NQPClassHOW.
p: 2d4a979 | jonathan++ | src/how/NQP (3 files):
Use Uninstantiable repr for things that should not be instantiated.
p: 26c3c1c | jonathan++ | src/stage0/ (7 files):
Update bootstrap.
moritz_ I was just about to update NQP_REVISION 09:56
jnthn There's more to come
moritz_ I think I'll just go with what I need, and you can bump again when you're done-ish :-)
jnthn +1
09:57 birdwindupbird joined
dalek kudo/nom: 1a56b91 | jonathan++ | src/ops/perl6.ops:
Make sure we don't hand back nulls from perl6_code_object_from_parrot_sub.
09:57
tadzik karma jnthn 09:59
aloha jnthn has karma of 955.
tadzik karma jonathan
aloha jonathan has karma of 1338.
tadzik this jonathan guy, stealing all karma
dalek kudo/nom: e24c94d | moritz++ | tools/build/NQP_REVISION:
bump nqp revision to get file annotations
10:00
10:01 woosley left 10:03 bakedb joined 10:07 cosimo_ left
tadzik is there anything more-less like .WHAT() in nqp? 10:08
moritz_ there's pir::typeof 10:09
tadzik it's more like .isa?
jnthn .WHAT works if you have a 6modelobject
moritz_ there's also pir::isa
tadzik: what do you want to achieve? 10:10
tadzik moritz_: cycling through $<pod_content>.ast I want to see if I'm getting the types I'm expecting to get
moritz_ isn't that always PAST:: something? 10:11
tadzik I hope it is, that's the thing 10:12
teaser trailer: gist.github.com/1064604
10:13 cosimo joined
moritz_ \o/ bacon 10:14
jnthn nom: say Pair.^mro
moritz_ hungry
p6eval nom: OUTPUT«Pair() Enum() Any() Mu()␤»
tadzik moritz_: the saddest part is that bacon is only temporary :( 10:15
moritz_ chunky bacon?
tadzik quickly, say something tasty!
sjn yum? 10:16
tadzik masak's edublogging is a bit like that guide, aside from being more to the topic :)
moritz_ it's like chunky bacon without the bacon :/ 10:20
rakudo: sub f { die }; f 10:24
p6eval rakudo 72d158: OUTPUT«Died␤␤ in 'f' at line 22:/tmp/8BbwAGyf6D␤ in main program body at line 22:/tmp/8BbwAGyf6D␤»
moritz_ perl6: my ($a, $b) = <a b>; say "$a:$b" 10:25
p6eval pugs, niecza v7-11-g9ba8284: OUTPUT«a:b␤»
..rakudo 72d158: OUTPUT«===SORRY!===␤Symbol '$a:$b' not predeclared in <anonymous> (/tmp/32SQJaCkWM:22)␤»
moritz_ nom: my ($a, $b) = <a b>; say "$a:$b"
p6eval nom: OUTPUT«Symbol '$a:$b' not predeclared in <anonymous>␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (compilers/pct/src/PCT/HLLCompiler.pir:107)␤»
moritz_ std: my ($a, $b) = <a b>; say "$a:$b"
p6eval std 37a0cdd: OUTPUT«ok 00:01 124m␤»
moritz_ is that bug known? 10:26
nom: my ($a, $b) = <a b>; say "{$a}:$b"
p6eval nom: OUTPUT«a:b␤»
jnthn Looks new to me. 10:27
tadzik hrm. What does prefix | mean, in nqp? Creates a capture from an array, si? 10:28
moritz_ context_
context?
tadzik foo('bar', |@asd); 10:29
moritz_ it interpolates into the argument list
tadzik okay, thanks 10:30
somewhere, somehow, my array duplicates itself
moritz_ the fun of using binding instead of assignment
tadzik oh, a trap 10:31
jnthn: is that ok that ST.add_constant returns something that stringifies to Capture[0x2643888]? 10:32
I thought it would be PAST::something
jnthn tadzik: I suspect it is a PAST node and it inherits its stringification from Parrot's Caputre PMC somehow 10:34
tadzik all right, thanks
10:36 pernatiy_ joined, pernatiy left
tadzik nqp: my $s = " foo bar "; $s ~~ s:g/\s+/ /; say($s) 10:37
p6eval nqp: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 1, near " \" foo "␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6372)␤»
tadzik nqp: my $s := " foo bar "; $s ~~ s:g/\s+/ /; say($s)
p6eval nqp: OUTPUT«Confused at line 1, near "$s ~~ s:g/"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6372)␤»
tadzik nqp: my $s := " foo bar "; $s := subst($s, /\s+/, ' '); say($s) 10:38
p6eval nqp: OUTPUT« foo bar ␤»
tadzik nqp: my $s := " foo bar "; $s := subst($s, /\s+/, ' ', :global); say($s)
p6eval nqp: OUTPUT« foo bar ␤»
tadzik wfm
10:46 _twitch joined 11:09 daniel-s left
tadzik moritz_: turns out moving $=POD earlier in the schedule was a good decision. In case I won't be able to debug the $=POD stuff today, I should be able to do those tables and formatting codes and have another week for $=POD, what do you think? 11:12
jnthn tadzik: ohbtw - I checked. we are missing the token for the = twigil 11:15
tadzik just that?
jnthn tadzik: I didn't try adding it.
tadzik: But it is missing
11:15 envi left
tadzik I see 11:15
jnthn (e.g. STD has it and Grammar.pm doesn't) 11:16
11:16 envi joined
tadzik $=foo Pod variable, says S02. And S26 mentions $=POD as the only Pod variable. Makes me wonder if we even want = as a special twigil, if it's only for one case 11:16
jnthn yeah, it feels odd if there's only the one 11:18
dalek p: f14f5b6 | jonathan++ | src/6model/reprs/P6opaque.c:
Refactor P6opaque a bit so that we can handle multiple inheritance.
11:19
p: 4c68b90 | jonathan++ | src/6model/reprs/P6opaque. (2 files):
Stash flag for when we're in an MI situation. Also a little cleanup.
p: 037134d | jonathan++ | src/6model/reprs/P6opaque.c:
Sort out error reporting for non-existant attributes so it actually says that's the problem.
p: 8fffc11 | jonathan++ | src/6model/reprs/P6opaque.c:
Add back decontainerize that got lost during refactors.
jnthn $?POD would maybe make sense
11:22 masak joined
masak o/ 11:22
jnthn lolitsmasak
ni hao ma? 11:23
masak wo hen hao. ni ne? :)
jnthn hen hao, xie xie
masak bu ke, bu ke :P 11:24
11:31 satyavvd left 11:32 agentzh left 11:33 _twitch left 11:34 wamba joined
moritz_ tadzik: +1 to taking more time to tweak $POD. Not sure if it needs to be a whole weak, YMMV 11:34
11:35 pernatiy_ left
tadzik moritz_: probably not, but I don't think it will be the half of the day, see today :) 11:35
too many suprise issues. Plus I don't want to deliver anything Less Than Awesome, it should be awesome, period :)
masak +1 11:36
moritz_ tadzik: sure, take your time. I prefer an incomplete-but-good-enough-to-be-mergeable any time over a quick hack that pmichaud++ will reject because it's trash :-)
masak pmichaud++ always has good reasons to reject things, often far more detailed than "it's trash" :) 11:37
11:37 am0c left
masak when I grow up, I want to have good reasons to reject commits, just like pmichaud :) 11:37
11:37 am0c joined
moritz_ when I grow up, I want to have good resons to accept commits :-) 11:38
moritz_ finds a bug in pmichaud++'s code :-) 11:39
i need name suggestions: how do you call an element of a backtrace? 11:42
jnthn A callframe?
moritz_ in the specs I wrote that it's a CallFrame, but that does additional stuff (like exposing some variables etc.)
nom: say List.Str 11:43
p6eval nom: OUTPUT«Parameter '(null)' requires an instance, but a type object was passed␤current instr.: 'Str' pc 328548 (src/gen/CORE.setting.pir:91608) (src/gen/CORE.setting:2010)␤»
11:44 whiteknight joined
jnthn Missing multi or stray proto 11:44
moritz_ missing multi
I discovered it while writing class BackTrace is List { multi method Str ... } 11:45
jnthn dinner & 11:46
moritz_ good nom!
dalek kudo/nom: bd50d5d | moritz++ | src/core/List.pm:
List.Str should be a multi
11:48
11:50 mj41 joined
flussence stupid question: using --without-pcre to get parrot to compile won't break anything in rakudo will it? 11:51
moritz_ won't break rakudo, no
flussence (3227 passing tests already?!) 11:52
at this rate nom will be passing 200% of the spectests by August :) 11:53
11:54 [perlhack] joined
[perlhack] :-) 11:55
hi friends
i came here again.
masak hi, [perlhack] 11:56
flussence: well, we have to write more spectests, then.
[perlhack] what are you do ding ?
what are you doing
masak [perlhack]: industrious people here are working on the 'nom' branch of Rakudo, making it pass tests. 11:57
[perlhack] haha 11:58
what is the 'nom' ? 11:59
masak it's just a name.
[perlhack] masak
masak it stands for 'New Object Model', since that's what it's about.
moritz_ [perlhack]: pmthium.com/2011/02/08/new-nqp-repo...do-branch/
[perlhack] :-)haha i get it 12:00
your English is very good 12:01
moritz_ masak
ty moritz
moritz_ because I pasted a link?
[perlhack] ty masak
haha yes
12:02 jedai joined
moritz_ masak: you will like this one: gist.github.com/1064564 12:03
(just updated)
[perlhack] moritz_:this is a friendly link .
:-) 12:04
masak moritz_: I like the improvements it represents :)
moritz_: <anon> subs always reported themselves as being on "line 1", even though they most often weren't.
moritz_ oh, it would make more sense if I put the loop *inside* the method :-)
masak this looks fixed here. moritz_++ 12:05
12:05 jedai_ left
moritz_ I wonder if I should generally filter out setting routines 12:05
masak huh? why?
moritz_ paste forthcoming... 12:06
masak: please reload that gist
masak moritz_: on line 24, 25: you can use <line file> and save yourself some repetition 12:07
moritz_ masak: I've now put the loop inside the method
masak moritz_: not sure I like the thought of suppressing setting routines.
that would make things harder to debug in some cases. 12:08
moritz_ masak: me neither, but I don't like 3x reify, 1x gime and 3x eager for a single for-loop either
masak I'd suggest merging them into one line somehow, but the line numbers are different... 12:09
moritz_ the problem here is really that the user called none of those routines 12:10
masak while we're on the topic of backtraces: one feature that is desperately missing from Rakudo is the ability to do die/warn without a backtrace.
even a short-term solution would be appreciated here.
moritz_ maybe the "real" solution is to add some magic to the code emitted for a 'for' that surpresses the backtrace, or some such 12:11
masak moritz_: oh, I see what you mean now.
moritz_: why *are* reify, gimme, and eager called in this case?
moritz_ masak: in master, you should be fine-ish patching src/Perl6/BacktracePrinter.pm to omit the backtrace if the error messages end in an \n 12:12
masak: that's because for() is really an 'eager map()'
masak ah, and you're doing a 'for'. yes, I see now. 12:13
pmichaud 'for' is not supposed to be any more or less eager than map() -- that's a rakudoism at the moment. 12:15
moritz_ yes, missing sink context and all that 12:16
pmichaud (good morning, #perl6)
moritz_ good morning pmichaud :-)
tadzik I wish my flat had a sink context. Could help with the suprise lake
moritz_ but the question remains: how do we remove the noise from the backtrace?
masak gm pm 12:17
TimToady write the backtrace to a file, and just give a URI to it :)
masak std: KitchenSink 12:18
p6eval std 37a0cdd: OUTPUT«ok 00:01 118m␤»
masak I look forward to being able to push feeds into IO objects... but I'm not married to the term "KitchenSink", which seems pretty arbitrary. 12:20
it's both too close to and too different from the term 'sink', which we already have. 12:21
moritz_ Can't we just use the * to mean "sink" in feeds?
TimToady it's probably more important that we figure out how feeds can be event queues a lá Go channels 12:22
masak moritz: right, but '@contents ==> "myfile".IO' would be an example of a KitchenSink.
I'd also like to see someone take on the task of making the Actor model supportable from within Perl 6.
12:22 drbean joined
TimToady at the moment KitchenSink is mostly for countering those folks that say "you've put everything in except the kitchen sink" 12:23
[perlhack] :-)
masak right, I suspected that. and hence it gets an automatic "cute today" label :P
TimToady think of it as a placeholder
masak that helps. a little.
moritz_ any more thoughts on possible solutions for the backtrace problem? 12:26
niecza: for 1..3 { die '' }
p6eval niecza v7-11-g9ba8284: OUTPUT«Unhandled exception: ␤ at /home/p6eval/niecza/lib/CORE.setting line 656 (CORE die @ 2) ␤ at /tmp/fdoR9kH5WW line 1 (MAIN mainline @ 6) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1879 (CORE C879_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting lin…
flussence
.oO( hm, on the one hand, nom's REPL starts up pretty much instantly. Typing "1" into it eats 120MB of RAM even faster... )
12:27
masak a lot of older Perl 6 documents under dev.perl.org/perl6 are missing.
pmichaud moritz_: the "backtrace problem" being the emitting of setting routines in the backtrace? 12:28
moritz_ pmichaud: well, being the emitting of 7 setting routines for a single for loop
masak: I think Ranguard on irc.perl.org could know something about that 12:29
pmichaud: I don't think setting methods per se are a problem - often it's even helpful
12:29 ab5tract left
moritz_ for example if you die from within a callback to sort(), you certainly want the sort to appear in the backtrace 12:29
pmichaud: gist.github.com/1064564#file_output%3A 12:30
pmichaud maybe we need error context setters -- some form of dynamic var 12:31
similar to :dba in STD.pm6
[Coke] pmichaud: o/
12:31 pernatiy joined
pmichaud [Coke]: o/ 12:31
[Coke] was momentarily surprised those lined up. 12:32
12:32 JimmyZ joined
pmichaud the other strategy I can think of is to print the setting call that is first within user code 12:32
[perlhack] :-) 12:33
moritz_ pmichaud: that's certainly worth trying out
masak moritz_: ok, I'll ask him when I get home.
moritz_ pmichaud: people will be confused when a 'for' gets turned into an 'eager' or a 'map' though 12:34
pmichaud yes, that's a bit tricky. because by the time you get to doing the 'for' loop iterations, you've already exited the for/map 12:35
(because it's lazy)
12:37 felliott joined
moritz_ I'd be fine with a for-loop not showing up at all 12:37
12:37 [perlhack] left
moritz_ just like it doesn't show up in p5 stack traces 12:38
pmichaud I suspect the level of detail for a backtrace ought to be contextual, also.
[Coke] throws out his attempt to add unlink and reclaim t/spec/integration/say-crash.t 12:39
pmichaud [Coke]: I'm a little surprised you're having trouble there -- can I see your latest patch before you toss it out? 12:40
(or am I too late?)
[Coke] there's a gist. momentito. 12:41
pmichaud moritz_: also, why is "BackTrace is List", ooc?
[Coke] gist.github.com/1063975 (add it) 12:42
gist.github.com/1063976 (bt you get running said spec test)
pmichaud moritz_: nm, I see why.
[Coke]: I suspect part of the problem is that the try block ends with a non-rakudo object. 12:43
(the result of the .rm)
[Coke] given the backtrace, very likely.
pmichaud try adding a 1; at the end of the try { }
[Coke] let me put in an explicit return.
I was going to check the spec and see what it said. ;)
pmichaud that works too :)
moritz_ it says "don't segfault" :-) 12:44
pmichaud it's also possible/likely that .rm returns PMCNULL and that's causing the segfault.
I have to run -- bbiab
moritz_ if it returns a PMCNULL in case of failure, there's no need for the try/catch
in that case a pir::isnull would be appropriate 12:45
oh, in the success case. Never mind.
[Coke] looks like it throws an ugly exception, the c ends with THROW("unlink"); 12:46
12:51 whiteknight left 12:53 colomon joined, wamba left
[Coke] pmichaud: adding a 1 inside the try block did not avert the segfault. 13:04
pmichaud [Coke]: okay, looking 13:05
13:05 drbean left
[Coke] no rush, don't want you to get sidetracked. ;) 13:06
13:07 tokuhirom joined 13:11 estrabd joined 13:13 woosley joined
pmichaud it only crashes (PMCNULL) when in the setting. standalone it seems to work fine. 13:23
13:26 birdwindupbird left
pmichaud is there a flag I can pass to trace to tell it to just dump the opcodes being executed, and not the values of the operands? 13:27
trace in nom is... LTA
(because Parrot's trace is helpfully tring to display the types of the PMC operands... which invokes a PIR subroutine which then gets inserted into the trace output) 13:28
Looks like it's the 'True' that is causing the problem. 13:31
13:32 tokuhirom left
moritz_ oh right, 1.True should solve that 13:33
pmichaud 1.Bool
moritz_ erm, right
[Coke] checking... 13:34
13:35 tokuhirom joined
[Coke] pmichaud: I don't think trace has that flag, no 13:35
pmichaud maybe I can fix whatever does the stringification in nqp
13:37 [particle] joined
dalek kudo/nom: 32dccc7 | pmichaud++ | NOMMAP.markdown:
Add note to NOMMAP about True not working in setting.
13:38
[Coke] pmichaud++ # unlink works, at least one test file reclaimed. ;)
will push after a rebase and re-test. 13:40
13:42 mj41 left 13:46 ab5tract joined, chris99 left 13:47 bluescreen10 joined
dalek kudo/nom: 393264f | moritz++ | / (3 files):
add &hash sub, enable tests
13:50
moritz_ [Coke]: I just pushed another commit, but you don't have to re-test after that one (no interaction with your stuff) :-)
[Coke] danke. 13:53
13:54 estrabd left 13:57 felliott left
[Coke] worth adding an option to the default spectest to shuffle the order of tests? 13:59
pmichaud ?
[Coke] (er, to make "make spectest" shuffle the test order by default)
moritz_ [Coke]: what would you achieve with that?
[Coke] "prove -s"\
moritz_ not "how", "what"? 14:00
or better, "why"?
[Coke] by running them in the same order each time you can (theoretically) end up with tests that depend on each other when you didn't mean for them to. 14:01
dalek ast: 347de93 | moritz++ | S04-statement (2 files):
small rakudo (un)fudges
14:03
kudo/nom: b195df3 | Coke++ | src/ (2 files):
add "unlink" from master with small tweak
kudo/nom: dc78320 | Coke++ | t/spectest.data:
reclaim a test.
[Coke] Tests=3231 #spectst
14:03 koban left
moritz_ increases that number 14:04
dalek kudo/nom: f1caed6 | moritz++ | t/spectest.data:
5 more passing test files
colomon \o/
moritz_ it's funny how a little builtin can win you back tests if all the basics are in place 14:05
and I'm pretty sure there are quite some files that pass dozens of tests, but hinge on some small thing that makes them bail out 14:08
dalek ast: b24a341 | moritz++ | S02-builtin_data_types/hash_ref.t:
refudge hash_ref.t for rakudo
14:12
14:13 wtw left
[Coke] moritz_: I am pondering making a gist of explosions per test file. 14:14
(then you could focus on explosions that were shared across test files)
... though I have to focus on $DAYJOB now. ;)
14:16 woosley left
pmichaud nom: say 'a'.chars 14:17
p6eval nom: OUTPUT«1␤»
pmichaud nom: say a.substr(-1)
tadzik nom: say 'ą'.chars; say 'ą'.bytes;
p6eval nom: OUTPUT«Could not find sub &a␤current instr.: '_block1002' pc 70 ((file unknown):59343318) (/tmp/T5vyriKzDs:1)␤»
nom: OUTPUT«1␤2␤»
pmichaud nom: say 'a'.substr(-1)
p6eval nom: OUTPUT«a␤»
pmichaud ...what's the overall guidelines for putting string methods in Cool vs. Str? 14:18
in master and at the beginning of nom, we tended to define the methods in Cool. Lately they seem to be going in Str with Cool doing self.Str.foo
moritz_ the latter kinda seems cleaner to me 14:19
since many of those methods stringified the invocant first anyway
and then did something on it
pmichaud why doesn't Cool have the numeric methods defined on it yet? 14:20
moritz_ which ones? 14:21
pmichaud nom: say "1".sin
p6eval nom: OUTPUT«Method 'sin' not found for invocant of class 'Str'␤current instr.: '_block1002' pc 75 ((file unknown):7560606) (/tmp/bFP9j6bHnq:1)␤»
moritz_ ah, I mostly just added those back that I needed to get tests passing
the rest should go there too 14:22
pmichaud okay, I think I'm fine with having self.Str.foo as the general pattern, then.
(and we should move the existing Cool methods that way)
I'm kind of wondering which one ultimately ends up being more efficient 14:23
also, I suspect that Cool should be self.Stringy.foo instead of self.Str.foo 14:24
since the numerics are generally self.Numeric.foo
moritz_ probably 14:25
[Coke] Method 'Capture' not found for invocant of class 'Parcel'
moritz_ but these days all the builtins .Stringy and .Str the same, no?
[Coke] (there's one of yer 'splosions)
moritz_ and they just .gist differently
[Coke]: I've had that one multiple times, and always thought "I'll live that one to pmichaud++' :-) 14:26
pmichaud Capture will undoubtedly be added as part of the new regex stuff, since Match ~~ Capture
masak when you're writing tests post facto for legacy code, "got" and "expected" are confusingly reversed :)
moritz_ didn't got that... erm, expected :-) 14:27
pmichaud (.Stringy/.Str) sure, they're the same now, but that might not be true for user classes that "is Cool"
moritz_ right
jnthn back from dinner/beer
tadzik what a day. Leaking washing machine, burning dinner, bugs in code. I'm curious what else can make it worse 14:29
14:29 simcop2387 joined
colomon tadzik: doesn't every single day have bugs in code? ;) 14:30
tadzik ask masak, he's submitting bugs daily :) 14:31
masak even code that looks right has bugs.
possibly with the exception of trivial and almost-trivial code.
but even that is suspect :P
I still haven't tracked down the error in my "obviously correct" recursive sierpinski builder. 14:32
pmichaud even if the trivial code is bug-free, the non-trivial compiler that runs it isn't. :)
colomon personally, my major change in my $work code over the weekend only turned up a trivial-to-fix seg fault. So I get to spend all day writing tests to see if I really got it right. 14:33
tadzik my gsoc goals tend to be a 10-line patches to the parser and another 100 lines of tests for that 14:34
masak my most anti-climactic bug hunt ever involved Perl 5, a 'sort' call, and a global variable called '$a'. I think you can fill in the blanks. 14:35
colomon though I think I've just detoured into doing a refactoring that will make it easier to write the tests, and therefore to actually use my new code...
pmichaud masak: heh 14:36
jnthn I doubt the True-in-setting issue will be dealt with until I actually implement enums.
I'm a little amazed the current hack works at all :) 14:37
pmichaud maybe we should go ahead and define True as a term then, as a short-term fix. 14:38
jnthn In general, "X works but not in the setting" shouldn't be that surprising. The setting is playing part of the role of circularity saw in places.
masak jnthn: what would it take to implement enums?
jnthn pmichaud: I doubt that'd actually help
14:38 bluescreen10 left
jnthn I'm not sure what the current bug is. it looks nasty and I'd rather spend time on doing enums than debugging why a questionable cheat doesn't work. 14:39
masak: Mostly, figuring out how EnumHOW looks :)
pmichaud I don't see why/how Inf works at the moment, fwiw. 14:40
masak jnthn: sounds like fun.
jnthn no, me either :)
masak jnthn: I might have a look at it this weekend.
14:40 donri joined
pmichaud jnthn: surely term:sym<True> would be guaranteed to work. 14:40
sub term:sym<True> { 1.Bool }
jnthn masak: I glanced through the enum spec quickly again recently and realized 6model may make a few things easier.
pmichaud if nothing else.
jnthn pmichaud: oh, that'd work but...why bother 14:41
pmichaud: I expect to have enums done in the next week or so anyway.
pmichaud so our setting isn't filled with 1.Bool all over the place, and so Coke++ doesn't spend hours trying to find a segfault that is because of a not-working "True" symbol.
jnthn masak: ooh, we could have a weekend hackathon
masak jnthn: remotely, in that case. :/ 14:42
jnthn masak: Well, part-of-weekend
masak: Oh?
masak jnthn: leaving early on Sat.
jnthn will be back, but guesses masak won't be
ah, ok
masak gonna be a teacher for a week :) 14:43
I expect to have some time left over for coding, though.
jnthn heh. When you get back I'll be gone again ;)
masak well, when I get back I'll just re-pack and take a week of vacation :) 14:44
jnthn ah, you're vacationing that week too :) 14:45
$dayjob will be quiet :)
masak indeed :)
14:47 simcop2387 left 14:48 everbrew joined, simcop2387 joined 14:53 ymasory joined 14:54 bluescreen10 joined 14:55 simcop2387 left 14:58 simcop2387 joined 15:13 ab5tract left 15:16 woosley joined 15:17 leprevost joined 15:19 Holy_Cow joined, am0c left 15:32 am0c joined
dalek p: b003b38 | jonathan++ | src/6model/sixmodelobject.h:
Extend representation API with a couple of new features to support doing defaults properly in Perl 6 and in order to support mixins (actually, the mechanism is far more generic, and should be able to support a bunch of other stuff that Perl 6 doesn't need, but other languages may).
15:36
p: 0ae9745 | jonathan++ | src/6model/reprs/ (7 files):
First sketch of implementation of is_attribute_initialized for all reprs.
15:36 mkramer joined
everbrew ls 15:38
masak No such file or directory. 15:41
everbrew thank you
masak just us chickens.
everbrew *facepalm* 15:42
I need more coffee
I thought it was zebras ...
15:43 thou joined, mkramer left 15:44 mkramer joined, mkramer left
masak if you ls zebras, all you get is lines and lines of output. 15:45
15:45 woosley left
jnthn every other line is blank, though 15:45
15:50 ymasory left
masak decommutes 15:54
15:54 masak left
dalek kudo/nom: df26bd3 | pmichaud++ | src/Perl6/ (2 files):
Temporary change to handle True/False and Bool::True/Bool::False

We can undo these when the official definitions of True/False become available.
16:03
ocmess: 8e69807 | tadzik++ | / (3 files):
Parse the simple case of tables
16:04
16:04 jaldhar left
dalek kudo/nom: e77b738 | pmichaud++ | NOMMAP.markdown:
Add note to NOMMAP about array/hash variable initialization.
16:05
16:06 kaare_ joined 16:11 bakedb left
pmichaud afk, errands 16:14
16:15 cotto_work joined
dalek kudo/nom: 7019642 | pmichaud++ | src/core/ (7 files):
Convert instances of 1.Bool into Bool::True.
16:19
16:20 mkramer1 joined 16:21 mkramer1 left 16:24 pernatiy left 16:25 wamba joined
tadzik I'm starting to hate Pod tables 16:30
moritz_ it might make sense to not parse the tables completely with rules 16:31
tadzik I don't think they can be
moritz_ but to postprocess stuff
16:32 kst left
moritz_ you know the bitwise-AND trick for discovering column boundaries? 16:32
tadzik you have to parse the whole table, then count the number of separators. if there are none, this is an ordinary table. If there's one, there's header and the ordinary table. If there's more than one, but all alike, it's a multi-line table. If there's more than one and they're different, then the first row is a multi line header and then comes the multi-line table 16:33
madness
moritz_: no, never heard of it
moritz_ tadzik: when you have whitespace-aligned columsn, you bit-AND all the rows
tadzik: and only the columns where the result is still a space can be column boundaries (but not all of them must be) 16:34
16:34 am0c left
tadzik interesting. So far I'm just relying on the fact, that the cells must be separated by at least two whitespaces... oh wait, that's weird 16:35
Columns are separated by two or more consecutive whitespace characters, or by a vertical line (C<|>) or a border intersection (C<+>), either of which must be separated from any content by at least one whitespace character.
So when they're separated by at least two consecutive whitespaces, must they be separated from any content by at least one whitespace too, which makes them at least four whitespaces? :) 16:36
moritz_ I guess the "either" doesn't apply to the first item 16:37
tadzik probably, yes
I have a feeling that Tables are a bit too complex to be summarized in 3 paragraphs and 3 examples
16:37 MayDaniel joined
moritz_ tadzik: how many weeks did you allocate for tables? 16:38
tadzik moritz_: one. They're supposed to be tables and formatting codes this week 16:39
that'd probably end up as 'tables and serialization experimentation' this week, and 'formatting codes and serialization' next week
16:40 mj41 joined 16:41 cdarroch joined, cdarroch left, cdarroch joined
tadzik I should've started this week earlier 16:42
16:42 kst joined
tadzik even though it's tuesday :) 16:42
jnthn sleep time 16:45
yes, I preported for #phasers :)
Will be offline-ish for a bunch of tomorrow due to flight
JimmyZ sleeps too 16:46
jnthn o/
thou good night, beijing! 16:47
\o
16:47 Jackneill left
tadzik good night :) 16:48
16:49 MayDaniel left 16:55 JimmyZ left 16:57 MayDaniel joined 17:02 daxim left, MayDaniel left 17:05 soh_cah_toa joined
soh_cah_toa Util: hey 17:06
17:09 mkramer joined, dakkar left 17:10 noganex_ joined, masak joined
tadzik # got: ("Human", "2", "Pizza") 17:12
# expected: ("Human", "2", "Pizza")
Contest! I'll show the winner the fastest way to tie a shoe
masak probably something silly like one being a List and the other a Seq... 17:13
17:13 noganex left
masak or hidden Nil elements that get flattened out... 17:13
or maybe the is_deeply routine simply doesn't handle that type. 17:14
so many ways this can fail! :)
tadzik :) 17:15
I'll get back to checking every pair of indexes then
masak unless you consider stringifying the whole lists and checking those with 'is' Good Enough. 17:19
one technique I've been liking more and more lately is making diffs and testing those.
everbrew panda's interactive mode isn't very interactive, is it? 17:20
tadzik isn't it? 17:21
it's less functional than the batch mode, IIRC. I'm planning a rewrite of those for a while now 17:22
everbrew I keep expecting cpan for no reason :)
dalek ocmess: fbb1956 | tadzik++ | / (2 files):
Allow '|' and '+' cell separators
ocmess: 458689d | tadzik++ | / (3 files):
Handle a one-lined table with a header. Add a skeleton for handling a multi-line tables
tadzik patches welcome :)
everbrew as soon as I get familiar enough to write something beyond hello.pl 17:24
17:24 l234567 joined, l234567 left 17:25 l234567 joined, l234567 left
tadzik how do you like Perl 6? 17:25
nqp: sub foo { sub bar { say(1) }; bar; bar; }; foo 17:26
p6eval nqp: OUTPUT«Routine declaration requires a signature at line 1, near "{ sub bar "␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6372)␤»
tadzik nqp: sub foo() { sub bar() { say(1) }; bar; bar; }; foo
p6eval nqp: ( no output )
everbrew as a long-time perler, short-time perl6er, I like the language a lot (but it's a tad slowish)
tadzik yeah, we're working on that. You may want to try niecza when you're looking for speed rather than features 17:27
17:28 l234567 joined, l234567 left
masak luckily, it's not the language that's slow :) 17:29
tadzik :) 17:30
17:38 mkramer left, jevin_ left, rindolf joined
rindolf Hi all. 17:38
tadzik hello rindolf
rindolf tadzik: hi. 17:39
17:44 impious joined 17:46 jevin joined
tadzik masak: can I have your helpy hand? 17:47
moritz_: or yours :) 17:48
moritz_ tadzik: I can try 17:49
tadzik preparing a gist, hold on 17:50
moritz_: gist.github.com/1065396 17:51
when I change line 22 from ]+ to ]* that fixes the example with a trailing empty field, but not with the leading 17:52
moritz_ you really need to post-process 17:53
tadzik the bitwise-way?
moritz_ or you can turn $/.from into column numbers 17:54
and do some matching afterwards
tadzik hmm 17:55
or I can push an empty element if the last one ends with |, and unshift one if the first one starts with | 17:58
well, any possible separator, not | 17:59
masak tadzik: I'm with moritz; parse the contents of the table in the simplest possible way, then post-process.
tadzik that's what I did, but I included splitting the row between cells in the simplies possible way :) 18:00
masak tadzik: you're in 2D-land here, and recursive-descent parsing is no longer the fastest vehicle.
tadzik yeah, I can see that
sigh :)
masak it doesn't seem to me you can say a lot about table cells before you've seen the whole table. 18:01
moritz_ especially if the separator is \s ** 2
tadzik yep
masak fwiw, this is very much the same situation I'm facing right now when I'm "parsing" Sudoku problems, and the like.
(for dlx-simple)
18:04 mj41 left 18:05 mj41 joined, cooper joined 18:20 Holy_Cow left
masak speaking of the flip-flop operations: 18:33
why are there eight of them? :) 18:34
wouldn't it be... fun... to try to come up with even one use case for each of those eight?
I'd sure like to get to know the flipflop family a little better.
at present, I don't think I grok the semantics of them very well. 18:35
what does ^ff do again? how about fff^ ?
pmichaud for lines() { /start/ ff /end/ && .print } 18:38
masak nice, good. 18:39
18:39 zby_home_ joined
pmichaud as soon as we see a line containing 'start', we start printing, we continue printing until we see a line containing 'end' 18:39
masak inclusive, both ends. good.
pmichaud for lines() { /start/ ^ff /end/ && .print }
omit the start line.
masak nod.
pmichaud for lines() { /start/ ff^ /end/ && .print } 18:40
(I think) keep the start line, omit the end line.
masak I think so too.
and ^ff^ is omit both.
pmichaud I think so, yes.
masak makes total sense.
that's four. 18:41
18:41 meteorjay joined
masak for what the 'fff' operator even does, it seems one has to go to 'perldoc perlop'. 18:41
pmichaud with the ff version, if a line contains both start and end, then we flip and flop on that one line. 18:42
i.e., we don't print anything.
masak oh!
yes, I see where this is heading.
pmichaud with fff, if a line contains start, we flip but don't even try to flop.
masak 'If you don't want it to test the right operand till the next evaluation, as in sed, just use three dots ("...") instead of two. In all other regards, "..." behaves just like ".." does.' 18:43
yes, perldoc perlop agrees.
still, that makes ^ff^ abd ^fff^ perfectly equivalent, I guess.
18:44 Mowah left
masak and ^ff and ^fff, and ff^ and fff^... 18:44
no wait.
sorry, I'm speaking without thinking.
no, it's different behaviours.
dalek kudo/nom: 87e9756 | pmichaud++ | src/core/ (5 files):
More True/False changes.
18:46
masak the way to pick between the eight seems to be to ask (1) "what to I want to happen at the endpoints?", and (2) do I want to test for flopping directly after flipping? 18:47
pmichaud correct.
masak the first question picks the left and right hats; the second one picks between ff and fff.
pmichaud .print for lines().grep({/start/ ff /end/}) # nice 18:48
masak ooh
I love what Perl 6 is doing with Perl :)
colomon hmm... does lines eat the newlines? 18:50
masak aye.
pmichaud if so, then .say
colomon two characters shorter!! \o/ 18:51
masak .say for lines.grep: /start/ ff /end/ 18:52
hm, I need those curlies, don't I?
pmichaud yes
masak wrong $_ otherwise. 18:53
tadzik moritz_, masak, could you please take a look at gist.github.com/1065563, did I get it right? Others are welcome to look in it as well :)
masak takes a look
pmichaud nom: say 'a'.substr(-1);
p6eval nom: OUTPUT«a␤»
pmichaud we should fix that. 18:54
masak tadzik: doesn't look obviously wrong :)
tadzik (:
masak tadzik: there are a number of things that can go wrong with a table. what's the failure mode? 18:55
tadzik I'd like to have it correct before I start reimplementing .comb :)
masak: looking at the spec, which says not much really, I think the failure mode is: you write weird tables, you deserve an undefined behaviour :)
masak things like people using inconsistent delimiters, or not lining them up correctly, or having different amounts of cells on each line...
tadzik different amount of cells is even in spec, that's what causes me make a post-processing 18:56
masak tadzik: you write weird tables, you get a good error message -- would please me more :)
tadzik: but probably not a parse error.
Util soh_cah_toa: Hi! 18:57
tadzik not lining the delimiters correctly is not an issue if we do the search for the delimiters for each row separately
masak huh what?
it's allowed to write bad tables?
tadzik what is the question about?
the spec?
masak or the interpretation of it. 18:58
tadzik remember the previous gist?
masak vividly.
tadzik gist.github.com/1065396
the heading uses a different number of cells each line
and the example is straight from S26
masak hm. slow down. 18:59
what's a "cell" to you?
tadzik something between the delimiters, or between a line boundary and a delimiter
masak good. to me too.
I think I see what you mean. 19:00
tadzik oh, so what happens if someone forgets a trailing delimiter before the empty cell?
masak for the header at least, it doesn't matter which line things are on.
tadzik I assume one gets an array of rows in which one of the rows has less cells than the other
masak before you pointed it out, I didn't even consider the different placement of the header cell contents a difference. 19:01
I mean, I didn't even think of it.
visually, even though there are two lines up there, I keep thinking of it as three cells, not six. 19:02
tadzik I didn't either, and then that test failed :P
masak have you considered treating it as three cells?
tadzik I will, one day. So far I used something like... (pasting) 19:03
gist.github.com/1065588
then I determined how long is the heading and did merge_rows(@rows[0..$how-long-is-the-heading]) 19:04
19:04 molaf left 19:10 Bzek left
[Coke] [~] doesn't work yet in nom, aye? 19:13
dalek kudo/nom: 86ff74d | pmichaud++ | src/core/ (2 files):
Move .substr guts from Cool to Str, make .substr properly fail on negative start or length arguments.
19:14
pmichaud nom: say [~] <a b c d>;
p6eval nom: OUTPUT«abcd␤»
pmichaud works. :)
dalek kudo/nom: 4353c16 | pmichaud++ | LHF.markdown:
Add a LHF for Str.chomp.
19:15
19:15 jferrero joined
[Coke] is that recent? hurm. 19:16
pmichaud since Sat, I suspect.
[Coke] probably a result of the other thing I'm adding not working. ;)
any gotches to bringing over the sub form of WHAT? 19:17
aside from s/our// ?
pmichaud it's really supposed to be a macro, not a sub :) 19:18
I'm okay if we cheat as a sub for a while longer, though. :)
[Coke] I'm bringing over the comment that says that too! :)
pmichaud [Coke]++ 19:19
19:19 cooper left
[Coke] nom: my $a=3;say $a.WHAT 19:20
p6eval nom: OUTPUT«Int()␤»
[Coke] hurm. that's not what that says locally, odd. (I have added a sub WHAT in core/operators.pm, but that's not the sub form. wtf.)
masak nom: say Mu.^methods>>name.perl 19:21
p6eval nom: OUTPUT«Confused at line 1, near "say Mu.^me"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6380) (src/stage2/gen/NQPHLL.pm:328)␤»
masak worth a shot :)
lue hello world o/ 19:22
masak hi lue!
masak is quickly realizing that even a smallish text adventure will be a bit of a challenge 19:23
dalek ecs: 839c329 | (Felix Herrmann)++ | S06-routines.pod:
[S06] typo fix: insert missing 'is'
masak felher++ # you're really reading the spec, aren't you? :)
lue ifMUD (a MUD for Interactive Fiction) runs on perlMUD
masak lue: yes, but that doesn't help me much for the blog posts... 19:24
19:25 buubot_backup left, am0c joined
lue I just mentioned it in case you'd like to take a look at perlMUD. 19:25
masak maybe afterwards :) 19:26
lue tries to start working on nom soon
masak for now, I'll take a first shot at writing a game prototype.
[Coke] nom: say 3.WHAT 19:27
p6eval nom: OUTPUT«Int()␤»
masak nom: say 3.WHAT.WHAT.WHAT # !? 19:28
p6eval nom: OUTPUT«Int()␤»
[Coke] in the REPL, that dies with:
Can only use nqp_get_sc_for_object with a SixModelObject
pmichaud pmichaud@kiwi:~/nom$ ./perl6
> say 3.WHAT
Int()
felher masak: well, actually i'm just reading the typos ;)
pmichaud there seems to be a problem in the repl that once an error occurs, we end up with the "SizModelObject" on various things afterwards (and so you need a fresh REPL) 19:29
*SixModelObject
masak felher: :P
[Coke] hurm. yah, it only happens after, e.g. my $a=3;$a.WHAT.say , but that doesn't throw an error. 19:30
but, "don't trust the REPL right now". Roger. 19:31
No applicable candidates found to dispatch to for 'infix:<~>'. Available candidates are: 19:34
... it would be helpful if that told me what types it was checking for, too, not just which multis were available.
everbrew "Learning Perl 6" -- not a good reference? 19:35
tadzik what's the date of publishing?
everbrew never 19:36
moritz_ not good.
lue rakudo: my $a = 3; say $a; $a = Nil; say $a;
p6eval rakudo 72d158: OUTPUT«3␤Any()␤»
lue nom: my $a = 3; say $a; $a = Nil; say $a;
p6eval nom: OUTPUT«3␤Nil␤»
lue which one is right here?
betterworld how do these spectests for hygienic macros look? - pastebin.com/qzmHfVG7
especially the last one 19:37
19:37 cooper joined
moritz_ betterworld: the first one already is not correct 19:37
oh wait, no 19:38
I thought you'd have to declare $x
masak lue: Rakudo master is right.
moritz_ but it's just a closure..
betterworld i don't quite follow ;)
masak betterworld++ # writing tests for that 19:39
[Coke] I have a test that I'm trying to recoup that is doing an infix ~ on a Pair, and then failing to dispatch that to the Any/Any multi version.
moritz_ betterworld: ignore what I wrote so far
betterworld: more interesting, in defun(foo, Int $arg, $arg * $arg); the foo needs to be quoted 19:40
betterworld i wondered about that too
moritz_ betterworld: unless you add "is parsed", the arguments to the macro are just normal Perl 6 code
pmichaud [Coke]: what's the test? 19:41
[Coke] t/spec/integration/pair-in-array.t
added the WHAT() locally, just trying to get the [~] working on Pairs now.
moritz_ betterworld: so I guess the 'Int $arg' suffers from the same problem
19:42 kaare_ left
betterworld then I guess the test might be more interesting with 'is parsed' than with strings. Something like this might become my favorite use case of macros ;) 19:43
[Coke] nom: my @P1 = ('a'=>2);
masak we won't know until we have macros :)
p6eval nom: ( no output )
[Coke] nom: my @P1 = ('a'=>2); say [~] @p1
p6eval nom: OUTPUT«Symbol '@p1' not predeclared in <anonymous> (/tmp/ZlNOsk1KII:1)␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (compilers/pct/src/PCT/HLLCompiler.pir:107)␤»
[Coke] nom: my @P1 = ('a'=>2); say [~] @P1
p6eval nom: OUTPUT«No applicable candidates found to dispatch to for 'infix:<~>'. Available candidates are:␤:(Str $a, Str $b)␤:(Any $a, Any $b)␤␤current instr.: 'infix:<~>' pc 292999 (src/gen/CORE.setting.pir:0) (src/gen/CORE.setting:1379)␤»
pmichaud oh!
moritz_ [Coke]: I think it's the [...] is NYI 19:44
pmichaud no
we haven't defined &infix:<~>($x?) { $x } yet
or any of the degenerate infixes
[Coke] ahhh. ok. I can grab that one.
pmichaud so [~] can't work when there's only zero or one element
nom: say [~] 'a' 19:45
p6eval nom: OUTPUT«No applicable candidates found to dispatch to for 'infix:<~>'. Available candidates are:␤:(Str $a, Str $b)␤:(Any $a, Any $b)␤␤current instr.: 'infix:<~>' pc 292999 (src/gen/CORE.setting.pir:0) (src/gen/CORE.setting:1379)␤»
pmichaud nom: say [~] 'a', 'b'
p6eval nom: OUTPUT«ab␤»
19:46 buubot_backup joined
[Coke] actually, do you want all those metaops brought over? 19:47
19:48 molaf joined
lue What's the gist method for in Iterator.pm? 19:49
moritz_ stringification that is targeted at the human, not at the computer 19:51
pmichaud [Coke]: yes, please.
[Coke] pmichaud: Failed to build with a naive copy and s/our//g - trying just the one first, will see if I can add more later.
pmichaud std: my @list; OUTER: @list.map({ ... }); # checking
p6eval std 37a0cdd: OUTPUT«ok 00:01 120m␤»
19:52 Chillance left
jlaire perl6: my @a; say [+] @a; say [*] @a 19:55
p6eval niecza v7-11-g9ba8284: OUTPUT«0␤0␤»
..pugs, rakudo 72d158: OUTPUT«0␤1␤»
jlaire perl6: my @a; say [+] @a; say [*] @a; say [&&] @a; say [||] @a; say [**] @a 19:56
p6eval rakudo 72d158: OUTPUT«0␤1␤Bool::True␤Bool::False␤1␤»
..niecza v7-11-g9ba8284: OUTPUT«===SORRY!===␤␤This macro cannot be used as a function at /tmp/sguDx7yWH2 line 1:␤------> my @a; say [+] @a; say [*] @a; say [&&]⏏ @a; say [||] @a; say [**] @a␤␤This macro cannot be used as a function at /tmp/sguDx7yWH2 l…
..pugs: OUTPUT«0␤1␤1␤␤1␤»
pmichaud \o/ rakudo++ 19:57
jlaire indeed :)
(assuming that's correct)
masak looks like.
jlaire karma rakudo 19:58
aloha rakudo has karma of 17.
jlaire karma niecza
aloha niecza has karma of 13.
jlaire karma pugs
aloha pugs has karma of 0.
pmichaud That's just Wrong, somehow.
jlaire aww, pugs++, it's close enough
what is? 19:59
pmichaud "pugs has karma of 0" <- wrong
jlaire oh, definitely
pmichaud as in, morally wrong or something.
jlaire maybe it ha overflowed
has*
tadzik probably 20:00
soh_cah_toa: is your new module in the ecosystem already? 20:06
soh_cah_toa tadzik: are you referring to META.info?
er, read that wrong. no it isn't 20:07
i was gonna ask how it get's on modules.perl6.org but i fell asleep :)
tadzik :)
soh_cah_toa what do i need to do to get it on modules.perl6.org and/or panda? 20:09
tadzik ask me :) Do you have a META.info? 20:10
soh_cah_toa yes
tadzik I'll add it to the github.com/perl6/ecosystem/blob/ma.../META.list file, and it'll magically appear in all the sources, modules.perl6.org, panda, API etc 20:11
that's it :)
soh_cah_toa ah neat. the repo's at github.com/soh-cah-toa/digest-sha256 20:13
tadzik ok, I'll do this in a second 20:14
soh_cah_toa sure
masak std: my @a = 1, 2, 3, given 42;
p6eval std 37a0cdd: OUTPUT«ok 00:01 122m␤»
masak rakudo: my @a = 1, 2, 3, given 42; say @a
p6eval rakudo 72d158: OUTPUT«Could not find sub &given␤ in main program body at line 22:/tmp/SdfkdMe7WW␤»
masak submits rakudobug 20:15
betterworld so, could I write the definition like macro defun($name is parsed /<deflongname>/, $sig is parsed /<signature>/, $body) 20:18
where deflongname and signature are supposed to reference the definitions in Perl6/Grammar.pm? 20:19
moritz_ I don't think so
you'd have to do something like
macro defun() is parsed /rule for the whole thing/ { compile $/ to Perl 6 code; do stuff with it } 20:20
betterworld hm, that does not sound very beautiful to be honest ;) 20:21
moritz_ it sounds like what you want can really be done with a sub at compile time
BEGIN install_sub('name', -> $x { $x * $x }) 20:22
betterworld: point is, if you go with 'is parsed' on parameters, how would the compiler know that you want a comma-separated list?
20:22 leprevost left
betterworld that's a reasonable question 20:23
dalek osystem: 6056d42 | tadzik++ | META.list:
Added Digest::SHA256 thanks to soh_cah_toa++
masak rakudo: class A { has $!x; method change(A $a) { $a!x = "foo" } }; my $a = A.new; my $b = A.new; $a.change($b) 20:24
p6eval rakudo 72d158: OUTPUT«Method '!x' not found for invocant of class 'A'␤ in 'A::change' at line 22:/tmp/Fxz0gRbVJY␤ in main program body at line 22:/tmp/Fxz0gRbVJY␤»
[Coke] sadly, those 2 commits don't get me that integration test back. Close, though.
tadzik soh_cah_toa: visibly done :) cronjobs for modules.perl6.org and he modules api run hourly, so you'll have to wait a bit for the module to appear in the media
dalek kudo/nom: 2e59702 | Coke++ | src/core/metaops.pm:
add degenerate infix:<~>
kudo/nom: 5fa788d | Coke++ | src/core/operators.pm:
add subish WHAT()
masak is the above supposed to work one day?
moritz_ has no idea 20:25
colomon soh_cah_toa++
soh_cah_toa tadzik: yay! it's nothing spectacular being my first attempt at a p6 module but it'll grow in time :)
tadzik soh_cah_toa: my first module was a port of Acme::Meow :P
moritz_ uploaded new book snapshots to github
betterworld on the other hand, I think you can use macros for this kind of stuff in scheme, so I thought it might be similar in Perl 6 20:26
moritz_ well, you can
we just haven't worked out yet how to do it nicely 20:27
betterworld: if you just pass existing literals to your macros, it will be much easier
where with "literals" I mean "anything that can be a statement in Perl 6"
:-)
lue .oO[ Mrr. I'm trying to do an extremely clever one-liner ?? !! conditional to fix a piece of LHF and nqp isn't letting me. :( ] 20:28
pmichaud [Coke]: the test has to be changed.
masak TimToady: true or faux: instances of a class can change each other's private attributes.
dalek ok: 0210e16 | moritz++ | src/ (6 files):
pseudopod needs a newline between headings and Z<...>
pmichaud type objects no longer stringify to their typename.
masak (provided they're rw, of course)
jlaire is that allowed in other languages? 20:30
masak in Java, it is.
it makes some sense. it's within the bounds of the class, so it's the class author that's making the access. 20:31
20:31 [Coke] left
dalek ast: a94b224 | pmichaud++ | integration/pair-in-array.t:
Type objects no longer stringify to "Type()" -- have to use .gist instead. Coke++ for working on this one.
20:31
jlaire yeah, it's allowed in C++ too
masak that also means that the private attribute is already "visible", since self can see it.
jlaire the '$obj!attr' syntax looks a bit odd
masak truly, the issue turns up as soon as you do something involving two objects of a class.
jlaire
.oO( $obj.!attr )
dalek kudo/nom: 48b9efc | pmichaud++ | t/spectest.data:
Add t/spec/integration/pair-in-array.t to spectest.data. Coke++
masak like "connect these rooms together, mutually". 20:33
jlaire: I like your syntax, too.
20:33 mj41 left
moritz_ nom: say Int.Str, Int.Stringy, Int.gist 20:33
p6eval nom: OUTPUT«Use of uninitialized value in string context␤Use of uninitialized value in string context␤Int()␤»
20:34 [Coke] joined
pmichaud coule also do Int.perl 20:34
*could 20:35
nom: say Int.Stringy, Int.gist, Int.perl
p6eval nom: OUTPUT«Use of uninitialized value in string context␤Int()Int␤»
dalek kudo/nom: 8c4e7fd | moritz++ | / (2 files):
add BackTrace class to setting. Not yet used in exceptions
[Coke] checks backscroll. 20:36
pmichaud moritz: anytime we have a non-rakudo object going to a variable, we probably need to declare the variable as "Mu"
my $bt = nqp::atkey(pir::getinterp, 'context').backtrace;
and binding is probably wise there also :) 20:37
moritz_ pmichaud: it comes back as a Parcel
[Coke] ah, pmichaud++, danke.
pmichaud oh, because it's an rpa
moritz_ right
pmichaud safer would still be Mu. Note that assigning a Parcel to a scalar may also end up converting it to a Seq.
(That's what the spec currently says, I'm thinking we might avoid that) 20:38
moritz_ that wouldn't hurt in this case
pmichaud okay.
moritz_ I just need something that has .elems and can be indexed
my attempts to iterate directly over .list of it always lead to segfaults 20:39
pmichaud yeah, because the things inside of the backtrace aren't rakudo objects.
moritz_ they are parrot hashes, and get turned into Hash objects
pmichaud so binding in the subcall has trouble
20:39 Sarten-X left
pmichaud could do it with nqp::iterator and nqp::shift 20:40
lue $ perl6 -e 'print "START"; print "\n".chomp; print "".chomp; say "END"'
STARTEND 20:41
pmichaud lue: \o/
lue should I run make spectest and report the changes?
pmichaud lue: yes, please.
lue running 20:43
pmichaud moritz_: also, using .[] on a Parcel gets very expensive -- it has to construct a new List for each invocation.
(not that it matters much for backtraces... just for future reference)
if it becomes a .Seq it won't be expensive, though. 20:44
lue Actually, things have been commited since I started working on this. Should I pull the latest before creating a patch?
pmichaud lue: can you nopaste the patch somewhere?
If so, I can give a quick review. In the meantime, yes, it'd be better to pull first.
lue I will do that as soon as the spectest is done [or if needed, I can open up another terminal and just create the patch now] 20:45
pmichaud lue: up to you :)
moritz_: I wonder if the verbosity of the backtrace should be figured out when it stringifies, instead of when it's created :). 20:46
20:47 rindolf left, wamba left
masak rakudo: my %h = <a b c>.kv; subset ABCStr of Str where { %h.exists($_) }; my ABCStr $b = "b"; say "alive" 20:48
p6eval rakudo 72d158: OUTPUT«Null PMC access in find_method('exists')␤ in <anon> at line 1:/tmp/XW15lZmHcc␤ in 'Block::ACCEPTS' at line 6377:src/gen/core.pm␤ in 'infix:<~~>' at line 483:src/gen/core.pm␤ in <anon> at line 1:/tmp/XW15lZmHcc␤ in 'Block::ACCEPTS' at line 6377:src/gen/core.pm␤…
masak known bug?
pmichaud masak: I'm sure I've run into it before, but I don't know if it's ticketed. 20:49
masak submits rakudobug
pmichaud okay by me to masakbug it :)
jlaire is that allowed? seems evil
if %h is not constant
pmichaud Perl 6 gives lots of new Evil possibilities. That's what happens when Damian is one of the main designers. 20:50
20:50 Sarten-X joined
pmichaud masak: also, that example suffers slightly in that 'b' isn't a key in the hash. 20:50
masak I guess this is related: rt.perl.org/rt3/Ticket/Display.html?id=77356
rakudo: my %h = <a b c>.kv; say %h.perl
p6eval rakudo 72d158: OUTPUT«{"0" => "a", "1" => "b", "2" => "c"}␤» 20:51
masak pmichaud: oh :)
pmichaud I doubt that eliminates the bug, but it means the test case needs a bit of work.
20:51 ribasushi left
masak jlaire: subtypes are very much allowed to change dynamically. 20:51
jlaire masak: kk
pmichaud jlaire: you can even do things like subset Chaos of Str where { rand > 0.5 } 20:52
masak the freedom of dynamic languages :P
jlaire subset July4th of Date where { ... }
pmichaud which only lets you assign about half of the time.
jlaire can only be instantiated on that day
masak pmichaud: have you looked into Java2k, perchance? :)
20:52 ribasushi joined
pmichaud masak: I have not. :) 20:52
does nom have where clauses, yet?
nom: subset Even of Int where { $_ * 2 == 0 }; my Even $a = 3; say $a; 20:53
p6eval nom: OUTPUT«Rebuild in progress␤»
masak pmichaud: Java2k argues that since programming is so fallible, it's "best" to build in 10% chance of failure into the language itself...
lue only S02-literals/numeric.rakudo didn't give ok
masak so every operation has a 10% chance of failing. protection against this comes through nested if statements. 20:54
pmichaud masak: that sounds like another one of those "made up on the spot statistics" :-P
masak reducing failure rate to 1%, .1%, .01%, etc.
pmichaud lue: that's a known failure if you don't have libgmp or some other bigint library installed
I think I'm going to fudge numeric.t 20:55
masak that way -- so Java2k claims -- the programmer gets a "failure-oriented" mindset from the start, leading to better programs.
it also naturally leads to *short* programs, since you don't want to expose the program to too many operations :P
pmichaud seems low on the whipituptitude scale, though.
jlaire we need a 'Perl6_2k' module that overwrites all standard subs to produce errors randomly 20:56
masak pmichaud: I haven't even mentioned that the language is base 11, with the 11th "numeral" being represented by ASCII 0x20 :) 20:57
I am not making this up.
(it's an esoteric language, of course)
dalek ast: 7a1f6e3 | pmichaud++ | S02-literals/numeric.t:
Fudge test in S02-literals/numeric.t for Rakudo (until we have a chance to fix numeric literals).
20:58
jlaire 'of course' <-- when it comes to java, I can't always be sure... 20:59
pmichaud "Java2k: 2000 iterations and still inflicting pain" 21:00
masak Java2k has about as much connection with Java as does JavaScript. 21:02
Util PWN: #parrotsketch will be held an hour earlier, starting next week. 21:03
jlaire niceone! but people who don't know it think it's almost the same language
pmichaud parrotsketch may overlap with phasers a bit, but that's probably okay. 21:04
lue here be the patch: gist.github.com/1065930
pmichaud I'd prefer something with fewer variables. :-| 21:06
lue At least I didn't add more :) 21:07
masak lue: sub chomp { self.subst(/\n$/, '') } 21:09
pmichaud definitely don't do it with a regex
chomp gets used on IO.lines and needs to be fast
masak aww :) 21:10
but it had no variables! :P
pmichaud (that's why it's in PIR in master)
masak lue: you can probably safely replace $rn_idx with *-2, etc. 21:11
pmichaud we don't have whatever closures yet, either.
lue I didn't realize it, but why not get change substr for chop?
pmichaud (in .substr) 21:12
masak lue: because chop removes any character, not just newlines
pmichaud but still, whatever closures is heading towards slower instead of faster
also, I wonder if chomp should chomp a trailing \r, too, and not just \r \n 21:14
I think some macs use \r as a newline 21:15
diakopter yeah
lue I was wondering that too. IIRC, Pre-OSX macs use \r
pmichaud and we should have tests for all of these cases :) 21:17
masak FYI, making a text adventure game in Perl 6 is *fun*! 21:18
lue pmichaud: [looking at S32-Str/chomp.t] would those tests need to test everything that is already tested for \n ? [or just a simple does it chomp for now] 21:20
21:21 y3llow_ joined 21:22 pothos_ joined 21:23 y3llow left, y3llow_ is now known as y3llow 21:24 pothos left, pothos_ is now known as pothos, drbean joined 21:25 bluescreen100 joined
lue
.oO(Actually, if we really wanted to be thorough, we'd test \n\r too.)
21:26
21:26 bluescreen10 left, bluescreen100 left
masak lue: want to test-drive my text adventure game? 21:27
pmichaud we should test \n, \r, and \r\n
I don't think there are any systems that have \n\r
and we should test strings that are 0, 1, and 2 chars long
afk for a while 21:28
diakopter and ones that are mixed line enndings
pmichaud ...mixed line endings?
masak pmichaud: Classic Mac OS has \n\r
diakopter just \r
masak oh, ok. 21:29
diakopter LF+CR: Acorn BBC spooled text output
sez wikipedia; lol
lue masak: yes. Just tell me if it runs on nom or master [I would guess master]
masak master.
21:29 simcop2387 left
masak lue: github.com/masak/crypt/blob/5675bb...1/crypt.pl 21:30
just the rooms so far. that's how far I got today ;) 21:31
I have an approximate idea for what to fill the rooms with (items, puzzles...)
21:34 simcop2387 joined 21:36 fhelmberger_ left 21:37 wamba joined
masak also, roles are perfect for text adventure games :) 21:39
Pullable, Drinkable, LightSource, Openable...
Readable, Container, Takeable... 21:40
21:42 am0c left
jlaire hmm, roles seem very similar to Scala's traits 21:45
masak I'd guess they are. 21:46
they're called 'traits' in Smalltalk, too.
21:46 Patterner left 21:48 Psyche^ joined, Psyche^ is now known as Patterner 21:59 am0c joined
lue hm. I'm having trouble pushing to the roast repo. 22:13
22:15 everbrew left
masak lue: what kind of trouble? 22:18
lue connection timed out 22:19
I thought it was a problem here at home but it doesn't seem like it.
masak does it say why?
I can push to github without a problem.
22:20 Zapelius joined 22:21 sivoais joined
masak lue: did you have a chance to try the game? :) 22:22
blog post! strangelyconsistent.org/blog/june-28-2011-roles 22:24
jlaire masak: "WHereas" <-- s/H/h/ 22:25
lue masak: I will, I just need to switch over to master. 22:27
the push command is 'git push origin master', right?
jlaire masak: "hearts content" --> "heart's content"
lue: right
masak jlaire: thanks, thanks. fixing, fixing. :) 22:28
jlaire masak: yay, this time I was FIRST!11!! 22:29
lue Hm, I think it's a problem with the remote server I use :/ [will push tests and recompile master later]
jlaire "option 3 is the right answer" <- I'm not disagreeing, but Scala explicitly goes with option 2 22:30
22:30 impious left
masak jlaire: aw, that's a shame. 22:31
jlaire the Perl 6 way feels saner
much saner
masak jlaire: the conflict flagging is one of the really nice things about roles.
jlaire oops, it was "our hearts content", so --> "our hearts' content" (right? not a native speaker) 22:33
22:34 am0c left
masak guess it could be argued both ways... 22:35
jlaire masak: these blog posts are really nice, they vaguely remind me of "Learn You a Haskell" 22:36
lue I think "our heart's content" is correct (because I've never heard someone say "our hearts' content")
jlaire is there one heart or more
thou hearts'
jlaire google agrees with hearts' 22:37
(the first few results anyway)
masak oki
thanks', guys'
22:38 beekor left 22:39 smallfoot- joined
lue The best thing I've gotten out of your posts so far is learning what map and grep do. 22:39
smallfoot- you guys heard Duke Nukem Forever got released?
so when is Perl 6 getting released? 22:40
22:40 lichtkind joined
masak smallfoot-: every month since 2008. 22:40
smallfoot- oh 22:41
when is stable release? 22:42
lichtkind about this duke thing I wanted post a motnh ago
dalek ast: 48e879e | lue++ | S32-str/chomp.t:
Added tests to S32-str/chomp.t for other newline styles (\r, \r\n), as well as for strings with less than 2 characters.
smallfoot- people say perl is ugly, is that so?
masak smallfoot-: Rakudo Star was a milestone towards stable releases, and we'll soon start a new series that's even more stable.
jlaire smallfoot-: some of those same people say that Perl 6 is beautiful 22:43
masak smallfoot-: I've seen some really beautiful Perl and some really ugly Perl. it's just a substrate.
smallfoot- masak, alright, but when is the really stable release coming, you know like the gold release, like 6.0, not beta, not release candidate
jlaire, Perl 6 is more beautiful / less ugly, than Perl 5?
masak smallfoot-: I wish I could give you a date. we're working really hard, and we're really expectant, but there's a lot to do.
jlaire smallfoot-: yes
smallfoot- jlaire, cool 22:44
masak, alright
masak smallfoot-: right now we're not in a place where we can predict the 6.0.0 release.
but that doesn't mean that we're idle. far from it.
thou we're cranking
smallfoot- i used to code some in Perl, like a decade ago... but is Perl relevant these days with Python and Ruby? 22:45
lue masak: the text adventure is good so far. I can't help but notice the room description comes up only once (known as BRIEF mode in Infocom games)
thou n 22:46
l
x smallfoot
put smallfoot in mouth
get smallfoot
put smallfoot in mouth
TimToady What, with your bare hands?!? 22:47
thou smallfoot-: yes, the perl5 community is still very active, too, and there's tons of modules on cpan, etc. it's still a very relevant and great environment for getting things done
22:48 mtk left
sjohnson smallfoot-: uhh... in probably all our opinions, perl is our preferred choice over those other two languages you mentioned 22:48
despite it being 2011!
22:48 dorlamm joined
masak lue: glad you like it :) 22:48
22:49 cooper left
tadzik smallfoot-: there've been cases of Perl people leaving to Ruby and then coming back to Perl seeing its evolution 22:49
22:49 cooper joined
masak lue: yes, I'm trying to emulate Infocom games a bit. 22:49
22:50 PerlJam left, PerlJam joined
masak smallfoot-: keeping just to Perl 5, there's no other language out there with that kind of module repository. it's very large and very active. 22:50
lue I'd recommend printing the room name. For a second I thought I entered an under-developed part of the game :)
22:50 envi left
masak lue: yes, I realized that too. thanks for the reminder. 22:51
I'll push that change, then go to bed.
lue: I also need to fix the "duplicate exits" problem somehow.
smallfoot- masak, so Perl is good because large number of modules? thats same reason people argue that Fortran is good, no other language has as much math/algorithm modules 22:52
masak smallfoot-: :) 22:53
smallfoot-: yes, that's one of the reasons Perl is good.
lue "duplicate exits", as in both out and south point to the same place?
masak lue: right.
smallfoot-: it's also good because it's a very malleably medium. it's easy to translate ideas about a program to a program. people around here call it Perl's "whipuptitude". 22:54
jlaire smallfoot-: is PHP relevant these days with Python and Ruby?
masak urgh, I wouldn't defend Perl by comparing it to PHP :P
22:55 huf left
smallfoot- jlaire, yeah, but its been losing some ground to Python and Ruby 22:55
jlaire surely Perl is better, but my point is that _even PHP_ is still relevant :)
lichtkind smallfoot-: perl is relevant because you get things done faster
jlaire there's definitely more public hype around python and ruby
smallfoot- y
ya
Khisanth masak: meh that cuts both ways
lichtkind smallfoot-: with more modules we mean modules that are not existing in python or ruby 22:56
Khisanth some people take it to mean it's fine write things in the messiest way possible because 'it works'
masak Khisanth: yes, I'm aware of that. 22:57
lichtkind smallfoot-: plus the whole cpan inrastructure is far beyond anything you will find in ruby or python
masak Khisanth: and not shunning those people is part of being open-minded towards "baby Perl", I guess.
Khisanth: it's OK to start out simple and unstructured.
lichtkind thou: <sob> you left me again
masak lue: pushed 22:58
'night, #perl6
22:58 masak left
lichtkind gnight masak 22:58
lue Python's good, as long as you don't need pointers (binding in Perl6) or switch statements... 22:59
Khisanth those are not the people I am referring to ...
thou lichtkind: i know, i've not had much slack time of late :-/
22:59 huf joined
thou lichtkind: but i'm getting bits of progress on november-wiki 22:59
lichtkind thou: what you mean by that
november is dead methinks
thou zombie november 23:00
november wants braaaaiiiiinsssss
lichtkind your perl 5 version?
thou no, perl6
lichtkind great 23:01
23:01 cdarroch left, aindilis joined
lichtkind thou: dont worry it gets better www.youtube.com/watch?v=VeEunG9M2s0...ature=fvst 23:01
thou tadzik: do you have any tricks for understanding what panda is doing? i can't find a verbose mode. i have an issue where 'panda install Digest::MD5' fails the 2nd test, but if i check it out from git and run 'PERL6LIB=$PWD/lib prove -eperl6 -r t' it works just fine, but i can't tell why the panda one fails 23:02
lichtkind smallfoot-: got enough answers? 23:05
23:08 cooper left 23:09 cooper joined 23:12 stepnem left 23:14 stepnem joined
tadzik thou: well, the tests indeed fail for me 23:16
23:16 dorlamm left
tadzik I think panda even has an option of being verbose, it's just the getopt which is broken 23:17
or maybe not
that needs fixing 23:18
thou: looks like compiling the module to pir breaks tests somehow 23:20
panda compiles the modules first, hence the tests break. If you install ufo and run ufo && make test inside the cloned dir, you'll see the tests fail too 23:22
23:29 orafu left, orafu joined 23:39 wamba left
thou tadzik: thanks, i'll try to look into that 23:51
or i'll just ignore it for now, maybe ....
tadzik: i had a problem that when i added "say 'debugging stuff'" in various places around Panda/*.pm, etc., it didn't show up on the terminal for some reason. i didn't spend much time on it though 23:52
23:56 molaf_ joined 23:59 molaf left