»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:01 drbean left 00:08 drbean joined 00:10 packetknife joined 00:19 molaf_ joined 00:31 Guest25315 joined 00:45 wolfman2000 joined 00:58 lichtkind joined 01:14 tokuhirom joined 01:21 tokuhirom left, tokuhirom joined 01:25 drbean left 01:26 tokuhirom left 01:32 drbean joined, shinobicl_ joined 01:33 hypolin joined 01:34 donri joined 01:40 lichtkind left
thou nom: role Base { has @.xyz = 1; }; role A does Base { }; role B does Base { }; class Example does A does B { } 01:59
p6eval nom eb6c4b: OUTPUT«===SORRY!===␤Attribute '@!xyz' conflicts in role composition␤»
thou nom: role Base { method foo() { say "foo" } }; role A does Base { }; role B does Base { }; class Example does A does B { }
p6eval nom eb6c4b: OUTPUT«===SORRY!===␤Method 'foo' must be resolved by class Example because it exists in multiple roles (B, A)␤»
thou ^ are these correct results? known bugs? something I should file bug reports for? 02:00
i expect them both to work, and just accept the (single) definition in the Base role 02:01
02:06 thou joined
sorear thou: I think that diamond composition is known-broken, but I'm not positive 02:12
02:12 donri left
thou thanks 02:12
sorear phenny: tell jnthn irclog.perlgeek.de/perl6/2011-12-27#i_4883396 I'd like a second opinion
phenny sorear: I'll pass that on when jnthn is around.
colomon I've been poking around in the spec tests, I haven't found any test vaguely resembling that yet. :( 02:13
sorear o/ colomon 02:14
how are you today?
colomon \o
a little bit under the weather, a little bit worn out from yesterday. :)
are you recovered yet?
sorear yes 02:15
colomon glad to hear it.
ooo, and I see there was a release! sorear++
sorear whatever that was, it was freakishly short. anyone who didn't know better could assume I was making excuses to avoid attending the Christmas eve party I was supposed to be at 02:16
thanks 02:17
colomon we had that sort of thing run through the whole extended family at Christmas back in 1985 or so. 20 cases of 24 hour flu with the first cases starting right at time to go to the Christmas Eve church service. (literally our car left went to church without knowing anything was wrong, and the cars that were supposed to follow us never left because of the sudden vomiting.) 02:19
sorear My first attempt to parse that sentence involved catestrophic brake failure and your car leaving your hourse without you. 02:21
house
but this wasn't even 24 hour flu. more like 12AM-10PM flu. 02:22
02:28 molaf_ left 02:31 aindilis joined
colomon ah, yeah. no, we sat in church wondering what the heck happened to everyone else. 02:31
like we were the Golgafrinch's B Ark 02:33
nom: say "a" cmp Inf 02:35
p6eval nom eb6c4b: OUTPUT«-1␤»
colomon niecza: say "a" cmp Inf
p6eval niecza v13: OUTPUT«-5␤»
colomon -5?
:)
sorear I'm not entirely usre myself... 02:36
however, cmp in niecza is very, very bogus
niecza: say "a" leg "f"
p6eval niecza v13: OUTPUT«-5␤»
sorear the classic way to implement strcmp involves a return *a - *b once *a != *b 02:37
which niecza seems to be doing, at some level
but how did Inf become something starting with f?
sorear goes source-digging 02:38
niecza: say Str leg Num 02:39
p6eval niecza v13: OUTPUT«-5␤»
sorear niecza: say ~Num
p6eval niecza v13: OUTPUT«Num()␤»
sorear niecza: say ~Str
p6eval niecza v13: OUTPUT«Str()␤»
sorear niecza: say "S" leg "N"
p6eval niecza v13: OUTPUT«5␤»
sorear isn't totally sure how this is working 02:40
02:42 replore_ joined
colomon wait, that's the code I was looking at last week 02:46
it does Str leg Num because they are different types, right?
shinobicl_ just asking... is there another rakudo star in development? 02:47
colomon shinobicl_: yes 02:48
sorear: ERROR: cannot verify github.com’s certificate -- that's what I get from make in Niecza?!
sorear colomon: yes, but I can't figure out why the result comes out negative.
colomon shinobicl_: as soon as the current development Rakudo has its act together fully, a Rakudo Star will be cut from it. 02:49
sorear: oh, Str leg Num, you mean?
dalek ecza: bfba5a3 | sorear++ | Makefile:
Revert "github.com has a valid SSL certificate now"

Ah, optimism.
This reverts commit 66cefa779d65646bca9f8fc7effbc46d08c6bdde.
sorear colomon: yes
colomon sorear++ for the quick patch! 02:50
02:53 drbean left 03:00 drbean joined
colomon btw, I like the looks of your niecza plans (re the release announcement), but I have to say that #3 and #4 seem drastically more important for my purposes. ;) 03:11
sorear ...I forgot to update those from last month. 03:14
03:19 shinobicl_ left
colomon I wondered what the heck you had left to do for regexes! :) 03:19
'night! 03:23
sorear bye 03:26
03:33 thou left 03:42 Psyche^ joined, Psyche^ is now known as Patterner 03:54 drbean left 04:01 drbean joined 04:08 drbean left 04:09 drbean joined 04:41 packetknife left, packetknife joined
djanatyn claims a new task! 05:26
I should have time, since it's winter vacation :P
sorear task?
05:29 kaare_ joined
djanatyn For Google Code-In. 05:29
I picked a bugfix task.
Or, writing a test for a bugfix. 05:30
05:32 benabik joined
sorear is that still going on? 05:33
05:34 kaleem joined 05:41 hundskatt joined 05:47 drbean left 05:53 drbean joined 06:04 thou joined 06:12 koban joined 06:20 GlitchMr joined 06:26 packetknife left 06:35 snearch joined 06:43 packetknife joined 06:44 molaf joined
moritz djanatyn: I've now assigned the task to you, have fun! 06:45
sorear o/ moritz 06:46
moritz \o sorear 06:54
sorear++ # v13
07:00 am0c joined, drbean left 07:07 drbean joined 07:21 alvis joined 07:24 replore_ left 07:25 mkramer joined 07:48 koban left 07:49 snearch left, snearch joined 07:50 snearch left 08:10 packetknife left, packetknife joined
masak morning, #perl6 08:24
sorear++ # v13
got an email. "Here’s my first pass solution at the first 3 problems on your list." o.O 08:30
oh noes, another moritz :P
08:30 sayu joined
masak but... he's already ceded the prize. odd. 08:32
kshannon With the colonpair you can easily create unamed pairs (e.g. :(5) :<foo> :{ my $bar = 1; } ), is there a way to write a signature to capture such an "unnamed" named argument? 08:37
08:37 arlinius left
masak perl6: say (:(5)).^name 08:38
p6eval niecza v13-1-gbfba5a3: OUTPUT«Unhandled exception: Unable to resolve method ast in class Any␤ at /home/p6eval/niecza/src/NieczaActions.pm6 line 2122 (NieczaActions.parameter @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 2931 (P6.parameter @ 234) ␤ at /home/p6eval/niecza/src/STD.pm6 …
..rakudo eb6c4b: OUTPUT«Signature␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected ")).^"␤ expecting signature or ")"␤ at /tmp/w23uZtGg5C line 1, column 9␤»
08:38 arlinius joined
masak :(5) is not an unnamed pair, it's a siggie. 08:38
kshannon Oops, Good point :) 08:39
masak nom: say (:<foo>).^name
p6eval nom eb6c4b: OUTPUT«Str␤»
masak nom: say (:{ my $bar = 1 }).^name
p6eval nom eb6c4b: OUTPUT«Block␤» 08:40
masak none of these are pairs.
kshannon OK, now I'm really confused. I'm working on RT#53804. 08:41
08:41 packetknife left
moritz kshannon++ # rakudo pull requests 08:44
kshannon Bingo, found the bit in the spec talking about adverbial blocks....
If anyone has a simple rakudobug they's like me to look at let me know, otherwise I'm just going to start from the top of the RT query and skip anything which looks like it could take a couple of days or more. 08:46
masak kshannon: how about the latest one? rt.perl.org/rt3/Ticket/Display.html?id=107022 08:47
since it's a library thing, it's almost guaranteed to have a Perl 6 solution. 08:48
08:49 drbean left
moritz nom: say set 1, 2, 3 08:49
p6eval nom eb6c4b: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&set' called (line 1)␤»
masak sometimes wishes for a NOT_FIRST phaser
moritz that bug report seems to be about the 2011.07 release 08:50
because nom doesn't have sets yet
08:56 drbean joined
kshannon perl6: my @array = 1, 2, 3; say @array.min:{ $^b <=> $^a } 08:57
p6eval rakudo eb6c4b: OUTPUT«Method 'min:{ $^b <=> $^a }' not found for invocant of class 'Array'␤ in block <anon> at /tmp/ySWtGEoeOY:1␤ in <anon> at /tmp/ySWtGEoeOY:1␤»
..pugs b927740, niecza v13-1-gbfba5a3: OUTPUT«3␤»
kshannon I've got a patch to fix rakudo's parsing for that, but it still gets the wrong answer :( 08:58
./perl6 -e 'my @array = 1, 2, 3; say @array.min:{ $^b <=> $^a }'
Inf
perl6: my @array = 1, 2, 3; say @array.min: { $^b <=> $^a } 08:59
p6eval pugs b927740, niecza v13-1-gbfba5a3: OUTPUT«3␤»
..rakudo eb6c4b: OUTPUT«Inf␤»
masak huh. 09:00
it would get Inf, I guess, if it had *no* way of comparing elements.
rakudo: my @array = 1, 2, 3; say @array.min 09:01
p6eval rakudo eb6c4b: OUTPUT«1␤»
masak rakudo: my @array = 1, 2, 3; say @array.min({ -1 })
p6eval rakudo eb6c4b: OUTPUT«Inf␤»
masak rakudo: my @array = 1, 2, 3; say @array.min({ 1 })
p6eval rakudo eb6c4b: OUTPUT«Inf␤»
masak rakudo: my @array = 1, 2, 3; say @array.min({})
p6eval rakudo eb6c4b: OUTPUT«Method 'arity' not found for invocant of class 'Hash'␤ in method min at src/gen/CORE.setting:1058␤ in block <anon> at /tmp/tKQETi7Aae:1␤ in <anon> at /tmp/tKQETi7Aae:1␤»
masak rakudo: my @array = 1, 2, 3; say @array.min({;})
p6eval rakudo eb6c4b: OUTPUT«use of uninitialized value of type Nil in numeric context␤use of uninitialized value of type Nil in numeric context␤use of uninitialized value of type Nil in numeric context␤use of uninitialized value of type Nil in numeric context␤use of uninitialized value of typ…
masak rakudo: my @array = 1, 2, 3; say @array.min({42}) 09:02
p6eval rakudo eb6c4b: OUTPUT«Inf␤»
masak rakudo: my @array = 1, 2, 3; say @array.min({ <-1 0 1>.pick.Int })
p6eval rakudo eb6c4b: OUTPUT«2␤»
masak :D
09:04 Mowah joined
kshannon It's because I was using a comparison sub with swapped arguments (i.e. actually looking for max) 09:05
It starts with Inf, and then iterates looking for a smaller element... 09:06
perl6: my @array = 5, 6, 7, 1, 2, 3; say @array.min: { $^a <=> $^b } 09:07
p6eval pugs b927740, rakudo eb6c4b, niecza v13-1-gbfba5a3: OUTPUT«1␤»
kshannon perl6: my @array = 5, 6, 7, 1, 2, 3; say @array.min: { $^b <=> $^a } 09:08
p6eval niecza v13-1-gbfba5a3: OUTPUT«Rebuild in progress␤»
..pugs b927740: OUTPUT«7␤»
..rakudo eb6c4b: OUTPUT«Inf␤»
moritz it's just wrong to ues Inf in .min
masak aye. 09:09
kshannon perl6: my @array = (); say @array.min: { $^a <=> $^b }
p6eval niecza v13-1-gbfba5a3: OUTPUT«Any()␤»
..rakudo eb6c4b: OUTPUT«Inf␤»
..pugs b927740: OUTPUT«␤»
masak we've already proven that that doesn't work.
moritz the right way it is to 1) return the element if the list has just one item and 2) otherwise only compare items within the list
masak Inf is not sufficiently out-of-band for .min
kshannon especially if you want to do string min
moritz nor is it sufficiently safe to pass to custom compare blocks
or any other min
like
([1, 2], [-2, 5], [5, -5).min: { $^a[1] <=> $^b[1]} 09:10
09:10 sayu left
masak right. 09:12
kshannon Do you think Any() is an appropriate answer for ().min
masak no, Inf is an appropriate *answer*.
not just appropriate to use inside the algorithm. 09:13
kshannon: the spec seems to be of the opinion that Inf can be used with Str. like "a"..Inf
kshannon Hmmm, OK. 09:14
masak Inf, like Failure, is a bit type-schizophrenic. 09:15
moritz hm 09:19
nom: say [min] ()
p6eval nom eb6c4b: OUTPUT«Inf␤»
09:25 hypolin left 09:27 thou left 09:32 daxim joined 09:33 snarkyboojum joined 09:36 Trashlord joined
colomon woah, I really think Inf is *not* an appropriate answer for ().min 09:42
moritz so, what should it be? a Failure? Nil? 09:44
colomon My first inclination is Failure 09:45
my second inclination is to go back to bed. ;) 09:47
kshannon Yeah, I'm not sure I agree with the idea: "All orderable object types must support C<+Inf> and C<-Inf> values as special forms of the undefined value." 09:48
moritz a tempting response
(going to bed, that is)
kshannon And if that is going to be the case then I don't think this is right: 09:51
nom: say Inf.^name
p6eval nom eb6c4b: OUTPUT«Num␤»
masak they're not "special forms of the undefined value" so much as "sentinel" values that always "win" a given comparison.
kshannon: now that I agree with.
kshannon: Inf and -Inf should probably both be of the type Inf :) or something 09:52
and then maybe Inf ~~ <any comparable type>
09:56 REPLeffect joined 10:07 daxim left 10:12 daxim joined
masak tadzik++ # gist.github.com/1522280 10:15
kshannon While we're on the subject of min/max, I'm not sure that Range should be accepting a comparator (RT#105118 and tests 9, 10, 15, and 21 in t/spec/S32-list/minmax.t) 10:20
If it does, then what does it do with excluded endpoints? 10:21
masak kshannon: Range is mostly a "continuum" these days, but the exception is when it's used as a list; then it collapses into discrete values. .min and friends are such an exception. 10:24
re what it does with excluded endpoints: it excludes them. :) 10:25
kshannon perl6: say (3 ^.. 5).min;
p6eval pugs b927740: OUTPUT«4␤»
..rakudo eb6c4b, niecza v13-1-gbfba5a3: OUTPUT«3␤»
kshannon So only pugs is right? 10:26
masak I... I think so. 10:27
kshannon perl6: say (3 ^.. 5).excludes_min;
p6eval rakudo eb6c4b, niecza v13-1-gbfba5a3: OUTPUT«Bool::True␤»
..pugs b927740: OUTPUT«*** No such method in class Array: "&excludes_min"␤ at /tmp/uCIRWSoSRX line 1, column 5-27␤»
moritz I think that niecza and rakudo conform to the spec, weird as it is 10:28
kshannon Yeah, just found the bit in the spec which has excludes_min 10:30
But that means .min (with no comparator) has to return an excluded min. 10:31
masak I don't like that. 10:32
kshannon I think I'm going to put an e-mail together for p6lang
masak please do.
moritz the problem is that Range.min returns either a minimum or an infimum, depending on .excludes_min 10:33
kshannon Ahh! .min with comparator is in S32-setting-library/Containers. Range is NOT a Container. 10:35
masak no, it's not. 10:36
kshannon our multi method min( @values: *&by ) 10:38
So it's part of role Positional {...}
We just put it in Any at the moment
10:39 rgrau joined
masak there are now 14 contestants in this year's p6cc. 10:46
daxim already?
masak yes, people are quick to sign up this year. 10:47
didn't have half as many by this time last year.
daxim I don't want to participate in earnest, then
masak why not?
if last year is any guide, 75% of the signups will sign up and never be heard from again ;)
daxim it's an enormous time sink without a p6 port of Algorithm::Combinatorics 10:48
masak hm, that reason seems completely unrelated to the speedy signup of contestants.
but fair enough -- you feel the lack of modules. so do I. :/
daxim I had a look yesterday, not so easily ported. the important part is XS, which is impenetrable for me 10:49
the module documentation links to a math paper at the end that contains the pseudo-code
masak would be cool if someone did a port of it using Zavolaj. 10:51
moritz daxim: instead of bemoaning the lack of libraries, you could also be happy about the option to solve problems yourself :-) 10:56
11:00 fsergot joined
fsergot hi o/ 11:00
moritz I often read about people complaining that programming has degenerated to stringing together many libraries, and no more "real programming" done 11:01
whatever you can say about Perl 6, that is not one of its problems :-)
\o fsergot
11:03 kaare_ left, kaare_ joined 11:09 kaare_ left
masak hi fsergot 11:11
fsergot How are You today? :) 11:13
11:23 kaare_ joined 11:26 kaare_ left 11:27 kaare_ joined 11:28 kaare_ left 11:29 kaare_ joined, kaare_ left 11:30 kaare_ joined, kaare_ left
tadzik 'morning 11:31
fsergot o/ tadzik 11:35
11:47 Trashlord left, hundskatt_ joined 11:48 hundskatt left, hundskatt_ is now known as hundskatt, daxim left 11:54 Patterner left, Psyche^ joined, Psyche^ is now known as Patterner
masak tadzik! \o/ 11:56
11:57 mj41 joined
tadzik \o/ 11:57
masak fsergot: I'm fine today, thank you. the events so far in p6cc make me happy :)
fsergot: how're you?
11:58 Trashlord joined
fsergot Hmm, fine. I'll "start" again with p6 :) 11:58
11:58 Trashlord is now known as Guest74250
fsergot I hadn't enough time. 11:58
tadzik play with Bailador!
(and hopefully catch some segfaults and GC bugs)
fsergot tadzik, i just saw Your project. It's awesome. :) 11:59
11:59 Guest74250 is now known as Trashlord, Trashlord left, Trashlord joined
tadzik :) I'm glad 12:00
I think it's time to implement some full-blown Bailador::Response today
fsergot Great. :) 12:01
Why "Bailador"? :) 12:02
masak hm. some of the functions in Algorithm::Combinations don't need a library in Perl 6. for example &variations is simply .pick, and &variations_with_repetition is simply .roll
fsergot From spanish?
tadzik it's "Dancer" in Spanish and I wrote the first version of it on a piece of paper during my Spanish classes 12:03
yes
masak: I think every observation like this is a material for a blog post "Yet another module we don't need anymore"
fsergot :)
tadzik (and it worked!)
masak tadzik: well, to be fair, we still don't have a primitive for permutations ;) 12:04
and I *always* have to reinvent them with some almost-but-not-quite-trivial recursive sub or other. grrr! 12:05
same with combinations. 12:06
12:21 GlitchMr42 joined, GlitchMr left, GlitchMr42 is now known as GlitchMr 12:31 tokuhirom joined 12:32 fridim_ joined
kshannon A bit of gather and take magic and I've translated the first couple of subs in Algorithm::Combinations... 12:36
nom: my Int @a = 1, 2, 3; 12:39
p6eval nom eb6c4b: ( no output )
kshannon nom: my int @a = 1, 2, 3;
p6eval nom eb6c4b: OUTPUT«Method 'STORE' not found for invocant of class 'Integer'␤ in block <anon> at /tmp/nwdVcKFz4a:1␤ in <anon> at /tmp/nwdVcKFz4a:1␤»
tadzik oh, speaking of bugs
masak kshannon: I haven't seen that one before. 12:40
tadzik nom: my @a = 1, 2, 3; @a.map: { $_ = $_ + 1; $_ - 1 }
12:40 mishin joined
p6eval nom eb6c4b: ( no output ) 12:40
tadzik hmm
masak submits rakudobug
(the int one)
12:40 kaare_ joined
masak nom: my @a = 1, 2, 3; @a.map: { $_ = $_ + 1; $_ - 1 }; say @a.perl 12:40
p6eval nom eb6c4b: OUTPUT«Array.new(1, 2, 3)␤»
masak niecza: my @a = 1, 2, 3; @a.map: { $_ = $_ + 1; $_ - 1 }; say @a.perl 12:41
p6eval niecza v13-1-gbfba5a3: OUTPUT«[2, 3, 4].list␤»
masak Niecza++
masak submits rakudobug
pugs: my @a = 1, 2, 3; @a.map: { $_ = $_ + 1; $_ - 1 }; say @a.perl
p6eval pugs b927740: OUTPUT«*** Can't modify constant item: VInt 1␤ at /tmp/rLuvFvdW0Q line 1, column 28-39␤»
masak wuss :P
I *assume* $_ is rw by default. 12:42
tadzik nom: my @a = "foo=bar"; @a.map: { $_ = $_.split('='); $_[0] => $_[1] }
p6eval nom eb6c4b: ( no output )
tadzik -_-
nom: my @a = "foo=bar"; @a.=map: { $_ = $_.split('='); $_[0] => $_[1] }
p6eval nom eb6c4b: ( no output )
tadzik ok, whatever
masak tadzik: you're not printing anything.
tadzik masak: shouldn't matter
masak please elaborate. 12:43
tadzik I got "cannot assign to non-container" with something of this sort while hacking on Bailador recently
masak and were you happy about that? or sad?
tadzik sad, quite
masak good, now we're getting somewhere.
masak is peeved by people who don't state their expectations in a bug report :) 12:44
tadzik I'll try to re /* :P */ produce it
12:47 kaare_ left
masak oh, I see. you were trying to reproduce the bug above, and nonplussed when you couldn't. yes, that explains why you left out vital information. 12:47
tadzik yeah
and I can't seem to reproduce it today
masak as much as possible, I try to reproduce things locally *before* going live with them on channel :) 12:48
if not, you'd see me making a fool of myself almost daily :P
tadzik gah, it still works
masak "a-haaa, a bug!" (five minutes later) "OK, I suck."
tadzik ok, whatever 12:49
12:49 GlitchMr42 joined, GlitchMr left, GlitchMr42 is now known as GlitchMr
masak but I do recognize the feeling. some of the hardest-to-track-down bugs have had to do with lexical lookup and scope reentrancy. 12:52
that's the kind of thing that really makes one respect working lexicals. :)
12:56 kaare_ joined 12:59 bluescreen10 joined, kaleem left 13:01 fridim_ left 13:15 lateau_ joined 13:16 GlitchMr42 joined, GlitchMr left, lateau_ left, lateau_ joined 13:17 GlitchMr42 is now known as GlitchMr, Trashlord left
kshannon nom: sub foo (Array of int @f) { ... }; my Array of int @a = 1, 2, 3; 13:33
p6eval nom eb6c4b: ( no output )
kshannon nom: sub foo (Array of int @f) { ... }; my Array of int @a = 1, 2, 3; foo(@a);
p6eval nom eb6c4b: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'foo' will never work with argument types (Positional) (line 1)␤ Expected: :(Positional @f)␤»
kshannon :( 13:34
13:35 Trashlord joined
masak kshannon: you probably don't mean 'Array of int', but just 'int' in both places. 13:36
kshannon: the '@' in '@f' already implies 'Array'.
13:36 mkramer left
tadzik how to compile a string to a regex? 13:42
masak nom: my $regex_string = "f o*"; my $regex = / <$regex_string> /; say "fooo" ~~ $regex; say "bar" ~~ $regex 13:47
p6eval nom eb6c4b: OUTPUT«=> <fooo>␤␤#<failed match>␤»
tadzik it will match its insides literally, I think 13:48
just as regex { foo foo } does
masak please read the above eval carefully.
kshannon masak: Yeah, but nom doesn't pay attention to that for natives...
tadzik oh 13:49
masak kshannon: just pointing out that the declaration probably isn't what you want.
tadzik masak++, thanks, didn't notice that
masak tadzik: :)
13:50 tokuhirom left, arlinius left, tokuhirom joined
tadzik nom: my @a = 1, 2, 3; @a.map: { return $_ + 1 } 13:54
p6eval nom eb6c4b: ( no output )
tadzik hrm
dies with Can not get non-existent attribute '$!storage' on class 'Parcel' locally
nom: my @a = 1, 2, 3; @a.map: { return $_ + 1 }; say 'alive'
p6eval nom eb6c4b: OUTPUT«alive␤»
tadzik wierd
masak guess you have a busted build.
are you on eb6c4b too? 13:55
13:55 tokuhirom left
tadzik seems to be RELEASE_3_11_0-2-g80e365d 13:55
update time, aye
13:55 sftp joined
tadzik but the following commits change only lib/Test.pm 13:56
may be the REPL issue
masak you're *using* the REPL!? 13:57
masak is just as surprised every time 13:58
nom: my @a = 1, 2, 3; say (@a.map: { return $_ + 1 }).perl
p6eval nom eb6c4b: OUTPUT«Can not get non-existent attribute '$!storage' on class 'Parcel'␤ in method reify at src/gen/CORE.setting:4257␤ in method gimme at src/gen/CORE.setting:4621␤ in method perl at src/gen/CORE.setting:4826␤ in block <anon> at /tmp/p5FwSgR5UN:1␤ in <anon> at /tmp/p5Fw…
masak tadzik: keep in mind that the REPL outputs things in the above way.
unless you output something yourself in the last statement, that is. 13:59
tadzik aye 14:02
14:03 [particle] joined, [particle] left 14:06 donri joined 14:07 kaare_ left 14:09 lateau_ left, Trashlord left
masak huh! haven't gotten a "sign me up" email for several hours now! :) 14:10
14:12 kaare_ joined
tadzik yay, got rakudo to segfault reliably! 14:13
gist.github.com/1523773 14:14
14:14 Trashlord joined 14:15 mucker joined
masak yay! 14:16
it's been so long... :)
14:16 arlinius joined
masak how did you do it? 14:16
tadzik Bailador hacking 14:17
no idea where exactly
you can try github.com/tadzik/bailador/tree/placeholders if you're curious 14:18
14:21 tokuhirom joined
masak ok. 14:22
14:23 GlitchMr42 joined, kaleem joined 14:24 Trashlord left 14:25 Trashlord joined, GlitchMr left
masak tadzik: "Started HTTP server." -- but that's with a slightly old nom: 7a1925 from 2011-12-22 14:29
updating and trying again.
tadzik masak: that's fine!
masak: now direct your browser to localhost:3000/hello
masak ah, ok.
masak does that
ack! segphpthpthpt! 14:30
tadzik :)
I'm quite curious where does the actual segfault occur
print-based debugging shows that it's _not_ inside dispatch()
masak happy golfing. 14:31
tadzik ha ha ha
14:32 MayDaniel joined
masak I wasn't being sarcastic. I think this part of debugging is quite fun. 14:32
tadzik :)
I know, I know 14:33
unless it's a GC issue and the bug disappears when you remove code :)
masak aughh 14:34
but you said "reliably", so that's not likely.
GC issues come and go.
tadzik yeah
masak fondly remembers when, in the heyday of November development, adding or removing a *comment* would cause segfaults 14:35
14:35 huf joined
tadzik :) 14:36
14:36 mkramer joined
tadzik that did happen in the days of Pod hackin :P 14:37
haha, got it 14:38
masak \o/ 14:39
fsergot :) 14:49
tadzik perl6: say so any('Foo', 'bar') ~~ Str 14:58
14:58 mkramer left
p6eval pugs b927740: OUTPUT«*** No such subroutine: "&so"␤ at /tmp/xRL4Lm6I5a line 1, column 5 - line 2, column 1␤» 14:58
..rakudo eb6c4b, niecza v13-1-gbfba5a3: OUTPUT«Bool::False␤»
15:00 mkramer joined
tadzik is there anything like '.is_junction' or something? 15:02
nevermind 15:06
okay, I take it back. It is a GC bug 15:07
masak :( 15:08
15:08 GlitchMr42 is now known as GlitchMr
masak we should all switch over to refcounting or something. 15:08
tadzik: $obj ~~ Junction should work, I think.
tadzik it does
I was more curious about what happens when you do my $p = parse_route($x.key) => $x.value;, $x.key being a Junction 15:09
and it Just Works too :)
masak: can you confirm that stuff works when you run it without GC? 15:10
masak if you remind me how to do that :)
15:10 Trashlord left
tadzik parrot -G /path/to/perl6.pbc foo.pl 15:10
masak attempts
confirmed. no segfault. 15:12
it gives a page with "Not found" instead.
tadzik okay. How about with GC and with gist.github.com/1523959
GC segfaulting reliably, who would've guessed 15:13
masak huh. 15:17
segfaults here too. 15:18
tadzik btw, I have some bad feelings about / <$foo> / 15:23
nom: gist.github.com/1523992 15:24
p6eval nom eb6c4b: OUTPUT«Any()␤Match.new(orig => "/hello/bug", from => 7, to => 10, ast => Any, list => ().list, hash => EnumMap.new())␤»
tadzik niecza: gist.github.com/1523992
p6eval niecza v13-1-gbfba5a3: OUTPUT«Any()␤#<match from(7) to(10) text(bug) pos([].list) named({}.hash)>␤»
tadzik huh, same reaction
can you take a look?
15:25 GlitchMr42 joined 15:26 rgrau left 15:28 GlitchMr left
[Coke] sorear: to run autounfudge, copy it over from rakudo, first. 15:32
phenny [Coke]: 26 Dec 22:31Z <sorear> tell [Coke] What do I need to do to run autounfudge against niecza?
[Coke] (then open it up and s/rakudo/niecza/)
it then expects tools/perl6-limited.pl to exist and run your perl6 programs. (you can either change it or create the .pl file) 15:33
masak tadzik: I didn't look at it closely, but are you sure we correctly implement backslash sequences inside charclasses yet? at some point we didn't. 15:37
oh, it can't be that; sorry. 15:38
oh!
tadzik: backwhack your backslashes in the qq string ;)
nom: my $hello = "'/'hello'/'(<-[\\\\/\\\\.]>+)"; my $reg = / ^ <$hello> $ /; "/hello/bug" ~~ $reg; say $/[0]; 15:39
p6eval nom eb6c4b: OUTPUT«Any()␤»
masak hrmph.
oh, I'm not thinking clearly.
they're already backwhacked. something else is the matter. 15:40
tadzik: could be that captures inside regexes interpolated as strings simply don't capture. 15:41
tadzik: that actually sounds very plausible, and probably even spec, since capture numbering is static in Perl 6 regexes.
and it can't be static if string-interpolated captures count.
hence, they don't. 15:42
tadzik ech 15:44
so I need a different way to turn a string into a regex, probably 15:46
[Coke] phenny: tell sorear your autounfudge question is answered a few lines back from here.
phenny [Coke]: I'll pass that on when sorear is around.
masak tadzik: in the best case, this will work for you: /<capture=$regex>/ 15:47
that gives it a place in the match tree.
tadzik aye. Then I have to distinguish user-defined regexes and generated regexes 15:48
15:48 kaare_ left
tadzik maybe I'll just look at how Dancer does it :) 15:48
masak "Use Perl 5 as a style guide. What could possibly go wrong?" 15:49
15:49 daxim joined
sorear good * #perl6 15:50
phenny sorear: 15:46Z <[Coke]> tell sorear your autounfudge question is answered a few lines back from here.
masak ha ha "10.11: Why can't I perform arithmetic on a void * pointer? -- You're too big and clumsy. When you try to push the numbers together, you lose your balance. Perhaps you should get some angels from the rave over on pin 3." -- www.seebs.net/faqs/c-iaq.html 15:52
sorear: nice to see v13 out. I'll give it a spin tonight.
sorear masak++ # "type-schizophrenic" 15:53
masak sorear: I felt bad about that use of "schizophrenic" afterwards, since I know enough about mental diseases to be able to tell schizophrenia from split-personality disorder. :/
I'd hate to propagate the belief further that they are identical. 15:54
sorear kshannon: 3 ^.. 5, treated as a smartmatcher, includes 3 + 1e-10. For .min to return 4 does not make a whole lot of sense
15:54 Chillance joined
masak sorear: it does if you consider there to be an intermediate listification/discretization step. 15:55
"10.15: Is C an acronym? -- Yes, it stands for ``C''. It's another of those funky recursive acronyms." :D 15:56
sorear [Coke]: thanks 15:57
[Coke] just downloaded the 2010 contest files. wtf.
masak huh? how did you end up doing that? 15:58
sorear niecza: my $hello = "'/'hello'/'(<-[\\\\/\\\\.]>+)"; my $reg = / ^ <hello=$hello> $/; "/hello/bug" ~~ $reg; say $/<hello>[0];
p6eval niecza v13-1-gbfba5a3: OUTPUT«Any()␤»
[Coke] masak: found a link to last year's blog post. 15:59
sorear niecza: my $hello = "'/'hello'/'(<-[\\\\/\\\\.]>+)"; my $reg = / ^ <hello=$hello> $/; "/hello/bug" ~~ $reg; say $/;
p6eval niecza v13-1-gbfba5a3: OUTPUT«#<match from(0) to(10) text(/hello/bug) pos([].list) named({"hello" => #<match from(0) to(10) text(/hello/bug) pos([].list) named({}.hash)>}.hash)>␤»
[Coke] glad I noticed before I wrote any code! ;)
masak [Coke]: ah. heh :)
me too!
sorear niecza: my $hello = "'/'hello'/'(<-[\\\\/\\\\.]>+)"; my $reg = / ^ <hello=$hello> $/; "/hello/bug" ~~ $reg; say $/<hello>;
p6eval niecza v13-1-gbfba5a3: OUTPUT«#<match from(0) to(10) text(/hello/bug) pos([].list) named({}.hash)>␤»
sorear oh 16:00
it's not being recognized as a capturing operator :|
masak submits nieczabug
tadzik++ 16:01
[Coke] masak: nice gmail icon. :) 16:02
tadzik haha
to much testing w/o GC
4 GBs of ram was not enough :P
masak [Coke]: is it the south park drawing? :) 16:03
tadzik that reminds me of a quote from the PHP guy
16:04 Trashlord joined
masak [Coke]: hah, you have one too :P 16:04
16:05 Trashlord left
kshannon "The indirect subrule assertion is not captured. (No assertion with leading punctuation is captured by default.) You may always capture it explicitly, of course:" 16:05
masak aye. 16:06
kshannon It looks like niecza is working to spec.
masak kshannon: no, sorear was capturing it explicitly.
read the thing after the colon :P
[Coke] current round of grants were all not funded. new round opens in a week (TPF standard grants)
kshannon Oh! I see, $<hello>[0] isn't being captured... 16:07
masak right.
16:08 lichtkind joined
masak kshannon: and there's now a github issue for that: github.com/sorear/niecza/issues/95 16:08
kshannon Well I'll leave that to sorear, don't have .net setup to be able to hack on niecza... 16:09
16:09 Yary joined 16:11 cedric joined
cedric hello #perl6! 16:11
tadzik hello cedric!
cedric perl6: say caller.WHAT
p6eval pugs b927740: OUTPUT«Scalar␤»
..rakudo eb6c4b: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&caller' called (line 1)␤»
..niecza v13-1-gbfba5a3: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object␤ at Anon.1.Run.MAIN.C0mainline (Niecza.Frame ) [0x00000] in <filename unknown>:0 ␤ at Niecza.Kernel.RunCore (Niecza.Frame& cur) [0x00000] in <filename…
tadzik b: say caller.WHAT 16:12
p6eval b 1b7dd1: OUTPUT«Could not find sub &caller␤ in main program body at line 22:/tmp/XZd_AnQ949␤»
cedric ? niecza says "CallFrame()" @home
... when running the REPL 16:13
masak hello cedric!
sorear hello cedric!
lichtkind masak: seen i put som 6-8 h work into tablets, mostly index a and mostly around bugs in the wikisyntax but its much nicer to navigate and man more correct desciptions, not so much removed cruft or added new stuff
cedric o/ tadzik masak :)
lichtkind o/
masak lichtkind: \o 16:14
cedric perl6: sub foo { say caller.WHAT }; sub bar { foo() }; bar; 16:16
p6eval niecza v13-1-gbfba5a3: OUTPUT«CallFrame()␤»
..pugs b927740: OUTPUT«Control::Caller␤»
..rakudo eb6c4b: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&caller' called (line 1)␤»
sorear eh heheheh
I see what's going on here
lichtkind masak: but it think it totally screwed the regex of the script which harvested part of the index
cedric sorear, is ^ expected? 16:17
sorear cedric: NRE is not expected
[Coke] sorear: any plans for an installable niecza?
sorear [Coke]: no 16:18
Yary Hi. I'm having trouble building a working Rakudo, using an updated git + after a "make realclean". I see that I am in a "master" branch. Should I be in the "nom" branch?
sorear Yary: yes 16:19
cedric sorear: what does NRE mean? 16:20
Yary ("updated git" = "git pull" )- thanks sorear
16:21 Trashlord joined
masak Yary: the nom branch is the latest-and-greatest Rakudo. you can see a feature comparison between nom and the old branch ("master", but now known as "b") here: perl6.org/compilers/features 16:22
Yary That's a pretty chart 16:23
masak we like pretty charts :) 16:24
...also, that's a pretty good answer when people ask "will I be able to use Perl 6 for X?"
masak decommutes & 16:25
cedric will I be able to use Perl 6 for world domination ? :)
ruoso wonders if there is a better way to connect to the existing irc session from my phone then connectbot+ssh+screen 16:29
16:31 MayDaniel left
sorear cedric: NullReferenceException 16:31
16:33 kaleem left 16:34 thou joined
sorear ...well I thought I understood what was going on. The obvious fix...didn't work 16:35
sorear stops trying 16:38
cedric perl6: say say.WHAT 16:40
p6eval pugs b927740: OUTPUT«␤Bool␤»
..niecza v13-1-gbfba5a3: OUTPUT«===SORRY!===␤␤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/Q4iTHHNb05 line 1:␤------> say say⏏.WHAT␤␤Unhandled exception: Check failed␤␤ at /h…
..rakudo eb6c4b: OUTPUT«␤Bool()␤»
cosimo ruoso: i've heard about irccloud recently, not sure if it's usable from a phone 16:41
cedric it seems I'm not lucky today :(
BTW, how could I call .WHAT on a subroutine (I'm expecting something like "Sub")? 16:42
ruoso cosimo: i'd prefer running the servic myself...
sorear perl6: say &say.WHAT
p6eval pugs b927740: OUTPUT«Sub␤»
..rakudo eb6c4b, niecza v13-1-gbfba5a3: OUTPUT«Sub()␤»
cedric and if I don't know that it is a sub initially? 16:43
16:43 kaleem joined
tadzik what is the problem you're trying to solve? 16:44
nom: my $a = sub { "eek!" }; say $a.WHAT
p6eval nom eb6c4b: OUTPUT«Sub()␤»
tadzik my $a = [sub { "eek!" }, "eek!"].pick; say $a.WHAT;
perl6: my $a = [sub { "eek!" }, "eek!"].pick; say $a.WHAT;
p6eval pugs b927740: OUTPUT«Str␤» 16:45
..niecza v13-1-gbfba5a3: OUTPUT«Str()␤»
..rakudo eb6c4b: OUTPUT«Sub()␤»
tadzik you don't need to know
cedric tadzik: suppose someone says to me to use "foo" and I didn't hear about "foo" at all, I would like to know quickly from the REPL what "foo" is :) 16:48
maybe I can guess from its name, are there objects that are bare words in Perl 6? 16:50
ruoso there are no bare words in Perl 6
there are sigil-less symbols, but they are declared. 16:51
cedric then how to get the full qualified name of a "sigil-less" symbol? 16:52
sorear what do you mean by a full qualified name? 16:53
16:53 mucker left
sorear constant five = 5; # this defines a symbol named simply "five", no more, no less 16:53
ruoso and more importantly, it defines in the current lexical scope... 16:54
cedric by "full qualified name" I mean something like "sub GLOBAL::foo (Int a, Int b --> Bool" 16:56
*Bool) 16:57
tadzik I believe what you're looking for is Documentation
ruoso less things are global in Perl 6...
I think you would need to declare it that way ifthat's what you mean... 16:58
cedric Actually I would like to use the some "meta-features" of Perl 6 to get information about anything. 16:59
sorear rakudo: say &say.signature 17:00
p6eval rakudo eb6c4b: OUTPUT«:(Any)␤»
sorear rakudo: say &say.signature.perl
p6eval rakudo eb6c4b: OUTPUT«:(Any)␤»
ruoso yes, you can get the symbol lexically. you don't need to use it as global....
cedric is dreaming of an IDE that could provide this kind of information (Padre?) 17:02
Thanks for you help!
ruoso well... that is actually fairly possible... 17:03
of course BEGIN blocks would still be executed, but the ide could compile the code an introspect its symbols 17:04
dalek ecza: 88d20b0 | sorear++ | / (2 files):
Allow <foo=$bar> to work (fixes #95)
17:05 GlitchMr42 left
sorear cedric: the creator of Padre has gone on record to say that Perl 6 doesn't have enough static structure to allow making a reasonable IDE 17:06
17:08 mkramer left 17:10 mkramer joined 17:12 achromic joined 17:19 fsergot left
cedric sorear: in the latest release note, you say that the "grapheme mode" is your next priority. Are you talking about Unicode modifier ":graphs"? 17:21
sorear cedric: yes
[Coke] gist.github.com/1476841 - niecza at 83.67%
sorear but I forgot to update that list :|
[Coke] looks like rakudo is backsliding. 17:22
sorear that's my fault. 17:23
cedric sorear: Do you mind if I ask you to think about the :bytes modifier too? :D
17:23 simcop2387 joined
sorear I picked a code point to use as a placeholder that ICU wasn't happy with. 17:23
moritz \o 17:24
sorear o/ moritz
colomon \o
17:24 mishin left
sorear cedric: there's been talk of getting rid of :bytes actually. Modern thinking is that a Str is "just" a list of codepoints/graphemes and doesn't know anything about encoding 17:24
s/Modern/Current/ 17:25
moritz you can always .encode to Buf if you want to match bytes
masak moritz! \o/
sorear flussence! \o/ 17:26
flussence ohai
17:26 mkramer left
sorear flussence: message waiting for you under the _ nick 17:26
masak goes out hunting for food to eat with his beer
flussence whoops
flussence_ ohai
phenny flussence_: 26 Dec 00:16Z <sorear> tell flussence_ Do you mind if I use github.com/flussence/specgraphs/ra.../impls.png in the niecza v13 announcement?
flussence_ sure
sorear but I now have to ask forgiveness rather than permission. 17:27
thanks
flussence there wouldn't be much point making it if I wasn't going to let anyone use it :)
17:30 Yary left, tokuhirom left, tokuhirom joined
flussence (maybe it's just me, but using regex on binary strings feels "dirty"...) 17:31
17:32 cedric left, Trashlord left 17:33 Trashlord joined 17:35 tokuhirom left
sorear masak: what do you think about proto token foo { (.) {*} (.) }; token foo:bar { (.) } ? 17:39
17:40 fsergot joined 17:43 Trashlord left 17:44 Trashlord joined, kaare_ joined 17:49 Mowah left
[Coke] sorear: getting a failure int/spec/S02-literals/listquote-whitespace.t^C 17:49
and t/spec/S02-literals/numeric.t 17:50
unfudging the passing todos.
dalek ast: 2788c08 | coke++ | S02-lexical-conventions/unicode (2 files):
niecza unfudge
17:51
[Coke] sorear: let me know if you want me to fudge those 2 failures or not.
17:52 fsergot left 18:02 lichtkind left
[Coke] wonders who Kris Shannon is. 18:03
moritz [Coke]: kshannon in here
18:04 kaleem left
[Coke] ah. kshannon: note that 105118 is against spec tests; so if your diagnosis is correct, the spec tests need to be updated. 18:04
(and it's not quite a dup of the other ticket, though certainly related) 18:05
moritz which reminds me, I wanted to review kshannon++'s pull requests
sorear [Coke]: ah, I forgot to push 18:06
dalek ast: 1650c5c | sorear++ | S02-literals/ (2 files):
[S02-literals/{listquote-whitespace,numeric}] Refudge two tests for the niecza bootstrap
[Coke] sorear: np. glad I pinged first. ;) 18:08
18:09 drbean left 18:12 am0c left, daxim left 18:13 MayDaniel joined 18:14 drbean joined
moritz uhm, urks 18:14
STD.pm line 312
listing a..z A..Z _ seems so wrong 18:15
that seems... not very Unicody at all
nqp: say('æ' ~~ /<+alpha+[ \< \[ ]>/) 18:18
p6eval nqp: OUTPUT«æ␤»
sorear viv doesn't support <+syntax> 18:21
masak sorear: I don't know what I think of it. haven't played around enough with proto tokens, I'm afraid. 18:23
or protoregexes in general.
18:30 molaf left 18:32 snearch joined 18:33 snearch left, snearch joined 18:38 Radvendii joined
Radvendii what happened to perl6 -e? 18:38
oh wait...
18:39 [particle] joined
Radvendii is use strict enabled for perl6 -e? 18:40
benabik Does perl6 have use strict?
colomon benabik: use strict is default
Radvendii that's weird. for one liners?? 18:41
colomon I dunno about one liners, but it's default for normal p6 code
18:41 Yary joined
Radvendii yeah, i know that (and that's good) but i was talking about for perl6 -e 18:42
yeah. it is
that's unfortnate
colomon Radvendii: and I was answering benabik's question. ;)
Radvendii oh
sorry
my bad
18:42 ksi joined
Yary has a freshly built Rakudo "nom" working on an OpenBSD box. Might actually write some code in perl6 now 18:43
benabik colomon: Conversely, is there a 'no strict'?
Radvendii im sure
colomon benabik: I think so, but it's definitely never been implemented
Yary++ \o/
masak Radvendii: there's no 'no strict' in any implementation yet.
Radvendii: -e is spec'd to be 'no strict', though.
benabik S02:2810
"When "strict" is in effect (which is the default except for one-liners)," 18:44
18:44 [particle] left
colomon "Perl 5 code is not strict by default, while Perl 6 code is. But it should be easy to relax with -e or a bare version number" 18:44
that's in S01
Radvendii oh. so it will work, but doesn't currently
benabik "bare version number?
colomon I dunno if the bare version number thing is a fossil or not...
benabik: the example is
v6; 18:45
as opposed to
use v6;
presumably
benabik odd.
colomon agreed
Radvendii perl6: say split '' "hello" 18:46
p6eval rakudo eb6c4b: OUTPUT«===SORRY!===␤Confused at line 1, near "say split "␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected "\""␤ expecting operator, ":" or ","␤ at /tmp/LJ_CW9A1Rh line 1, column 14␤»
..niecza v13-2-g88d20b0: OUTPUT«===SORRY!===␤␤Two terms in a row at /tmp/89pAMYVTta line 1:␤------> say split '' ⏏"hello"␤␤Parse failed␤␤»
Radvendii perl6: say split '', "hello"
p6eval pugs b927740: OUTPUT«hello␤»
..niecza v13-2-g88d20b0: OUTPUT« h e l l o ␤»
..rakudo eb6c4b: OUTPUT«h e l l o␤»
18:47 [particle] joined
colomon oooo, interesting 18:47
18:47 [particle] left
colomon is niecza or rakudo right there? 18:47
Radvendii perl6: my $a="hi"; my @a := split '', $a; $a="hello"; say @a[^10]
p6eval rakudo eb6c4b: OUTPUT«h i␤»
..niecza v13-2-g88d20b0: OUTPUT« h i Any() Any() Any() Any() Any() Any()␤»
..pugs b927740: OUTPUT«hi␤»
Radvendii but... i used := 18:48
shouldn't that link them?
colomon no
it links @a to the output of the split statement, which is based on the first $a
Radvendii that's odd... 18:49
then how do i do what i'm trying to do?
that's kind of counter intuitive... 18:50
colomon what are you trying to do?
Radvendii link the two 18:51
so that @a is an array version of $a
colomon I'm pretty sure you'd have to create a custom Positional class to do that.
Radvendii for real? i feel like that should be pretty basic... 18:52
18:52 overrosy joined
Radvendii so what is the point of :=? is it just to force lazy evalutaion? 18:53
benabik @a := foo means that @a _is_ the output of foo, not a new array initialized with the output of foo. 18:54
18:54 AndreasX joined
Radvendii so it should call foo when you try to access @a right... 18:54
18:54 AndreasX left
benabik No, it calls foo right then. 18:54
It doesn't automatically create a closure. 18:55
Radvendii but if you do @a := 1..* it will lazy evalutate
benabik It doesn't "call" 1..* every time you access @a.
Radvendii ugh... 18:56
so why would := be useful?
benabik nom: (1..*).WHAT
p6eval nom eb6c4b: ( no output )
colomon Radvendii: the basic way to do what you're thinking of is to create a closure function.
benabik Blah.
nom: (1..*).WHAT.say 18:57
p6eval nom eb6c4b: OUTPUT«Range()␤»
colomon nom: my $a="hi"; sub a() { split '', $a; } $a="hello"; say a()[^10]
p6eval nom eb6c4b: OUTPUT«===SORRY!===␤Confused at line 1, near "sub a() { "␤»
benabik nom: my @a; say @a.WHAT; @a := 1..*; say @a.WHAT
p6eval nom eb6c4b: OUTPUT«Array()␤Range()␤»
colomon nom: my $a="hi"; sub a() { split '', $a; } ;$a="hello"; say a()[^10]
p6eval nom eb6c4b: OUTPUT«===SORRY!===␤Confused at line 1, near "\x{1c}$a=\"hello"␤»
benabik nom: my @a; say @a.WHAT; @a = 1..*; say @a.WHAT; 18:58
p6eval nom eb6c4b: OUTPUT«Array()␤Array()␤»
colomon nom: my $a="hi"; sub a() { split '', $a; }; $a = "hello"; say a()[^10]
p6eval nom eb6c4b: OUTPUT«h e l l o␤»
18:58 Yary left
benabik Although I'll note that's a bit slow because it resplits $a every time you call &a. 18:59
Radvendii still, what's the utility of :=?
benabik Although I suppose it depends on if you set $a more than you call &a.
Radvendii and shouldn't splitting arrays be really easy? they have to be represented as arrays at some point
benabik Spliting an array into characters is not necessarily trivial. 19:00
*string
Radvendii why not? it's fundamentally an array of chars...
no? 19:01
benabik array of _unicode_ characters.
colomon nope
Radvendii so?
benabik If it's stored internally as UTF8, a character may be 1, 2, or 3 bytes.
colomon there's no one-to-one correspondence between bytes and characters.
tadzik or 4, I think
Radvendii what about just getting access to that array? 19:02
benabik tadzik: Blub. Yes, you're right.
Radvendii the array of chars....
colomon btw, the idiomatic perl 6 way to get all the characters in a string is to use comb instead of split.
Radvendii what's comb?
tadzik Radvendii: what do you want to achieve?
nom: "foo".comb.perl.say
p6eval nom eb6c4b: OUTPUT«("f", "o", "o").list␤»
colomon nom: "this is a test".comb(/\w+/).perl.say 19:03
p6eval nom eb6c4b: OUTPUT«("this", "is", "a", "test").list␤»
Radvendii tadzik: what i really want is for the strings to also be accessable as arrays.
colomon comb lets you specify what you are looking for in the string, rather than the bits between what you are looking for (which is split).
tadzik Radvendii: as in, postcircumfix:<[]>? 19:04
Radvendii eys
yes
can i just do $a="hello";$a[3]?
colomon no
Radvendii perl6: $a="hello"; say $a[2]
p6eval niecza v13-2-g88d20b0: OUTPUT«===SORRY!===␤␤Variable $a is not predeclared at /tmp/219u_hJPf3 line 1:␤------> <BOL>⏏$a="hello"; say $a[2]␤␤Variable $a is not predeclared at /tmp/219u_hJPf3 line 1:␤------> $a="hello"; say ⏏$a[2]␤␤Un…
..rakudo eb6c4b: OUTPUT«===SORRY!===␤Variable $a is not predeclared at line 1, near "=\"hello\"; "␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected "=\""␤ expecting "::"␤ Variable "$a" requires predeclaration or explicit package name␤ at /tmp/cgYYNUeag8 line 1, column 3␤»
tadzik you can just $a.comb[3]
perl6: my $a="hello"; say $a.comb[2] 19:05
p6eval rakudo eb6c4b, niecza v13-2-g88d20b0: OUTPUT«l␤»
..pugs b927740: OUTPUT«␤»
colomon or $a.substr(3,1)
Radvendii yeah, but using substr is just cumbersome
benabik That's interesting...
nom: my $a = 'hello'; say $a[1]
p6eval nom eb6c4b: OUTPUT«Failure.new(exception => Exception.new())␤»
benabik ^^ LTA
Radvendii and comb... ugh. alright then.
tadzik Radvendii: keep in mind that we're not coping with C-strings here. They _may_ be implemented as mere array of characters
dalek ecza: d8f1334 | (Solomon Foster)++ | lib/CORE.setting:
Add infix:<cmp> rule for Pairs.
19:06
Radvendii d
sorry
alright
i guess comb is as good as im going to get...
benabik You could make $a be a proxy object where STORE sets @a to $a.comb. :-D 19:07
(In theory.)
Not sure how that would actually work.
Radvendii what?
tadzik hmm
Radvendii proxy object? 19:08
colomon that's what I was trying to say before
Radvendii oh
i see
that's interesting...
tadzik nom: use MONKEY_TYPING; augment class Str { method postcircumfix:<[]>($a) { self.comb[$a] } }; "perl"[3].say
p6eval nom eb6c4b: OUTPUT«Failure.new(exception => Exception.new())␤»
tadzik eeh
benabik tadzik: Yeah, that's the problem I was trying to point out a moment ago. 19:09
19:12 overrosy left 19:13 alvis left, alvis joined 19:14 PacoLinux joined, overrosy joined
Radvendii does anyone have a good tutorial for proxy objects in perl 6 19:16
?
colomon Radvendii: I think the real point here is, what are you ACTUALLY trying to do? In general, trying to treat a Unicode string like a C-style character array is a bad idea. 19:17
Radvendii why?
benabik Hm. Proxy objects aren't on compiler feature list. Are they currently implemented?
tadzik I think they are 19:18
istr jnthn used them in some of the advent blog posts
benabik Cool.
colomon jnthn was definitely messing around with them this month, but I don't know if they're fully functional yet
Radvendii why is it a bad idea to treat them like C-style character arrays? 19:19
colomon Radvendii: because it's not, as we tried to explain to you above. You cannot access character 25 without looking at characters 0-24.
Radvendii dang :(
alright
well
i have to go
but thanks for the help and patience
colomon if you build a proxy (or whatever), it will just be doing that behind the scenes. 19:20
Radvendii im not so good at understanding the inner workings of the programming language.
19:20 overrosy left
moritz benabik: rakudo passes most of the tests that use Proxy 19:20
19:21 Radvendii is now known as Radv_AWAY
benabik nom: gist.github.com/1524863 19:23
p6eval nom eb6c4b: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 5␤»
benabik :-(
moritz benabik: try to give the FETCH emthod a signature too 19:24
benabik: oh, and write it as Proxy.new(...), not new Proxy: 19:25
we don't do indirect method calls
not sure why S06 uses that arcane and weird syntax
benabik Hah, yes that fixed it. 19:26
nom: gist.github.com/1524863
p6eval nom eb6c4b: OUTPUT«s␤»
tadzik ha
19:27 overrosy joined
dalek ecs: 8a99698 | moritz++ | S06-routines.pod:
[S06] avoid indirect method call syntax

It is unrelated to the topic, and seem to confuse readers. Me too.
19:27
tadzik std: new Proxy; 19:28
p6eval std dc62e1d: OUTPUT«===SORRY!===␤Unsupported use of C++ constructor syntax; in Perl 6 please use method call syntax at /tmp/yTzaQ9pfli line 1:␤------> new Proxy⏏;␤Parse failed␤FAILED 00:01 118m␤»
tadzik thought so
benabik std: new Proxy: ;
p6eval std dc62e1d: OUTPUT«ok 00:01 121m␤»
colomon tadzik++
benabik It wants the colon. 19:29
tadzik mhm
moritz hates indirect method syntax
tadzik confusing and ugly :) 19:30
benabik nom: gist.github.com/1524863
p6eval nom eb6c4b: OUTPUT«Str.new()␤Array.new("t", "e", "s", "t")␤»
benabik Huh.
nom: $a = 'test; $a.perl.say
p6eval nom eb6c4b: OUTPUT«===SORRY!===␤Variable $a is not predeclared at line 1, near " = 'test; "␤»
benabik nom: my $a = 'test'; $a.perl.say
p6eval nom eb6c4b: OUTPUT«"test"␤»
benabik Oh, I think it's confused by the Proxy. 19:31
nom: my $a_ = 'test'; my $a := Proxy.new(FETCH => method { $a_ }); say $a.perl
p6eval nom eb6c4b: OUTPUT«Str.new()␤»
benabik LTA.
nom: gist.github.com/1524863 19:32
p6eval nom eb6c4b: OUTPUT«"test"␤Array.new("t", "e", "s", "t")␤»
19:34 overrosy left 19:36 snearch left 19:37 overrosy joined
benabik nom: gist.github.com/1524863 19:38
p6eval nom eb6c4b: OUTPUT«"test"␤t e s t␤»
benabik Not sure why say $a adds the ""s and why $a.perl becomes Str.new(). But other than that, I think it's kinda neat. 19:39
20:00 drbean left 20:03 overrosy left
masak std: class A {}; new A: 20:04
p6eval std dc62e1d: OUTPUT«ok 00:01 122m␤»
masak std: class A {}; new (new A:):
p6eval std dc62e1d: OUTPUT«ok 00:01 123m␤»
tadzik :F
masak std: class A {}; new (new (new A:):):
p6eval std dc62e1d: OUTPUT«ok 00:01 123m␤»
masak weird. :)
tadzik it laughs at you! :P 20:05
new A:):)
like :D, but more subtle
20:05 overrosy joined 20:07 drbean joined, bbkr1 joined
bbkr1 tadzik: I'm testing panda on 2011.12 and it cannot find Shell::Command (required by Panda::Installer), which package contains it? 20:08
tadzik bbkr1: File::Tools
bbkr1: bootstrap.sh should install it 20:09
also, META.info should list everything that's needed
also also, all the deps are shipped in ext/ :)
20:09 stepnem joined
bbkr1 I've run bootstrap, weird. I'll remove everything and repeat process. 20:09
tadzik huh 20:10
oh
do you have ~/.perl6/lib in your $PERL6LIB?
bbkr1 I have it in @*INC 20:12
dalek ast: b52a5cb | moritz++ | S32- (3 files):
minor rakudo fudging and corrections
tadzik hmm
dalek kudo/kshannon-fixes: 7300003 | (Kris Shannon)++ | src/Perl6/Grammar.pm:
Make termish panic on failure when before an infixish (fixes RT#53814)
20:13
kudo/kshannon-fixes: ac925b0 | (Kris Shannon)++ | src/Perl6/Grammar.pm:
<args> already has an empty option, no need to make it optional
kudo/kshannon-fixes: 8d63d90 | (Kris Shannon)++ | src/Perl6/Actions.pm:
Make the stubby exception generators actually use any passed parameters (fixes RT#58558)
kudo/kshannon-fixes: 84b1fcc | moritz++ | src/Perl6/ (2 files):
Merge remote branch 'kshannon/fix-rt58558' into nom
tadzik bbkr1: does "perl6 -e 'use Shell::Command'" work?
sorear my #1 priority for this month is getting MOPpy stuff to work. "6model convergence" but especially roles, allowing custom ClassHOWs
bbkr1 ok, i've catched error this time: t/panda/fetcher.t .... fatal: failed to open '/Users/bbkr/.panda/src/panda/t//objects': No such file or directory
tadzik bbkr1: that's not an error, I know it looks like one
that's expected, and git just doesn't shut up about it
moritz oops, I didn't mean to push that branch. OTOH, not much harm done
20:14 ksi left
bbkr1 tadzik: using Shell::Command from command line doesn't work either. 20:15
masak moritz: just use the strangely out-of-place colon syntax in git to remove it again :P
tadzik bbkr1: after bootstrap, did Shell/Command.pm end up in ~/.perl6/lib?
moritz masak: I will, in time 20:16
bbkr1 tadzik: no, which is weird. I'll check bootstrap code, maybe it's some Apple'ism
tadzik huh, it always worked on Macs 20:17
bbkr1: does panda pass its tests? Particulary panda/installer.t
moritz what I actually planned was to push these commits to nom, and keep those plus a few more in the branch
ah well
bbkr1 tadzik: during bootstrap - yes 20:18
tadzik oddness
tadzik reruns locally
rsimoes Is there a complete perl 6 parser yet? Even if it just produces a somewhat stubby op tree? 20:23
moritz I think that std and niecza are both fairly complete wrt parsing 20:24
rsimoes omgggg my roomba is knocking over everything
oh yeah?
moritz oh yeah
rsimoes Thanks, I'll take a peak
masak rsimoes: there's also viv in connection with STD, but I don't know how bitrotted it is at this point. 20:26
bbkr1 tadzik: mystery solved. bootstrapping was using old files in ~/.panda directory (from previous installation). 20:30
rsimoes is there a std repo somewheres?
masak github.com/perl6/std
tadzik bbkr1: so it considered stuff installed, and didn't reinstall, aye? 20:31
20:31 ksi joined
tadzik I wonder if a "Foo::Bar is already installed" message would be useful 20:31
bbkr1 tadzik: yes, i've removed my old stuff in ~/.perl6 (whole directory) and panda got somehow confused due to presence of old files in ~/.panda. 20:32
tadzik yeah. ~/.panda/state has probably shown File::Tools installed, and bootstrap didn't install it 20:33
bbkr1 tadzik: thanks for help and sorry about wasting your time, everything is working afterall
tadzik bbkr1: no problem with that :) Glad it works
[Coke] sorear: ping.
bbkr1 time to reanimate JSON::RPC on nom :) 20:34
tadzik \o/
[Coke] niecza: say +("bac" ~~ /a/).WHAT.gist 20:36
p6eval niecza v13-3-gd8f1334: OUTPUT«Unhandled exception: Cannot parse number: Match()␤ at /home/p6eval/niecza/lib/CORE.setting line 919 (die @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2328 (ANON @ 9) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2330 (NumSyntax.str2num @ 3) ␤ at…
[Coke] sorear: (just reopened #84.) 20:37
dalek kudo/nom: 7300003 | (Kris Shannon)++ | src/Perl6/Grammar.pm:
Make termish panic on failure when before an infixish (fixes RT#53814)
20:50
rakudo/nom: ac925b0 | (Kris Shannon)++ | src/Perl6/Grammar.pm:
rakudo/nom: <args> already has an empty option, no need to make it optional
20:51 dalek joined, ChanServ sets mode: +v dalek 20:53 mj41 left 20:54 mj41 joined 21:01 cognominal_ joined 21:02 fsergot joined
fsergot tadzik, whats new about Bailador? :) 21:02
tadzik fsergot: lots of things :) Proper Request and Response objects, POST support, even placeholders work if you turn GC of 21:03
fsergot So, I will install it and build some webpages :) 21:04
tadzik great!
let me know if you miss anything in it 21:05
benabik … "If you turn GC off"? That's not a good sentance.
tadzik there's an example pastebin app in the repo which shows off most of the features
benabik: Rakudo segfaults are generally not very good :)
fsergot tadzik, Your project is great. It probably allow me to get into perl6 deeper. 21:08
tadzik I'm glad you like it
fsergot will* :)
masak tadzik: I like it too. this was one of the goals of Web.pm 21:09
fsergot tadzik++
tadzik masak: I'm thinking about stealing some template system for Bailador 21:10
once GC issues are gone I'll write another blog post as a bait for Dancer guys
...again :)
fsergot ;] 21:11
21:14 bluescreen10 left
masak tadzik: have a look at Python's Genshi and Web.pm's Hitomi. 21:18
I still believe that's a really neat idea.
tadzik does it pass its tests?
istr one of those templaters did
maybe ratel 21:19
masak dunno.
tadzik meh, I only recenly fixed all those stuff to work on ng... :)
fsergot tadzik, just perl6 pastebin.pl (e.g.) or how? :) 21:20
tadzik fsergot: provided you have Bailador installed, yes 21:21
then just direct your browser to localhost:3000
masak 'night, #perl6
fsergot Then, how i can run it on serwer without typing port number? :) 21:22
o/ masak
tadzik fsergot: modify lib/Bailador.pm at the bottom :P
fsergot: oh, and better not run it on a server, it's unsafe and unstable as hell ;) 21:23
g'night masak
fsergot Ok :0
:)
tadzik, so You can add this 'feature' in future. i mean, something like configuration methor, or vars.
:) 21:24
tadzik I'll consider that :)
well, it now acts like the built-in webserver in Dancer
you ran dance(), it listens on :3000
if you want fancy stuff, you run the .psgi app with plackup
I think someone was working on p6-plackup a while ago 21:25
fsergot Ok. :)
21:31 cognominal_ left 21:33 cognominal joined
sorear good * #perl6 21:33
rsimoes: Why are you spamming me? 21:34
[Coke]: pong 21:35
21:36 y3llow_ joined, kaare_ left, pothos_ joined 21:37 y3llow left, pothos left, y3llow_ is now known as y3llow
sorear [Coke]: What should +'Match()' be? 21:38
nom: say +'Match()'
p6eval nom 5f7f4d: OUTPUT«0␤»
sorear nom: say +'Moo' 21:39
p6eval nom 5f7f4d: OUTPUT«0␤»
21:39 pothos_ is now known as pothos
sorear b: say +'Moo' 21:39
p6eval b 1b7dd1: OUTPUT«0␤»
sorear wah
b: say 'Moo'.Numeric
p6eval b 1b7dd1: OUTPUT«0␤»
sorear I was sure I had seen actual parse errors earlier
rakudo: say "123def" + 5 21:41
p6eval rakudo 5f7f4d: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(Mu $v, Mu %_)␤␤ in method Numeric at src/gen/CORE.setting:648␤ in sub infix:<+> at src/gen/CORE.setting:2166␤ in sub infix:<+> at src/gen/CORE.setting:2166␤ in block <anon>…
sorear rakudo: say +"123def" 21:42
p6eval rakudo 5f7f4d: OUTPUT«Failure.new(exception => Exception.new())␤»
sorear rakudo: say +"def"
p6eval rakudo 5f7f4d: OUTPUT«0␤»
sorear yeeech
21:50 cognominal_ joined, MayDaniel left 21:52 zipf joined 21:53 cognominal left 22:02 zipf left 22:06 cognominal_ left 22:07 cognominal joined 22:11 cognominal_ joined 22:15 cognominal left 22:26 wolfman2000 left 22:30 mj41 left
tadzik wow, Ratel does some dirty magic 22:31
23:02 drbean left
[Coke] sorear: if the spectest is borked, we can of course change that instead. I read the test as the + having higher precedence. 23:05
sorear ah, the issue was the test failure 23:06
oh! that was a fudge ticket. I get it now
23:09 drbean joined, HarryS joined
dalek ast: 909cd58 | sorear++ | S12-methods/what.t:
[S12-methods/what] Fix over-zealous .gist usage from f85b8bf9, was testing the wrong thing as a result (fixes sorear/niecza#84)
23:12
sorear I wonder if this will work?
[Coke] sees fudges' emit for the first time. "oh!"
23:14 HarryS left
[Coke] that makes it easier to fudge some tests, boy howdy. 23:14
sorear yeah. avoid it if you can - it messes up the line numbers
23:39 cognominal_ left 23:40 cognominal joined 23:41 whiteknight joined 23:42 whiteknight is now known as Guest90895 23:46 thou left