»ö« 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:03 Moukeddar left 00:10 dayangkun joined 00:28 dayangkun left 00:32 azawawi joined 00:36 lue left 00:44 gdey joined
azawawi hi 00:50
diakopter hi 00:51
azawawi tadzik: ping 00:52
phenny: tell tadzik feather.perl6.nl:3000/module/Acme;Meow broken?
phenny azawawi: I'll pass that on when tadzik is around.
00:52 anuby joined 00:54 gdey left 00:57 huf joined 00:58 havenn joined, havenn left 01:02 wknight_ left 01:03 wknight8111 left, whiteknight left 01:08 tokuhiro_ left, tokuhiro_ joined 01:10 rummik- left 01:13 tokuhiro_ left 01:19 anuby_ joined, anuby left 01:20 UncleFester6 joined
UncleFester6 azawawi ping 01:20
azawawi :) 01:21
UncleFester6: png
01:22 rummik joined
UncleFester6 I managed to install the updated LWP::Simple with panda and Rakudo Star-09 ok. Did you ever get that resolved? 01:22
azawawi UncleFester6: let me check it 01:23
01:23 bakedb joined, bbeans joined
azawawi runs q{ panda install LWP::Simple } 01:24
UncleFester6: installs but... 01:25
01:30 azawawi left, azawawi_ joined
azawawi_ UncleFester6: sorry got dc 01:30
UncleFester6: use LWP::Simple; LWP::Simple.get('feather.perl6.nl:3000/projects.json') # works... great 01:31
UncleFester6: use LWP::Simple; LWP::Simple.get('google.com') # returns invalid encoding windows-1256
UncleFester6: exact message is {invalid encoding 'windows-1256'}
UncleFester6 looking ... 01:32
WFM ?? hmmm ... 01:35
azawai - are you outside the United States now? 01:36
s/azawai/azawawi/
01:37 grondilu left
UncleFester6 Yes - I get the error for www.google.jo ... 01:39
google.ca does not have the problem ... I will look into the problem and try to post a fix in a few days if that's OK ... 01:40
azawawi_ yeah jordan... correct google.jo => windows-1256 although shouldnt it be utf8 01:43
i guess they support older IE browsers by using that
for Farabi6 i need HTTPS + HTTP 01:44
right now im using wget in farabi6 until there is a viable p6 implementation 01:45
https is needed for github file access
UncleFester6: and thanks :) UncleFester6++ 01:46
UncleFester6 Not really aware of the status on https although it doesn't seem to work :(
bbl
01:46 UncleFester6 left
azawawi_ star: use LWP::Simple; LWP::Simple.get('github.com/tadzik/perl6-MPD/'); 01:47
p6eval star 2012.07: ( no output )
01:55 azawawi_ left 01:59 azawawi joined
diakopter rn: my $a=4; sub b($c) { sub { $c } }; my $d = b($a); $a++; say $d() 02:02
p6eval rakudo 0e866a, niecza v22-14-g136ddcf: OUTPUT«4␤»
diakopter see, there, I would call $c a "copy" of the parameter, which makes "is copy" seem out of place if I add it 02:04
"is rw" would make more sense
imho
s/parameter/argument/ 02:05
02:17 CharellKing joined 02:21 CharellKing left 02:28 grondilu joined
azawawi is having fun... Farabi std viv syntax check nearly done 02:30
skids wonders whether a "without replacement" version of X/cross might be useful, or whether he's just missing a good idiom 02:41
e.g. say it was W, (1,2,3) W (4,5,6) would give (1,5),(1,6),(2,4),(2,6),(3,4),(3,5) 02:43
diakopter skids: do you have a use case? 02:46
skids Mostly some of the formulas in digest calculations.
02:48 fgomez left
skids e.g. [+|] ($a,$b,$c) W+& ($a, $b, $c) 02:48
02:49 havenn_ joined 02:54 bbeans left 02:55 bbeans joined 02:58 grondilu left
japhb First try at allomorphic types --> segfault. Wheeeee ... 03:05
03:06 fgomez joined 03:09 grondilu joined
grondilu rn: sort *.sin, ^10; 03:12
p6eval rakudo 0e866a, niecza v22-14-g136ddcf: ( no output )
grondilu rn: say sort *.sin, ^10;
p6eval rakudo 0e866a, niecza v22-14-g136ddcf: OUTPUT«5 4 6 0 3 9 7 1 2 8␤»
grondilu rn: sort &sin, ^10;
p6eval rakudo 0e866a: OUTPUT«Cannot call 'sin'; none of these signatures match:␤:(num $x)␤:(Numeric \x)␤:(Cool \x)␤␤ in sub sin at src/gen/CORE.setting:2479␤ in block at src/gen/CORE.setting:5777␤ in method sort at src/gen/CORE.setting:5771␤ in sub sort at src/gen/CORE.setting:1526␤ in b…
..niecza v22-14-g136ddcf: ( no output )
03:12 MikeFair_ joined
grondilu n: say sort *.sin, ^10; 03:13
p6eval niecza v22-14-g136ddcf: OUTPUT«5 4 6 0 3 9 7 1 2 8␤»
grondilu n: say max *.sin, ^10;
p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Cannot use value like WhateverCode as a number␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting line 293 (Any.Numeric @ 6) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.se…
grondilu so if I want the max I must sort first? 03:14
n: say max sort *.sin, ^10;
p6eval niecza v22-14-g136ddcf: OUTPUT«9␤»
grondilu nah 03:15
skids Often I've wished the "none of these signatures matched" error would show the types of the offered arguments. 03:16
grondilu n: say .end given sort *.sin, ^10; 03:17
p6eval niecza v22-14-g136ddcf: OUTPUT«9␤»
grondilu rn: say (sort *.sin, ^10).end;
p6eval rakudo 0e866a, niecza v22-14-g136ddcf: OUTPUT«9␤»
grondilu ? why 9 ?
03:18 bakedb__ joined
grondilu rn: my @a = sort *.sin, ^10; say @a, " --> ", @a.end; 03:18
p6eval rakudo 0e866a, niecza v22-14-g136ddcf: OUTPUT«5 4 6 0 3 9 7 1 2 8 --> 9␤»
skids rn: say max (.sin for ^10)
p6eval niecza v22-14-g136ddcf: OUTPUT«0.98935824662338179␤»
..rakudo 0e866a: OUTPUT«0.989358246623382␤»
sorear grondilu: why not 9?
grondilu shouldn't it be 8?
sorear grondilu: .end returns the last index, not the last value
it's the same as .elems - 1
grondilu oh
ok 03:19
grondilu wishes there was a method to get the last value. .[*-1] is annoying to type. 03:20
r: use MONKEY_TYPING; class Array { method last { self.[*-1] } }; say [^10].last 03:21
p6eval rakudo 0e866a: OUTPUT«No such method 'last' for invocant of type 'Array'␤ in block at /tmp/tsG3XSfvms:1␤␤»
sorear grondilu: augment class 03:22
grondilu r: use MONKEY_TYPING; augment class Array { method last { self.[*-1] } }; say [^10].last
p6eval rakudo 0e866a: OUTPUT«9␤»
grondilu cool
r: use MONKEY_TYPING; augment role Positional { method last { self.[*-1] } }; say (^10).last 03:24
p6eval rakudo 0e866a: OUTPUT«===SORRY!===␤Cannot augment role Positional, since roles are immutable␤at /tmp/FDTp0f46Mg:1␤»
grondilu *
r: multi max(&f, @a) { sort(&f, @a)[*-1] }; say max *.sin, ^10; 03:30
p6eval rakudo 0e866a: OUTPUT«8␤»
grondilu r: multi max(&f, @a) { max map &f, @a }; say max *.sin, ^10;
p6eval rakudo 0e866a: OUTPUT«Cannot call 'max'; none of these signatures match:␤:(&f, @a)␤␤ in sub max at /tmp/qMNowvZmdS:1␤ in block at /tmp/qMNowvZmdS:1␤␤»
grondilu isn't max defined as multi in core? 03:31
n: say max map *.sin, ^10; 03:33
p6eval niecza v22-14-g136ddcf: OUTPUT«0.98935824662338179␤»
grondilu nah
skids rn: $_ = (1,2,3); $_[.end].say; # works if your array is the topic 03:37
p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Unable to resolve method end in type Parcel␤ at /tmp/G2tk649Pr7 line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4216 (module-CORE @ 579) ␤ at /home…
..rakudo 0e866a: OUTPUT«3␤»
skids ok, well works on rakudo 03:38
04:04 bakedb___ joined
japhb rn: class A { has Int $.a handles * }; A.new(a => 1).Numeric 04:05
p6eval niecza v22-14-g136ddcf: OUTPUT«===SORRY!===␤␤Action method trait_mod:handles not yet implemented at /tmp/3_d9T8EVyf line 1:␤------> class A { has Int $.a handles * ⏏}; A.new(a => 1).Numeric␤␤Trait 0 not available on variables at /tmp/3_d9T8EVyf line …
..rakudo 0e866a: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤␤ in method Numeric at src/gen/CORE.setting:791␤ in block at /tmp/aMmPpNWf1D:1␤␤»
japhb OK, granted that niecza doesn't handle it yet, but I *thought* that should work for rakudo these days. 04:06
Am I missing something obvious?
04:09 kaleem joined
TimToady wildcards nyi 04:16
japhb narble garble 04:17
Sigh
That makes writing allomorphic type classes kinda painful. 04:18
04:19 havenn_ left
japhb r: class A is Bool { }; A.new.Bool 04:21
p6eval rakudo 0e866a: ( no output )
japhb r: class A is Bool { }; A.new.Bool; say "Alive"
p6eval rakudo 0e866a: OUTPUT«Alive␤»
japhb Huh. Segfault here in the REPL 04:22
(With up-to-date rakudo)
04:23 bakedb__ left 04:24 popl joined
azawawi finally ... ~/std/viv output is rendered as inline problem messages inside Farabi6 ... oh yeah! :) 04:26
TimToady++ 04:27
04:28 Leconite joined, Leconite left
grondilu here is a message I got from projecteuler after posting a perl6 on-liner: « Here I spent an hour or so creating a struct that technically adds any integer with an infinite amount of digits and most of you are making it look like nothing with your one or two liners haha. » Good perl6 advert, guys :) 04:29
04:30 christop` joined, Alpha64 joined 04:39 DarthGandalf left 04:43 skids left 04:47 bbeans left 04:48 cognominal joined, bakedb left 04:49 bbeans joined 04:50 bakedb_ joined 04:52 christop` left
azawawi feather.perl6.nl:3030/ # Farabi6 modern Perl edit with viv syntax check feature on/off switch 04:53
s/edit/editor/ :)
04:53 havenn joined
azawawi phenny: tell rindolf you werent getting any input because of a bug in new commits of HTTP::Easy 04:54
phenny azawawi: I'll pass that on when rindolf is around.
04:54 kurahaupo left 05:01 DarthGandalf joined 05:17 raiph joined
raiph azawawi: ping 05:18
azawawi raiph: pong
raiph "could not connect to feather.perl6.nl:3030" # is that just me? 05:19
azawawi let me check 05:20
yup server is down :) 05:21
05:26 Alpha64 left
azawawi raiph: feather.perl6.nl:3030/ # up again 05:27
raiph: i think it segfault and exits... will investigate
05:28 bakedb___ left, Alpha64 joined 05:30 GlitchMr joined
raiph azawawi: first, in case I haven't already said this: looks great. second, syntax checking the default hello world code doesn't seem to do anything 05:32
azawawi yeah im fixing the workflow as i go 05:33
thanks for checking it out
i should get session management working with tabs... 05:34
my objective is to use farabi to write farabi :) 05:35
05:36 bakedb__ joined
azawawi open with autocomplete-style history and save functionality is next 05:36
05:42 azawawi left 05:43 bakedb___ joined, bakedb___ left 05:47 colomon left
grondilu nr: given 4 { when 1, 2 ... 9 { say "less than 10" } } 05:47
p6eval rakudo 0e866a, niecza v22-14-g136ddcf: ( no output )
grondilu can't I use sequences in smart match? 05:48
nr: given 4 { when any 1, 2 ... 9 { say "less than 10" } }
p6eval rakudo 0e866a, niecza v22-14-g136ddcf: OUTPUT«less than 10␤»
05:49 flightrecorder joined, FROGGS joined
GlitchMr grondilu: when doesn't mean "in array" anymore 05:50
For that, you should either use range (1..9) or any() function or method
05:50 hash_table left 05:51 GlitchMr left
grondilu ok, I'll go for any(). 05:51
05:52 GlitchMr joined
GlitchMr I've no idea what happened 05:52
I still could write messages, I even have seen them on irc.perl6.org, but I couldn't read anything from server. So, I've reconnected.
05:57 birdwindupbird joined, cognominal left 05:59 cognominal joined
FROGGS good morning 06:01
tadzik good morning #perl6
phenny tadzik: 00:52Z <azawawi> tell tadzik feather.perl6.nl:3000/module/Acme;Meow broken?
06:02 birdwindupbird left 06:03 raiph left
tadzik phenny: tell azawawi indeed, fixed now. Strange thing though :) 06:05
phenny tadzik: I'll pass that on when azawawi is around.
06:10 GlitchMr left 06:12 PZt left 06:21 colomon joined 06:22 popl left 06:24 circlepuller left 06:25 birdwindupbird joined 06:40 nlpplz left 06:41 nlpplz joined 06:43 PZt joined
jnthn japhb: As for has Int $.a handles *, the problem is that * is a fallback, after we failed to dispatch by looking at the MRO. And we find the default Numeric in the MRO and call that. 06:43
06:46 PZt left
jnthn (To clarify, we find the proto method; it's the inner multi-dispatch that then fails) 06:46
06:49 domidumont joined
jnthn japhb: I'm curious about using delegation for the alomorphs; I thought Niecza defiend them as things like class IntStr is Str is Int { } or so. 06:51
So that they ~~ Int and ~~ Str
phenny: tell japhb If you don't backlog, see irclog.perlgeek.de/perl6/2012-10-25#i_6097300 :) 06:52
phenny jnthn: I'll pass that on when japhb is around.
06:55 bbeans left, bakedb__1 joined, araujo left 06:57 bakedb_ left 06:58 bbeans joined 07:02 bbeans left 07:03 cognominal left, bakedb_ joined 07:05 bakedb__1 left 07:06 PZt joined 07:07 bbeans joined 07:08 am0c joined 07:11 hoelzro|away is now known as hoelzro 07:19 domidumont left 07:20 domidumont joined 07:21 fgomez left, fgomez joined 07:28 kaleem left 07:29 birdwindupbird left 07:31 bakedb___ joined 07:33 bakedb_ left 07:35 bbeans left 07:36 bbeans joined 07:40 bakedb__ left, bakedb_ joined 07:41 bakedb_ left, bakedb_ joined 07:46 bakedb_ left, bakedb_ joined 07:50 bakedb_ left, bakedb_ joined 07:51 bakedb_ left, bakedb_ joined 07:52 fgomez left 07:53 grondilu left 08:04 bakedb_ left, bakedb_ joined 08:06 bakedb_ left, bakedb_ joined 08:16 kresike joined
kresike hello all you happy perl6 people 08:17
jnthn o/ kresike
FROGGS hi kresike
kresike jnthn, FROGGS o/
dalek pan style="color: #395be5">perl6-examples: b3ea22a | (Gerhard R)++ | euler/prob029-gerdr (2 files):
[euler/prob029] add more 6ish versions
08:23
08:25 rindolf joined 08:34 cognominal joined, cognominal left, cognominal joined
dalek pan style="color: #395be5">perl6-examples: 349db40 | (Gerhard R)++ | euler/prob029-gerdr.pl:
[euler/prob029] add FIXME note: broken for more general input
08:35
08:36 bbeans left 08:48 cognominal_ joined 08:49 cognominal left 08:52 cognominal_ left 09:00 dakkar joined 09:09 kaleem joined 09:12 sivoais left, phenny left 09:13 phenny joined, cognominal joined 09:17 araujo joined 09:18 cognominal_ joined, cognominal left
masak morning, #perl6 09:20
09:20 dayangkun joined, daxim joined
jnthn o/ masak 09:22
09:23 colomon left 09:25 cognominal_ left 09:34 cognominal joined 09:45 bakedb_ left
masak I must confess I don't really "get" #perl11. I'm not sure what kind of conversation was meant to take place there. 09:47
the parts that have been logged seem to be mostly about things like SvNV and people being rude/jerks. that is, Perl 5 stuff. :P 09:48
the one comment about Perl 6 I found was this: irclog.perlgeek.de/perl11/2012-10-14#i_6061608 09:49
perhaps we're seeing the effects of unintended-but-obvious-in-retrospect consequences here. create a channel where Perl 5 and Perl 6 people can collaborate freely, and you will find that (a) for every Perl 6 person, there are 20 Perl 5 people, and (b) most of them aren't so into Perl 6. 09:51
someone could say "so go in there and make it better!". but I don't understand what they are talking about most of the time. I guess that's how many newcomers feel about #perl6. 09:52
hoelzro masak: that it will never take off? or what? 09:54
09:55 dayangkun left
masak right. the whole comment, basically. 09:56
I wouldn't be surprised if many agree. heck, I may agree, too. (though why exactly 10 years? why not 5 or 20?) 09:57
09:58 leont joined
masak but it feels a weird thing to bring up on a channel for p5/p6 collaboration. maybe it would feel *less* weird if the rest of the backlog over there was actually about p5/p6 collaboration. 09:58
09:58 leont left 09:59 bakedb_ joined
masak oh, ingy++ steps in to defend. that's something, at least. 09:59
nwc10 14th - that's *so* last week :-) 10:02
10:02 brrt joined
masak well, I saw #perl11 in the list of channels, and went "hey, what's this?" 10:03
nwc10 question about the IRC logger - if I understand it correctly, it only links to channels on days where there is activity
is there a way to make it only show links where there is *actual* activity - ie not just joins and parts? 10:04
masak not that I know. 10:05
10:07 bakedb___ left 10:12 dayangkun joined
masak oh, here they actually explain what the channel is about: irclog.perlgeek.de/perl11/2012-10-15#i_6064279 10:13
(though, nobody agrees, apparently) :)
10:14 anuby_ left
masak "This should be a lesson to educators: You don't need to start kids off on some fake programming language like Scratch. We have something they can understand and actually use later." therealkatie.net/blog/2012/oct/24/career-day/ 10:20
brrt this is pretty fascinating stuff (from the perl11 channel): blog.headius.com/2012/09/avoiding-h...-ruby.html 10:26
10:28 mucker joined
masak brrt: there is a story about a programming language designer who shocked his PhD students by putting linked lists in his lexpads instead of hash tables. guess what: his way was faster. 10:29
brrt masak: seriously? that is somewhat hilarious 10:30
masak s/in his/in the implementation of his/
brrt i had a toy implementation of scheme that used linked lists :-p back when i didn't know how hash tables work
masak if not the Oberon language, then some language from that family. and I don't think it was Wirth, but someone else.
moritz if a lexpad is usually very small, I can imagine that 10:31
brrt a lexpad is usually very small
moritz especially if you compile symbol lookups to the pointers
r: say CORE::.keys.elems
p6eval rakudo 0e866a: OUTPUT«425␤»
brrt 10 variables are a lot for a single routine
and, if as moritz say, you use symbols rather than strings 10:32
things get simpler still 10:33
masak moritz: well, compiling to pointers is just common sense, I think. but there's no way to remove the "two lexpads up" cost at runtime, in a language where you have not only static lexpdads but runtime lexpads, too. that is, most languages.
brrt also, you might as well put a simple array, augmenting the lexpad is rare
i.e. the cases where a compiler cannot predict the number of fields the lexpad has to take 10:34
masak but yes, the cost of the linked list happens mostly during compilation.
maybe the extra lookup cost of the linked list is much smaller than the setup cost of the hash.
dalek pan style="color: #395be5">perl6-examples: dc828c7 | (Gerhard R)++ | euler/prob029-gerdr (2 files):
[euler/prob029] fix, merge and add MAIN() to my solution
10:38
10:41 brrt left 10:44 hypolin left 10:46 pmurias joined
pmurias masak: re what's #perl11 about: look at perl11.org 10:47
10:47 bakedb__ joined
daxim now I'm dumber than before 10:49
pmurias daxim: ? 10:52
masak pmurias: thanks. I hadn't seen that URL before.
pmurias masak: it's in the #perl11 channel topic 10:54
masak ah. well, I haven't actually been on the channel. 10:56
11:02 bakedb__ left, cognominal_ joined 11:03 cognominal left 11:04 gootle left, brrt joined 11:05 Su-Shee_ joined 11:06 Su-Shee left, Su-Shee_ is now known as Su-Shee 11:07 SmokeMachine joined 11:22 cognominal_ left
dalek pan style="color: #395be5">perl6-examples: dc602bd | (Gerhard R)++ | euler/prob029-gerdr.pl:
[euler/prob029] bikeshedding and benchmarking
11:26
11:30 Alpha64 left 11:38 havenn left 11:45 sivoais joined 12:02 tokuhiro_ joined 12:08 pmurias left, havenn joined 12:11 mat_mat joined 12:19 havenn left 12:22 cognominal joined 12:26 Moukeddar joined 12:30 mtk joined 12:46 PacoAir joined, havenn joined 12:56 hash_table joined 12:57 havenn left
[Coke] nqp: class augment String { method get_list() { return ["eek"] }; my $a := "3"; say($a.get_list()); 12:59
p6eval nqp: OUTPUT«Malformed package declaration at line 2, near "String { m"␤current instr.: 'panic' pc 13089 (src/stage2/gen/NQPHLL.pir:4619) (src/stage2/gen/NQPHLL.pm:324)␤»
[Coke] nqp: class augment String { method get_list() { return ["eek"] } }; my $a := "3"; say($a.get_list());
p6eval nqp: OUTPUT«Malformed package declaration at line 2, near "String { m"␤current instr.: 'panic' pc 13089 (src/stage2/gen/NQPHLL.pir:4619) (src/stage2/gen/NQPHLL.pm:324)␤»
[Coke] r: class augment String { method get_list() { return ["eek"] } }; my $a := "3"; say($a.get_list()); 13:00
p6eval rakudo 0e866a: OUTPUT«===SORRY!===␤Unable to parse $*PKGDECL definition at line 2, near "String { m"␤»
[Coke] r: augment class String { method get_list() { return ["eek"] } }; my $a := "3"; say($a.get_list());
p6eval rakudo 0e866a: OUTPUT«===SORRY!===␤augment not allowed without 'use MONKEY_TYPING'␤at /tmp/l7BjSVPKV2:1␤»
[Coke] r: use MONKEY_TYPING; augment class String { method get_list() { return ["eek"] } }; my $a := "3"; say($a.get_list());
p6eval rakudo 0e866a: OUTPUT«===SORRY!===␤You tried to augment class String, but it does not exist␤at /tmp/K1_TMtwTzk:1␤»
[Coke] nqp: use MONKEY_TYPING; augment class String { method get_list() { return ["eek"] } }; my $a := "3"; say($a.get_list()); 13:01
p6eval nqp: OUTPUT«"load_bytecode" couldn't find file 'MONKEY_TYPING.pbc'␤current instr.: '' pc 1785 (src/stage2/gen/module_loader.pir:773) (src/ModuleLoader.pm:59)␤»
[Coke] nqp: augment class String { method get_list() { return ["eek"] } }; my $a := "3"; say($a.get_list());
p6eval nqp: OUTPUT«Confused at line 2, near "augment cl"␤current instr.: 'panic' pc 13089 (src/stage2/gen/NQPHLL.pir:4619) (src/stage2/gen/NQPHLL.pm:324)␤»
[Coke] nqp: class String { method get_list() { return ["eek"] } }; my $a := "3"; say($a.get_list());
p6eval nqp: OUTPUT«Method 'get_list' not found for invocant of class 'String'␤current instr.: '' pc 76 ((file unknown):48) (/tmp/LaulZ5pGEP:1)␤»
[Coke] <sadface>
13:07 Patterner left 13:09 Psyche^ joined, Psyche^ is now known as Patterner, Moukeddar left 13:11 sudokode left, bluescreen10 joined 13:14 _jaldhar_ joined, sudokode joined 13:15 _jaldhar_ is now known as jaldhar, tokuhiro_ left, tokuhiro_ joined 13:16 bakedb_ left 13:17 bakedb_ joined 13:20 tokuhiro_ left 13:22 GlitchMr joined 13:24 havenn joined
moritz rakudo.org gets so much comment spam that I'd like to globally disable comments on the site 13:24
FROGGS what about captchas? 13:25
masak moritz: +1 13:28
moritz: maybe with a global notice somewhere saying "if you would like to provide feedback, please do so through p6c or #perl6" 13:29
moritz FROGGS: captchas are annoying and not helpful, most of the time 13:31
13:33 hash_table left
flussence point them to /r/perl6 too, that doesn't get enough use 13:34
13:34 havenn left
hoelzro goes to /r/perl6, having just heard about it from flussence 13:36
hey, I'm #3!
masak :) 13:38
13:40 pmurias joined
pmurias jnthn: do we use the QAST op lexotic for anything other than RETURN? 13:40
and is there a reason for quoting the method name in github.com/perl6/nqp/blob/master/s....nqp#L953? 13:44
jnthn pmurias: At the moment just return, but I'd not be surprised if we ended up using it for more in the future. 13:45
pmurias: quoting is probably left-over from when the code was ported from PIR 13:46
(which needs all method names quoted)
13:53 sizz left 13:57 sizz joined 14:01 havenn joined 14:02 stopbit joined
pmurias jnthn: how should I look up pir ops? 14:03
jnthn "look up"? 14:05
brrt pmurias: from the parrot repository
either in docs
jnthn oh, as in what they mean
brrt or in src/ops/
and then perldoc on the individual files
they are pretty well documented
jnthn All the Parrot ones are documented, in theory. And the NQP ones are too in src/ops/nqp.ops
brrt although they can be confusing
14:06 skids joined, cosimo left
pmurias gives up on understanding the pir ops in lexotic and just implements it as return 14:06
as I don't care about parrot at all 14:07
brrt github.com/parrot/parrot/blob/mast...s/core.ops 14:08
pmurias, parrot is fun :-)
jnthn pmurias: So long as you get the semantics the same, it's fine :)
pmurias: Note that the return can be from several nested blocks. 14:09
If you're compiling each QAST::Block to a JavaScript function, you need to make sure you return from the right one
pmurias I'm aware of that
jnthn OK
pmurias but I don't have a good solution for that, I'm afraid I'll have to use exceptions for that 14:10
jnthn Yes, and also find a way to deal with the need for it to be lexical.
brrt the 'solution' is continuations, if you have them
jnthn r: sub foo() { (1,2,3).map({ return 42 }).eager }; say foo()
p6eval rakudo 0e866a: OUTPUT«42␤»
jnthn The return needs to return from foo (lexically), not map (dynamically). That's what makes it a bit fiddly :) 14:11
14:11 havenn left
rjbs has a running (rakudo) perl6 again. yay! 14:11
pmurias that's just checking if we got the correct exception ;)
rjbs mst++
pmurias jnthn: I'll expand the return test in nqp for more tricky cases 14:12
brrt jnthn: is that really the desired behavior? 14:14
the difference between blocks and subs, i guess
jnthn brrt: yes
14:15 cognominal_ joined
brrt interesting 14:15
14:15 cognominal left
jnthn It's spec. 14:15
And it's what you want
brrt my lispish brain has some problems with it, but it does make sense 14:16
in perl, there really is more than one way to do it
jnthn Otherwise sub foo(@a) { for @a { return 42 when 'answer' } } or so would not do what you wanted :)
(for loops are just syntax sugar for map calls)
brrt .. but map collects, and for doesn't, or does it 14:17
jnthn for collects too, if it's not in void context. 14:18
brrt rn: my @a = 1, 2, 3; my @b = for @a { $_ * 2 }; say @b.perl
p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Unable to resolve method from in type P6+{term:sym<∅>},{infix:sym<∈>},{infix:sym<(elem)>},{infix:sym<∉>},{infix:sym<∋>},{infix:sym<(cont)>},{infix:sym<∌>},{infix:sym<∪>},{infix:sym<(|)>},{infix:sym<∩>},{infix:sym<(&)>},{infix:sym<(-)>}…
..rakudo 0e866a: OUTPUT«===SORRY!===␤Confused␤at /tmp/d4qYVeQyY4:1␤»
jnthn Need a "do"
rn: my @a = 1, 2, 3; my @b = do for @a { $_ * 2 }; say @b.perl
p6eval niecza v22-14-g136ddcf: OUTPUT«[].list␤»
..rakudo 0e866a: OUTPUT«Array.new(2, 4, 6)␤»
brrt rn: my @a = 1, 2, 3; my @b = do for @a { $_ * 2 }; say @b.perl
p6eval niecza v22-14-g136ddcf: OUTPUT«[].list␤» 14:19
..rakudo 0e866a: OUTPUT«Array.new(2, 4, 6)␤»
brrt nice
14:25 cognominal_ left 14:29 kaare_ joined 14:30 MikeFair_ left 14:31 cognominal_ joined
[Coke] jnthn: is there a way to augment nqp classes like String? 14:37
jnthn [Coke]: There is no NQP class String
[Coke] Figured I'd try that out rather than try to get the HLL mapping working.
jnthn [Coke]: You're confusing Parrot's type system and NQPs.
[Coke] oh, is that String the parrot String? 14:38
jnthn They don't intersect.
Right.
NQP still uses bits of both.
[Coke] nqp: say(String.WHAT);
p6eval nqp: OUTPUT«␤»
14:38 cosimo joined, hash_table joined, havenn joined
jnthn Rakudo doesn't use hll mapping or expose Parrot types, fwiw. 14:38
Well, it does for its custom lexpad I guess. 14:39
But not for anything "user facing"
[Coke] wonders if he can augment parrot types from nqp, then. Or get parrot subclasses instead of nqp subclasses, since they don't seem to be equivalent.
(though, to be fair, I haven't tried to distill my core issue of not being able to do an HLL mapping down to a simple test file.) 14:40
jnthn [Coke]: It really depends what your goals are. If your goal is "a compiler that targets Parrot" you could go that way and it should mostly work out. If your goal is "a compiler that will, without too many changes, work on anything else that NQP lets you target in the future", then avoiding depending on Parrot's HLL mapping is probably for the best. 14:43
[Coke] My goal was "get partcl working again with the minimum amount of effort". :) 14:46
brrt [Coke]++ for that
14:46 xinming_ joined
japhb jnthn, I haven't done my backlogging yet, but just looking at where you highlighted me ... Niecza has internal support for a "dualvar", and then exposes that through role Niecza::Dualvar, so class IntStr is Int does Niecza::Dualvar. Given that Kernel.cs says "// Truly vile hack to make dualvars work.", I was hoping to avoid that kind of invasive work in Rakudo. So first I tried 'class IntStr is Int is Str { has $!string handles < Str gis 14:48
phenny japhb: 06:52Z <jnthn> tell japhb If you don't backlog, see irclog.perlgeek.de/perl6/2012-10-25#i_6097300 :)
japhb t >; has $!value handles *; }' but that resulted in reliable segfaults. So then I tried it again with *just* delegation, got the dispatch failures, and golfed my way to what I posted last night. So I'm stuck at the moment.
14:49 havenn left
jnthn japhb: But if you inherit from Int and Str you already have something capable of storing both an int and a str. 14:49
Well, apart from it's not an int, it's a bigint thingy
japhb: 6model is capable of such things, but currently only from the C API to it.
14:49 xinming left
japhb Done entirely at the Perl 6 level, how would I see the attributes of Int and Str where I would store the respective values? Or are you saying that I have to do 6model hackery to get at them? 14:51
s/Perl 6/NQP and Perl 6/
14:51 Exodist left 14:53 Exodist joined
jnthn japhb: I'm saying that currently, we only expose ops like nqp::p6box_n(...), for example 14:53
It internally does an allocate, initialize and set_num
japhb following you so far 14:54
jnthn We don't have ops that use a single object to box two primitive types.
14:54 mucker left
jnthn It's not that we need to do any low-level 6model hackery. It supports it well enough already, it's just that bit of functionality isn't exposed in any way to NQP or Rakudo space. 14:54
japhb OK, it sounds like you're suggesting writing said double-primitive boxing ops, and basically having the equivalent of Niecza's low-level dualvar, yes? 14:55
But perhaps less painful because 6model is designed to handle that level of crazy. 14:56
jnthn yes, write the ops to construct these kinds of thing.
japhb OK, guess it's time to learn 6model a little more thoroughly. :-) 14:57
japhb had held out some home that Perl 6 was powerful enough to do that all in "user space", so to speak, but perhaps I was pushing it a bit too far.
*hope 14:58
pmurias what is a dualvar?
[Coke] jnthn: but you're right. if I stop trying to target parrot through nqp and just target nqp, I'll no doubt have an easier time of it.
brrt a scalar that holds both a string and a number at the same time 14:59
in p5, you have a 'use dualvar'; which allows you to manipulate this
(a p5 scalar always holds both, but they are supposed to be in sync) 15:00
pmurias do we have them in Perl6?
japhb pmurias: yes ... the result of the val() sub, which I'm trying to implement in Rakudo 15:01
pmurias found it in the spec 15:04
japhb Well, I guess val() is a very specific subset of the general dualvar concept, but still, the basic functionality is required.
bbiab 15:05
15:07 mucker joined 15:08 benabik joined 15:15 havenn joined 15:18 cognominal_ left 15:21 alester joined 15:26 havenn left
kresike bye folks 15:27
15:27 kresike left
masak fare thee well, kresike. 15:32
masak .oO( why is it "fare thee well", and not "fare thou well"? )
japhb @kids[$_].delivered = True for ^2;
15:32 brrt left
masak japhb: \o/ 15:32
japhb: heartfelt congratulations. 15:33
japhb *chuckle* Not *that* kind of delivered. ;-)
masak oh!
heh. :)
beg pardon, I am not a native speaker of your language... :P
PerlJam wonders if kid 0 feels any lesser for being 0 ;) 15:34
masak dang, PerlJam++ beat me to it :P
15:35 benabik left, benabik joined
jnthn japhb, [Coke]: Got caught up with $client-task. Decommute now, will backlog when I'm home :) 15:46
15:48 colomon joined 15:49 mucker left 15:50 hoelzro is now known as hoelzro|away 15:52 havenn_ joined 15:53 gdey joined 15:55 kaleem left, kaleem joined, domidumont left 16:02 sizz left 16:03 havenn_ left 16:05 circlepuller joined 16:09 SamuraiJack joined, kaleem left 16:10 havenn joined
japhb @kids[2].delivered(:to($pre-school)); # Breath easy, masak. ;-) 16:13
masak ;)
I hear breathing is the key in these circumstances. 16:14
japhb :-D
masak by the way, there's a strong case for making those two different methods, and not rely on nameds to separate the two usages. :P
TimToady heavy breathing is usually involved somewhere... :)
japhb I refactored my API after the first failed test
TimToady, ;-) 16:15
TimToady when I hear "She delivered a baby" my default assumption is that she is a doctor. 16:16
even more so for He
flussence or a stork 16:17
TimToady usually we "had" or "gave birth to" for the other thing
16:17 SamuraiJack left
TimToady *we use 16:17
japhb Clearly my mistake was the boolean attribute, which led to masak++'s interpretation "has been delivered" 16:18
TimToady use of "delivered" for "gave birth to" sounds kinda elizabethan to my ear 16:19
16:19 arlinius joined
skids r: sub a ($f) { (1,2,3).map: { return $_ } }; a(1).say # Should this blow up like it does, or should it just slap an implicit eager on there when it sees the return? 16:19
p6eval rakudo 0e866a: OUTPUT«Attempt to return outside of any Routine␤ in block at src/gen/CORE.setting:462␤ in block at /tmp/Qlf3Zdg_uu:1␤␤»
japhb Huh. Sounds perfectly modern to me, if a bit impersonal.
japhb looks for the accent grave so as to spell "birthed" with two syllables 16:20
jnthn is back 16:22
TimToady skids: um, I'm guessing neither?
jnthn skids: It's behaving as expected. 16:23
TimToady it should not blow up, because the return should lexotically return from the sub
japhb jnthn: in black?
jnthn TimToady: Huh. The map is lazy. We *already* returned from the sub.
TimToady ah, so we did
jnthn And we try to iterate afterwards. 16:24
phew :)
TimToady blames lack of coffee, but that's a crock :)
jnthn wasn't looking forward to trying to implement the solution to that one :P
japhb: I am, actually, wearing quite a bit of black today :)
[Coke] could use a crock of coffe, and is wearing all black. 16:25
TimToady [Coke]: you know, you can start wearing a few accents of red; that's how recovering goths do it... 16:26
Y'know, if I'd just admit my mistakes before I make them, it'd save a world of misunderstandings... 16:28
16:28 domidumont joined
diakopter join #perl11 16:29
heh
wrong network
jnthn hands diakopter a slash 16:30
japhb: I guess the options are to add new ops specific to doing this double-boxing, or just adding a few ones that call the appropriate REPR set functions from the boxing API. 16:31
16:32 MayDaniel joined
[Coke] TimToady: I apparently give off a more johnny cash than goth vibe. 16:34
TimToady even johnny cash is goth at halloween, especially since he's dead 16:39
ingy ouch! 16:43
perigrin Also Johnny did do those NIN covers.
ingy this parrot is NOT goth. 16:44
it's merely pining for the Nails...
perigrin The Norwegian Black ... beautiful eyeliner!
TimToady no, it's pining for the Fords. 16:45
perigrin it wouldn't be if it had been driving one. stupid car.
ingy My volvo is a ford :(
diakopter reminds me of the knights who say Nimh
TimToady you know what happens if you play a country song backwards?
diakopter your dog comes back to life? 16:46
TimToady and your pickup starts running again
not to mention the girlfriend coming back
ingy all of them?
from Texas?!
diakopter anyone know how to remove oneself from the maintainer's list of a CPAN distribution? 16:48
I was added to one a few years ago and now I'm tired of getting RT mail
and the other maintainer isn't replying to my email 16:49
TimToady change your name? 16:58
GlitchMr block e-mails? 17:01
FROGGS diakopter: you might ask [email@hidden.address] (or perl.org?), or ANDK
or module-authors or what it was 17:02
on pause.perl.org you can give up maintainership, but I dont know if that fits your needs
diakopter oh, that's probably what I want
it's been so long... 17:03
17:03 dakkar left 17:08 am0c left
diakopter FROGGS: found/did it; thanks 17:08
17:11 Chillance joined 17:18 HarryS left
flussence I've spent about 20 seconds thinking about an idea: taint checking using role + type checking 17:18
as in, sub print_html(HTMLEscapedStr $s) { ... } (but with better names that don't drive people crazy to use) 17:20
masak flussence: there is some wording about a Taint enum in S12. 17:21
might interest you.
never been implemented AFAIK.
pmurias in the absence of threads contextuals can be turned into globals and local? 17:22
TimToady local is one of the major reasons P5 has trouble with threads, of course :) 17:25
flussence masak: that does sound like what I'm thinking of, but it seems a bit narrowly defined. I wonder if it'll turn into a hierarchy of "safe for use" roles, like exceptions are today 17:26
TimToady pmurias: but yes, that's precisely what STD does
flussence (so you can't pass an Untainted::HTML to a SQL function and so on)
TimToady (for the p5 backend)
17:29 daxim left
felher jnthn++ #blog post from yesterday 17:30
pmurias TimToady: is there a different backend?
moritz yes, a .NET/CLR backend 17:31
called niecza
felher jnthn: i find trace points to be a nice idea :) 17:32
17:36 orafu joined
TimToady masak: re "fare thee well", all I can say is that the Indo-European word "fare" comes from also gives us "ferry", "ford", and "port", any of which can have transitive meanings when used as a verb 17:36
however, this does not explain why it is "fare thee", and not "fare thyself"
maybe it's one of those things like "Just look at you!" 17:37
masak maybe.
TimToady where it's objectifying the 2nd person to make it seems like someone else
or "F*ck you!" and such 17:38
or maybe it's using "you" as a referent to a 3rd-person notion in the speaker's mind, pragmatically "I'm not really speaking to you, but about you." 17:39
17:40 sjohnson left
TimToady so even though the form of the verb seems to indicate a command to the hearer, it's really more like a Whatever for the subject of the sentence 17:41
masak so, "fare thee well" is really directed at a third party? that makes sense, since kresike had already left the room. ;) 17:43
TimToady such that it's perfectly proper (or imperfectly improper) for one to drop the F-bomb on a hearer you can't actually hear you, such as the driver of another car
17:43 sjohnson joined 17:44 benabik left, HarryS joined
TimToady well, yeah, something like "I wish the Universe to do a good job of ferrying this person named 'you'" 17:45
of course, all this analysis is beside the point when you have a fossilized form that people just repeat because they heard it that way, not because they've analyzed it in their head 17:46
.oO(Go not to the linguists for advice, for they will say both "Yes" and "Huh?")
17:47
17:48 leont joined 17:51 alester left 17:52 HarryS left
TimToady the top three elements on the stack should probably be named .ult, .penult, and .antepenult 17:55
(referreing to the .last proposed earlier)
((esp since "last" means something else in Perl))
masak .oO( because we never overload terms? ) :P 18:01
18:02 pmurias left
tadzik is it just me, or perlcabal.org/syn/ is very slow? 18:04
18:05 masak left, masak joined
awwaiid just you 18:16
18:16 leont left
awwaiid pretty instant here 18:17
18:21 rindolf left 18:32 benabik joined, fgomez joined 18:33 cognominal joined 18:41 HarryS joined 18:42 havenn left 18:43 havenn joined 18:46 HarryS left
dalek osystem: 0f96f3c | tadzik++ | META.list:
Add Test::Harness
18:47
tadzik goo.gl/WPSDR
18:53 havenn left, sweet_kid left
jnthn tadzik: :D 18:58
tadzik there should be a Panda on that picture
feeling the Wind of Change in its ears
colomon what a great picture!
jnthn tadzik: There is photoshop... :) 19:00
tadzik If I could use it, I'd make an Obama saying "Not Bad Man" 19:01
jnthn meh, googling for "panda leaning out of a car" doesn't find a picture of one. 19:03
It did find a monorail panda though
19:04 birdwindupbird joined
[Coke] tadzik: www.kevincharnas.com/uploaded_image...726147.jpg 19:04
>close enough< 19:05
tadzik ahaha
I knew this with a caption
axelrod5.tripod.com/funny/thumbnail...0sense.jpg this one :)
[Coke] tadzik: hee!
19:06 changedNicks joined
jnthn nice! 19:06
skids Ah, was just about to link that one. 19:07
19:07 changedNicks left, changedNicks joined 19:08 mathw left, changedNicks is now known as sweet_kid
skids
.oO(in addition to the "last" keyword, proposed .last also doesn't play well with .first semantics)
19:11
19:11 thou left 19:12 havenn joined
skids Somedays I want to strip a thesaurus of unreasonably cumbersome words and produce a "coders thesaurus". 19:13
19:18 araujo left
flussence rn: say '12345' ~~ /({my @nums = 1..4})+/ 19:18
p6eval rakudo 0e866a: OUTPUT«(timeout)»
..niecza v22-14-g136ddcf: OUTPUT«(timeout)Potential difficulties:␤ @nums is declared but not used at /tmp/x4BONmavFh line 1:␤------> say '12345' ~~ /({my ⏏@nums = 1..4})+/␤␤»
19:22 zby_home joined 19:27 domidumont left, mathw joined 19:31 raiph joined 19:40 HarryS joined
mat_mat >>28555549 19:45
19:45 mat_mat left 19:47 araujo joined, araujo left, araujo joined 19:48 HarryS left 20:01 zby_home left
jnthn r: say defined try eval '!!omg!!! syntax fA1l!' 20:02
p6eval rakudo 0e866a: OUTPUT«True␤»
jnthn r: say so try eval '!!omg!!! syntax fA1l!'
p6eval rakudo 0e866a: OUTPUT«True␤»
jnthn r: say WHAT try eval '!!omg!!! syntax fA1l!'
p6eval rakudo 0e866a: OUTPUT«X::Syntax::Confused()␤»
jnthn r: try eval '!!omg!!! syntax fA1l!'; say so $! 20:03
p6eval rakudo 0e866a: OUTPUT«True␤»
jnthn r: try eval '42'; say so $!
p6eval rakudo 0e866a: OUTPUT«False␤»
jnthn precedence.t does
ok((not defined try eval '4 !'), "Whitespace not allowed before user-defined postfix");
jnthn glances through S04 20:04
flussence this turned out to be much harder than it looks: www.reddit.com/r/dailyprogrammer/co...ts/122c4t/ 20:05
masak flussence: ooh 20:06
jnthn S04 doesn't seem to say afaict
jnthn changes it to dies_ok( { eval '4 !' }, ... ); which should work for Niecza too 20:07
flussence masak: right now I've got as far as m:ex/^ (1\d || 2<[0..6]> || \d)+ $/ which is returning strings longer than the input. I'm pretty lost :( 20:08
masak flussence: seems one could use the :exhaustive flag on regexes to get all possible parsings.
20:09 GlitchMr left
masak flussence: how about m:ex/^ [(\d ** 1..2) <?{ $0 <= 26 }>]+ $/ ? 20:10
arnsholt For that kind of task I usually think of Prolog =)
20:10 SamuraiJack joined, popl joined
masak r: say "aaa" ~~ m:ex/a/ 20:11
p6eval rakudo 0e866a: OUTPUT«False␤»
masak hm.
r: say "aaa" ~~ m/a/
p6eval rakudo 0e866a: OUTPUT«「a」␤␤»
masak why would :ex make things return False?
jnthn masak: Be careful with m. It matches immediately. 20:12
Meaning that what you actually smart-match against is what gets returned by match. 20:13
~~ m/.../ may well be an anti-pattern, especially if you add modifiers.
r: say "aaa" ~~ rx:ex/a/
p6eval rakudo 0e866a: OUTPUT«===SORRY!===␤Adverb ex not allowed on rx␤at /tmp/nh2fdGKKDl:1␤» 20:14
jnthn Hm :)
masak ok, so I shouldn't combine ~~ and :ex
jnthn r: $_ = "aaa"; say m:ex/a/
p6eval rakudo 0e866a: OUTPUT«a a a␤»
masak \o/
20:14 SamuraiJack left
flussence r: say m:ex/a/ given 'aaa' 20:14
p6eval rakudo 0e866a: OUTPUT«a a a␤»
jnthn masak: Seems so. But that feels warty.
masak r: $_ = "123"; .say for m:ex/^ [(\d ** 1..2) <?{ $0 <= 26 }>]+ $/ 20:15
p6eval rakudo 0e866a: OUTPUT«「123」␤ 0 => 「12」␤ 0 => 「3」␤␤「123」␤ 0 => 「12」␤ 0 => 「1」␤ 0 => 「23」␤␤「123」␤ 0 => 「12」␤ 0 => 「1」␤ 0 => 「23」␤ 0 => 「2」␤ 0 => 「3」␤␤»
jnthn masak: But I think it's a known issue (at a design level...Rakudo is behaving to current spec afaik)
20:15 bruges left
masak r: $_ = "123"; say .Str for m:ex/^ [(\d ** 1..2) <?{ $0 <= 26 }>]+ $/ 20:15
p6eval rakudo 0e866a: OUTPUT«123␤123␤123␤»
masak heh :)
r: $_ = "123"; say .list for m:ex/^ [(\d ** 1..2) <?{ $0 <= 26 }>]+ $/
p6eval rakudo 0e866a: OUTPUT«12 3␤12 1 23␤12 1 23 2 3␤»
20:17 bruges joined
flussence
.oO( hm, I wonder what font I need to get those fancy brackets in the terminal... )
20:22
masak may I suggest that the above output is outright wrong? 20:24
arnsholt masak: I wouldn't disagree with that =)
masak I would expect '12 3', '1 23', '1 2 3'.
jnthn I don't even know what :ex is meant to do, so no clue. :) 20:25
masak it would seem to me :ex is passed down to subrules.
or something.
jnthn I thought it was meant to produce all the possible ways it can match.
masak aye.
flussence am I imagining things, or did we have an :all at one point that would've worked that way? 20:26
says here :ex implies :overlap, wouldn't that mean it can be done without that?
masak hm, why would :ex imply overlap?
maybe I'm misremembering things. 20:27
dalek ast: 00ff866 | jnthn++ | S06-traits/precedence.t:
Use dies_ok instead of 'defined try'.
20:30 cognominal left
flussence the :ex-ample in S05:576 doesn't work in rakudo either. 20:30
...probably because it's doing exactly that ~~ m// thing mentioned earlier :) 20:31
masak I still haven't understood what went wrong with ~~ m// 20:32
something is serisouly fishy there.
seriously*
flussence n: 'abc' ~ m/a/
p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: Unable to resolve method match in type Any␤ at /tmp/F6NApKRi_c line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4216 (module-CORE @ 579) ␤ at /home/…
flussence erm
n: say 'abc' ~~ m/a/
p6eval niecza v22-14-g136ddcf: OUTPUT«#<match from(0) to(1) text(a) pos([].list) named({}.hash)>␤»
masak anyway, :overlap shouldn't be a problem for us in my regex above, since I'm anchoring it to both ends of the string.
LordVorp I'm on a forum that often has attached files with names that look like: "Sample (10).tos". When I click Download, I get a file named "Sample %2810%29.tos". Is there a switch or setting that will make these come down w/o escapes? 20:33
flussence ww?
LordVorp wow TOTALL ww 20:34
!
LordVorp blushes
flussence heh :)
sorear hey LordVorp. welcome to the nonlurkers. :D 20:35
masak no there's no going back.
LordVorp haha thank you.
masak now you must try Perl 6. :P
LordVorp i've been watching P6 vicariously for some time but haven't quite gotten my feet wet yet. 20:36
masak splashes some water on LordVorp's feet
LordVorp is it still prudent to simply start with the Apocalypse docs and go from there?
masak LordVorp: gosh, no.
LordVorp: if you must read something, read doc.perl6.org/
LordVorp will do 20:37
LordVorp starts to learn something interesting...
masak LordVorp: but most of all, pick a small task and try to code it up. that tends to cause the right questions to be asked.
LordVorp yep.
masak we're all very eager to answer beginner questions.
20:39 birdwindupbird left
colomon r: sub cycle($start) { $start, { when * !%% 2 { 3 * $n + 1 }; when * %% 2 { $n / 2 }; } ... 1 }; say cycle(22) 20:40
p6eval rakudo 0e866a: OUTPUT«===SORRY!===␤Variable $n is not declared␤at /tmp/5YOnNtVvA3:1␤»
20:40 HarryS joined
colomon r: sub cycle($start) { $start, { when * !%% 2 { 3 * $_ + 1 }; when * %% 2 { $_ / 2 }; } ... 1 }; say cycle(22) 20:41
p6eval rakudo 0e866a: OUTPUT«22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1␤»
jnthn r: sub bicycle($start) { ($start, { when * !%% 2 { 3 * $_ + 1 }; when * %% 2 { $_ / 2 }; } ... 1) xx 2 }; say bicycle(22) 20:42
p6eval rakudo 0e866a: OUTPUT«22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1␤»
20:44 kurahaupo joined 20:47 Moukeddar joined
masak Moukeddar! \o/ 20:47
20:47 HarryS left
Moukeddar Good evening #perl6, masak o/ 20:47
20:52 havenn left
dalek ast: a011579 | jnthn++ | S06-traits/precedence.t:
Fudge for Rakudo.
20:52
kudo/nom: 8c6ccf5 | jnthn++ | src/ (2 files):
Some fixes to precedence handling.

With these, we now pass all but 1 test of S06-traits/precedence.t.
kudo/nom: c8d1bd6 | jnthn++ | t/spectest.data:
Run S06-traits/precedence.t.
japhb jnthn, before you head to sleep ... :-) 20:53
20:53 benabik_ joined
japhb Where do you suggest I start researching to figure out how to do the dualvar functionality in Rakudo? 20:53
20:53 benabik left, benabik_ is now known as benabik
japhb (I figure I'll be reading a lot of code before I write any, since much of it will be in C it sounds like.) 20:53
20:53 raiph left
dalek kudo/nom: 75ee64b | jnthn++ | docs/ROADMAP:
ROADMAP update.
20:54
masak japhb: all this for val() ? 20:55
20:55 havenn joined
jnthn japhb: Read 6model.h to figure out the REPR API 20:55
japhb: When you say "much of it" though, I think we're not talking much.
masak nr: say .^name for <42 4.2 1e3> 20:56
japhb masak, in one form or another I've been working on pieces of val() or things that want to call val() for a really damn long time. It's like the curse of my Rakudo tenure. ;-)
p6eval rakudo 0e866a: OUTPUT«Str␤Str␤Str␤»
..niecza v22-14-g136ddcf: OUTPUT«IntStr␤RatStr␤NumStr␤»
20:56 spanner left
japhb jnthn, OK, I hope you are correct. :-) 20:56
jnthn japhb: See then for example perl6_box_str in perl6.ops 20:57
20:57 hash_table left
jnthn japhb: To explain what's needed... 20:57
masak japhb: I know how that feels. I've been wanting macros for years.
jnthn Boxing a primitive involves two steps:
japhb is listening
masak, I bet!
jnthn 1) allocate
2) store the primitive type inside of the object 20:58
Int is a little bit different because it's really a big integer, but it's basically the same approach. 20:59
For example, the op taht boxes an int is:
PMC *type = Rakudo_types_int_get();
$1 = REPR(type)->allocate(interp, STABLE(type));
REPR($1)->box_funcs->set_int(interp, STABLE($1), OBJECT_BODY($1), $2);
If you're coming from a native integer 21:00
It occurs to me the easiest way to get what you want is really just to produce the FooStr in the same way you'd produce a Foo 21:01
And then write just one op that is something that sets the thing's string likeness
21:01 spanner joined
jnthn So it takes an existing object and a string and just calls the set_str on the boxing API. 21:02
Plus do a write-barrier in the op.
japhb Is there already a slot to store the string into?
jnthn If you inherit from Str also then yes. 21:03
21:04 skids left
jnthn To illustrate what's going on: 21:06
japhb jnthn, Am I correct in assuming that by '6model.h', you actually meant 'sixmodelobject.h'?
jnthn r: class SpecialStr { has str $!value is box_target; multi method gist(SpecialStr:D:) { self.Str() }; method Str() { self } }; my $x = nqp::box_s('blah', SpecialStr); say $x.WHAT; say $x;
p6eval rakudo 0e866a: OUTPUT«SpecialStr()␤blah␤»
japhb still listening
jnthn japhb: uh, yes, sorry :)
Str is declared something like this. It's native str is marked with the "box_target" trait. 21:07
This means that if you use the type to box a native string, or you want to get a native string out of it, it will look at that slot.
21:08 benabik left
japhb no problem. BTW, I note that the only differences between the copies in Rakudo's src/binder/ and NQP's src/6model/ is the write barriers and the 3 typedefs right under 'Dynamic representation registration.' in the NQP version. Is that just unintentional skew, or intended difference? 21:08
jnthn Unintentional skew
japhb Ah, OK
jnthn Surprising though because normally things explode very quickly if they are out of sync 21:09
Well, actually, the dynamic representation registration stuff is used nowhere in Rakudo
But it doesn't harm to have it. Feel free to sync them. (NQP one is latest.)
japhb Okie dokie
So I guess my next question is, can there be multiple box_targets, as long as they have different native types? 21:10
jnthn Yes 21:11
japhb \o/
jnthn And it's not just about the 3 core native types
japhb Oh yeah, my job just got way easier
jnthn Any inlineable REPR can kinda have one too
Which is why the libtommath big int data structure can be inlined straight into the body of a Perl 6 Int.
japhb jnthn++ # Internal APIs that don't suck
excellent
jnthn Rather than needing another level of indirection.
In the end this kinda thing is how we'll get things like packed arrays of compact structs. 21:12
jnthn waves hands a bit :)
dalek kudo/nom: 3619d77 | (Geoffrey Broadwell)++ | src/binder/sixmodelobject.h:
Syncing unintentionally skewed 6model header, as per jnthn++
21:13
japhb I do like me some packed arrays, so that's good news ... 21:14
jnthn Like everything undone, it's on the todo list :)
japhb heh
TODO: *
jnthn r: say *
p6eval rakudo 75ee64: OUTPUT«*␤»
jnthn Actually, that's todone :P
BTW, if nobody else jumps up to do it, I'll cut the month's R* release on Saturday or so. 21:16
japhb
.oO( Is a list of TODO items countable, given that every TODO item can usually be broken into smaller TODOs recursively?)
jnthn I think that this recursion does terminate. However, $jnthn.comprehend-how-the-hell-STDs-handling-of-operator-adverbs-works may take infinite time... 21:18
jnthn decides, for the 5th time, not to work on that for now... 21:19
21:19 sweet_kid left
japhb heh 21:20
21:23 changedNicks joined 21:33 changedNicks left, changedNicks joined 21:34 changedNicks is now known as sweet_kid 21:35 kaare_ left 21:47 sweet_kid left 21:48 sizz joined 21:49 changedNicks joined 21:50 hash_table joined 21:51 changedNicks left, changedNicks joined, changedNicks is now known as sweet_kid 21:52 MayDaniel left 21:53 soptnrs joined 21:56 thou joined 22:04 soptnrs left
dalek p: acab2e7 | jnthn++ | src/QAST/Operations.nqp:
Add some context introspection nqp:: ops.

Whatever VM we target, we'll need to be able to talk about these in a first class way, and it'll be the same basic operations (chase the outer or caller chain, look at lexicals, etc.)
22:05
p: f80be32 | jnthn++ | src/stage0/ (9 files):
Update bootstrap to get new nqp:: ops.
p: a01efec | jnthn++ | src/ (4 files):
Replace some Q:PIR with the various new ops.
22:05 stopbit left 22:09 bluescreen10 left
masak r: sub ex($_) { return "" when ""; my ($f, $r) = .substr(0, 1), .substr(1); return $f when .chars == 1; my @r = ex $r; my ($f2, $r2) = .substr(0, 2), .substr(2); my @r2 = ex $r2; return $f2 < 27 ?? ("$f2 $_".trim for @r2) !! (), ("$f $_" for @r) }; sub l($s) { $s.words.map({($_ + "a".ord - 1).chr}).join }; say .&l for ex "123" 22:10
p6eval rakudo 75ee64: OUTPUT«lc␤aw␤abc␤»
masak yay
if at first you don't succeed... :)
though this would've been *so* much easier if :ex had worked to spec. 22:11
this is the first time I've wanted :ex
flussence: ^^^ 22:12
22:16 Moukeddar left
flussence masak++ 22:17
masak TDD++
flussence (I wonder if something [ab]using junctions would've worked...)
masak I tried .comb with a disjunction. the results were dissapointing. 22:18
rn: say "123".comb(/./ | /../)
p6eval rakudo 3619d7: OUTPUT«any(1, 2, 3, 12)␤»
..niecza v22-14-g136ddcf: OUTPUT«any(["1", "2", "3"].list, ["12"].list)␤»
22:18 fgomez left
masak both of those answers are "wrong" from the perspective of the problme. 22:18
problem*
jnthn But unsurprising given how auto-threading works :) 22:19
masak seems what junctions do there is to mostly expose the internals of the .comb algorithm.
jnthn: yes.
jnthn (The junction never makes it into comb)
masak jnthn: perhaps if .comb had been defined recursively on the remaining string, it'd have worked.
jnthn isn't sure he follows :) 22:20
If Rakudo passes spectest I'm running at the moment, we will have reached an interesting milestone...
22:20 flightrecorder left 22:21 FROGGS left
masak oh? 22:22
22:24 whiteknight joined
dalek p: d82aa59 | jnthn++ | src/HLL/ (2 files):
Eliminate use of lexpad_pull cheat.

Logic re-written in terms of the new nqp:: ops.
22:25
p: 843aec6 | jnthn++ | src/QRegex/P6Regex/Grammar.nqp:
Stop loading now-unused PASTRegex library.
p: 893a4d1 | jnthn++ | src/stage0/ (9 files):
Update bootstrap to elminate PASTRegex usage.
jnthn And...
dalek p: c05f281 | jnthn++ | / (3 files):
Eliminate callcontext cheat.

This in turn means PASTRegex - the library the remaining .pir cheats were placed into - can now also go away. This means we have no .pir files in the NQP repository, apart from the generated-from-NQP stage0.
22:26
arnsholt Cool!
masak jnthn++ 22:32
'night, #perl6
22:35 skids joined
jnthn japhb: One detail I forgot to mention: src/Perl6/Ops.pm is where we do nqp:: space things for the pir:: operations declared in src/ops/perl6.ops 22:40
(as in, that's where the mapping goes)
sleep & 22:41
22:41 gdey left 22:48 PacoAir left 23:00 tokuhiro_ joined 23:02 popl left
[Coke] jnthn++ 23:21
does nqp support typed method parameters? 23:33
(i want to do a multi method, but method foo(String $string) {...} doesn't work.
nqp: class A { method B(String $a) {say($a)} }; A.new().B("eek"); 23:35
p6eval nqp: OUTPUT«Routine declaration requires a signature at line 2, near "(String $a"␤current instr.: 'panic' pc 13089 (src/stage2/gen/NQPHLL.pir:4619) (src/stage2/gen/NQPHLL.pm:324)␤»
[Coke] r: class A { method B(String $a) {say($a)} }; A.new().B("eek");
p6eval rakudo 3619d7: OUTPUT«===SORRY!===␤Invalid typename in parameter declaration at line 2, near " $a) {say("␤»
[Coke] r: class A { method B(Str $a) {say($a)} }; A.new().B("eek"); 23:36
p6eval rakudo 3619d7: OUTPUT«eek␤»
[Coke] guess I'll do a single untyped method and put a switch in. :|
23:38 Chillance left 23:45 havenn left 23:49 whiteknight left 23:54 adu joined
[Coke] \o/ [llength "a b c"] now returns 3 in partcl again. That took too long. :) 23:55
adu o/ 23:57
23:59 fgomez joined