»ö« 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 _jaldhar_ is now known as jaldhar
pmichaud I'm thinking that it should be a method 00:22
.isitem or .is_item might be good first approximations to a name
could even be .flattens
.isflattening 00:23
00:27 Chillance left
sorear pmichaud: what's your favorite .perl syntax for the List type? 00:31
00:35 xinming_ joined 00:37 xinming left 00:43 silent_h_ joined 00:44 benabik left 00:45 donri left 00:52 masonkramer joined 00:56 thou joined 01:07 silent_h_ left
pmichaud goooood question 01:08
sorear I'm going with (1, 2, 3).list for now
.list.item if needed :)
pmichaud I'd guess either List.new(...) or (...).list
TimToady something that always flattens in list context and doesn't in item context might just be (1,2,3), me would think; the question is whether we expect the resulting value to be forced into list/item context, the avoiding of which I thought this was about 01:12
TimToady wonders if that implies eval_list(), eval_item()... 01:15
or whether eval() can be lazy on that... 01:16
01:24 thou left
dalek ecza: 116226c | sorear++ | / (2 files):
New flattening-aware .perl (pmichaud++ for design help)
01:39
01:40 whiteknight left
pmichaud I think sorear is guarding against the fact that (1,2,3) is in fact a Parcel, and not a list 01:40
*not a List
but that's a guess on my part.
sorear right. 01:41
the idea is that .perl should expose as many fine distinctions as possible 01:42
(1,2,3) and @(1,2,3) are not quite the same - .HOW.name is different - so they should .perl different
I wonder if the standard .perl methods should actually be submethods 01:43
01:43 Khisanth left
sorear so user-defined subclasses of List or whatever .perl non-misleadingly 01:43
pmichaud well, I'm wondering if (1,2,3) and @(1,2,3) can actually be the same, though -- I mean, a Parcel in list context is still a Parcel 01:44
01:44 benabik joined
pmichaud i.e., the @ doesn't force any additional interpretation on the bare parcel, afaik 01:45
(and that's why I was a little hesitant about using .list to mean "List" earlier, too)
rakudo: say (1,2,3).WHAT
p6eval rakudo be887a: OUTPUT«Parcel()␤»
pmichaud rakudo: say @(1,2,3).WHAT
p6eval rakudo be887a: OUTPUT«List()␤»
pmichaud apparently Rakudo currently recasts it as a list, yes.
*List 01:46
(darn capitalization puns. In Texas, we know that "texas" and "Texas" both really mean "TEXAS". :-P ) 01:47
(for an avowed non-Texas, I sure like to act like one at times. Hmm. )
*non-Texan
01:53 dur-randir joined 01:56 Khisanth joined 02:09 flatwhatson left 02:13 agentzh joined 02:23 flatwhatson joined 02:31 masonkramer left 02:48 [particle] left 02:49 [particle] joined 02:53 woosley joined 03:02 alester joined 03:05 woosley left, bluescreen10 left 03:18 thou joined 03:19 woosley joined 03:23 Su-Shee_ joined 03:26 jlaire left, Su-Shee left
dalek ecza: ddee5a5 | sorear++ | / (4 files):
Implement term:<rand>
03:50
sorear niecza: my @foo = 1,2,3; say @foo.perl; 03:53
p6eval niecza v5-11-g116226c: OUTPUT«[1, 2, 3].list␤»
sorear niecza: my @foo = 1,2,3; my $x = @foo; say $x.perl;
p6eval niecza v5-11-g116226c: OUTPUT«[1, 2, 3]␤»
03:57 dur-randir left 04:08 satyavvd joined 04:44 [particle] left 04:45 [particle] joined 04:48 ymasory left 04:50 alester left, [particle] left 04:58 kaare_ joined, wamba joined 05:02 risou_awy is now known as risou, dur-randir joined 05:12 noganex left 05:13 noganex joined
dalek ecza: a2b2f37 | sorear++ | / (8 files):
$_ defaults to $OUTER::_
05:13
ecza: 622e5dc | sorear++ | / (2 files):
Implement validation for "is rw"
05:15
05:16 [particle] joined
pmichaud sorear: what method name or other did you choose to distinguish between item/list ? 05:17
(so I can choose a similar name in Rakudo, and in the List docs that I'm still planning to write someday soon)
sorear .flattens 05:18
niecza: say [1,2,3].flattens
p6eval niecza v5-12-gddee5a5: OUTPUT«Bool::False␤»
pmichaud wfm... we'll use that. 05:19
sorear niecza's $_-handling is a lot closer to spec now
pmichaud sorear++
sorear niecza: $_ = 5; if $_ { say $_ } # this will work once p6eval updates 05:20
p6eval niecza v5-12-gddee5a5: OUTPUT«Any()␤»
sorear I wonder if "ア".."ン" should be treated as an increment range, skipping over "ゲ" etc 05:23
TimToady the song I know puts ン between ワ and ヲso I dunno 05:29
05:32 birdwindupbird joined
sorear I haven't seen iroha used with katakana before 05:32
05:33 wamba left
TimToady metoo, but I just went with what you started :) 05:33
05:34 wamba joined
sorear my current teacher does all of eir bulleting with katakana in gojuuon order 05:34
was hoping I could extrapolate a rule
for the Perl 6 i18n features we might have a chicken/egg problem - need to reach out to other linguistic communities somehow 05:35
05:36 ruoso left
TimToady was just going to suggest 日本人に話いる。。。 05:36
05:43 wamba left, wamba joined 05:51 wtw_ joined 06:08 nsh left 06:10 nsh joined 06:12 Baggio joined 06:14 Baggio left 06:20 Su-Shee_ is now known as Su-Shee 06:24 baest_ is now known as baest
moritz sorear: I get a regression in t/spec/S06-multi/lexical-multis.t on niecza 06:30
sorear TimToady: my dictionary does not have /hanairu/, /hanashiiru/, or /wairu/ and I do not know any relevant conjugation patterns
moritz not ok 9 - inner multi conflicts with outer one
# /home/moritz/p6/niecza/t/spec/S06-multi/lexical-multis.t line 41
sorear++ # line numbers for failed tests 06:31
t/spec/S03-operators/relational.t also fails some tests, but iirc pmichaud++ added some in there
sorear I hold that that test is in conflict with the spec prose
moritz so probably not a regression
sorear: should inner multis win? 06:32
sorear the inner and outer multis have the same long name, so the inner multi should completely shadow the outer one, not conflict with it
(niecza cheats at this by saying "inner multis win ties", which is not quite right)
yes, S12:1077 says that multis hide outer or less derived multis with the same long name 06:34
06:35 woosley left
sorear rakudo: my $x = 'aaa'; $x--; say $x.perl 06:36
p6eval rakudo be887a: OUTPUT«undef␤»
moritz how does the "same long name" work out for params with constraints? 06:37
sorear moritz: I keep asking that to no use
also, I question Rakudo's behavior on the last line 06:38
it does not seem very useful, even if it is what roast looks for
(the spec itself is rather vague, saying only "fails.") 06:39
moritz perl6: my %h = ( o => 1, 1 => 0 }; my ($a, $b); $a = 1 if %h{0}; $b = 1 if %h{1}; say $a, $b
p6eval rakudo be887a: OUTPUT«===SORRY!===␤Confused at line 22, near "my %h = ( "␤»
..pugs: OUTPUT«*** ␤ Unexpected "%h"␤ expecting "=", operator, ")", context, ":" or "("␤ at /tmp/XrLjHdSbHY line 1, column 4␤»
..niecza v5-14-g622e5dc: OUTPUT«===SORRY!===␤␤Any()Unable to parse parenthesized expression at /tmp/jszl8s3ozx line 1:␤------> my %h = (⏏ o => 1, 1 => 0 }; my ($a, $b); $a = 1 i␤Couldn't find final ')'; gave up at /tmp/jszl8s3ozx line 1:␤------> my %h = ( o
..=> 1, 1 => 0 …
TimToady just mistyped something between 話す and 話します. 06:40
moritz perl6: my %h = ( 0 => 1, 1 => 0 ); my ($a, $b); $a = 1 if %h{0}; $b = 1 if %h{1}; say $a, $b
p6eval pugs: OUTPUT«1␤»
..rakudo be887a, niecza v5-14-g622e5dc: OUTPUT«1Any()␤»
moritz sorear: (unrelated) niecza fails in t/spec/S04-statement-modifiers/values_in_bool_context.t, might be a LHF 06:41
dalek ecza: 772e83c | moritz++ | t/spectest.data:
run another integration test
moritz sorear: feel free to fix the multi test according to your spec interpretation, I'd do it myself but i have to leave right now
bbl 06:42
tadzik hello #perl6 06:44
sorear hi tadzik !
TimToady: ah 06:45
dalek ast: 98a4c10 | sorear++ | S06-multi/lexical-multis.t:
Inner multis should hide, not conflict (S12:1077)
06:46
06:50 ershov joined
sorear out 06:53
07:01 domidumont joined 07:08 fhelmberger joined 07:22 nrr left 07:29 mj41 joined 07:30 nrr joined 07:35 thou left 07:36 woosley joined 07:50 risou is now known as risou_awy 07:52 awoodland joined 08:00 risou_awy is now known as risou 08:06 mberends joined 08:32 dakkar joined 08:39 Mowah joined 08:41 wamba left 08:49 daxim joined 08:52 ershov_ joined, ershov left 08:57 wamba joined 09:13 bacek left 09:31 bacek joined 09:33 awoodland left 09:34 satyavvd left 09:35 satyavvd joined 09:37 Mowah left 09:38 wamba left 09:47 dju__ joined, dju_ left 09:53 ershov_ left 09:54 ershov joined, wamba joined 10:18 ershov left 10:25 icwiener joined
DarthGandalf perl6: my @a = 1,2,3,4; my @b = 11,12,13,14; @a Z @b 10:45
p6eval pugs, rakudo be887a, niecza v5-15-g772e83c: ( no output )
DarthGandalf perl6: my @a = 1,2,3,4; my @b = 11,12,13,14; my @x = @a Z @b; say @x
p6eval rakudo be887a, niecza v5-15-g772e83c: OUTPUT«111212313414␤»
..pugs: OUTPUT«1234␤»
DarthGandalf perl6: my @a = 1,2,3,4; my @b = 11,12,13,14; my @x = @a Z @b; say "@x" 10:46
p6eval niecza v5-15-g772e83c: OUTPUT«1 11 2 12 3 13 4 14␤»
..pugs, rakudo be887a: OUTPUT«@x␤»
mberends
.oO( who is right there? )
DarthGandalf perl6: my @a = 1,2,3,4; my @b = 11,12,13,14; my @c = 21,22,23,24; my @x = @a Z @b Z @c; say "@x" 10:47
p6eval pugs: OUTPUT«@x␤»
..rakudo be887a: OUTPUT«No applicable candidates found to dispatch to for 'infix:<Z>'. Available candidates are:␤:()␤:(Any $lhs, Any $rhs)␤␤ in main program body at line 22:/tmp/8lNVfwtWji␤»
..niecza v5-15-g772e83c: OUTPUT«1 11 21 2 12 22 3 13 23 4 14 24␤»
DarthGandalf Why do they give different output? 10:48
s/they/rakudo, pugs and niecza/ 10:49
TiMBuS It's particularly handy because Perl 6 (unlike Perl 5) won't interpolate a bare array without bracket
excerpt from s09
say "@x = @x[]"; # prints @x = 1 2 3 10:50
DarthGandalf perl6: my @a = 1,2,3,4; my @b = 11,12,13,14; my @x = @a Z @b; say "@x[]"
p6eval rakudo be887a: OUTPUT«1 11 2 12 3 13 4 14␤» 10:51
..niecza v5-15-g772e83c: OUTPUT«Unhandled exception: No value for parameter $index in CORE postcircumfix:<[ ]>␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE postcircumfix:<[ ]> @ 0)␤ at /tmp/QyB561ITXa line 1 (MAIN mainline @ 10)␤ at /home/p6eval/niecza/lib/CORE.setting line 1374 (CORE
..C562_ANON @ 2)␤ …
..pugs: OUTPUT«1 2 3 4␤»
10:52 morten__ joined
DarthGandalf perl6: my @a = 1,2,3,4; my @b = 11,12,13,14; my @c = 21,22,23,24; my @x = @a Z @b Z @c; say "@x[]" 10:52
TiMBuS victory goes to rakudo
p6eval niecza v5-15-g772e83c: OUTPUT«Unhandled exception: No value for parameter $index in CORE postcircumfix:<[ ]>␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE postcircumfix:<[ ]> @ 0)␤ at /tmp/m94Bhe0ulJ line 1 (MAIN mainline @ 13)␤ at /home/p6eval/niecza/lib/CORE.setting line 1374 (CORE
..C562_ANON @ 2)␤ …
..rakudo be887a: OUTPUT«No applicable candidates found to dispatch to for 'infix:<Z>'. Available candidates are:␤:()␤:(Any $lhs, Any $rhs)␤␤ in main program body at line 22:/tmp/Ujbp_7KTxs␤»
..pugs: OUTPUT«1 2 3 4␤»
DarthGandalf TiMBuS: except few Zs
10:54 morten__ left
TiMBuS what the heck doesnt match Any 10:54
=/
10:54 mikemol left 10:55 masonkramer joined
mberends rakudo: my @a = «the rain in Spain»; say @a; say "\@a:@a"; # should interpolate but doesn't 10:55
p6eval rakudo be887a: OUTPUT«theraininSpain␤@a:@a␤»
10:55 masonkramer left
DarthGandalf oO Does it understand non-" quotes? 10:56
mberends rakudo: my @a = «the rain in Spain»; say @a; say qq/\@a:@a/; # same problem 10:57
TiMBuS oh.. so its calling infix<Z>(@a, @b, @c)
p6eval rakudo be887a: OUTPUT«theraininSpain␤@a:@a␤»
DarthGandalf perl6: say «foo», „bar“, “baz” 10:58
p6eval niecza v5-15-g772e83c: OUTPUT«===SORRY!===␤␤Any()Confused at /tmp/QmLPEf4MKz line 1:␤------> say «foo», ⏏„bar“, “baz”␤␤Parse failed␤␤»
..pugs: OUTPUT«decodeUTF8': bad data: '\171'␤decodeUTF8': bad data: '\187'␤decodeUTF8': bad data: '\8222'␤decodeUTF8': bad data: '\8220'␤decodeUTF8': bad data: '\8220'␤decodeUTF8': bad data: '\8221'␤*** ␤ Unexpected "\8222"␤ expecting bare or pointy block construct, ":", identifier or opera…
..rakudo be887a: OUTPUT«===SORRY!===␤Confused at line 22, near "say \x{ab}foo\x{bb},"␤»
TiMBuS destroyed it
its better to use std: for that stuff 10:59
DarthGandalf std: my @a = 1,2,3,4; my @b = 11,12,13,14; my @c = 21,22,23,24; my @x = @a Z @b Z @c; say "@x[]"
p6eval std a71faea: OUTPUT«ok 00:01 117m␤»
DarthGandalf Really?
TiMBuS yes. if you're checking syntax
DarthGandalf Ah
11:00 takesako left 11:02 Psyche^ joined, _jaldhar joined 11:03 tzhs joined, Patterner left, Psyche^ is now known as Patterner 11:04 jaldhar left 11:05 jaldhar_ joined, woosley left 11:06 _jaldhar left 11:07 SHODAN joined 11:10 jaldhar_ left, jaldhar_ joined 11:13 Trashlord left 11:14 _jaldhar_ joined, jaldhar_ left
mberends oh, I misremembered S02:3858: "In order to interpolate an entire array, it's necessary now to subscript with empty brackets:" 11:17
rakudo: my @a = «the rain in Spain»; say @a; say qq/\@a:@a[]/; # no problem
p6eval rakudo be887a: OUTPUT«theraininSpain␤@a:the rain in Spain␤»
11:19 _jaldhar_ left 11:22 ggoebel left
TiMBuS rakudo: my @a = «the rain in Spain»; say qq/\@a:\@a[]/; 11:22
p6eval rakudo be887a: OUTPUT«@a:@a[]␤»
TiMBuS cool
11:27 ggoebel joined 11:30 ab5tract joined 11:37 phenny left 11:38 MayDaniel joined, _jaldhar_ joined 11:39 nsh left, sbp left 11:41 phenny joined 11:42 _jaldhar_ left, _jaldhar_ joined 11:44 _jaldhar_ left, _jaldhar_ joined 11:45 _jaldhar_ left, _jaldhar_ joined 11:49 jaldhar joined 11:50 _jaldhar_ left 11:51 phenny left, Ali_h left
moritz jdhore: you've been quiet lately... are you still up for the rakudo release on Thursday? 11:51
dalek kudo: ee21f4b | moritz++ | tools/sublog-report.pl:
[tools] document output format of sublog-report.pl
kudo: 577b759 | moritz++ | docs/ChangeLog:
[docs] update ChangeLog
11:52 Ali_h joined 11:54 jaldhar left 11:57 phenny joined, PacoLinux joined, satyavvd left, nsh joined 11:58 sbp joined
pmichaud I'm still seeking comments for pmichaud.com/sandbox/relman-draft.txt, if there are any 12:00
moritz pmichaud: my comment is "+1"
12:01 ershov joined 12:02 ab5tract left, donri joined 12:03 pernatiy joined
pmichaud also, there's a small chance we'll have to delay the rakudo release on thursday depending on what happens with the parrot release this week 12:04
12:05 jaldhar joined
pmichaud I'm thinking we may want a 2011.05 star release to get some of the performance wins of the past couple of weeks 12:06
12:07 jaldhar left, jaldhar joined
tadzik speedup smart-matching against numbers and Str.comb with default arguments -- what commit was that? 12:07
moritz two different ones 12:08
7e81699bf017ff81e6b164fabc971b19d39f0dba
and
6ca6140a4683a66b9f7d54e9a336051d5f564924
tadzik oh, one is even mine :) 12:09
12:10 _jaldhar joined, jaldhar left
takadonet morning all 12:10
moritz indeed :-) 12:11
12:13 _jaldhar left, jaldhar_ joined, tzhs left 12:14 ab5tract joined 12:15 MayDaniel left 12:20 _jaldhar_ joined, jaldhar_ left 12:26 _jaldhar_ left
daxim $ xulrunner feather.perl6.nl/~audreyt/osdc/vb.xul 12:31
Error: unrecognized application.ini path.
does this work for you?
tadzik ENOXULRUNNER 12:33
moritz daxim: I think I just loaded it in firefox 12:36
pmichaud I think I see a bug with the Str.comb patch 12:40
rakudo: say 'hello'.comb(/./, :limit(10)).elems 12:41
p6eval rakudo 577b75: OUTPUT«5␤»
pmichaud rakudo: say 'hello.comb(:limit(10)).elems
p6eval rakudo 577b75: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'hello"␤»
pmichaud rakudo: say 'hello'.comb(:limit(10)).elems
p6eval rakudo 577b75: OUTPUT«10␤»
12:41 woosley joined 12:42 woosley left
pmichaud rakudo: sub xyz(:$limit) { $limit min 5 }; say xyz(); say xyz(3); say xyz(8); 12:43
p6eval rakudo 577b75: OUTPUT«5␤Too many positional parameters passed; got 1 but expected 0␤ in 'xyz' at line 1:/tmp/OE0NH2Nekp␤ in main program body at line 22:/tmp/OE0NH2Nekp␤»
pmichaud rakudo: sub xyz(:$limit) { $limit min 5 }; say xyz(); say xyz(:limit(3)); say xyz(:limit(8));
p6eval rakudo 577b75: OUTPUT«5␤3␤5␤»
pmichaud that works better
pmichaud creates a (failing) test for someone to fix :)
12:44 wknight8111 joined
pmichaud ...after he takes kids to school. 12:45
tadzik great. I thought there might be something buggy about this, but there was no spectests to prove it :) 12:47
12:47 agentzh left
tadzik the implementation is a bit LTA, I agree 12:47
12:47 _jaldhar_ joined
moritz wonders if it would be easier to handle in a single routine body 12:48
and just make the matcher optional, and check if a value has been supplied
12:49 orafu left
daxim moritz, xul does not work anymore in firefox 4, else I wouldn't ask 12:53
12:56 PacoLinux left
moritz it must have advantages to run Debian stable :-) 12:56
12:59 Holy_Cow joined 13:03 Holy_Cow left
pmichaud rakudo: sub xyz($c) { 3 < $c }; say xyz(5); 13:05
p6eval rakudo 577b75: OUTPUT«Bool::True␤»
pmichaud rakudo: sub xyz($c) { 3 < $c }; say xyz(*);
p6eval rakudo 577b75: OUTPUT«Cannot take numeric value for object of type Whatever␤ in 'Any::Numeric' at line 1485:CORE.setting␤ in 'infix:<<>' at line 7654:CORE.setting␤ in 'xyz' at line 22:/tmp/D4QBSEe_js␤ in main program body at line 22:/tmp/D4QBSEe_js␤»
moritz rakudo: say Whatever ~~ Cool 13:06
p6eval rakudo 577b75: OUTPUT«Bool::False␤»
moritz I guess it should be infix:<< < >>(Cool $a, Cool $b)
and thus do a dispatch failure
pmichaud well, there still needs to be an Any 13:07
moritz why?
pmichaud not every (user-defined) numeric thingy will be Cool
moritz if it's neither Numeric nor Cool, it should better provide its own comparison operators
pmichaud checking 13:08
moritz because those are the tools we offer for automagic handling of custom types that are similar-ish to built-in types
pmichaud according to S03, all that a type has to do is provide a way to convert to Num 13:10
I think S03 is wrong there.
moritz too 13:11
pmichaud (or fossiled)
As in Perl 5, converts to C<Num> before comparison. C<!=> is short for C<!==>.
moritz but what does it convert?
pmichaud currently Rakudo uses prefix:<+> to convert each side to a numeric form before comparing 13:12
moritz rakudo: say + rx/a/
p6eval rakudo 577b75: OUTPUT«maximum recursion depth exceeded␤ in 'Cool::Numeric' at line 1910:CORE.setting␤ in 'Cool::Numeric' at line 1910:CORE.setting␤ in 'Cool::Num' at line 7654:CORE.setting␤ in 'Cool::Numeric' at line 1910:CORE.setting␤ in 'Cool::Numeric' at line 1910:CORE.setting␤ in
..'Cool::Num' a…
mathw fun 13:13
moritz pingpong between .Num and .Numeric
mathw so rakudo expects a meaningful prefix:<+> and S03 says you need conversion to Num... fight!
pmichaud currently Rakudo uses .Numeric for prefix:<+>
which means it's not necessary for a type to ~~ Numeric to participate in numeric operators 13:14
mathw What's the difference between Num and Numeric?
pmichaud Numeric is the role for numbers
moritz mathw: Num is floating-point
colomon Num is floating point
pmichaud Num is specifically for floating-point stuff
colomon Numeric is abstract concenpt of number
mathw Okay
moritz notes: discussions about numebers in rakudo conjure colomon++ out of thin air :-)
mathw :) 13:15
colomon suddenly feels like one of the Three Witches
pmichaud anyway, even if S03 is changed to be C<Numeric>, I'd hold that the numeric comparisons aren't limited to ~~ Numeric
mathw My inner Haskell programmer says all number-ish things should do Numeric
colomon S03 should definitely say Numeric, IMO
13:15 mtk joined
pmichaud just like the string comparisons aren't limited to ~~ Stringy 13:15
mathw But 'be convertible to Numeric' is more Perlish
colomon that's certainly how I pictured things when I was re-arranging them last spring. 13:16
mathw if Num's specific on floating point then it seems like the wrong choice here
colomon rakudo: say 4 < "5"
p6eval rakudo 577b75: OUTPUT«Bool::True␤»
13:17 mikemol joined
colomon what's pir::set__NP(self) do? 13:18
pmichaud creates a num register with the value of self
basically $N99 = self
colomon would that implicitly call .Num? 13:19
pmichaud well, it calls the get_number vtable
which in turn calls .Num
moritz ... which in turns calls .Numeric
or something
colomon right, Cool.Num definitely calls .Numeric
moritz it's a problem that we depend on the parrot vtables for string -> number conversions and the other way round
pmichaud well, not so much "depend on" as "support" 13:20
moritz we depend on it, in the current code
pmichaud we can do it without the dependency if we want. but if we want non-Rakudo types to participate in Perl 6 programs, we have to support the vtables
moritz the actual conversion of +"3.4" happens in the get_number vtable
agreed
what I wanted to say that the usage of the vtables internally is the problem 13:21
it was convenient and efficient back then
but it leads to circularity issues as in the case demonstrated above
pmichaud actually, it's never been convenient nor efficient :-)
moritz and it means that +"3" returns a Num and not an Int 13:22
pmichaud at the time it was necessary because we didn't have .Numeric worked out, or an easy way to convert string to num
13:22 ab5tract left
mathw Why do I get the impression every time I witness one of these conversations that the goal is always to rely on Parrot less and less? 13:22
pmichaud mathw: that's generally been a goal (more) 13:23
mathw: but more importantly, Parrot's object and vtable model is often completely backwards from what Perl 6 expects
this is one of those cases
moritz mathw: a way to look at it is that parrot provides something vaguely p6ish. The more we refine the semantics of rakudo, the less we can rely on those defaults
pmichaud a better way to look at is is that parrot provides something vaguely p5ish. 13:24
*it
colomon and we're (understandably) faster at changing when the p6 spec changes.
pmichaud parrot has little intention of changing in response to the p6 spec
that's been true for several years no.
*now
13:25 larsen_ left
mathw well of course 13:25
they don't exist just to service Rakudo
colomon pmichaud: understanding that we will definitely need get_number for "foreign" objects, does it make any sense calling it from Cool? Are foreign objects intended to be Cool?
mathw also it helps with the possibility of running Rakudo on something else I suppose :)
pmichaud colomon: I'm a little uncertain why Cool.Num calls .Numeric 13:26
(looking at code now) 13:27
an, it gets a Numeric, and takes the Num of that
colomon because it relies on the Numeric .Num method
yes
pmichaud okay, that makes sense
13:28 JimmyZ joined
pmichaud while I believe that foreign objects can act Cool, I don't think they default to being ~~ Cool 13:29
that's what the vtables do right now
colomon seems like the appropriate factoring (at least for this) would be something like: 13:30
Cool.Numeric does nothing by default 13:31
There's a Foreign.Numeric which does pir::set__NP(self)
and Foreign is a role which foreign objects are expected to do.
pmichaud I'm not sure about the Foreign role 13:32
at one time numeric and string conversion were tied to prefix:<+> and prefix:<~>
13:33 _jaldhar_ left, mtk left
pmichaud could be that Foreign is some sort of type definition 13:33
i.e., anything that isn't Mu|Any|Cool|something
moritz can't we check if $thing ~~ Mu, and if not, it's foreign and goes through the vtable?
pmichaud I'm not sure that Mu is the type for perl6-only objects 13:34
I think Mu has to encompass foreign objects also
otherwise you can never pass a foreign object to a subroutine that has Mu as its type
same for scalar assignment
moritz right
colomon I suggest a Foreign role merely because it does make sense that foreign objects call the Parrot vtable functions, and it should be easy to do.
they should probably be Any, too, shouldn't they? 13:35
pmichaud colomon: it's not easy to get all of the foreign subroutines to return values that ~~ Foreign
colomon pmichaud: ah
moritz we do need a simple-ish way to check if an object is a Perl 6 object
maybe we can abstract that out into some function, and use that everywhere
where "everywhere" is hopefully only a handful of places :-) 13:36
pmichaud anyway, I'm fine if Cool.Numeric doesn't exist
all of which gets back to my original question -- what should be the result of infix:«<»(3, *) ? 13:37
colomon moritz: you're thinking something like Any.Numeric { if self.foreign { pir::set__NP(self) } ?
moritz colomon: yes
colomon moritz: makes sense 13:38
13:38 mtk joined
pmichaud note that we also have the vtables in case any other Parrot languages want to use Perl 6 objects :-) 13:38
colomon pmichaud: is that "*" in the formal Whatever sense, or in the generic wildcard sense? 13:39
moritz the Whatever object
pmichaud I mean * as a Whatever argument, yes.
moritz something that's ~~ Any but !~~ Cool 13:40
colomon seems like it's an error? you're not expecting Whatever currying there, right?
pmichaud no, that's different
(to moritz)
moritz colomon: only operators curry, not function calls 13:41
pmichaud if I pass a ~~ Any object that doesn't have .Numeric, I expect infix:<+> to fail with "cannot get numeric value of object"
but it seems weird to say "cannot get numeric value of Whatever" when in fact we do it in a lot of places
moritz colomon: and only at compile time, ie my $x = *; $x < 3 will not curry
pmichaud: we don't, strictly speaking 13:42
pmichaud: we supply default numeric values for * based on context
pmichaud well, "supply a default numeric value" then
colomon pmichaud: are you suggesting Whatever might translate to Inf in this case? 13:43
pmichaud clearly we're in a numeric context with infix:«<»
moritz or -Inf, or NaN
pmichaud colomon: I'm thinking Whatever might always return true in this case
moritz like the opposite of NaN
13:43 brill joined
pmichaud because while 3 < * it's also true that 3 > * :-) 13:43
(not syntactically) 13:44
moritz we write that * <3 in modern language :-)
s/that/that as/
pmichaud rephrase: my $x = *; say $x < 3; say $x > 3;
an interesting question might be infix:<min>(3, *) 13:45
colomon Huh. It obviously can be done, but I'm not sure why we'd want to have it work that way?
pmichaud colomon: I'm seeing a lot of places where we check if an argument is Whatever and then have to do something weird based on that
especially for, say, the $limit parameter to .comb
moritz would prefer it if * only had a special meaning in cases where its meaning is pretty much obvious 13:46
pmichaud whatever. :-P
(scnr)
moritz :-)
13:48 wamba left
colomon pmichaud: looking at .comb, for instance, you'd also have to define prefix:<-->(Whatever) 13:48
pmichaud colomon: I would? 13:49
no.
colomon .comb counts down based on $limit 13:50
pmichaud yes, but it doesn't decrement $limit
13:50 brill left
moritz you could just as well count up, and check against 0..$limit 13:50
colomon yes, but it decrements $l, which is the copy of $limit
moritz that way you don't even need to special-case $limit
pmichaud colomon: I'm saying that I'd like $l to be set to something else 13:51
I'm not looking at the regular case, I'm looking at the optimized case, where we know the maximum limit ($str.chars)
13:51 woosley joined
pmichaud I can then write 13:51
method comb(:$limit) { my $to = min(self.chars, $limit); ... } 13:52
13:52 brill joined
pmichaud but that doesn't work if someone writes $str.comb(:limit(*)) 13:52
13:52 PacoLinux joined
pmichaud it fails with "cannot take numeric value of Whatever" 13:53
which feels inconsistent to me somehow
13:53 ershov left
pmichaud but I think I agree that ambiguity is best handled with an explicit exception than with a possibly surprising outcome 13:54
colomon maybe I'm missing something (I vaguely feel like I am) but to me this discussion pretty strongly argues against the idea that Whatever should have magic properties in this way.
13:54 MayDaniel joined
pmichaud rakudo: my $x = *; say 3 ~~ ^$x 13:55
p6eval rakudo 577b75: OUTPUT«Cannot take numeric value for object of type Whatever␤ in 'Any::Numeric' at line 1485:CORE.setting␤ in 'prefix:<^>' at line 7654:CORE.setting␤ in main program body at line 22:/tmp/Vjb1zdJRic␤»
colomon because what you've just said makes me think that you really want min($a, *) to be $a always.
pmichaud colomon: right, that's why I said min is an interesting case... and why I'm now thinking it's not a good idea :) 13:56
rakudo: my $x = *; say 3 ~~ 0 .. $x
p6eval rakudo 577b75: OUTPUT«Bool::True␤»
pmichaud rakudo: my $x = *; say 3 ~~ 0 ..^ $x
p6eval rakudo 577b75: OUTPUT«Bool::True␤»
pmichaud rakudo: my $x = *; say 3 ~~ ^ $x
p6eval rakudo 577b75: OUTPUT«Cannot take numeric value for object of type Whatever␤ in 'Any::Numeric' at line 1485:CORE.setting␤ in 'prefix:<^>' at line 7654:CORE.setting␤ in main program body at line 22:/tmp/j0o0kheJLt␤»
pmichaud that looks like a bug 13:57
moritz aye
colomon I fear it's an optimization
pmichaud why would that want optimizing?
colomon our multi sub prefix:<^>($max) {
0..^+$max;
}
not optimization
sorry
the idea was that ^"10" should be 0..^10, not an error 13:58
or rather, 0 .. ^"10"
13:58 brill left
moritz add a multi sub prefix:<^>(Whatever $) { 0..* } 13:58
pmichaud I prefer to take away, rather than add :-)
moritz too, but that's not always how Perl 6 workds
colomon I'm pretty sure we really want ^"10" to take the Numeric value there, because ^$a doesn't make sense otherwise 13:59
and that's likely to be a common case, too, with user input and such
moritz maybe +* should just return * # probably totally insane 14:00
colomon I can see where adding moritz's multi makes sense
pmichaud that's another case that argues in favor of Whatever.Numeric returns +Inf, though.
colomon moritz: nope, that's totally insane. :)
pmichaud: I like Whatever.Numeric returns +Inf much better than I like the idea of having Whatever be magic in Numeric comparison operations. 14:01
pmichaud: though in the case of ^*, Whatever already has a specific meaning of +Inf in that context. 14:02
14:02 mkramer joined
moritz rakudo: say +Inf / 2 14:02
p6eval rakudo 577b75: OUTPUT«Inf␤»
14:03 bluescreen10 joined, woosley left
pmichaud files tickets, to deny masak++ the chance to do it :) 14:07
14:07 mkramer left
colomon pmichaud++ # masak denial 14:07
14:08 mkramer joined, slavik1 joined
moritz pmichaud: locally I implemented an --ignore-parrot-rev option to Configure.pl which skips the PARROT_REVISION check (useful for checking parrot branches) 14:10
pmichaud: should I push it?
pmichaud option might want a different name, but that's fine for now 14:11
moritz I also have a t/harness patch that allows you RAKUDO_SUBLOG all spectest files, but I think that one isn't very useful
because most sublogs look very similar
14:13 lateau joined
dalek kudo: 631085c | pmichaud++ | src/ (2 files):
Move Mu.item to builtins/Mu.pir; results in 8%+ overall speed improvement.
14:17
kudo: ec5cdf5 | pmichaud++ | / (2 files):
Merge branch 'master' of github.com:rakudo/rakudo
pmichaud forgot to push that fix yesterday 14:18
dalek kudo: ca8731c | moritz++ | Configure.pl:
[build] add --ignore-parrot-rev option to Configure.pl which allows you to build parrot branches which are behind build/PARROT_REVISION
14:23
14:27 Mowah joined 14:29 Trashlord joined 14:33 satyavvd joined 14:35 ymasory joined 14:38 nymacro left, wtw_ left 14:39 ymasory left 14:40 ymasory joined, Trashlord left
sorear good * #perl6 14:41
14:42 spq joined 14:43 Trashlord joined, MayDaniel left
TimToady good morning #sorear :) 14:44
moritz \o
colomon o/ 14:46
14:49 bluescreen10 left 14:50 Trashlord left
sorear niecza: my @foo = 1,2,3; say "@foo" 14:52
p6eval niecza v5-15-g772e83c: OUTPUT«1 2 3␤»
sorear ...
moritz BUG
14:52 Trashlord joined
moritz sorear: did you see my comments about a potentially LHF test file earlier? 14:53
sorear see, yes, pay attention to, no
I'll check that now
moritz ok :-)
PerlJam have person1 and person2 been identified from pmichaud.com/sandbox/relman-draft.txt ? 14:55
mberends rules himself out 14:57
moritz doesn't feel qualified about low-level parrot stuff 14:58
otherwise I could do it, I hang out in #parrot anyway :-) 14:59
PerlJam I don't think low-level knowledge is required.
moritz: I was thinking that you and jnthn would be the perfect people for this job.
colomon Seems like low-level knowledge would be very helpful.
sorear std: say "$_." ~ "(undef)"
p6eval std a71faea: OUTPUT«ok 00:01 115m␤»
PerlJam colomon: it's always helpful :) 15:00
sorear std: say "$_."~"(undef)"
p6eval std a71faea: OUTPUT«===SORRY!===␤Unsupported use of undef as a value; in Perl 6 please use something more specific:␤ Mu (the "most undefined" type object),␤ an undefined type object such as Int,␤ Nil as an empty list,␤ :!defined as a matcher,␤ Any:U as a type constraint␤
.. or fail() as…
PerlJam But this is a "relationship manager" position. It's all about the people.
sorear what's the difference here?
TimToady ."~" is a method call 15:01
sorear ." ~ " isn't?
PerlJam not with whitespace
TimToady whitespace is disallowed
sorear whitespace in a quoted string is disallowed?
TimToady otherwise any quote ending with ." tends to misfire
15:01 Trashlord left
TimToady and a lot of quotes end with a period 15:02
15:02 Trashlord joined
TimToady if you want whitespace, you can just put the whole thing into {...} 15:02
sorear ah, '# dwim on "$foo."' 15:03
TimToady and it's another spot where Perl is prejudiced against people who don't put whitespace around their infixes :)
the @foo interpolate is determined by $*QSIGIL in termish, in std STD 15:04
15:04 woosley joined
TimToady s/te/tion/ 15:04
15:04 bluescreen10 joined
TimToady I suspect it's one of those spots where your parser is divergent 15:04
since it's close to EXPR :)
sorear AFAICT std STD will parse @foo in "", it just sets $*VAR to 0 15:05
cf. line 2047 15:06
TimToady hmm, well, it probably needs to pass more info back up to the nibbler, or fail <escape> outright 15:09
pmichaud PerlJam: no, <person1> and <person2> have not been identified yet. That's one of the things I'm especially looking for feedback on :) 15:11
15:11 Trashlord left
TimToady those have different semantics, if you have "@(stuff)", since stuff is reparsed if <escape> fails 15:11
15:11 Trashlord joined
TimToady oh wait, @(stuff) passes the bracket rule, so never mind 15:12
15:12 woosley left 15:15 SHODAN left
pmichaud and, I'm not ruling myself out as a candidate for <person1> or <person2> -- just didn't want to imply that I should be one. 15:17
TimToady hmm, wait, it requires + postfixes, so no 15:18
maybe it should require * postfixes so that @(...) works, or @() should force QSIGIL to $ 15:19
15:21 Trashlord left
TimToady simplest would be to change + to * in termish 15:22
15:22 Trashlord joined
TimToady suspects 15:22
15:26 Trashlord left 15:27 benabik left
sorear pmichaud: do you want a public nomination process or.. 15:28
15:34 lateau left
PerlJam sorear: whiteknight and cotto self-selected from the parrot side of the house. Maybe if someone would volunteer ? 15:35
pmichaud I'm just looking for opinions who who people would like to see 15:36
doesn't have to be a formal process -- I think we can get to a consensus opinion easily enough
my off-the-top-of-my-head candidates would be (no particular order): jnthn, moritz, masak, PerlJam, myself 15:37
sorear mine too.
rakudo: say join " ", Mu.^methods(:locall).sort 15:38
moritz aka "the people that hang out in #parrot and are involved a bit longer"
p6eval rakudo 577b75: OUTPUT« BUILD BUILDALL Bool CREATE Capture PARROT WALK WHENCE WHERE WHICH bless clone defined item new not notdef note perl print say so␤»
moritz hopes that Mu doesn't have any methods that are not :local :-)
pmichaud I say that even sorear++ could be a candidate, although he's a bit niecza focused (as he should be)
sorear How many of those should be in Mu, and how many are missing? 15:39
moritz rakudo: say join " ", Mu.^methods.sort
p6eval rakudo 577b75: OUTPUT« BUILD BUILDALL Bool CREATE Capture PARROT WALK WHENCE WHERE WHICH bless clone defined item new not notdef note perl print say so␤»
sorear rakudo: say join " ", Mu.^methods(:local).sort
p6eval rakudo 577b75: OUTPUT« BUILD BUILDALL Bool CREATE Capture PARROT WALK WHENCE WHERE WHICH bless clone defined item new not notdef note perl print say so␤»
sorear rakudo: say join " ", Mu.^parents
p6eval rakudo 577b75: OUTPUT«␤»
sorear what, no parrot;Object ? 15:40
moritz iirc WHICH shouldn't be a method
and PARROT is non-spec, obviously
15:40 alester joined
sorear right now niecza doesn't have Mu.item, leading to certain problems 15:41
pmichaud would Mu need Str & Stringy ?
(Mu.^methods doesn't display its vtable methods.) 15:42
sorear niecza's mu has head, flattens, typename, Str, succ, pred, notdef, ACCEPTS, perl, defined, and Bool
waitasecond 15:43
rakudo: say Mu.^methods(:local).grep(* eq "")
p6eval rakudo 577b75: OUTPUT«␤»
sorear rakudo: say Mu.^methods(:local).grep(* eq "").perl
p6eval rakudo 577b75: OUTPUT«({ ... })␤»
sorear a single nameless method! 15:44
moritz sorear: known artifact from vtables
sorear: parrot vtables couldn't be :anon last I looked
sorear: so we install them with name ''
15:45 jfried joined
sorear oh my Mu also has so, not, RAWCREATE, CREATE, new 15:45
I thought my %foo declared a Hash[Any]? 15:57
TimToady .o(Mu should not have anything that should autothread...)
by default, Hash[Str] 15:58
moritz but should it have everything that should not autothread?
sorear TimToady: Hash[Str,Any]?
moritz rakudo: my %h = a => Mu, b => 2; say %h.perl
p6eval rakudo 577b75: OUTPUT«{"a" => Mu, "b" => 2}␤»
sorear urk
moritz thinks that's sensible
scalars and arrays accept Mu too 15:59
why not hashes?
and what would it mean if %h<a> = 1|2|3 autothreads?
or would it typecheck-fail?
sorear scalars don't accept Mu unless you specifically ask them to 16:00
TimToady it arguably should fail
sorear the default type of scalars is "Any"
moritz sorear: I thought the compromise was that scalars are typed to Mu, but default to Any
TimToady I think rakudo makes a distinction between "default" and "accepts", which I'm not sure I believe in
sorear I'm not sure I beleive in it either 16:01
moritz hates the whole junctions business
16:01 domidumont left
moritz they are neat in places, but probably not neat enough to warrant so much confusion and deep design implications 16:02
sorear also, I'm planning to implement Parcel Seqification as a part of the assign type checking path
moritz don't worry, I'm not seriously suggesting to toss junctions, I just rant a bit
TimToady woudn't toss 'em anyway :P 16:03
moritz thought so :-)
TimToady cuz I are a lingrist
PerlJam TimToady: as long as you don't have any linguistic surprises waiting in the wings ... :)
sorear niecza: anon method foo($x:) { self }
p6eval niecza v5-15-g772e83c: OUTPUT«Potential difficulties:␤ $x is declared but not used at /tmp/T0auWivVlO line 1:␤------> anon method foo(⏏$x:) { self }␤␤Unhandled exception: System.Exception: Unable to find lexical self in foo␤␤Server stack trace: ␤ at
..Niecza.CLRBackend.NamProcessor.ResolveLex…
dalek ecza: 3fd8a5d | sorear++ | / (2 files):
Do not interpolate bare @vars
16:05
ecza: 2af2593 | sorear++ | lib/ (2 files):
Greatly increase usable range of Mu
ecza: d96efe7 | sorear++ | t/spectest.data:
S04-statement-modifiers/values_in_bool_context.t now passes
16:07
sorear moritz++
16:08 kjeldahl joined
sorear I feel the need to catalog #perl6 users by non-English native/high proficiency language 16:08
I already have de_DE, fr_FR, and es_ES accounted for 16:09
16:09 s1n left
moritz points to tadzik and mentions Polish 16:09
16:10 s1n joined
sorear for instance, I'm still looking for a nontrivial CharLingua 16:12
NotFound(es) says that "ch".chars should == 2 16:13
moritz norwegian has the fun thing to sort AA behind Z 16:15
not sure if that's what CharLingua would do
(because AA basically means A with circle above)
pmichaud (default/accepts) I'm willing to accept a new default behavior; we arrived at this one because all of the others seemed to bring about surprising results 16:25
if my $x initializes $x to Mu, then $x++ doesn't dwim 16:27
if my $x constrains $x to Any, then it's hard to assign anything that isn't Any to $x (e.g. Junctions)
(also potentially foreign objects) 16:29
PerlJam Mu should auto-transmogrify to whatever is needed. Ordinarily this would be a coercion I think, but I'm not sure about the Junction case give the threading behavior
pmichaud PerlJam: I'm pretty sure we decided that any transmogrification belongs in Any, not Mu 16:30
otherwise *everything* transmogrifies
again, I'm not committed to one answer or another-- but we arrived at the current situation for specific reasons, and not really by accident 16:31
PerlJam sounds like a Schroedinger's cat situation then. my $x; is "nothing" until you look at it. 16:32
sorear Every time I've seen someone assign a junction to a variable, they've been doing something stupid like try to use Junction as Set
PerlJam sorear: that doesn't mean there aren't valid reasons to do so however :)
pmichaud of the two options, I think that having my $x default to my Any $x; will ultimately be the lesser of the evils 16:33
and then assignment of a junction to an Any-constrained slot should simply fail
PerlJam at least you wouldn't get accidental threading that way.
pmichaud if you want to store a junction, you have to explicitly my Mu $x or my Junction $x
16:34 pernatiy left, satyavvd left
sorear niecza: my $x = Mu; 16:35
p6eval niecza v5-18-gd96efe7: OUTPUT«Unhandled exception: Nominal type check failed for scalar store; got Mu, needed Any or subtype␤ at /tmp/Zw4zWsMHLA line 1 (MAIN mainline @ 1)␤ at /home/p6eval/niecza/lib/CORE.setting line 1374 (CORE C562_ANON @ 2)␤ at /home/p6eval/niecza/lib/CORE.setting line 1375
..(CORE module-C…
PerlJam Any still seems so much like a misnomer. It's more like we have normal things and abnormal things and Any means any of the normal things.
I'd want to call it "Norm" then :) 16:36
pmichaud Norm! </cheers>
sorear rakudo: say Parcel.^parents
p6eval rakudo ca8731: OUTPUT«Iterable()Cool()Any()Mu()␤»
sorear I thought we had decided that Parcel !~~ Any
pmichaud noway 16:37
or, if we did, I wasn't present for that decision :)
jdhore moritz, yep, i'm still up for doing the release 16:38
sorear What's up with inviZible_frmae?
frame
pmichaud frames that don't show up in backtraces, I think. 16:39
PerlJam :q1
sorear yeah, but why is it 'misspelled'?
pmichaud I don't know... maybe because it's l33t?
:-) 16:40
sorear perl6: * = say 5;
p6eval pugs: OUTPUT«5␤*** Can't modify constant item: VNum Infinity␤ at /tmp/qTbTCkY6En line 1, column 1-10␤»
..rakudo ca8731: OUTPUT«5␤»
..niecza v5-18-gd96efe7: OUTPUT«5␤Unhandled exception: assigning to readonly value␤ at /tmp/fEGw1qohzm line 1 (MAIN mainline @ 3)␤ at /home/p6eval/niecza/lib/CORE.setting line 1374 (CORE C562_ANON @ 2)␤ at /home/p6eval/niecza/lib/CORE.setting line 1375 (CORE module-CORE @ 39)␤ at
../home/p6eval/niecza/lib/CORE.…
sorear Is Rakudo in the wrong here?
pmichaud I think anything can be assigned to Whatever 16:41
16:41 JimmyZ left
pmichaud I know that (3, *, 5) = @foo; is supposed to work 16:41
sorear rakudo: my $wh = *; $wh = 5; say $wh;
p6eval rakudo ca8731: OUTPUT«Whatever()<0x366da38>␤»
pmichaud that's probably wrong.
PerlJam sorear: perhaps a non-native-speaker-of-english named it ?
pmichaud so, whatever term can be assigned to.... not a container with whatever in it. 16:42
and sorry, I meant
($a, *, $b) = @foo; above
(obviously can't assign to constants)
sorear pr'aps I'll make * return a lvalue that eats STORE 16:43
pmichaud: do Seq, List, and Array really need to be separate types? 16:46
pmichaud List and Array certainly do
Seq and List certainly do
so I think yes
sorear why?
pmichaud List is a list of values
Array is a list of containers
wait 16:47
List is a list of objects. they may be either values or containers
Array is definitely a list of containers -- they get assigned to
the difference between the two is in how they reify
Seq is a list of rvalues -- any containers in the generator get stripped 16:49
I'm much less certain about the need for a separate Seq type... but so far the distinction has been useful
also, Seq forces some flattening that List doesn't necessarily force
say Seq.^parents 16:50
rakudo: say Seq.^parents
p6eval rakudo ca8731: OUTPUT«List()Iterable()Cool()Any()Mu()␤»
pmichaud rakudo: say Array.^parrents
p6eval rakudo ca8731: OUTPUT«Method 'parrents' not found for invocant of class 'ClassHOW'␤ in main program body at line 22:/tmp/9TjdH5v3x9␤»
pmichaud rakudo: say Array.^parents
p6eval rakudo ca8731: OUTPUT«List()Iterable()Cool()Any()Mu()␤»
16:50 bluescreen10 left
pmichaud yeah, that's about what I remembered. 16:50
16:52 _jaldhar_ joined
sorear rakudo: say (1,).item.WHAT 16:53
p6eval rakudo ca8731: OUTPUT«Seq()␤»
16:56 birdwindupbird left 16:58 _jaldhar_ left, sirelander joined 17:02 cdarroch joined, cdarroch left, cdarroch joined 17:03 snearch joined, bluescreen10 joined
sjn seen masak 17:03
aloha masak was last seen in #perl6 1 days 3 hours ago saying "pivo &".
17:09 mj41 left 17:14 dakkar left 17:15 sirelander left 17:23 bluescreen10 left 17:24 thou joined 17:25 mberends left 17:27 MayDaniel joined 17:38 bluescreen10 joined
colomon rakudo: say "Hello" ~~ /<upper>/ 17:40
p6eval rakudo ca8731: OUTPUT«H␤» 17:41
17:47 mj41 joined 17:51 MayDaniel left 17:53 impious joined, impious left 17:58 pernatiy joined 18:05 mberends joined 18:11 sirelander joined, sirelander left 18:13 sirelander joined
sirelander rakudo: say "Hello World"; 18:13
p6eval rakudo ca8731: OUTPUT«Hello World␤»
sirelander rakudo: say 35+25; 18:14
p6eval rakudo ca8731: OUTPUT«60␤»
18:18 jlaire joined 18:19 Chillance joined 18:21 nymacro joined 18:23 starcoder left, starcoder joined 18:24 awoodland joined 18:27 newbee joined
tadzik hello zebras 18:28
colomon \o
18:31 alester left 18:34 p6eval left 18:35 IllvilJa joined 18:36 starcoder left, starcoder joined, p6eval joined, ChanServ sets mode: +v p6eval
IllvilJa One way to get some training on Perl6: solve the problems in Project Euler, but only use Perl 6 programs for any necessary calculations. 18:37
18:37 p6eval left 18:39 p6eval joined, ChanServ sets mode: +v p6eval
TimToady I think my $x should default to Any (failing on Mu or Junction assigment), and that foreign objects should probably come in under Any as sisters of Cool, where the name of the root object type for a given language is the name of the language itself 18:46
Any -> Java means Java's Object type...mebbe... 18:47
or maybe Any -> Java::Object -> Java::OtherType or some such...
numerifying * to +Inf by default feels wrongish to me, but I can't put my finger on why it does yet 18:49
colomon well, it's certainly wrong when doing * .. 10 (for instance)
TimToady something like, failure to dwim expectedly does not justify dwimming unexpectedly 18:50
and all such dwimmery should be controlled by multi dispatch anyway
(even the compile-time currying is supposed to be controlled by whether there's a Whatever multi to override) 18:51
18:51 risou is now known as risou_awy
TimToady which is how the compiler is supposed to know not to curry 1..* 18:51
18:51 risou_awy is now known as risou
TimToady there may also yet be a solution in there that involves currying with a parameter that defaults to Inf 18:51
but only if we can call WhateverCode with 0 args in the appropriate places to trigger the default, and that seems problematic 18:53
colomon I guess my inclination is for as little additional dwimmery as possible here. 18:54
TimToady $x ~~ 1..* # somehow this would have to know to pass 0 args to WhateverCode instead of 1, and I don't see how that can work
anyway, that's a side issue for whether * should numerify 18:55
18:59 pernatiy left
colomon It seems to me it would be somewhat confusing if +* was Inf, but * .. 10 was -Inf .. 10 19:02
TimToady I think +* and -* should definitely curry 19:03
rakudo: say join ' ', map -*, 1..10;
p6eval rakudo ca8731: OUTPUT«-1 -2 -3 -4 -5 -6 -7 -8 -9 -10␤»
TimToady like that
colomon particularly if whatever currying requires you to have operator infix<..>($num, Whatever) anyway. 19:04
TimToady which is how it's specced
it's not supposed to be a hard-wired list of exceptions
except insofar as the multis are "hard-wired" 19:05
colomon and that certainly is an elegant way to handle currying on new operators, too.
TimToady yes, that's the main motivation
colomon user-defined ops, I mean.
TimToady++
so going back to my mis-statment, I mean, it would be confusing if * numified to Inf, but * .. 10 was -Inf .. 10 19:06
TimToady a large majority of the p6 design boils down to extensibility, hopefully without loss of efficiency
colomon Put another way, numifying * to Inf feels like a logical extension of the more common 0 .. * case; but that extension it just muddles the * .. 0 case. 19:07
TimToady rakudo: say (1 < * < 10).WHAT
p6eval rakudo ca8731: OUTPUT«WhateverCode()␤»
TimToady rakudo: say (1 < * < 10)(5) 19:08
p6eval rakudo ca8731: OUTPUT«Bool::True␤»
TimToady rakudo: say (1 < * < 10)(1)
p6eval rakudo ca8731: OUTPUT«Bool::True␤»
colomon :\ 19:09
TimToady whoopsie
colomon oh, I think that may be a known bug. where's jnthn when you need him?
TimToady apparently doing (1 < *) < 10
chained ops have to be considered all at once
19:10 wamba joined
colomon right 19:10
19:10 pernatiy joined
colomon my guess is there's special code for the chained ops and special code for the currying, and so far the twain have not met. 19:11
TimToady hopefully it won't be as problematic as QM and relativity...
19:14 meteorjay joined 19:15 snearch left 19:27 alester joined, birdwindupbird joined
thou perl6: ([+](3, 6 ... 99)) + ([+](5, 10 ... 99)) 19:30
p6eval niecza v5-18-gd96efe7: OUTPUT«Unhandled exception: Series op NYI␤ at /home/p6eval/niecza/lib/CORE.setting line 430 (CORE die @ 2)␤ at /home/p6eval/niecza/lib/CORE.setting line 1271 (CORE infix:<...> @ 2)␤ at /tmp/MafIcwq49A line 1 (MAIN mainline @ 2)␤ at /home/p6eval/niecza/lib/CORE.setting 19:31
..line 1374 (CORE …
..rakudo ca8731: OUTPUT«(timeout)»
..pugs: OUTPUT«*** ␤ Unexpected "99"␤ expecting operator, ":" or ")"␤ at /tmp/d4sBL3XXus line 1, column 15␤»
TimToady you want a say
thou perl6: ([+](3, 6 ... 99)) + ([+](5, 10 ... 99)).say
p6eval rakudo ca8731: OUTPUT«(timeout)»
..niecza v5-18-gd96efe7: OUTPUT«Unhandled exception: Series op NYI␤ at /home/p6eval/niecza/lib/CORE.setting line 430 (CORE die @ 2)␤ at /home/p6eval/niecza/lib/CORE.setting line 1271 (CORE infix:<...> @ 2)␤ at /tmp/xsluGBUL93 line 1 (MAIN mainline @ 2)␤ at /home/p6eval/niecza/lib/CORE.setting
..line 1374 (CORE …
..pugs: OUTPUT«*** ␤ Unexpected "99"␤ expecting operator, ":" or ")"␤ at /tmp/k3ecrs51g1 line 1, column 15␤»
TimToady the second one won't terminate though
thou oh 19:32
19:32 wamba left
PerlJam hence rakudo's timeout 19:32
thou yeah, i was finding that in my local rakudo, wanted to see what others did. i see now that it's my misunderstanding of ...
TimToady it used to dwim that, but we decided it was a bad idea because it's too hard to figure out whether the comparison should be > or < 19:33
perl6: ([+](3, 6 ... 99)) + ([+](5, 10 ...^ * > 99)).say
PerlJam thou: you probably want 5, 10 ...^ * > 99
p6eval niecza v5-18-gd96efe7: OUTPUT«Unhandled exception: Series op NYI␤ at /home/p6eval/niecza/lib/CORE.setting line 430 (CORE die @ 2)␤ at /home/p6eval/niecza/lib/CORE.setting line 1271 (CORE infix:<...> @ 2)␤ at /tmp/nVRY0pmC6h line 1 (MAIN mainline @ 2)␤ at /home/p6eval/niecza/lib/CORE.setting
..line 1374 (CORE …
..rakudo ca8731: OUTPUT«950␤»
..pugs: OUTPUT«*** ␤ Unexpected "99"␤ expecting operator, ":" or ")"␤ at /tmp/SoEodQhBs4 line 1, column 15␤»
thou PerlJam: yes, thanks!
TimToady thing is, not all serieseses even keep the same sign from term to term... 19:34
19:34 wamba joined
TimToady so the right side is now just a smartmatch 19:34
PerlJam It's too bad you need those "extra" concepts to get that behavior though 19:36
TimToady the whole point of smartmatching is to be a single "extra" concept that is reused over and over
thou i really want ($n, 2*$n ...^ * >= $lim)
TimToady if you want to include the limit, leave out the ^ 19:37
thou i don't want to include the limit
TimToady ok
thou (project euler #1)
PerlJam sure, but it'd be nice if you could do 5, 10 ... upto 99 (or something)
thou :-)
TimToady sure, but that's spelled * > 99 :P 19:38
thou :-)
colomon rakudo: sub upto($n) { * > $n }; say ~(5, 10 ... upto 99)
PerlJam I'm just looking for more baby talk I guess.
p6eval rakudo ca8731: OUTPUT«5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100␤»
TimToady showoff :) 19:39
PerlJam perl6++ :)
counting by 5s as long as you haven't passed a certain number is something I could explain adequately to my kids. I'm not sure I could explain * > 99 to them quite as well and then relate that to the other thing. 19:41
(kids are 5, 9, 12)
I guess you could pull a Feynman on me and say that I don't understand * > 99 well enough then :) 19:42
19:42 bluescreen10 left
TimToady I'd rather play the congas. 19:42
PerlJam colomon: Did you see xkcd.com/899/ ? 19:46
colomon PerlJam: yes, I think e & pi (observed) might be my new favorite number. :)
rakudo: say (e + pi) / 2 19:47
p6eval rakudo ca8731: OUTPUT«2.92993724102442␤»
PerlJam :)
mberends wait, so nobody else minds that 100 falls within the definition "up to 99" ? 19:49
PerlJam mberends: colomon didn't have enough thought time to work out the magic to make it work like 5, 10 ...^ * > 99 19:51
mberends: give him a few more seconds and I'm sure he could do it. :) 19:52
mberends it seems to work as a kind of "until false" condition then
19:54 bluescreen10 joined
colomon mberends: the thing is, the "up to" part is exactly what the ...^ is, if you know what I mean. 19:56
19:57 Ali_h left
TimToady rakudo: sub upto($lim) { -> $n { fail if $n > $lim } }; .say for 5, 10 ... upto 99 19:57
p6eval rakudo ca8731:
..OUTPUT«(timeout)0␤25␤30␤35␤40␤45␤50␤55␤60␤65␤70␤75␤80␤85␤90␤95␤100␤105␤110␤115␤120␤125␤130␤135␤140␤145␤150␤155␤160␤165␤170␤175␤180␤185␤190␤195␤200␤205␤210␤215␤220␤225␤230␤235␤240␤245␤250␤255␤260␤265␤270␤275␤280␤285␤290␤295␤300␤305␤310␤315␤320␤325␤330␤335␤340␤345␤350␤355␤360␤365␤370␤
TimToady hmm 19:58
tadzik seen jnthn
aloha jnthn was last seen in #perl6 1 days 7 hours ago saying "masak is so impure... :P".
TimToady rakudo: sub upto($lim) { -> $n { Nil if $n > $lim } }; .say for 5, 10 ... upto 99
p6eval rakudo ca8731:
..OUTPUT«(timeout)0␤25␤30␤35␤40␤45␤50␤55␤60␤65␤70␤75␤80␤85␤90␤95␤100␤105␤110␤115␤120␤125␤130␤135␤140␤145␤150␤155␤160␤165␤170␤175␤180␤185␤190␤195␤200␤205␤210␤215␤220␤225␤230␤235␤240␤245␤250␤255␤260␤265␤270␤275␤280␤285␤290␤295␤300␤305␤310␤315␤320␤325␤330␤335␤340␤345␤350␤355␤360␤365␤370␤
tadzik phenny: please tell jnthn can we close rt.perl.org/rt3/Ticket/Display.html?id=65396 ?
TimToady rakudo: sub upto($lim) { -> $n { die if $n > $lim } }; .say for 5, 10 ... upto 99
p6eval rakudo ca8731: OUTPUT«5␤10␤15␤20␤25␤30␤35␤40␤45␤50␤55␤60␤65␤70␤75␤80␤85␤90␤95␤Died␤␤ in <anon> at line 22:/tmp/0DB0p9HKnl␤ in 'Block::ACCEPTS' at line 6354:CORE.setting␤ in <anon> at line 899:CORE.setting␤ in main program body at line 1␤»
mberends colomon: aye, I wonder if the implementation would be more dwimmy if it popped off the last value in the series when the terminating condition is met. 19:59
tadzik phenny: tell jnthn can we close rt.perl.org/rt3/Ticket/Display.html?id=65396 ?
phenny tadzik: I'll pass that on when jnthn is around.
tadzik phenny-- # deaf to kindness
TimToady rakudo: sub upto($lim) { -> $n { last if $n > $lim } }; .say for 5, 10 ... upto 99 20:01
p6eval rakudo ca8731: OUTPUT«5␤10␤15␤20␤25␤30␤35␤40␤45␤50␤55␤60␤65␤70␤75␤80␤85␤90␤95␤»
colomon rakudp
TimToady that's what I was looking for
colomon TimToady++
I forgot that was supposed to work
TimToady had to look in the spec...
colomon and didn't know that it actually would work in Rakudo, for that matter. is that tadzik++ ?
PerlJam Doesn't that require you to know a little much about how ... is implemented? 20:02
tadzik colomon: sorry, could you refactor your question?
TimToady it suffices to know that it is considered a loop
colomon tadzik: was it you who did all the additional work on the sequence operator, or is my brain muddled again 20:03
PerlJam so, it's specced that ... must be some sort of loop?
colomon PerlJam: the spec says you can call last like TimToady did
20:03 Ali_h joined
tadzik colomon: nah, I don't think so 20:03
TimToady rakudo: say ~map { last when 100; $_ }, 5, 10 ... 200 20:04
p6eval rakudo ca8731: OUTPUT«No candidates found to invoke for method 'map' on object of type 'Array'; available candidates have signatures:␤:(Mu : &block;; *%_)␤␤ in 'map' at line 1887:CORE.setting␤ in main program body at line 22:/tmp/Qls5KsRhWF␤»
tadzik I was as suprised with the spec change as everyone else :)
I'm not sure how to treat rt.perl.org/rt3/Ticket/Display.html?id=62244 NCI has had (is that correct English?) so many adventures recently anyway
TimToady rakudo: say ~map { last when 100; $_ }, (5, 10 ... 200) 20:05
p6eval rakudo ca8731: OUTPUT«5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95␤»
TimToady that too
sjohnson writes those numbers down
TimToady rakudo: say ~map { next when 100; $_ }, (5, 10 ... 200)
p6eval rakudo ca8731: OUTPUT«5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200␤» 20:06
PerlJam sjohnson: 8 6 7 5 3 0 9 ;)
TimToady :D
colomon oh, patrickas++ # thank you blame
TimToady what area code?
TimToady goes to drill more holes in his house 20:08
tadzik I think rt.perl.org/rt3/Ticket/Display.html?id=63408 can be closed
20:09 mikemol left, mikemol joined
tadzik rakudo: say "foo" ~~ /<[f] #[comment] + [o]>/ 20:09
p6eval rakudo ca8731: OUTPUT«===SORRY!===␤regex assertion not terminated by angle bracket at line 22, near ""␤»
20:10 risou is now known as risou_awy
tadzik rakudo: class class {}; say class.new.perl 20:11
p6eval rakudo ca8731: OUTPUT«===SORRY!===␤Malformed package declaration at line 22, near ".new.perl"␤»
20:12 mikemol left, mikemol joined
tadzik rakudo: regex foo { foo }; say foo('foo').perl 20:13
p6eval rakudo ca8731: OUTPUT«Useless declaration of has-scoped regex in a module; add our or my to install it in the lexpad or namespace␤Could not find sub &foo␤ in main program body at line 22:/tmp/6aXxQJ0J1h␤»
tadzik rakudo: my regex foo { foo }; say foo('foo').perl
p6eval rakudo ca8731: OUTPUT«Method '!cursor_start' not found for invocant of class 'Str'␤ in 'foo' at line 10:/tmp/aTCnAK3fiO␤ in main program body at line 22:/tmp/aTCnAK3fiO␤»
20:13 PacoLinux left
tadzik rakudo: caffeine(eval('sub caffeine($a){say $a}')); 20:14
p6eval rakudo ca8731: OUTPUT«Could not find sub &caffeine␤ in main program body at line 22:/tmp/BX9vC2E6Z5␤»
tadzik enough of ticketwork today 20:16
20:17 kaare_ left 20:24 birdwindupbird left 20:31 [particle]1 joined 20:32 mj41 left, [particle] left 20:33 [particle]1 is now known as [particle], risou_awy is now known as risou 20:36 newbee left, wknight8111 left
cognominal is it possible to do call stack introspection from user code today? 20:42
I see that one can get a stack trace when dying... 20:44
20:45 ymasory left
mberends cognominal: it is only when you are about to die that you can see your whole life flash before your eyes. So you have to die. 20:48
chartreuse! 20:49
You have to hand it to Ruby. They make a nice Port. :) 20:50
cognominal gnole++
karma gnole?
aloha gnole? has karma of 0.
20:50 mkramer left
cognominal karma gnole 20:50
aloha gnole has karma of 1.
mberends better :)
20:51 bluescreen10 left 20:54 spq left, PacoLinux joined
mberends cognominal: I speculate that although the stack trace is only currently emitted when dying, it should be free of side effects, and therefore might work in a well crafted pir call without terminating the running program. Proof is left as an exercise for the reader. 20:59
moritz cognominal: callframe() 21:03
rakudo: say callframe().line
p6eval rakudo ca8731: OUTPUT«22␤»
moritz rakudo: f();␤ sub f { say callframe().line; say callframe(1).line } 21:04
p6eval rakudo ca8731: OUTPUT«23␤22␤»
21:12 Mowah left
cognominal moritz, thx I will try it 21:22
21:22 bluescreen10 joined 21:26 sirelander left 21:32 mtk left 21:38 mtk joined 21:41 wamba left 21:44 kjeldahl left
pmichaud cognominal: I think CALLER and or callframe() work in Rakudo to some extend 21:58
*extent
gist.github.com/975473 # zavolaj almost works 21:59
22:23 [particle]1 joined
jasonmay ah yes, I'm working on porting Term::VT102 to XS, I should extract the C and write a p6 library with it using zavolaj or something 22:23
22:24 [particle] left 22:26 bluescreen10 left
Tene wasn't someone working on an llvm-based runtime thunk builder? 22:32
22:37 icwiener left 22:40 risou_ joined
colomon tirania.org/blog/archive/2011/May-16.html # sounds like, in the foreseeable future, we might be able to run niecza on our phones.... 22:45
errr... or can we do that already? 22:47
mono-android.net/
pmichaud do we have any mysqlclient/zavolaj-knowledgeable people here? 22:50
thou perl6: my %h = 1..10; %h.say; %h{3} :delete; %h.say; 22:52
p6eval rakudo ca8731: OUTPUT«===SORRY!===␤Confused at line 22, near "%h{3} :del"␤»
..pugs: OUTPUT«*** ␤ Unexpected ":delete"␤ expecting operator␤ at /tmp/yhU4VDVZBs line 1, column 30␤»
..niecza v5-18-gd96efe7: OUTPUT«Unhandled exception: Attempted to access slot key of type object for Num␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE Hash.LISTSTORE @ 0)␤ at /tmp/Ms97R5Do8U line 1 (MAIN mainline @ 3)␤ at /home/p6eval/niecza/lib/CORE.setting line 1374 (CORE C562_ANON @
..2)␤ at /home/p6…
thou can anyone point me to how to remove an element from a hash? 22:56
22:57 estrabd left 22:58 estrabd joined
thou actually, i'm trying to remove a single element from a Set. my $s = Set.new(3, 5 ...^ *>100); my @primes = $s.min; $s.delete\ #`[ That doesn't work ] ($s.min); 22:59
23:04 benabik joined 23:05 benabik left 23:08 PacoLinux left 23:09 PacoLinux joined 23:11 whiteknight joined, dur-randir left 23:13 [particle]1 left 23:14 PacoLinux left 23:18 PacoLinux joined 23:19 [particle] joined 23:33 ajr joined 23:34 ajr left 23:35 donri left 23:49 Chillance left 23:56 risou_ left