»ö« 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:06 packetknife left 00:16 ksi left, drbean left 00:22 packetknife joined 00:23 drbean joined 00:31 lestrrat left 00:33 lestrrat joined 00:34 replore_ joined, alim left 00:37 stepnem left 00:38 drbean left 00:43 wolfman2000 joined
dalek ast: 32452ff | coke++ | S05-m (2 files):
Niecza - unfudge bugfixed.
00:44
00:45 drbean joined 00:55 Radvendii joined
Radvendii hey guys 00:56
ive got a bug
b: say (0,1,*+*...*)[1477]
p6eval b 1b7dd1: OUTPUT«Inf␤»
sorear Radvendii: Stop using b.
Radvendii :(
why?
sorear b does not support large integers
perl6: say (0,1,*+*...*)[1477] 00:57
p6eval rakudo 92f383: OUTPUT«2114752986979021852557858619611791355705525027468032521749562265586340243239476666371378239325243976118646715662119083302633774252045520741882086869936691237540043402509431087092122991804222930097654049305082429757737746121400215994779830067135361065494411613234990…
..niecza v12-17-g8ff7b21: OUTPUT«2114752986979021852557858619611791355705525027468032521749562265586340243239476666371378239325243976118646715662119083302633774252045520741882086869936691237540043402509431087092122991804222930097654049305082429757737746121400215994779830067135361065494411…
..pugs b927740: OUTPUT«*** ␤ Unexpected "["␤ at /tmp/9tIwDqaSin line 1, column 18␤»
Radvendii so is niecza just superior? 00:58
sorear No. Why do you say that? 00:59
[Coke] Radvendii: are you using b because you're on the last version of rakudo star? 01:00
Radvendii yeah 01:02
01:02 hundskatt left
[Coke] so, that code path isn't getting updated; best you can do is check against nom to see if it's likely to be fixed in the next release of star. 01:03
Sorry for the inconvenience, but nom is better than b in a lot of respects.
Radvendii in the meantime, every error ive run up against has been fixed in niecza 01:04
sorear fixed in Rakudo, too
Radvendii in nom? 01:05
sorear Rakudo means nom now
01:05 tokuhirom left
Radvendii wha..? 01:05
how do i get a version on my computer that is fairly easy to update?
i want to use the language with fairly little interference from updating the compiler every couple of months... 01:06
or weeks. or however often
(not that the crazy big numbers is *that* much of an issue
:P
colomon Radvendii: if you were doing all your work in niecza, you'd be running into niecza bugs which work in b and/or nom. That's why I've got projects going on both niecza and nom... 01:10
sorear colomon++ # perfect responce
[Coke] if you don't want churn, stick with the star releases. 01:11
you're just at a bad point because there was a series of refactors that changed a lot fo the code underneath.
wait for the next star, which is based on the new line of rakudo development.
benabik Which should be soon, right? 01:12
FSVO soon
[Coke] I've heard as early as this month, but it really depends on jnthn++'s tuits. 01:15
01:16 whiteknight joined, whiteknight is now known as Guest87244 01:17 thou left
colomon jnthn seemed pretty determined to get it out this month, for what that is worth. (As of last week.) 01:20
01:24 stepnem joined 01:29 lestrrat left, hrj left, lestrrat joined 01:32 Radvendii left 01:36 preflex left, preflex_ joined 01:37 preflex_ is now known as preflex, cooper left 01:41 Radvendii joined 01:50 am0c joined 01:55 cooper joined, cooper left, cooper joined, cooper left, cooper joined, cooper left 01:56 cooper joined 02:05 stepnem left 02:13 stepnem joined 02:20 noidea joined
noidea I looked at perl5 a while ago and it looked horrendous. I looked at perl6 today, and it has a beauty 02:20
02:25 orafu left, alvis left 02:30 orafu joined, geekosaur left, geekosaur joined 02:37 leprevost left 02:38 icwiener joined 02:39 alvis joined
sorear noidea: hello and welcome 02:40
02:41 DarthGandalf left 02:43 Patterner left 02:46 DarthGandalf joined 02:59 Guest87244 left 03:00 drbean left 03:07 packetknife left 03:08 drbean joined 03:14 jaldhar joined 03:24 drbean left 03:27 volkove joined 03:29 drbean joined 03:34 Psyche^ joined, Psyche^ is now known as Patterner 03:39 Psyche^ joined, Patterner left, Psyche^ is now known as Patterner 04:17 mikemol left 04:21 mikemol joined, mikemol left 04:33 mikemol joined 04:38 icwiener left 04:39 donri left 04:48 cooper left
dalek ecza: 4659c86 | sorear++ | src/ (3 files):
Implement new character class syntax
05:26
05:34 koban joined 05:45 kaleem joined
dalek ecza: e31c8eb | sorear++ | lib/Cursor.cs:
Support supplementary characters in LTM
06:03
06:06 alim joined 06:09 alim left 06:18 Radvendii left 06:26 drbean left 06:32 drbean joined 06:35 gfldex left 06:36 gfldex joined 06:38 thou joined 06:56 sftp left 07:23 birmjin joined 07:26 wtw joined 07:32 grondilu joined
grondilu Hi, here is the error log from panda: pastebin.com/82nMWaUV 07:32
ahh sorry I don't think pastebin accepted it 07:33
hang on
s0.barwen.ch/~grondilu/err-log.panda.txt 07:36
dalek ecza: 049fd3d | sorear++ | src/niecza:
Refactor, optimize, allow multi-character codes in character classes
sorear -> sleep 07:37
tomorrow: proper CRLF handling, other random regex stuff 07:38
07:38 thou left 07:39 grondilu left 07:50 stepnem left 07:52 araujo left 07:53 fridim_ left 07:54 stepnem joined 07:58 mkramer joined 08:01 araujo joined 08:05 stepnem left 08:11 stepnem joined
TiMBuS non perl6 question but since im here: how do you provide an extra lib folder to cpan (for it to then pass to dmake)? 08:29
moritz TiMBuS: PERL5LIB=$path/to/your/lib 08:33
08:35 mkramer left 08:36 mj41 joined
TiMBuS does that work on windows 08:36
moritz TiMBuS: the syntax is different on windows, iirc
but if you want it cross-platform, do use lib '...'; inside the module 08:37
TiMBuS nah its a dll
i'm compiling gtk (ugh) 08:38
setting make_arg should do it i think
08:39 cognominal left 08:41 flussence left, cognominal joined, flussence joined 08:42 alim joined 08:44 drbean left 08:48 alim left 08:51 drbean joined 08:54 chra joined 09:01 am0c left 09:09 araujo left 09:10 volkove left 09:22 hundskatt joined 09:37 dakkar joined 09:39 mkramer joined 09:44 birmjin left 09:47 drbean left 09:53 drbean joined 10:02 bacek joined 10:04 bacek left
moritz nom: my $!x 10:08
p6eval nom 92f383: ( no output )
moritz nom: class A { $!foo }
p6eval nom 92f383: OUTPUT«===SORRY!===␤Attribute $!foo not declared in class A at line 1, near " }"␤»
10:13 mkramer left 10:15 mkramer joined, kaare_ joined 10:19 noidea left, noidea joined 10:25 mkramer left 10:26 mkramer joined 10:28 baest joined 10:30 mkramer left
moritz evalbot rebuild nom 10:31
p6eval OK (started asynchronously)
moritz evalbot rebuild nom
p6eval NOT OK (maybe a rebuild is already in progress?)
dalek kudo/nom: 3504a85 | moritz++ | src/ (2 files):
throw a X::Attribute::Undeclared when encountering an undeclared attribute
moritz good, that mechanism still works 10:32
10:39 snearch joined, tokuhirom joined 10:42 replore_ left 10:45 snearch left, snearch joined 10:46 snearch left, snearch joined 10:48 mkramer1 joined 10:52 mkramer1 left 10:53 mkramer joined 11:00 snearch left 11:16 Mowah_ joined 11:17 araujo joined, araujo left, araujo joined 11:40 envi_ left, lestrrat left 11:41 lestrrat joined 11:44 envi_ joined 12:02 mkramer left 12:05 mkramer joined 12:08 tokuhirom left
colomon moritz: do we have an Advent post plan for today? 12:15
jnthn afternoon o/ 12:16
colomon \o
jnthn had to hide away this morning to get a $dayjob-task out of the way 12:19
Hopefully I get at least some Perl 6 tuits later today.
colomon \o/ 12:20
moritz colomon: not a plan yet; I might write about operator precedence 12:27
tadzik I have a handful of time-tuits today, may write something 12:29
12:29 packetknife joined, packetknife left
moritz tadzik: that would be nice too 12:30
tadzik any wanted topic not yet taken? 12:31
moritz NCI (though it might make sense to wait until jnthn++ does the array passing stuff) 12:34
tadzik maybe advertising bailador a bit? :)
moritz tadzik: sure
tadzik okay
the implementation is short enough to be explained statement by statement :) 12:35
12:38 orafu left, orafu joined
moritz tadzik: should I add your topic to the schedule for today? 12:47
12:48 grondilu joined
jnthn +1 to a bailador post 12:49
tadzik moritz: sure
dalek : fbfd11d | moritz++ | misc/perl6advent-2011/ (2 files):
update schedule and topics, tadzik++
12:50
12:52 baest left, baest joined
tadzik ok, doomed :P 12:54
12:57 baest left 13:01 baest joined 13:03 baest_ joined 13:06 baest left 13:12 drbean left, baest_ is now known as baest 13:18 drbean joined 13:22 Moukeddar joined 13:26 hundskatt left 13:36 mkramer left 13:38 CoreX_ left 13:39 mkramer joined, mkramer left
[Coke] tries to remember why he quit #parrot. 13:42
13:44 skangas joined, Moukeddar left 13:50 drbean left
[Coke] "Why do Python classes have both _mro_ and mro() ? What was I thinking at the time? Does anyone remember?" -guido. mmhehehe. 13:51
13:55 CoreX_ joined 13:56 drbean joined 14:03 benabik left 14:05 wolfman2000 left
[Coke] niecza: say 1 ** Inf; 14:06
p6eval niecza v12-20-g049fd3d: OUTPUT«NaN␤»
14:06 risou_awy is now known as risou
[Coke] nom: say 1 ** Inf; 14:06
p6eval nom 3504a8: OUTPUT«1␤»
14:06 icwiener joined
colomon [Coke]: is that in the spectest somewhere? 14:07
jnthn nom: say 2 ** Inf 14:08
p6eval nom 3504a8: OUTPUT«Inf␤»
jnthn nom++
well, (the folks who did numeric stuff in nom)++ :)
colomon niecza: say 2 ** Inf
p6eval niecza v12-20-g049fd3d: OUTPUT«Infinity␤»
djanatyn sorry I haven't been here for a while ^_^
14:09 Mowah_ left
djanatyn any interesting new perl6 tasks? 14:09
PerlJam djanatyn: want to write an advent post on perl 6? :) 14:10
[Coke] colomon: yes. 14:11
colomon :)
14:11 cosimo left
[Coke] updating the comment to make it an issue instead of just "WTF" 14:11
colomon wishes he understood the issues enough to figure out which approach is better...
djanatyn PerlJam: ooh! Sure. 14:12
Is that on the list?
colomon djanatyn: not yet
djanatyn ah, okay. 14:13
[Coke] niecza: say 2«1.1*:2<10>**:2<10>» 14:14
p6eval niecza v12-20-g049fd3d: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 773 (warn @ 2) ␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 168 (Mu.Str @ 9) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/boot/li…
[Coke] I give up, what's that supposed to do? 14:16
niecza: say 1.1*:2<10>**:2<10>
p6eval niecza v12-20-g049fd3d: OUTPUT«22/5␤»
dalek ast: f16c416 | coke++ | S32-num/power.t:
niecza re-fudge with ticket.
14:17
14:17 kaleem left
[Coke] nom:say 2«1» 14:24
nom: say 2«1»
p6eval nom 3504a8: OUTPUT«===SORRY!===␤Confused at line 1, near "say 2\x{ab}1\x{bb}"␤»
[Coke] nom: say 2<<1>>
p6eval nom 3504a8: OUTPUT«Method 'at_key' not found for invocant of class 'Int'␤ in method postcircumfix:<{ }> at src/gen/CORE.setting:1145␤ in block <anon> at /tmp/PcqRX2cIXA:1␤ in <anon> at /tmp/PcqRX2cIXA:1␤» 14:25
colomon [Coke]: I think you're forgetting the : before the 2 sometimes there?
nom: say :2<1>
p6eval nom 3504a8: OUTPUT«1␤»
colomon nom: say :2<1011>
p6eval nom 3504a8: OUTPUT«11␤»
[Coke] colomon: not me: t/spec/S02-literals/radix.t 14:26
Look for "WTF" - it's fudged for pugs, rakudo & niecza.
14:26 icwiener left 14:27 icwiener joined
moritz std: :2«1.1*:2<10>**:2<10>» 14:28
p6eval std be1f10e: OUTPUT«===SORRY!===␤Malformed radix number at /tmp/CEw7JcKbH3 line 1:␤------> :2⏏«1.1*:2<10>**:2<10>»␤ expecting any of:␤ statement end␤ statement list␤Parse failed␤FAILED 00:01 118m␤»
moritz std: :2«1.1»
p6eval std be1f10e: OUTPUT«===SORRY!===␤Malformed radix number at /tmp/KVtzBXidyD line 1:␤------> :2⏏«1.1»␤ expecting any of:␤ statement end␤ statement list␤Parse failed␤FAILED 00:01 118m␤»
moritz std: :2<1.1> 14:29
p6eval std be1f10e: OUTPUT«ok 00:01 118m␤»
14:29 daxim joined
colomon std: 2«1.1*:2<10>**:2<10>» 14:29
p6eval std be1f10e: OUTPUT«ok 00:01 118m␤»
colomon wonder what std thinks it means?!
moritz colomon: it just parses it as 2.{'some text here}
as in %hash<some text here>
[Coke] hopes the test is removed so he doesn't have to create a niecza ticket. ;) 14:30
moritz [Coke]: we can safely remove that test
colomon :2«1.1*:2<10>**:2<10>» is in the spec
2«1.1*:2<10>**:2<10>» is not 14:31
moritz well, std doesn't like it
it should be harmonized one way or another
colomon as far as I'm concerned, the important part is that that test is wrong. :) 14:32
moritz (and I'm all for killing the feature; I don't see us winning anything by yet more crazy literals
colomon +1
[Coke] +1 14:33
14:34 sftp joined
colomon std: :2«101» 14:34
p6eval std be1f10e: OUTPUT«===SORRY!===␤Malformed radix number at /tmp/4WZRKMAomc line 1:␤------> :2⏏«101»␤ expecting any of:␤ statement end␤ statement list␤Parse failed␤FAILED 00:01 118m␤»
grondilu test 14:35
yath failed
grondilu perl6: sub postfix:<²>($x) { $x * $x }; say $x² 14:36
colomon moritz: in particular, what kind of maniac would write :2«1.1*:2<10>**:2<10>» when :2<1.1> * :2<10> ** :2<10> is available to do the same thing?
p6eval rakudo 3504a8: OUTPUT«===SORRY!===␤Variable $x is not predeclared at line 1, near "\x{b2}"␤»
..niecza v12-20-g049fd3d: OUTPUT«===SORRY!===␤␤Variable $x² is not predeclared at /tmp/2aK5n2ZNFH line 1:␤------> sub postfix:<²>($x) { $x * $x }; say ⏏$x²␤␤Potential difficulties:␤ &postfix:<²> is declared but not used at /tmp/2aK5n2ZNFH line 1:␤----…
..pugs b927740: OUTPUT«decodeUTF8': bad data: '\178'␤decodeUTF8': bad data: '\178'␤*** ␤ Unexpected end of input␤ expecting "::"␤ Variable "$x\194\178" requires predeclaration or explicit package name␤ at /tmp/Tk65aOTP2l line 1, column 41␤»
moritz perl6: sub postfix:<²>($x) { $x * $x }; say 5² 14:37
p6eval rakudo 3504a8: OUTPUT«25␤»
..pugs b927740: OUTPUT«decodeUTF8': bad data: '\178'␤decodeUTF8': bad data: '\178'␤25␤»
..niecza v12-20-g049fd3d: OUTPUT«Potential difficulties:␤ &postfix:<²> is declared but not used at /tmp/3Pfj2vYzh8 line 1:␤------> sub postfix:<²>⏏($x) { $x * $x }; say 5²␤␤Unhandled exception: System.Exception: invalid digit in 5²␤ at Niecza.EmitUnit.ExactNum (Int32 …
grondilu perl6: sub postfix:<²>($x) { $x * $x }; say 4²
p6eval niecza v12-20-g049fd3d: OUTPUT«Potential difficulties:␤ &postfix:<²> is declared but not used at /tmp/4pD2g5NFwt line 1:␤------> sub postfix:<²>⏏($x) { $x * $x }; say 4²␤␤Unhandled exception: System.Exception: invalid digit in 4²␤ at Niecza.EmitUnit.ExactNum (Int32 …
..pugs b927740: OUTPUT«decodeUTF8': bad data: '\178'␤decodeUTF8': bad data: '\178'␤16␤»
..rakudo 3504a8: OUTPUT«16␤»
jnthn std: sub postfix:<²>($x) { $x * $x }; say 5²
p6eval std be1f10e: OUTPUT«ok 00:01 128m␤»
14:38 icwiener left, benabik joined
grondilu Being able to define ² is really cool :) 14:38
14:38 icwiener joined
moritz colomon: probably somebody who wants guranteed execution at compile time 14:38
14:43 kaleem joined
[Coke] niecza: my @a = 1,2,3,4; say @a.=pick(*); 14:45
p6eval niecza v12-20-g049fd3d: OUTPUT«Unhandled exception: Cannot use value like Whatever as a number␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting line 191 (Any.Numeric @ 4) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.settin…
[Coke] nom: my @a = 1,2,3,4; say @a.=pick(*);
p6eval nom 3504a8: OUTPUT«2 1 4 3␤»
14:47 am0c joined
colomon [Coke]: I skipped the pick(*) bit when I did pick, because Whatever wasn't actually defined yet at that point in the setting. Probably LHF, but definitely wrong atm. 14:49
[Coke] colomon: there are a lot of skips in spectest for niecza about not being able to use <some type> as a number. 14:55
moritz niecza: say +Cool
p6eval niecza v12-20-g049fd3d: OUTPUT«0␤» 14:56
colomon ?
[Coke] I'll see if I can handle the Whatever ones.
niecza: say +Sub
p6eval niecza v12-20-g049fd3d: OUTPUT«0␤»
colomon [Coke]: something like MyType as a number?
[Coke] moritz: presumably it's like the pick situation where it's an argument that is defined as a Numeric.
moritz [Coke]: ah right, missing special cases 14:57
[Coke] colomon: e.g. "Cannot use value like Block as a number"
colomon eqv.t, eh? 14:58
Huh. I don't think that's a number issue at all, is it? 15:00
niecza: my $a = { 3 }; my $b = { 3 }; say $a eqv $b
p6eval niecza v12-20-g049fd3d: OUTPUT«Unhandled exception: Cannot use value like Block as a number␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting line 191 (Any.Numeric @ 4) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting l…
moritz eqv should fall back to ===
colomon yeah, it's an eqv bug 15:01
errr.. cmp bug, actually
sub infix:<eqv> is equiv<==> ($a, $b) { ($a cmp $b) == 0 } 15:02
colomon apparently picked a good morning to update his ack-in-textmate to search .setting files. ;)
yeah, in niecza, if cmp can't figure out what to do it just tries subtracting the two arguments 15:03
[Coke] colomon: if that's a simple fix, you might be able to get a few tests back.
I'm happy to do the unfudge work.
colomon I dunno, I've no idea what the correct implementation is. 15:04
all I can say with authority is that the current implementation of cmp is really screwed up.
15:06 grondilu left
colomon right now, it does numeric comparison if both sides are numbers; that's right 15:06
then it does a string compare on the .WHATs if the .WHATs are not ===
does that make any sense to any of you? 15:07
then it does a string compare on the arguments if the first is a Str
and wow, cmp.t is nearly completely useless. seems like it needs 100s more tests... 15:08
moritz colomon: makes sense-ish
colomon moritz: please explain, because I'm finding the spec here to be completely opaque 15:10
15:11 koban left
moritz colomon: I must confess I don't know how cmp works for non-Cool types 15:12
colomon: I just know how eqv works
and that checks type equality first, and then for value types compares equality, and uses === for everything else 15:13
but I wouldn't know how cmp works on two code blocks
but I'm pretty sure that eqv just returns False
so I'd rather dispatch-fail infix:<cmp>(Code, Code) 15:14
colomon actually, you're wrong on eqv, according to roast
eqv.t, for instance, has ok ($a eqv $a), "eqv on sub references (1-1)"; 15:15
as well as ok ($a eqv $b), "eqv on sub references (1-3)";
the latter is todo'd for rakudo
moritz I'm not really sure these tests are correct
colomon gack, what a mess 15:16
moritz are these blocks really equivalent?
colomon hell if I know
moritz I mean, they produce different line numbers in backtraces, for one
15:16 wtw left
moritz comparing two code blocks for equivalence could be turing complete 15:17
arnsholt Isn't that actually halting-equivalent? 15:19
Or, I suppose that's what you meant
moritz that's what I meant, yes
benabik NP-Complete
colomon not NP-Complete
moritz benabik: harder than NP :-)
arnsholt Undecidable, in fact 15:20
There's a theorem whose name I've forgotten that states that in the general case it's impossible to characterise any run-time property of a program simply by analysing the code 15:22
The halting problem is a specific instance
This is why virus scanners are so hard to make. They're impossible ^_^ 15:24
colomon hmmm, may have the start of a patch 15:26
benabik Oh, yes. Blah. Say "complete" and jumped to NP. Need coffee
*Saw
colomon so, I've just modified niecza's infix:<eqv> to check to see if its arguments are infix:<===> first, and return true if === is true. 15:28
I believe that will get us back a lot of the skipped tests.
sorear good * #perl6 15:29
colomon but the ones which are todo'd for rakudo will need to be skipped for niecza, because it still gives you the 'Cannot use value like Block as a number' message if you compare two different blocks.
of course, if those tests are actually wrong anyway, as per moritz's argument... 15:30
moritz well, not all of them are wrong :-)
15:31 icwiener left
sorear arnsholt: Rice 15:32
colomon: I have NFI how cmp is supposed to be implemented, but I do know what it is supposed to do
colomon sorear: you're doing better than the rest of us, then. 15:33
sorear colomon: per TimToady, $a cmp $b means, roughly, $a.perl leg $b.perl
moritz urks
sorear it defines a total order on the _value_ of two objects, deeply
colomon WTF?
sorear not using .perl per se
([2,1] cmp [1,2]) > 0 15:34
dalek ast: 5a51d4d | moritz++ | S03-operators/eqv.t:
correct an eqv test
colomon right, so two arrays with the same values will be equal, correct?
moritz colomon: yes
positionals compare as $a.elems == $b.elems && @$a >>eqv<< @$a 15:35
colomon moritz: for eqv -- that won't work for cmp 15:36
but I take your point.
moritz colomon: well, for cmp it still cmp's element by element
so something like [||] @$a >>cmp<< @$b, modulo handling the end 15:37
colomon sorear: actually, so that's what the comparing WHATs is about? the short version of comparing .perls for different types?
arnsholt sorear: That's the one. Cheers!
colomon sorear: perhaps it should literally do $a.perl leg $b.perl for the "we don't know what to do!" case? Seems like that would be quite a bit more robust than the current $a - $b approach. 15:39
it being infix:<cmp>, I mean
moritz but then Hash.perl would need to sort its output 15:40
colomon or just define its own infix:<cmp> 15:41
moritz or that, yes
colomon or I suppose its own special case line in the general cmp implementation. :)
moritz I just hate the idea, because .perl is so very non-canonical 15:42
colomon how is it supposed to compare, anyway? sorting its keys?
moritz you can make (1, 2, 3).perl produce reverse(3, 2, 1) if you want
colomon you mean different implementations might compare differently
moritz and if you leg-compare them, you'll get fubar
I mean that .perl is so very non-canonical that you shouldn't base any semantics on the exactly emitted form 15:43
colomon First note that I'm not proposing this as a be-all, end-all solution. 15:44
I'm just trying to find something a little bit better than the current broken implementation.
moritz nom: say { 3 } cmp { 5 } 15:45
p6eval nom 3504a8: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(Mu $v, Mu %_)␤␤ in method Numeric at src/gen/CORE.setting:638␤ in sub infix:<==> at src/gen/CORE.setting:2196␤ in sub infix:<cmp> at src/gen/CORE.setting:1163␤ in block <anon>…
moritz that's broken too
colomon yup 15:46
15:46 baest left
sorear colomon: I dislike using .perl for the same reasons moritz gives 15:46
moritz I'd expect it to error out, because I can't think of a way to compare those two blocks
what about { 1 + 1 } cmp { 2 } ? 15:47
it's just futile to try to provide useful semantics, so I'd rather fail() or die()
colomon moritz: we've already agreed its impossible to eqv two blocks.
sorear colomon: I think the proper solution is something closer to sub infix:<cmp>($a,$b) { ($a.WHAT leg $b.WHAT) || $a.CMP($b) }
15:47 ab5tract joined
moritz colomon: but the approach with .perl tries exactly that 15:48
15:48 thou joined
sorear colomon: last time I discussed this with TimToady, there was talk of making 4e0 eqv 4, which aaaaa 15:48
moritz sorear: nonono
sorear: there was a talk about introducing a looser comparison op
which would do that, and also compares List and Array with the same contents equally, etc. 15:49
colomon moritz: no, the .perl approach just gets those answers wrong. 15:50
moritz prefers no answer to wrong answer
sorear niecza's === is also quite under-implemented 15:53
colomon perl6: my @a = 1, 2, 3; say @a eqv @a.map({ $_ })
p6eval pugs b927740: OUTPUT«1␤» 15:54
..niecza v12-20-g049fd3d: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/lib/CORE.setting line 775 (warn @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 169 (Mu.Str @ 9) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting …
..rakudo 3504a8: OUTPUT«Bool::False␤»
colomon what's the correct answer there?
benabik Once you allow values of different types to compare, things get… hazy. I look forward to Perl6 getting it less wrong than everyone else. :-D
moritz colomon: false, because .map returns a List or a Parcel or so, not an Array 15:55
perl6: my @a = 1, 2, 3; say @a eqv @a.map({ $_ }).Array 15:56
p6eval niecza v12-20-g049fd3d: OUTPUT«Unhandled exception: Unable to resolve method Array in class List␤ at /tmp/T2Z13l_m4Q line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2226 (ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2227 (module-CORE @ 58) ␤ at /home…
..rakudo 3504a8: OUTPUT«Bool::True␤»
..pugs b927740: OUTPUT«*** No such method in class Array: "&Array"␤ at /tmp/glEt94qjbm line 1, column 22 - line 2, column 1␤»
[Coke] gist.github.com/1472657 - colomon, sorear; if I try to reference Whatever in pick() (either here or creating a new multi), I get a similar error. Any suggestions? 15:58
colomon [Coke]: the only thing I could think of was moving pick's implementation to the sub form of pick, and putting it after Whatever is defined. But maybe sorear has a better suggestion. 15:59
moritz in rakudo, you'd stub Whatever
my class Whatever { ... } # with literal ...
16:00 icwiener joined
colomon ah, yes, looks like that's in niecza as well. moritz++ 16:01
[Coke]: look at the top of CORE.setting
sorear question: if two unrelated classes have the same string name, what should cmp do? 16:02
my $a = (anon class Foo { }).new; my $b = (anon class Foo { }).new; say $a cmp $b; 16:03
jnthn I highly doubt we could ever be comparing classes on the name. 16:04
*should
16:04 drbean left
colomon should we have is antisymmetric as well as is symmetric? 16:05
sorear colomon: what does is symmetric do? 16:06
jnthn: We need some way to stably order classes 16:07
16:07 molaf joined
jnthn sorear: Hm. Memory address of the type object is fragile in the light of copying GCs. 16:07
colomon sorear: my multi infix:<+>(Rat $r, Int $i) is symmetric also defines infix:<+>(Int $i, Rat $r) with the same body 16:08
Do we need to stably order classes? Why not just have the cmp fail?
sorear jnthn: I would just use MMD type cache IDs but that's not very stable across runs
jnthn sorear: Yeah, I was gonna suggest that too 16:09
sorear: It's stable in 6model if the runs are identical
sorear: Taht is, identical in the types they create and the order they do it in.
sorear colomon: 1. eqv is defined in terms of cmp 2. AIUI, cmp falls back to cmping the classes if the classes are different
jnthn *that
sorear 1 cmp "foo" means Int cmp Str
colomon sorear: in niecza eqv is defined in terms of cmp. in the spec, it's the other way around
sorear not so much AIUI as as I'm planning to do it 16:10
colomon: how do you define cmp using eqv?
seems rather impossible to me
colomon defined in the "this is what it means" sense, not in the "is implemented in terms of" sense
16:11 drbean joined
colomon literally: "The cmp is just like the eqv above except..." 16:11
sorear ah, yeah.
cmp is a more or less arbitrary total order consistant with eqv
colomon well... that's the catch, right? 16:12
we've just been discussing how it can't be a total ordering 16:13
sorear [Coke]: are you sure 1 ** Inf should be 1? that's one of the classic indeterminate forms, along with Inf - Inf, 0 * Inf, 0 / 0, and 0 ** 0
colomon: it can be a total ordering on all types except Code, and even there it can be total if you're willing to lose extensionality. 16:14
16:17 drbean left
colomon there's also the 4e0 eqv 4 thing -- 4e0 cmp 4 should definitely be Order::Same 16:18
moritz eqv returns True or False, not Order::*
16:21 drbean joined
colomon moritz: yes, but the point here is that "consistent with eqv" implies that if $a cmp $b is Order::Same, then $a eqv $b should be true. (or at least, that's what I thought was meant by it...) 16:21
moritz yes, I think that's what it means
sorear 07:48 < sorear> colomon: last time I discussed this with TimToady, there was talk of making 4e0 eqv 4, which aaaaa 16:23
07:48 < moritz> sorear: nonono
07:48 < moritz> sorear: there was a talk about introducing a looser comparison op
colomon right, that's why I was bringing it up in this context. 16:25
I'm trying to make sense of the relationship between cmp and eqv. (At least in my own head.) 16:27
s/make sense of/understand/
hmm... I'm also not seeing why I shouldn't be able to meaningfully cmp a List and an Array -- doing an element-by-element by and ignoring the overall type. (Whereas I can see not making them eqv.) 16:33
16:34 kaleem left 16:36 drbean left
colomon gist.github.com/1472831 # random thoughts... 16:39
16:39 kaleem joined 16:40 tokuhirom joined 16:43 drbean joined 16:48 hrj joined
TimToady a few more ideas: the roles are slightly off from what is wanted semantically 16:49
we want the Real domain, the Unicode domain, not Numeric/Stringy
16:50 hrj left
TimToady and Positional is perhaps too restrictive, if Complex wants to be considered a list of two elements for ordering purposes 16:51
hashes might be ordered on cardinality only
though that doesn't fit with eqv meaning Order::Same 16:52
16:53 mj41 left
TimToady to do that would requiring ordering the keys and then using listy comparisons 16:53
but Buf should be considered listy, not stringy
not unicodey, really
with the possible exception of a utf8 buf 16:54
benabik Hashes are somewhat set like. Sets can be equal or not, but usually aren't ordered.
TimToady yes, but we've already committed to imposing an ordering on things like Complex that aren't conventionally considered ordered, just so they are sortable 16:55
16:55 icwiener left
TimToady and since <=> will fail on Complex, treating them as listy is what makes sense there 16:56
benabik cmp is the "sort it somehow" ordering?
colomon TimToady++ 16:57
err.... wait, should <=> fail on Complex? that strikes me as a slightly odd choice 16:58
benabik colomon: There is no total order for Complex. 16:59
colomon benabik: yes, I know that. but I would think the logic which makes it want to work for cmp would also hold for <=>
TimToady one thing cmp will not do is try to do natural sorting, since that intermixes the comparison domains
benabik colomon: Personally, I'd want at least one notion of comparison that fails when it should. 17:00
TimToady I'm thinking <=> should imply Real domain, and leg should imply Unicode
17:00 cogno joined
TimToady which is why I think the cmp categories should be those, not Numeric/Stringy 17:01
I am also suspecting that, since we have MI and mixins, we need the ability for a type to choose which domain it wants to be compared in 17:02
colomon +1 for choosing!
benabik class Foo extends Real, Unicode is cmp(Real)? 17:03
colomon is Unicode actually a p6 type now?
TimToady well, it's supposed to be eventually, but Unicode is more like "is known to represent Unicode somehow or other" 17:04
as for an actual type used for comparison, it's something like NFD 17:05
comparison of two NFG characters probably compares the two NFD strings pointed to by that code point, unless the NFG codes are equal 17:06
colomon I can certainly live with <=> implying Real. not 100% sure I want Complex to sort as Positional-ish
TimToady if NFG codes are equal, the NFC or NFD are implied equal
you want it to blow up the rocket instead? 17:07
17:07 MayDaniel joined
TimToady I think this is somewhere where Perl wants to be failsoft 17:07
most sorting of numbers is for human consumption, if you're using cmp 17:08
colomon TimToady: I thought the goal was that comparing any two unrelated types would failsoft
TimToady if you're trying to be type safe, you're probably using <=> anyway
colomon cmp comparing, I mean. 17:09
TimToady there are many conflicting goals that are possible with cmp :)
it's all tradeoffs
but we'd like it to failsoft that way, yes
the question is whether there's any sense to sorting Complex in with the other scalar Real numbers 17:10
that would imply sorting compound Numerics more like surreal numbers
colomon my objection was more to the idea that [3 4] might equal 3+4i. That seems weird and unexpected. 17:12
TimToady well they aren't eqv because the types are not the same
this is the point where cmp Same diverges from eqv
colomon right, I'm all for cmp diverging from eqv. :) 17:13
TimToady cmp-Same just says throw 'em into the same bin
cmp-Same must ignore types if we're to base it on domains
colomon you know, I guess if you're crazy enough to compare [3 4] with 3+4i, they might as well cmp equal. :)
it's a bit bizarre, but I can't see a downside 17:14
TimToady it might be a feature :)
colomon errr... though what happens if you compare [3 4] with 3?
TimToady well, I've been thinking listy dominates in any case 17:15
colomon so 3 is like [3]?
TimToady that implies we also know where Nil fits into to listy comparisons in each domain
colomon always first, right? (he guessed...) 17:16
TimToady for Unicode, obviously, but not so obvious for Real
TimToady can imagine vectors that want to assuming missing elements are 0 17:17
but maybe that just falls out of declared defaults, if needed
17:19 hrj joined, cogno left, cogno joined
TimToady but overall, +1 to the idea of general comparison domains 17:19
17:20 stepnem left
TimToady biab & 17:20
colomon and they're something like positionalish, Real, and Unicode?
and maybe hashish?
17:23 stepnem joined
benabik Setish? 17:24
colomon I just like saying hashish. ;)
or was that another suggestion? 17:25
(I mean, as another type)
benabik Well, I was pondering based on my hashes are like sets comment earlier. Although sets may cmp as positional… *shrug* 17:26
And hashes may want to cmp values.
colomon hashes are kind of like sets.... I guess if you define a set as being a hash with a value of true for everything, they're exactly the same. 17:27
gist.github.com/1472831 # now with a comment outlining my understanding of TimToady++'s suggestions, with additional input from benabik++
benabik colomon: You can edit the gist directly and the history will be shown on the right. 17:28
17:29 hrj left
colomon benabik: yeah, I suppose I should have done it under the first attempt. ah, well 17:29
17:30 felipe left
colomon fixed. benabik++ 17:30
17:34 sayu joined 17:38 jerome__ left 17:41 cogno left 17:44 cogno joined 17:53 felipe joined 17:58 risou is now known as risou_awy 17:59 Chillance joined, cogno left
tadzik 'evening 18:00
colomon o/
felher o/
colomon tadzik: Advent?
tadzik yeah, working on it 18:01
just got back home
18:01 dakkar left
tadzik I guess I missed 13th in some timezones? :) 18:01
colomon doesn't worry me, it's still the 13th here. :)
tadzik okay :) 18:02
18:03 risou_awy is now known as risou 18:06 icwiener joined 18:07 MayDaniel left 18:10 ksi joined, kaleem left
[Coke] sorear: (1**Inf) Pulling from the roast test on that one, but 1**Inf==1 makes sense to me. More 1's aren't going to change the value 18:13
18:14 thou left, cogno joined
[Coke] colomon: I know Whatever is defined at the top of the CORE setting there, aye. I still can't reference it at pick definition time. 18:15
colomon [Coke]: oh. bother. 18:16
[Coke] oh!
No, it's defined below pick. my bad.
sorear,colomon: so, this solves my immediate problem: 18:20
feather.perl6.nl/~coke/pick.diff
18:21 thou joined
colomon [Coke]: oh! That does seem like a pretty simple solution. 18:26
spectests okay?
18:27 cogno left, icwiener left
benabik Isn't CORE.setting a generated file though? 18:27
18:28 envi_ left, icwiener joined
moritz benabik: in rakudo yes, not in niecza 18:28
18:29 localhost left, GlitchMr joined
benabik moritz: Oh. :-[ 18:29
[Coke] colomon: running them now. 18:30
so much faster to put stuff in core in niecza to test. ;)
18:31 localhost joined 18:33 GlitchMr left 18:37 tokuhirom left
colomon though it does make for a pretty darned long file. :) 18:47
tadzik blog post preview: perl6advent.wordpress.com/?p=940&am...eview=true 18:48
please review :)
18:49 kaleem joined
jnthn s/a simpliest/the simplest/ 18:49
tadzik sure, thanks 18:50
jnthn tadzik++ # nice post :) 18:52
PerlJam tadzik: in that last code snippet, I'd use ??!! rather than if..else but other than that, it looks good to me.
tadzik++
tadzik PerlJam: if $/ looks less magical and more obvious, but I don't mind changing it in the original Bailador codebase :) 18:58
ok, publishing
18:58 drbean left
tadzik perl6advent.wordpress.com/2011/12/1...cer-clone/ 18:59
PerlJam "looks less magical"? I like my Perl6 to look magical ;) 19:03
19:04 drbean joined
colomon tadzik++ 19:04
19:06 fridim_ joined 19:09 sayu left 19:10 kmwallio joined 19:14 supernovus joined
supernovus Okay, I am working on getting all of my modules working on nom. This is reminding me of the alpha to ng migration. I may have a few questions. 19:15
colomon naturally! 19:16
colomon should get around to more migrating as well 19:17
tadzik \o/
19:17 kaleem left
supernovus Question 1, say a method returns an array. Now say I use something like this: my @results = $object.method(); Previously, the @results would contain the array returned by the method. Now it appears the first element of @results contains the array returned by method()... is this an intentional change? 19:17
jnthn supernovus: What exactly does the return statement look like? 19:18
supernovus: That is, is it return @foo;, or return [1,2,3] ?
supernovus jnthn: In this case it's 19:19
return %.types{$type}
19:19 snearch joined
supernovus where %.types contains arrays. 19:19
Do I need to do a return @(%.types{$type}) instead?
19:20 MayDaniel joined
jnthn nom: class C { method m1 { [1,2,3] }; method m2 { my @a = 1,2,3 } }; my @x = C.m1; say @x.elems; my @y = C.m2; say @y.elems; 19:20
p6eval nom 3504a8: OUTPUT«1␤3␤»
jnthn supernovus: Yes, that will make it work 19:21
supernovus jnthn: Yup, that worked. It's clearer too. Hurray!
sorear good * #perl6 19:22
tadzik hey sorear
supernovus hello sorear
jnthn o/ sorear
TimToady tadzik: s/simpliest/simplest/ 19:26
sorear [Coke]: lim x->Inf 1**x = 1, but lim x->1+ x**Inf = Inf and lim x->1- x**Inf = 0
[Coke]: the power function is discontinuous at (1,Inf) 19:27
[Coke] sorear: ah.
supernovus I'll update the module status page as I get thing working. Mime::Types is now in the "working" list thanks to a single @() wrapper in a return statement :-D
[Coke] sorear: any issues with my pick patch? gives us a few tests back.
jnthn supernovus: Hope the rest are relatively painless. 19:28
sorear and lim x->Inf (1 + 1/x) ** x = e :) 19:29
[Coke]: looks fine to me.
19:29 icwiener left 19:30 icwiener joined
dalek ecza: 9548a6d | coke++ | lib/CORE.setting:
Support .pick(*)
19:30
supernovus I think Exemel will be the toughest to debug, but one of the more important ones to get migrated. If anyone still uses XML these days that is ;-) 19:31
jnthn No, the whole world already migrated to JSON. :)
;-)
supernovus JSON++ :-) 19:32
[Coke] niecza: my $result; for ^20 {my ($a,$b)=<AT CG>.pick.comb.pick(*); my ($c,$d)=sort map({6+4*sin($_/2)},($_,$_+4)); $result ~= sprintf "%{$c}s%{$d-$c}s\n",$a,$b}; say $result.chars();
p6eval niecza v12-20-g049fd3d: OUTPUT«Unhandled exception: Cannot use value like Whatever as a number␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting line 191 (Any.Numeric @ 4) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.settin…
[Coke] oops. once the rebuild happens, that gives 170, but the test expects 169. 19:33
supernovus Oh, and as far as I know, the "xml" library (not to be confused with the Exemel library) is abandoned. It hasn't worked since the 'alpha' branch. 19:34
19:35 drbean left
sorear colomon, TimToady: shouldn't 'cmp' somehow delegate to the object for unknown things? 19:36
[Coke] nom: my $result; for ^20 {my ($a,$b)=<AT CG>.pick.comb.pick(*); my ($c,$d)=sort map({6+4*sin($_/2)},($_,$_+4)); $result ~= sprintf "%{$c}s%{$d-$c}s\n",$a,$b}; say $result.chars();
p6eval nom 3504a8: OUTPUT«169␤»
sorear colomon, TimToady: how does 'eqv' fit into that draft?
dalek ecza: 09e2f5d | sorear++ | src/CClass.pm6:
Sync \h \v \s up with new spec
19:37
ast: 6873594 | coke++ | integration/advent2009-day1 (2 files):
niecza unfudge
19:37 itz left 19:41 drbean joined
[Coke] nom: say (1, 2, 3, * Z+ 10, 20, 30, 40, 50) 19:41
p6eval nom 3504a8: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(Mu $v, Mu %_)␤␤ in method Numeric at src/gen/CORE.setting:638␤ in sub infix:<+> at src/gen/CORE.setting:2148␤ in sub <anon> at src/gen/CORE.setting:8520␤ in sub coro at src/ge…
[Coke] niecza: say (1, 2, 3, * Z+ 10, 20, 30, 40, 50)
p6eval niecza v12-20-g049fd3d: OUTPUT«Unhandled exception: Cannot use value like Whatever as a number␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting line 191 (Any.Numeric @ 4) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.settin…
colomon sorear: my understanding of it was that you can always add another multi for cmp for your own types, if desired. 19:42
supernovus Oh, the other thing I seem to get is errors like "Incorrect pre-compiled version of lib/HTTP/Easy.pm6 loaded".
colomon sorear: and I would assume (based on today's conversations) eqv is stricter about type than cmp. 19:43
supernovus replacing lib/HTTP/Easy.pm6 which whatever library you may have installed via a "ufo" generated makefile.
Removing all .pir files from ~/.perl6/lib seems to work, but that seems counter-productive to the whole idea of pre-compiling modules. 19:46
jnthn supernovus: If module A is pre-compiled against module B, then the versions must match up 19:47
supernovus: Note that CORE.setting is also a module, so a fresh Rakudo build invalidates existing pre-compiled modules.
[Coke] niecza: join(',', [Z+] [1, 2], [20, 10], [100, 200]).say 19:48
p6eval niecza v12-20-g049fd3d: OUTPUT«6␤»
jnthn Which is by design, but we really need to make this more transparent.
19:49 itz joined
supernovus jnthn: I recompile all of my modules right after recompiling rakudo. I'll play with this some more. 19:49
jnthn supernovus: If you get some really odd behavior with it, I'd appreciate instructions on reproducing it.
supernovus Okay, I'll let you know. I'm going to try recompiling them all now. 19:53
Yeah, right off the bat, immediately after compiling the modules cleanly, I get "Incorrect pre-compiled version of lib/HTTP/Easy.pm6". I'm going to remove all pir files and try compiling the modules one by one and see if it's only certain modules exhibiting this behavior. 19:56
jnthn supernovus: Oh, one question. Does HTTP::Easy have dependencies?
supernovus: If so, are they pre-compiled?
supernovus Yes, it depends on HTTP::Status, which is also pre-compiled (before the compilation of HTTP::Easy). 19:57
19:57 ggoebel left
supernovus Okay, if I pre-compile HTTP::Status alone, the test works. Once I pre-compile HTTP::Easy, things fail. I'm going to try pre-compiling HTTP::Easy without pre-compiling HTTP::Status and see what happens. 20:00
nope, still doesn't work 20:01
20:01 bluescreen10 joined 20:08 daxim left
jnthn supernovus: OK, thanks for the info. I'll try and reproduce it here soon and see if I can figure out what's going on. 20:09
20:10 ggoebel joined 20:19 icwiener left
supernovus I have tracked it down to the HTTP::Easy::PSGI library (which is a part of the HTTP::Easy distribution.) If I remove ~/.perl6/lib/HTTP/Easy/PSGI.pir and leave all the others, the test then runs. 20:21
20:22 drbean left, MayDaniel left 20:23 donri joined 20:28 drbean joined, molaf left 20:29 cooper joined, icwiener joined
sorear colomon: If a user wants to modify comparison behavior for their favorite class, they should not have to lexically override cmp - because lexical overrides to cmp cannot be made available to all _other_ modules 20:30
colomon Err... it can be made available to .... crap, you're right, aren't you? 20:32
what were you saying about $a.CMP($b)?
sorear lift is an incomplete solution, I feel 20:33
tadzik TimToady: thanks, fixing
sorear colomon: yes, I was proposing $a.CMP($b), mostly because that's what Java, C#, and Perl 5 do
colomon I'm still inclined to think p6 is broken if lift isn't the default. but I don't seem to ever win that debate. 20:34
20:41 icwiener left, icwiener joined
sorear colomon: please elaborate 20:42
colomon: I agree with you that statement_prefix:lift is broken by design
colomon my particular problem comes with issues just like this one. 20:43
benabik lift?
colomon part of the philosophy of p6 is that operators have a single meaning, which might get distributed across different classes. ie infix:<+> is always addition.
sorear The Perl 6 MMD system is a shattered-mirror image of CLOS's system; AIUI in CLOS multis have no scope 20:45
they are visible everywhere the corresponding proto is
colomon that means it's very, very natural to write code which will work for any objects that can do infix:<+>
20:46 hrj joined
colomon having the limitation that you can only use infix:<+>s you have already seen when you write the code completely shatters that 20:46
sorear however jnthn gets very touchy when I so much as suggest that MMD needs to be changed
PerlJam sorear: it's just that he's thinking of all the work he put into the existing system :)
20:46 hrj left
sorear colomon: agree completely 20:47
jnthn *systems*
20:47 hrj joined, raiph joined
PerlJam sorry. systems. 20:47
20:47 tokuhirom joined
PerlJam you've built one to throw away and you've built your "second system", what are you at now? :) 20:47
jnthn A major difference with CLOS and Perl 6 is that the Perl 6 multi-dispatch approach doesn't favor any particular parameter. 20:48
Whereas CLOS favors leftmost first.
20:48 cosimo joined
TimToady operators are defined by the current language, and that will always be lexically scoped in Perl 6 20:49
colomon sorear: it's interesting, because I feel that for most subs, I'm completely okay with the way it works now. but for operators I always want the most specific version of the operator out there.
TimToady it's fine if those operators default/failover to single dispatch, but that's still part of the def of the current language 20:50
if you want to import operators, import 'em
we're not going to play the One Language to Rule Them All game
not unless you say 'use My_Perfect_Language;' first :) 20:51
jnthn wonders if lift can is somewhat do-able as "import CALLER::<< &infix:<+> >>", or something 20:52
TimToady global mmd is just another way for magical action at a distance to wipe you out
delegating semantics to objects is the province of the single dispatcher, not the operators
jnthn +1 on lexically scoped MMD. That's why we have a good shot at compile time decisions and thus inlining. 20:53
Amongst all of the other issues TimToady++ points out :)
TimToady if it results in the occasional can't-get-there-from-here problem, maybe you don't want to go there anyway...
colomon nom: sub foo($a, $b) { lift $a + $b }; say foo(10, 11)
p6eval nom 3504a8: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&lift' called (line 1)␤»
colomon maybe I'd feel better about it all if lift actually existed... 20:54
niecza: sub foo($a, $b) { lift $a + $b }; say foo(10, 11)
p6eval niecza v12-22-g09e2f5d: OUTPUT«===SORRY!===␤␤Action method statement_prefix:lift not yet implemented at /tmp/teADDtOyCP line 1:␤------> sub foo($a, $b) { lift $a + $b ⏏}; say foo(10, 11)␤␤Unhandled exception: Unable to resolve method statement_level …
jnthn Does lift simply replace the definition of + with the caller's one?
(for the scope of the lift) 20:55
ah, yes, S03 makes it seem so 20:56
TimToady it's kind of a chintzy macro
jnthn *nod* 20:57
sorear TimToady: I fail to see why delegation of semantics to objects must always use single dispatch.
jnthn wonders how to preserve enough info about the presence of lift, or the transformation that it did, to make sure that when something that lifts gets inlined it just ends up back as a totally normal lexical dispatch again.
sorear jnthn: +1 to keeping lexically scoped MMD, possibly even by default. I am currently campaigning to provide multiple-delegation functionality 20:58
21:00 wolfman2000 joined 21:01 kmwallio left
TimToady "How do we determine the winner?" ~~ "What language am I in?" 21:02
you can't have any kind of complicated voting without a constitution of some sort 21:03
and constitutions are "lexically" scoped by polity
there is no reason you can't define such a dispatcher in P6, but the use of it will be lexically scoped 21:04
sorear I see. 21:06
21:06 snearch left
TimToady "No accidental genericity" is bedrock to Perl 6. 21:07
21:16 mj41 joined
colomon I don't suppose we could at least get a "use lift" to lift an entire module at once? 21:19
sorear colomon: that doesn't make a whole lot of sense, I think? 21:20
another problem with lift is the need to qualify _what_ is lifted
21:20 am0c left
colomon I'm assuming it would mean something like "lift every block". But maybe that's worse than I was thinking... 21:21
sorear colomon: the current spec for lift says that everything not in the immediately surrounding scope is lifted
so, imagine 'use lift; sub foo($x) { $x }; sub bar($x) { foo($x) }' 21:22
in bar(), 'foo' is lifted ($x is not)
now, if bar() is called from a scope with no foo... boom
21:22 drbean left
colomon ah, ick 21:23
benabik Would `sub bar($x) { lift foo($x) }` do the same?
sorear Yes.
sorear doesn't like lift much
21:23 kaare_ left
colomon is really wishing someone would implement lift, so he could code with it and find out what it is like in practice. 21:25
benabik It seems simultaneously very useful and very painful.
21:27 bluescreen10 left
benabik Is there an inverse of that? Instead of "everything in {} is from CALLER", is there something that says "I want to use X, Y, and Z from CALLER"? 21:27
21:29 drbean joined
supernovus Hmm, now there's a bit of a change. Using say or print on an object used to call the Str() method if it existed, now it does not appear to do so. So any calls like: say $object; now need to be say "$object"; Not a biggy, but it certainly was a bit of a head scratcher. :-) 21:32
benabik supernovus: It now calls .gist 21:33
21:33 tokuhirom3 left, molaf joined
supernovus Ah, and none of the Exemel classes have a .gist method. It just kinda locked up solid. Nice to know :-) 21:34
21:35 thou left
supernovus So, Str() is for when you want a string representation, perl() is for when you want something that can be evaled back into the object in question, and gist() is a friendly description of the object? 21:35
benabik Yes.
supernovus Awesome! :-) 21:36
sorear example: 21:39
perl6: say 1..*
p6eval niecza v12-22-g09e2f5d: OUTPUT«1..Infinity␤»
..pugs b927740: OUTPUT«Stack space overflow: current size 8388608 bytes.␤Use `+RTS -Ksize -RTS' to increase it.␤»
..rakudo 3504a8: OUTPUT«1..Inf␤»
benabik perl6: print 1..*; say 21:40
That wasn't nice of me. :-D
p6eval niecza v12-22-g09e2f5d: OUTPUT«===SORRY!===␤␤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/OL73xYQXd2 line 1 (EOF):␤------> print 1..*; say⏏<EOL>␤␤Unhandled exception: Check …
..pugs b927740: OUTPUT«Stack space overflow: current size 8388608 bytes.␤Use `+RTS -Ksize -RTS' to increase it.␤»
..rakudo 3504a8: OUTPUT«(timeout)1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211…
benabik niecza: print 1..*, "\n" 21:41
p6eval niecza v12-22-g09e2f5d: OUTPUT«1..Infinity␤»
benabik Hm.
niecza: say (1..*).Str
p6eval niecza v12-22-g09e2f5d: OUTPUT«1..Infinity␤»
worr how much of the perl6 spec does pugs support?
noidea Which interpreter is prefered? 21:43
worr rakudo and niecza are being actively developed
I don't think pugs has anyone working on it 21:44
noidea pugs isnt? I know its written in haskell and thats about it
aj
ah*
benabik There have been some motions towards updating pugs, but they haven't gotten very far yet.
worr does pugs support the complete spec? I know it was the first implementation 21:45
sorear The Perl 6 spec has changed a great deal since pugs was developed.
21:48 cooper left 21:49 tokuhirom left
moritz and it was never complete either 21:52
21:53 cooper joined
colomon nom: given "Hello" { when /e(\w\w)/ { say $0; }; }; 21:54
p6eval nom 3504a8: OUTPUT«Nil␤»
colomon niecza: given "Hello" { when /e(\w\w)/ { say $0; }; };
p6eval niecza v12-22-g09e2f5d: OUTPUT«#<match from(2) to(4) text(ll) pos([].list) named({}.hash)>␤»
colomon nom bug?
21:55 drbean left
jnthn colomon: yeah, and in RT 21:55
I thought a previous fix I did had taken care of it, but evidently not :( 21:56
colomon is there a work around?
it's stupid, but this is in one of my $work p6 scripts... 21:58
ps... does qqx work yet in nom?
supernovus Okay, so the XML grammar has things like: regex comment { '<--' <content> '-->' } token content { .*? } which worked in ng, but is not matching in nom. Any suggestions for a replacement (I'm guessing it's the "content" bit that isn't liked anymore.)
jnthn colomon: Hm, can't think of a workaround. I do have a couple of tuits in a moment though... 21:59
colomon qqx does appear to work, \o/ 22:00
22:02 drbean joined 22:05 mj41 left
sorear worr: I would not say that any implementation has ever implemented more than 40% of the spec 22:06
supernovus: combine the two 22:07
supernovus: backtracking into subrules is NYI (and I suspect that in this case it shouldn't work, because of :ratchet) 22:08
moritz .*? overrides :ratchet, no?
supernovus I had been using <content> rules in a few places, I'm looking at replacing it with regex comment { '<--' $<content>=[.*?] '-->' } instead. 22:09
sorear perl6: note 5;
p6eval pugs b927740: OUTPUT«*** No such subroutine: "&note"␤ at /tmp/dmhPAL_qhZ line 1, column 1-7␤»
..rakudo 3504a8, niecza v12-22-g09e2f5d: OUTPUT«5␤»
sorear rakudo: note 1..5; 22:10
p6eval rakudo 3504a8: OUTPUT«1..5␤»
supernovus woot, that seems to work!
sorear supernovus: $<content>=(.*?), however, won't work
because (.*?) is treated more like a subrule than [.*?] is
supernovus Yeah, that's why I picked [.*?] instead. :-) 22:11
Basically, the only part I'm interested in is the content of the comment as a string. I'm not even sure people care about being able to preserve comments in XML documents, so the next version may have a "strip-comments" option. 22:12
dalek ecza: b0f1579 | sorear++ | lib/CORE.setting:
CORE::print should not have been using gist
22:15
22:16 ksi left 22:17 drbean left
jnthn colomon: testing a patch for the when nombug now. 22:19
colomon jnthn++
22:23 drbean joined
jnthn In theory, my tuits for the weekend will be decent, since my last major $dayjob task will be over by Friday. 22:23
sorear niecza: say "foo\d" 22:25
p6eval niecza v12-22-g09e2f5d: OUTPUT«===SORRY!===␤␤Unrecognized backslash sequence: '\d' at /tmp/F70B9CEwpD line 1:␤------> say "foo\d⏏"␤␤Use of uninitialized value in string context␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 773 (warn @ 2) ␤ at …
22:27 hrj left
dalek kudo/nom: ad9e72c | jnthn++ | src/Perl6/Actions.pm:
Fix when, so $/ will be properly set.
22:27
jnthn colomon: ^^ 22:28
Tagged the related ST as testneeded also.
japhb [Coke], moritz, colomon: re: irclog.perlgeek.de/perl6/2011-12-13#i_4827767 , note that the str-numeric branch already has that syntax working; see irclog.perlgeek.de/perl6/2011-12-05#i_4794000 for an example. It just can't be merged into nom until Failure handling is resolved, otherwise the new implementation will trigger spec failures in tests that expect soft-fails and whatnot. 22:32
colomon jnthn++
jnthn japhb: Was it you who had the curious "failure doesn't throw properly" issue?
japhb jnthn, ISTR I was one of those, yes. 22:33
jnthn japhb: ah...was just going ot have a quick look at it, but I don't see an RT for it...I'm guessing it didn't make it there.
japhb: Don't suppose you remember how to make it happen? :)
japhb Last I left the discussion of Failure with sorear++, we had found some common ground for agreement about Failure(), but had more discussion to go to reach consensus.
jnthn, I'll see if I can find it for you. (I've had my head in other stuff for a week) 22:34
22:35 drbean left 22:36 hundskatt joined
dalek ecza: b273daf | sorear++ | / (2 files):
Allow \n ^^ $$ to match any vertical whitespace, including CRLF as a unit
22:36
colomon jnthn: any feelings on where a test for the given when $/ bug should go? 22:37
jnthn colomon: Well, the bug was with the implementation of when... 22:39
22:41 drbean joined, envi_ joined 22:43 syslq left 22:44 wolfman2000 left
japhb jnthn, Were you referring to this one: irclog.perlgeek.de/perl6/2011-12-04#i_4792222 (note that you golf that a lot farther down) 22:44
22:45 icwiener left, icwiener joined
Tene japhb: can you explain your assertion that people shoudl be able to call fail in mainline code to bind failure objects? 22:46
as specced, fail *returns* a failure.
jnthn nom: sub foo() { fail "boo" }; my $val = foo(); try { ~$val }; try { ~$val; }; say "ok"
p6eval nom 3504a8: OUTPUT«boo␤ in sub foo at /tmp/uN1YojTyEu:1␤ in block <anon> at /tmp/uN1YojTyEu:1␤ in <anon> at /tmp/uN1YojTyEu:1␤»
jnthn ok, that's a valid program that does it.
jnthn tries the fix mls_++ suggested 22:47
dalek ecza: 758356b | sorear++ | src/niecza:
Fix compilation of CORE::infix:<*>(3, 3) (Radvendii)
22:51
japhb Tene: I don't really object if fail() itself doesn't work in the mainline (though I think "idioms that work in one place and not another without an obvious reason why it can't be made to work" is a smell), as long as there is *some* way to bind a properly intialized Failure object in the mainline.
Tene nom: my $x = Failure.new(); try { ~$x }; say "Foo: $!" 22:53
p6eval nom 3504a8: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in method new at src/gen/CORE.setting:6839␤ in block <anon> at /tmp/Jqs0P8Tx1s:1␤ in <anon> at /tmp/Jqs0P8Tx1s:1␤»
Tene nom: my $x = Failure.new("wtf"); try { ~$x }; say "Foo: $!"
p6eval nom 3504a8: OUTPUT«Foo: Method 'rethrow' not found for invocant of class 'Str'␤»
Tene oh, right, it should have an exception in there.
dalek ast: 5913dd5 | sorear++ | S02-names/pseudo.t:
[S02-names/pseudo] Unfudge for niecza
Tene anyway, $x = fail() is equivalent to $x = return(), and would ideally be caught as invalid by the compiler. 22:54
japhb Tene, I should also point out that my examples were in the mainline mostly because I was golfing down from something much bigger and had forgotten that removing the last layer of surrounding Routine would make a difference.
None of which negates the fact that I did actually stumble across a real bug. ;-) 22:55
Tene japhb: I was specifically responding to "Because someone *should* be able to do what I did in mainline code", perhaps I misunderstood "what I did"
two bugs, really. Anything happening after fail() is also a bug.
nom: sub foo { fail("wtf"); say "lol ohai" }; my $x = foo(); try { ~$x }; say "Foo: $!" 22:56
p6eval nom 3504a8: OUTPUT«Foo: wtf␤»
dalek kudo/nom: 32dc1ed | jnthn++ | src/core/Failure.pm:
Fix double-stringification of Failure causing death bug; fix suggested by mls++.
japhb
.oO( Is there an emoticon for "bowing in acknowledgement"? )
jnthn orz
japhb What an odd emoticon. 22:57
jnthn Well, maybe that's a bit more than acknowledgement :)
japhb heh
jnthn It does look like somebody bowing though :)
japhb I kindof meant at about the level of "touche"
jnthn oh :)
supernovus This is going to drive me insane. It recognizes elements with no attributes, and elements with a single attribute, but if you put more than one attribute, it says there are none... I'm wondering how much the previous grammar was relying on "misfeatures"... uhg! 22:58
Tene jnthn: any ideas about what fail in mainline is doing there?
sorear niecza: my $x; say ~($x++)
p6eval niecza v12-22-g09e2f5d: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/lib/CORE.setting line 781 (warn @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 169 (Mu.Str @ 9) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /tmp/ZIk2JQa_cw line 1 (mainline @ 1)…
Tene nom: use fatal; say 1; fail(2); say 3; 22:59
p6eval nom ad9e72: OUTPUT«1␤2␤ in block <anon> at /tmp/GKi_5TLH82:1␤ in <anon> at /tmp/GKi_5TLH82:1␤»
sorear perl6: my $x; say $x++
p6eval niecza v12-22-g09e2f5d: OUTPUT«Any()␤»
..pugs b927740, rakudo ad9e72: OUTPUT«0␤»
japhb Oooh, sneaky 23:00
sorear perl6: my $x; say $x--
p6eval niecza v12-22-g09e2f5d: OUTPUT«Any()␤»
..rakudo ad9e72: OUTPUT«0␤»
..pugs b927740: OUTPUT«␤»
sorear perl6: my $x = Bool; say $x++
p6eval niecza v12-22-g09e2f5d: OUTPUT«Bool()␤» 23:01
..pugs b927740, rakudo ad9e72: OUTPUT«0␤»
japhb is boggled by how few characters it takes, time and time again, in order to come across something important that merits discussion
jnthn Tene: Throwing something that something else considers resumable, I guess. 23:02
Tene Hmm, could be...
23:06 PacoLinux left
japhb TimToady, ping 23:06
Is there some place that we can submit/track "questions that require a ruling by $Larry"? 23:08
dalek ecza: 8114adc | sorear++ | lib/Builtins.cs:
$x++ should never return undef (fixes #81)
23:09
ast: 10cc21e | sorear++ | S04-statements/for.t:
[S04-statements/for] Unfudge for Unfudges for sorear/niecza#81
sorear japhb: pm.txt was the old way. I think now we file tickets against specs? 23:10
23:10 thou joined
japhb sorear, ah, github issue against perl6/specs, yes? 23:12
sorear ues
rakudo: say i > 1 23:13
p6eval rakudo ad9e72: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&i' called (line 1)␤»
sorear rakudo: say 5i > 1
p6eval rakudo ad9e72: OUTPUT«No applicable candidates found to dispatch to for 'Real'. Available candidates are:␤:(Mu $v, Mu %_)␤␤ in method Real at src/gen/CORE.setting:646␤ in sub infix:<>> at src/gen/CORE.setting:2212␤ in sub infix:<>> at src/gen/CORE.setting:2212␤ in block <anon> at /t…
dalek ecza: 358e1f9 | sorear++ | lib/Builtins.cs:
Disallow numeric comparison on Complex (fixes #79)
23:17
23:17 rjbs joined
rjbs Accidentally did /join #perl5, was shocked to learn that it *is* dead! 23:17
phenny rjbs: 05 Dec 15:12Z <[Coke]> ask rjbs if we can get a perl5 advent calendar RSS feed that will show all years, not just the current year.
rjbs [Coke]: perladvent.org/RSS.xml (although not actually RSS) will work "forever"
dalek ast: 73505a2 | sorear++ | S32-num/complex.t:
[S32-num/complex] Unfudge for sorear/niecza#79
23:18
sorear hello rjbs
23:18 hundskatt left
rjbs [Coke]: I need to update the Feed link to point to that, in the page header, but they point to the same resource. Fixign the pointer will require WWW::AdventCalendar tweaking that I have not prioritized. 23:18
sorear: Hi!
dalek kudo/nom: 483b3fc | jnthn++ | docs/ROADMAP:
Take a crack at getting us a ROADMAP that isn't over a year out of date. Patches welcome - this sure won't be perfect.
rjbs Is there any support for grammars that can be used for productions? 23:19
sorear rjbs: What do you mean? 23:20
supernovus I am finding grammars to be very buggy at the moment. :( 23:21
rjbs sorear: Please forgive the following extremely pseudo code...
TOP { noun verb } noun { "The cow" | "The farmer" | "The pig" } verb { "eats" | "plays" | "works" | "bathes" } 23:22
jnthn rjbs: Did you see perl6advent.wordpress.com/2011/12/1...th-perl-6/ ?
rjbs sorear: while grammar.next_possible_valid_string -> x { ... }
jnthn: No, I'm not caught up. Looking.
sorear rjbs: The functionality exists but I'm not aware of a standard API for it 23:23
rjbs jnthn: This doesn't seem on topic.
sorear rjbs: oh, wait, you mean _generating_ strings?
rjbs Yes.
jnthn Oh, *generating*. 23:24
Ok, then it's not on topic :)
jnthn misunderstood
tadzik jnthn: how is "2 ** inlining of method calls" different from "2 *** method call inlining"? :)
sorear rjbs: That's... not something Perl 6 grammars will do
rjbs sorear: Okay. I will use something else. Thanks. :)
jnthn tadzik: er, I know what I menat :) 23:25
tadzik okay :)
jnthn tadzik: tried to clarify it :) 23:26
That was crappy wording
dalek kudo/nom: 81a1031 | jnthn++ | docs/ROADMAP:
Attempt a clarification (tadzik++).
sorear I'm now breaking S05-grammar/protoregex.t for Rakudo 23:27
23:28 birmjin joined
tadzik okay, that looks clearer :) 23:28
good night #perl6
japhb o/ 23:29
colomon \o
jnthn sorear: How so?
sorear: And if you know you are, why not add #?rakudo 'skip' for the tests you're adding? :)
sorear jnthn: updating it to use proto token foo {*} syntax
jnthn sorear: oh, +1... 23:30
...but...I thought Rakudo supported that already. :)
nom: grammar Foo { proto token bar {*} }
sorear rakudo: grammar G { proto token foo {*} }
p6eval nom 483b3f: ( no output )
rakudo 483b3f: ( no output )
sorear I guess I'm not breaking it, then.
jnthn :)
I'll toss the older syntax at some point.
colomon jnthn: looks like my $work script works now. \o/ I think this means I'll switch my system's perl6 to nom. 23:31
jnthn well, or make it warn :)
and then toss it a bit after
colomon: \o/
23:32 rjbs left
japhb Where in the ROADMAP would I put each of: Str.Numeric, val(), MAIN, Failure changes? 23:33
slavik1 japhb: what's the b for?
japhb In my name? 23:34
er nick?
slavik1 yes 23:35
jnthn japhb: MAIN and Failure can go under langauge features, the other two under built-ins. Though it's hazy. I was trying to draw out "stuff that needs work in CORE.setting" (e.g. the builtins) vs "stuff that'll need wider changes or compiler work"
japhb OK, that makes sense
slavik1, My old nick was 'geoffb', but that caused nick collisions on FreeNode. So, since I'm a Perl guy and don't mind a pun, I changed it to 'japhb'. 23:36
slavik1 I see 23:37
ok
jnthn Time for some rest. night o/ 23:40
japhb o/ 23:42
23:42 Chillance left
supernovus In a grammar a rule like { <subrule1> <subrule2>* } should match zero or more instances of <subrule2> should it not? 23:42
Tene yes 23:43
23:43 Trashlord left
dalek kudo/nom: 6fd6552 | (Geoffrey Broadwell)++ | docs/ROADMAP:
Add four of my projects to the ROADMAP
23:43
japhb (git diff)++ # Understanding the format of ROADMAP well enough to correctly show which section each edit was contained in.
23:44 icwiener left
supernovus I know it used to work in the ng/b branch. I don't know what's wrong with it in nom. I need to walk away for a while. Exemel is closer to working under nom, but until I figure out why <rule>* refuses to match more than one item, it's stalled. 23:46
23:49 drbean left 23:50 supernovus left
sorear rakudo: /::/ 23:55
p6eval rakudo 483b3f: OUTPUT«===SORRY!===␤:: not yet implemented at line 1, near "/"␤»
23:55 drbean joined
sorear rakudo: grammar G { rule TOP { } }; say G.parse("x") 23:58
p6eval rakudo 6fd655: OUTPUT«=> <>␤␤»
sorear jnthn: I would like to make the case that this behavior is wrong. 23:59
23:59 tokuhirom joined