| Time |
S |
Nick |
Message |
| 00:36 |
|
|
Alias_ joined #perl6 |
| 00:49 |
|
|
silug joined #perl6 |
| 01:07 |
|
|
eternaleye joined #perl6 |
| 01:08 |
|
pugs_svn |
r22549 | lwall++ | [assign.t] missing semicolons |
| 01:23 |
|
pugs_svn |
r22550 | lwall++ | [STD] there is no infix:<is> (was hiding missing semicolons in assign.t) |
| 01:23 |
|
pugs_svn |
r22550 | lwall++ | [viv] much improved typology of EXPR asts (and doesn't lose nested ops) |
| 01:29 |
|
|
alanhaggai joined #Perl6 |
| 01:37 |
|
|
BinGOs joined #perl6 |
| 01:48 |
|
|
hercynium_ joined #perl6 |
| 01:51 |
|
|
PZt joined #perl6 |
| 02:04 |
|
|
alester joined #perl6 |
| 02:22 |
|
|
eternaleye joined #perl6 |
| 02:48 |
|
|
agentzh joined #perl6 |
| 02:49 |
|
pugs_svn |
r22551 | lwall++ | [basic.t] default expression must come after traits |
| 02:52 |
|
pugs_svn |
r22552 | lwall++ | [viv] autogenerate VAST packages as needed |
| 03:09 |
|
|
ab5tract joined #perl6 |
| 03:31 |
|
|
felipe joined #perl6 |
| 03:44 |
|
|
agentzh joined #perl6 |
| 04:16 |
|
pugs_svn |
r22553 | lwall++ | [viv] can now reconstruct the p6 from the ast for simple expressions |
| 04:55 |
|
|
masak joined #perl6 |
| 05:07 |
|
|
Psyche^ joined #perl6 |
| 05:13 |
|
|
|Jedai| joined #perl6 |
| 05:20 |
|
|
Bzek joined #perl6 |
| 05:28 |
|
|
|Jedai| joined #perl6 |
| 06:08 |
|
|
BinGOs_ joined #perl6 |
| 06:10 |
|
|
agentzh joined #perl6 |
| 06:29 |
|
|
ashizawa joined #perl6 |
| 06:48 |
|
|
alester joined #perl6 |
| 06:58 |
|
|
iblechbot joined #perl6 |
| 06:59 |
|
|
alester joined #perl6 |
| 07:04 |
|
|
penk joined #perl6 |
| 07:08 |
|
|
agentzh joined #perl6 |
| 07:11 |
|
|
sri_work joined #perl6 |
| 07:13 |
|
|
agentzh left #perl6 |
| 07:17 |
|
|
agentzh joined #perl6 |
| 07:23 |
|
|
viklund joined #perl6 |
| 08:03 |
|
|
cosimo joined #perl6 |
| 08:06 |
|
|
BinGOs_ joined #perl6 |
| 08:15 |
|
|
elmex joined #perl6 |
| 08:27 |
|
|
jferrero joined #perl6 |
| 08:53 |
|
|
BinGOs joined #perl6 |
| 09:16 |
|
|
renormalist joined #perl6 |
| 09:36 |
|
|
tomyan joined #perl6 |
| 09:44 |
|
moritz_ |
std: class A { sub :foo { say bar }; }; |
| 09:44 |
|
lambdabot |
moritz_: You have 1 new message. '/msg lambdabot @messages' to read it. |
| 09:44 |
|
p6eval |
std 22553: OUTPUT[Unknown routines: bar called at 1 parsed] |
| 09:44 |
|
moritz_ |
@massages |
| 09:44 |
|
lambdabot |
azawawi said 11h 46m 54s ago: any-list.pir p5chop and p5chomp is running all tests now. Patches are on RT. Thanks. |
| 09:54 |
|
|
meppl joined #perl6 |
| 10:18 |
|
|
Bzek joined #perl6 |
| 10:29 |
|
|
xinming_ joined #perl6 |
| 10:37 |
|
|
xinming joined #perl6 |
| 10:37 |
|
|
Ontolog joined #perl6 |
| 10:46 |
|
|
xinming_ joined #perl6 |
| 10:47 |
|
|
dmq joined #perl6 |
| 10:48 |
|
|
dmq left #perl6 |
| 10:59 |
|
|
[particle] joined #perl6 |
| 10:59 |
|
|
ruoso joined #perl6 |
| 11:03 |
|
|
xinming joined #perl6 |
| 11:05 |
|
moritz_ |
@tell azawawi thanks for the patch. However (as the others that modify self) I'll wait wih applying until the lexical issues are sorted out |
| 11:05 |
|
lambdabot |
Consider it noted. |
| 11:06 |
|
|
penk left #perl6 |
| 11:13 |
|
|
xinming joined #perl6 |
| 11:29 |
|
pugs_svn |
r22554 | ruoso++ | [smop] small bugfix in native bool was causing unexpected behavior |
| 11:30 |
|
ruoso |
er... actually it wasn't the bugfix that was causing the unexpcted behavior... *sigh* |
| 11:35 |
|
|
alanhaggai joined #Perl6 |
| 11:47 |
|
|
kanru joined #perl6 |
| 12:05 |
|
|
bjakb joined #perl6 |
| 12:08 |
|
bjakb |
hello? |
| 12:08 |
|
moritz_ |
hi |
| 12:10 |
|
|
xinming joined #perl6 |
| 12:11 |
|
bjakb |
I have a problem with the Pugs installation, can somebody might help me? |
| 12:11 |
|
moritz_ |
I can try |
| 12:12 |
|
moritz_ |
but only if I know what your problem is |
| 12:13 |
|
|
bjakb2 joined #perl6 |
| 12:13 |
|
bjakb |
sorry I have a problem with my irc client could you please repeat your answer? |
| 12:14 |
|
moritz_ |
the logs are at irc.pugscode.org |
| 12:14 |
|
moritz_ |
in short "I can try" |
| 12:18 |
|
bjakb2 |
OK, I'm following the installation instructions of pugs |
| 12:18 |
|
moritz_ |
which instructions? |
| 12:18 |
|
bjakb2 |
that is the best to install it with cabal |
| 12:18 |
|
bjakb2 |
'cabal update' |
| 12:19 |
|
bjakb2 |
'cabal install Pugs' |
| 12:19 |
|
|
kanru joined #perl6 |
| 12:19 |
|
moritz_ |
ok |
| 12:19 |
|
bjakb2 |
to be able to do that you have to install a few haskell packages - which i did install |
| 12:20 |
|
bjakb2 |
I was also able to run the two mentioned cabal commands |
| 12:20 |
|
bjakb2 |
the installation went through without any errors |
| 12:20 |
|
bjakb2 |
But, at the end, I cannot run pugs |
| 12:21 |
|
bjakb2 |
I can also not find any pugs binary |
| 12:22 |
|
moritz_ |
the binary will be in ~/.cabal/ somewhere |
| 12:22 |
|
moritz_ |
probably ~/.cabal/Pugs/bin/pugs or something along these lines |
| 12:22 |
|
moritz_ |
which OS are you on? |
| 12:25 |
|
|
Ontolog joined #perl6 |
| 12:28 |
|
bjakb2 |
say 'hello' :-) |
| 12:29 |
|
bjakb2 |
moritz: the binary was indeed in the ~/.cabal directory - thanks |
| 12:29 |
|
moritz_ |
bjakb2: you're welcome |
| 12:31 |
|
|
bjakbh joined #perl6 |
| 12:33 |
|
bjakb2 |
the next thing I want to try is to compile perl6 code into perl5 - that sounds interesting |
| 12:34 |
|
moritz_ |
I don't think that's properly implemented in pugs |
| 12:34 |
|
moritz_ |
elf does it, though |
| 12:35 |
|
ruoso |
pugs: module Foo { sub bar { baz() } }; &Foo::baz := sub { say 1 }; Foo::bar() |
| 12:35 |
|
p6eval |
pugs: OUTPUT[1] |
| 12:35 |
|
bjakbh |
elf? - never heard of that |
| 12:35 |
|
moritz_ |
elf: say "hi"; |
| 12:35 |
|
p6eval |
elf 22554: OUTPUT[hi] |
| 12:36 |
|
moritz_ |
see also http://perl.net.au/wiki/Elf |
| 12:36 |
|
lambdabot |
Title: Elf - PerlNet |
| 12:37 |
|
ruoso |
pugs: module Foo { sub bar { our $foo = 1; }; sub baz { say $foo } }; Foo::bar(); Foo::baz(); |
| 12:37 |
|
p6eval |
pugs: OUTPUT[***  Unexpected " }" expecting "::" Variable "$foo" requires predeclaration or explicit package name at /tmp/Bwbo2aprAs line 1, column 59] |
| 12:38 |
|
ruoso |
pugs: module Foo { sub bar { our &foo := sub { say 1 } }; sub baz { say foo() } }; Foo::bar(); Foo::baz(); |
| 12:38 |
|
p6eval |
pugs: OUTPUT[*** Cannot use Undef as a Code object at /tmp/vScVoZWa3S line 1, column 67-73] |
| 12:42 |
|
ruoso |
pugs: module Foo { sub bar { our sub foo { say 1 } }; sub baz { foo() } }; Foo::baz(); |
| 12:42 |
|
p6eval |
pugs: OUTPUT[1] |
| 12:44 |
|
ruoso |
that means one of two things: |
| 12:44 |
|
ruoso |
1) The package variables are visible as if they were declared as "our" even if there isn't such a declaration... |
| 12:44 |
|
ruoso |
2) sub dispatch sees if the current package CANDO that after looking in the lexical scope |
| 12:45 |
|
moritz_ |
ruoso: 'our sub' is the same as 'sub' |
| 12:45 |
|
ruoso |
but the local name is installed inside that scope only... |
| 12:47 |
|
|
bjak joined #perl6 |
| 12:47 |
|
moritz_ |
hurm |
| 12:48 |
|
ruoso |
which probably means that the option 2 is the correct one |
| 12:48 |
|
|
alester joined #perl6 |
| 12:49 |
|
ruoso |
sub dispatch is 'no strict' |
| 12:49 |
|
ruoso |
it falls back to global lookup (by global meaning looking up in the package, and not only on the lexical scope) |
| 12:50 |
|
ruoso |
pugs: $Foo::bar = 1; module Foo { sub foo { say $bar } }; Foo::foo(); |
| 12:50 |
|
p6eval |
pugs: OUTPUT[***  Unexpected " }" expecting "::" Variable "$bar" requires predeclaration or explicit package name at /tmp/uEICR3JQar line 1, column 47] |
| 12:50 |
|
ruoso |
pugs: &Foo::bar = sub { 1 }; module Foo { sub foo { say bar() } }; Foo::foo(); |
| 12:50 |
|
p6eval |
pugs: OUTPUT[*** Can't modify constant item: VStr "MkCode {isMulti = True, subName = \"&\", subType = SubPrim, subOuterPads = [], subInnerPad = MkPad (padToList []), subPackage = , subAssoc = AIrrelevantToParsing, subParams = [], subBindings = [], subSlurpLimit = [], subReturns = (mkType \"An... |
| 12:50 |
|
ruoso |
pugs: &Foo::bar := sub { 1 }; module Foo { sub foo { say bar() } }; Foo::foo(); |
| 12:50 |
|
p6eval |
pugs: OUTPUT[1] |
| 12:51 |
|
moritz_ |
ruoso: re sub lookup is 'no strict', that's my feeling as well |
| 12:53 |
|
ruoso |
pugs: &Foo::bar := sub { 1 }; module Foo { sub foo { say &bar.() } }; Foo::foo(); |
| 12:53 |
|
p6eval |
pugs: OUTPUT[***  Unexpected ".()" expecting "::" or signature value Variable "&bar" requires predeclaration or explicit package name at /tmp/pstwoiEGm4 line 1, column 56] |
| 12:53 |
|
ruoso |
indeed... it looks like so... |
| 12:55 |
|
ruoso |
alright... so it looks that sub dispatch does: |
| 12:55 |
|
ruoso |
1) looks for all variants from the lexical scope and from package CANDO |
| 12:55 |
|
|
bjakb joined #perl6 |
| 12:56 |
|
ruoso |
(it traverses itself the lexical scope, so a inner declaration doesn't mask the outer declaration) |
| 12:56 |
|
ruoso |
greps for the ACCEPTS |
| 12:56 |
|
moritz_ |
(CANDO sounds like a reactor from a nuclear power plant; but I probably confuse that with CANDU) |
| 12:56 |
|
ruoso |
sorts using a "pluggable disambiguation code" |
| 12:57 |
|
ruoso |
and invoke the first |
| 12:57 |
|
ruoso |
and we leave a cache of all variants in the innermost declaration as the room for optimizations |
| 12:57 |
|
moritz_ |
sounds sane |
| 12:58 |
|
|
Alias_ joined #perl6 |
| 13:00 |
|
|
Alias__ joined #perl6 |
| 13:01 |
|
|
z80ASM joined #perl6 |
| 13:26 |
|
|
pmurias joined #perl6 |
| 13:30 |
|
|
pmurias_ joined #perl6 |
| 13:30 |
|
pmurias |
is it possible to add multi variants at runtime? |
| 13:31 |
|
moritz_ |
yes |
| 13:32 |
|
pmurias |
how? ;) |
| 13:33 |
|
moritz_ |
proto foo; eval 'sub foo($x) { $x*2 }'; say foo(2); |
| 13:35 |
|
pmurias |
perl6: multi foo(1) {say 3};foo(1); |
| 13:35 |
|
p6eval |
pugs: OUTPUT[***  Unexpected "1" expecting formal parameter or ")" at /tmp/yOHlPNDb3K line 1, column 11] |
| 13:35 |
|
p6eval |
..elf 22554: OUTPUT[No viable candidate for call to multimethod foo(#) at (eval 121) line 4 at ./elf_f line 3861] |
| 13:35 |
|
p6eval |
..rakudo 31827: OUTPUT[Statement not terminated properly at line 1, near "{say 3};fo"current instr.: 'parrot;PGE::Util;die' pc 119 (runtime/parrot/library/PGE/Util.pir:82)] |
| 13:35 |
|
pmurias |
perl6: multi foo(Int $a) {say 3};foo(1); |
| 13:35 |
|
p6eval |
elf 22554, pugs, rakudo 31827: OUTPUT[3] |
| 13:35 |
|
|
BinGOs joined #perl6 |
| 13:36 |
|
moritz_ |
perl6: multi foo(Int $x) { say "Int" }; eval 'multi foo(Str $x) { say "Str" }'; foo(1); foo("bar"); |
| 13:36 |
|
p6eval |
elf 22554, rakudo 31827: OUTPUT[IntStr] |
| 13:36 |
|
p6eval |
..pugs: OUTPUT[IntInt] |
| 13:36 |
|
moritz_ |
elf++ |
| 13:36 |
|
moritz_ |
rakudo++ |
| 13:36 |
|
pmurias |
is it possible to close multis? |
| 13:37 |
|
pmurias |
like use multi :closed? |
| 13:37 |
|
moritz_ |
dunno |
| 13:37 |
|
moritz_ |
don't think it makes much sense |
| 13:37 |
|
pmurias |
why? |
| 13:38 |
|
moritz_ |
because multis are one of teh central mechanism to get extensibility into Perl 6 |
| 13:38 |
|
ruoso |
http://www.perlfoundation.org/[…]ulti_sub_dispatch |
| 13:38 |
|
lambdabot |
Title: SMOP Multi Sub Dispatch / Perl 6, http://tinyurl.com/43fhyt |
| 13:39 |
|
|
Lorn joined #perl6 |
| 13:39 |
|
pmurias |
ruoso: hi |
| 13:39 |
|
ruoso |
hi pmurias |
| 13:42 |
|
pmurias |
ruoso: withought variant disambiguation multis wouldn't be more powerfull then normal methods |
| 13:42 |
|
ruoso |
indeed |
| 13:42 |
|
ruoso |
pmurias, refresh the wiki page ;) |
| 13:43 |
|
|
BinGOs joined #perl6 |
| 13:44 |
|
pmurias |
we also need to check for ambiguity |
| 13:44 |
|
pmurias |
that is there need to be 1 topmost item |
| 13:45 |
|
ruoso |
pmurias, I think the disambiguation code would 'fail' in that case |
| 13:46 |
|
pmurias |
ok |
| 13:49 |
|
|
xinming joined #perl6 |
| 13:49 |
|
pmurias |
ruoso: can i remove the nasty adjective |
| 13:49 |
|
pmurias |
? |
| 13:49 |
|
|
abra joined #perl6 |
| 13:49 |
|
ruoso |
yeah... :) |
| 13:49 |
|
moritz_ |
;) |
| 13:53 |
|
pmurias |
got to run to eat something and catch a train |
| 13:53 |
|
pmurias |
& |
| 13:57 |
|
|
alester joined #perl6 |
| 14:08 |
|
|
[particle]1 joined #perl6 |
| 14:13 |
|
|
iblechbot joined #perl6 |
| 14:36 |
|
|
sscaffidi joined #perl6 |
| 14:36 |
|
|
coke joined #perl6 |
| 15:01 |
|
|
z80ASM joined #perl6 |
| 15:06 |
|
rakudo_svn |
r31829 | pmichaud++ | [rakudo]: spectest-progress.csv update: 205 files, 4366 passing, 11 failing |
| 15:15 |
|
|
justatheory joined #perl6 |
| 15:20 |
|
|
ab5tract joined #perl6 |
| 15:25 |
|
|
mj41 joined #perl6 |
| 15:28 |
|
|
z80ASM joined #perl6 |
| 15:38 |
|
|
xinming_ joined #perl6 |
| 15:41 |
|
ruoso |
TimToady, if you have some time, could you please take a look at http://www.perlfoundation.org/[…]ulti_sub_dispatch |
| 15:41 |
|
lambdabot |
Title: SMOP Multi Sub Dispatch / Perl 6, http://tinyurl.com/43fhyt |
| 15:42 |
|
|
Exodist joined #perl6 |
| 15:45 |
|
|
lisppaste3 joined #perl6 |
| 15:46 |
|
TimToady |
I never have some time :) |
| 15:46 |
|
TimToady |
unless you count negative time... |
| 15:47 |
|
PerlJam |
ruoso: I just looked at it and your examples look single-dispatchy |
| 15:48 |
|
ruoso |
PerlJam, what do you mean? |
| 15:49 |
|
TimToady |
thinking about lexical CANDO now :) |
| 15:50 |
|
|
kanru joined #perl6 |
| 15:51 |
|
TimToady |
as someone mentioned earlier, you need to deal with ambiguities too |
| 15:51 |
|
|
jhorwitz joined #perl6 |
| 15:54 |
|
TimToady |
and there are probably a few other things from S12:876 that will need to be considered eventually |
| 15:55 |
|
TimToady |
though a lot of it can be swept under the carpet of "sorting" |
| 15:55 |
|
TimToady |
but it basically looks sane |
| 15:56 |
|
ruoso |
lexical CANDO? |
| 15:56 |
|
TimToady |
lexical autoloading of some sort or other |
| 15:56 |
|
TimToady |
probably only dynamic response, not install new symbols |
| 15:57 |
|
ruoso |
ah... I see... |
| 15:57 |
|
ruoso |
it seems heavyweight to call CANDO for every lexical scope in the tree |
| 15:57 |
|
TimToady |
but it would be nice to intercept the query on the way outward |
| 15:57 |
|
|
xinming_ joined #perl6 |
| 15:58 |
|
ruoso |
TimToady, probably installing symbols at runtime is better |
| 15:58 |
|
ruoso |
instead of doing the AUTOLOAD way |
| 15:59 |
|
TimToady |
well, the presence of a CANDO in an outer lexical scope would basically pessimize the ability to know what a name means at compile time |
| 15:59 |
|
TimToady |
but that can be known at compile time :) |
| 15:59 |
|
ruoso |
oh... I see... you're actually thinking about CANDO not being in the package at all |
| 16:00 |
|
TimToady |
that's what I mean by "lexical" |
| 16:00 |
|
coke |
has anyone written a rule to english translator? |
| 16:00 |
|
lambdabot |
coke: You have 1 new message. '/msg lambdabot @messages' to read it. |
| 16:00 |
|
ruoso |
I initially read that as "additionally in the lexical scope" |
| 16:00 |
|
TimToady |
but also potentially in the package, as it is currently |
| 16:01 |
|
ruoso |
ok... |
| 16:01 |
|
ruoso |
so it basically means adding another step... |
| 16:01 |
|
TimToady |
anyway, just a thought, doesn't even need a bit in the lexical scope unless you actually find a my CANDO at compile time |
| 16:02 |
|
ruoso |
hmm... I see... the presence of a CANDO would generate a degenerated lexical scope object |
| 16:03 |
|
TimToady |
which would know to treat the CANDO as * |
| 16:03 |
|
TimToady |
it's probably not worth worrying about right now |
| 16:03 |
|
ruoso |
yeah... it looks like something that can be just plugged in |
| 16:03 |
|
TimToady |
can be retrofitted to the compiler if we decide to do it later |
| 16:03 |
|
|
alanhaggai joined #Perl6 |
| 16:07 |
|
|
z80ASM joined #perl6 |
| 16:07 |
|
diakopte1 |
moritz_: you pinged |
| 16:09 |
|
diakopter |
moritz_: you pang |
| 16:09 |
|
moritz_ |
diakopter: yes, about the SVN::Web stuff, but Infinioid helped me to sort it out in the mean time |
| 16:10 |
|
diakopter |
that guy is very resourceful |
| 16:10 |
|
diakopter |
what was wrong with it |
| 16:10 |
|
moritz_ |
it died on every request :/ |
| 16:11 |
|
diakopter |
what caused that symptom |
| 16:11 |
|
moritz_ |
assertion failure in some svn libs... changing a path from '/' to '' helped |
| 16:15 |
|
|
exodist_ joined #perl6 |
| 16:16 |
|
pugs_svn |
r22555 | moritz++ | [t/spec] unfudge passing tests in split-simple.t |
| 16:31 |
|
|
[particle] joined #perl6 |
| 16:33 |
|
pugs_svn |
r22556 | moritz++ | [t/spec] more tests for unchanged source string in transliteration tests. |
| 17:07 |
|
|
xinming joined #perl6 |
| 17:12 |
|
|
mberends joined #perl6 |
| 17:17 |
|
|
jferrero joined #perl6 |
| 17:18 |
|
|
apeiron joined #perl6 |
| 17:27 |
|
|
raiph joined #perl6 |
| 17:31 |
|
|
jan_ joined #perl6 |
| 17:32 |
|
|
meppl joined #perl6 |
| 18:05 |
|
rakudo_svn |
r31835 | moritz++ | [rakudo] workaround for RT #59730 by cjfields++ (Str.trans with closures) |
| 18:06 |
|
pugs_svn |
r22557 | moritz++ | [t/spec] unfduge passing test, cjfields++ |
| 18:10 |
|
|
pyrimidine joined #perl6 |
| 18:14 |
|
|
Exodist joined #perl6 |
| 18:19 |
|
|
abra joined #perl6 |
| 18:32 |
|
pugs_svn |
r22558 | moritz++ | [t/spec] added a test file for infix:<where> |
| 18:36 |
|
moritz_ |
I would appreciate it if somebody could take a look at r22558, not sure I fully understood that operator |
| 18:38 |
|
|
Southen_ joined #perl6 |
| 19:02 |
|
|
zamolxes joined #perl6 |
| 19:12 |
|
|
smg joined #perl6 |
| 19:14 |
|
|
[particle1 joined #perl6 |
| 19:18 |
|
|
[particle1 left #perl6 |
| 19:35 |
|
TimToady |
moritz_: well, I don't know if I'm somebody, but it looks okay to me. |
| 19:36 |
|
moritz_ |
TimToady: you're somebody enough to count in this one ;) |
| 19:36 |
|
TimToady |
it's a bit subtle that the closures doing appending are returning true |
| 19:36 |
|
moritz_ |
subtle, but intended ;) |
| 19:36 |
|
TimToady |
well, but you could say $x ~= 'b'; True to be explicit |
| 19:37 |
|
moritz_ |
right |
| 19:37 |
|
TimToady |
just thinking of the Gentle Reader |
| 19:38 |
|
TimToady |
btw, thanks for all your spectacular work on the test suite |
| 19:39 |
|
moritz_ |
my pleasure |
| 19:39 |
|
TimToady |
what's your opinion of changing all the is $a,$b to ok $a eqv $b? |
| 19:39 |
|
TimToady |
or maybe even making the builtin ok an infix? |
| 19:40 |
|
TimToady |
so you could say $a eqv $b ok "message" |
| 19:40 |
|
moritz_ |
wait a sec... |
| 19:40 |
|
TimToady |
well, would look better with ok lined up with tabs |
| 19:41 |
|
moritz_ |
I like "ok" up front |
| 19:41 |
|
TimToady |
or maybe the builtin tests could be $a eqv $b OK "message"; |
| 19:42 |
|
TimToady |
well I like what you're testing up front :) |
| 19:42 |
|
TimToady |
and I don't like commas |
| 19:42 |
|
moritz_ |
why do you want to make them all operators? |
| 19:42 |
|
TimToady |
esp when they can be confused with precedence |
| 19:42 |
|
moritz_ |
re all is $a, $b to ok $a eqv $b, I think many comparisons should stay string comparisons |
| 19:43 |
|
TimToady |
well, that's the trouble, people are using them both ways, so ok would make it explicit |
| 19:43 |
|
moritz_ |
right |
| 19:44 |
|
TimToady |
anyway, I'm just trying to think of a construct that reads more like "and", except it has to pay attention to the right side all the time |
| 19:44 |
|
fullermd |
"with"? |
| 19:45 |
|
moritz_ |
well, the infix:<where> is rather confusing when read as english |
| 19:45 |
|
TimToady |
in fact, ok doesn't work well because it's the wrong valence, and because it disappears too easily in the middle |
| 19:45 |
|
moritz_ |
that's why you suggested OK, right? |
| 19:45 |
|
moritz_ |
as all caps |
| 19:45 |
|
TimToady |
yes, but also to hide the builtin a little better, since there are other functions too |
| 19:46 |
|
TimToady |
not that anyone is going to want to define infix:<DIES_OK>, but you never know... :) |
| 19:46 |
|
moritz_ |
anyway, I think that explicit comparison semantics are good, but I somehow fear all the work that it will make |
| 19:46 |
|
TimToady |
another reason I want to get rid of "is" is because it's overloaded in Perl 6 |
| 19:46 |
|
moritz_ |
right |
| 19:47 |
|
TimToady |
but I know how to work around that |
| 19:47 |
|
TimToady |
(though it's ugly) |
| 19:47 |
|
|
[particle]1 joined #perl6 |
| 19:47 |
|
TimToady |
still, I'd rather not have the cognitive dissonance |
| 19:47 |
|
TimToady |
and the is test is horribly imprecise |
| 19:49 |
|
TimToady |
well, one argument (a weak one) for keeping a verb out front is that you could more easily make macros that way for evalish arguments |
| 19:49 |
|
TimToady |
but of course that's awfully fancy |
| 19:49 |
|
moritz_ |
right now I'd rather rewrite all is() tests to ok() than rewriting everything to infix operators; but I don't see how early implementations can give good summaries of failing tests |
| 19:49 |
|
TimToady |
you mean with an infix? |
| 19:50 |
|
TimToady |
don't see a problem with ok() |
| 19:50 |
|
moritz_ |
ok $a eq $b would just say "not ok", whereas is() can tell you what's expected and what you got |
| 19:50 |
|
TimToady |
ah |
| 19:50 |
|
moritz_ |
so unless you have a very clever macro you loose the information too early |
| 19:52 |
|
TimToady |
I wonder how easy it would be to allow parameter properties that capture the text of the parameter, not because you want to reprocess the text like a macro, but simply for documentation |
| 19:52 |
|
TimToady |
could write assert() using that too |
| 19:53 |
|
TimToady |
as long as the original program is available as a string, and we know where the argument started and stopped, it could be done. |
| 19:53 |
|
moritz_ |
but how does that help with error reporting? |
| 19:54 |
|
TimToady |
right, still doesn't give you the two values...drat... |
| 19:54 |
|
moritz_ |
an assert($x eq $y) would know '$x eq $y' and true/false |
| 19:57 |
|
moritz_ |
unless it would peek into the AST of its arguments, which is really non-trivial |
| 19:57 |
|
TimToady |
maybe there wants to be a metaoperator, as long as we're dreaming |
| 19:57 |
|
TimToady |
because you can change is to iseq, iseqv, but is== is not good |
| 19:58 |
|
TimToady |
don't really need to deal with AST, I think |
| 20:00 |
|
moritz_ |
so would you write '$x iseq $y OK "message";'? |
| 20:01 |
|
moritz_ |
that'd be confusing, to say the least |
| 20:01 |
|
TimToady |
something like that, though that's kind of ugly |
| 20:01 |
|
TimToady |
but something that would automatically capture $x, $y, '$x eq $y', and eval '$x eq $y' |
| 20:01 |
|
TimToady |
well, and maybe 'eq' |
| 20:02 |
|
moritz_ |
still sounds like too much magic for basic implementations |
| 20:03 |
|
TimToady |
could always hardwire 'ok' into the grammar too |
| 20:04 |
|
TimToady |
as long as we're building in test ops, that would not be terribly difficult |
| 20:05 |
|
TimToady |
after all, all the built-in constructs are essentially macros |
| 20:05 |
|
TimToady |
and the utility of this might well outweigh the futility :) |
| 20:06 |
|
* moritz_ |
isn't entirely convinced |
| 20:07 |
|
TimToady |
people weren't entirely convinced by fudge either :) |
| 20:07 |
|
moritz_ |
aye ;) |
| 20:08 |
|
TimToady |
anyway, if we set up the syntax such that a stupid ok could work without macroizing, but you just get less info, that's probably cool |
| 20:08 |
|
TimToady |
then if the grammar redirects to a smart ok, we just get more info |
| 20:09 |
|
moritz_ |
maybe you could even convince viv to rewrite the tests automatically |
| 20:10 |
|
TimToady |
well, that'd be at the parse tree or ast level, but sure, that's about the right level to recognize the structure of the first argument |
| 20:11 |
|
TimToady |
on the other hand, if it's just a grammar rule, we just pick the right precedence to pick off the two sides of the comparison |
| 20:12 |
|
TimToady |
several equivalent aproaches |
| 20:14 |
|
moritz_ |
brb |
| 20:14 |
|
|
FurnaceBoy joined #perl6 |
| 20:16 |
|
pmichaud |
it almost cries out for making it clear that 'ok', 'is', etc. are truly test operators |
| 20:17 |
|
pmichaud |
so maybe infix:<?is> infix:<?ok> |
| 20:17 |
|
pmichaud |
where ?is is a ternary. |
| 20:18 |
|
pmichaud |
or, infix:<?is> keeps its arguments somewhere that ?ok can use in a diagnostic message |
| 20:18 |
|
pmichaud |
$a ?is $b ?ok "variable equivalence" |
| 20:18 |
|
moritz_ |
in a contet var, or something? |
| 20:18 |
|
pmichaud |
true ?ok "truth" |
| 20:19 |
|
pmichaud |
I'm just throwing out notions here -- I'm not convinced myself. |
| 20:20 |
|
pmichaud |
maybe it's another meta prefix |
| 20:20 |
|
pmichaud |
$a ?eqv $b :diag<equivalence of variables> |
| 20:20 |
|
TimToady |
there are obvious infelicities in the current approach, so we might as well fix 'em all :) |
| 20:20 |
|
pmichaud |
although ? wouldn't work well as the meta prefix. |
| 20:20 |
|
|
r0bby joined #perl6 |
| 20:20 |
|
TimToady |
yeah, I was thinking about metaops earlier |
| 20:20 |
|
pmichaud |
oh, I guess it wouldn't be toooooo bad |
| 20:20 |
|
moritz_ |
pmichaud: in principle I like the notation, but it looks like more character noise |
| 20:21 |
|
pmichaud |
maybe it's just an adverb to the existing ops? |
| 20:21 |
|
pmichaud |
$a eqv $b :test<items are equivalent> |
| 20:21 |
|
pmichaud |
$a eq $b :test<items are string equivalent> |
| 20:21 |
|
TimToady |
I was thinking if we wrote 'ok' as a macro the extra info would come in as named args |
| 20:22 |
|
TimToady |
so the first two args would still be the boolean and the string |
| 20:22 |
|
pmichaud |
but the advantage of tying it to the comparison operator is that it has the operands immediately available for a diagnostic message |
| 20:22 |
|
TimToady |
hmm, interesting syntax |
| 20:22 |
|
pmichaud |
unless we have "interesting values of boolean" :-) |
| 20:22 |
|
TimToady |
Test Yourself! |
| 20:23 |
|
pmichaud |
it could even be |
| 20:23 |
|
pmichaud |
$a eq $b :ok<items are string equivalent> |
| 20:23 |
|
pmichaud |
if there's no :ok adverb, then it's not part of the test output. |
| 20:23 |
|
TimToady |
and the operator knows its own identity too |
| 20:23 |
|
pmichaud |
of course, this assumes that we have adverbs, which might be a little difficult in a newish implementation :-| |
| 20:24 |
|
pmichaud |
I'm guessing it's less difficult now that there's a standard grammar, though. |
| 20:24 |
|
TimToady |
which is the advantage of a stupidish ok $a eqv $b, "string" |
| 20:24 |
|
TimToady |
with extra named args containing the pertinent bits of the first arg |
| 20:24 |
|
TimToady |
which a stupid "ok" can ignore |
| 20:24 |
|
|
zamolxes joined #perl6 |
| 20:25 |
|
pmichaud |
rakudo's lack of adverb support is mostly because it wasn't entirely clear how to get them into the grammar |
| 20:25 |
|
pmichaud |
(whereas it's much clearer now.) |
| 20:25 |
|
TimToady |
but especially with tabs before :ok it could look very clean |
| 20:26 |
|
pmichaud |
yes |
| 20:26 |
|
|
BinGOs joined #perl6 |
| 20:26 |
|
pmichaud |
....and.... |
| 20:26 |
|
TimToady |
it would also be pretty easy to preprocess into a stupider form |
| 20:26 |
|
pmichaud |
a newbie compiler could just treat :ok as a special syntax |
| 20:26 |
|
TimToady |
assuming one per line |
| 20:26 |
|
pmichaud |
until it has full adverb support |
| 20:26 |
|
TimToady |
that too |
| 20:26 |
|
moritz_ |
one per line isn't always realistic |
| 20:27 |
|
TimToady |
now we just have the problem of dispatching to the version of comparisons that supports the :ok parameter... :/ |
| 20:27 |
|
pmichaud |
it's also nice because the default :ok could give a reasonable message based on the operator type |
| 20:27 |
|
pmichaud |
i.e., $a eqv $b :ok |
| 20:27 |
|
pmichaud |
could give a nicer error message than ok($a eqv $b) |
| 20:27 |
|
pmichaud |
s/error/diagnostic/ |
| 20:28 |
|
TimToady |
"FOO isn't eqv to BAR you #$&*@#$&!" |
| 20:28 |
|
pmichaud |
exactly. |
| 20:28 |
|
pmichaud |
that's much nicer. |
| 20:28 |
|
pmichaud |
how many comparisons would need to support :ok? |
| 20:28 |
|
pmichaud |
most other comparisons could be reduced (in tests) to versions that support :ok, same as we do now |
| 20:29 |
|
TimToady |
I wonder how often we'd have people making the error of trying to interpoalte into :ok<bad $x pardner> |
| 20:29 |
|
pmichaud |
I also wonder what happens with negative comparisons |
| 20:30 |
|
pmichaud |
$a != $b :ok<not equal> |
| 20:30 |
|
pmichaud |
I guess that actually works. |
| 20:30 |
|
TimToady |
presumably meta-! needs to know about it |
| 20:30 |
|
pmichaud |
anyway, I think I've tossed my popcorn for now. |
| 20:30 |
|
pmichaud |
er, peanuts |
| 20:30 |
|
TimToady |
peanuts hurt more |
| 20:31 |
|
pmichaud |
(I used to go to melodramas where the "peanut gallery" actually threw popcorn at the actors) |
| 20:31 |
|
TimToady |
anyway, I think this could be a new state of the art |
| 20:31 |
|
moritz_ |
agreed |
| 20:31 |
|
TimToady |
and it doesn't look terribly hard |
| 20:31 |
|
pmichaud |
the :ok adverb? really? I did something good? ;-) |
| 20:32 |
|
TimToady |
for once :P |
| 20:32 |
|
moritz_ |
if it's reasonable to implement (which I can't really judge) I'm all for it |
| 20:32 |
|
TimToady |
well, even if it's unreasonable, wouldn't be the first time I forced it anyway... :) |
| 20:32 |
|
pmichaud |
THAT'S for sure! :-P |
| 20:33 |
|
TimToady |
after all, Perl Philosphy is simply to torment the implementors on behalf of the user |
| 20:33 |
|
pmichaud |
aha! I have a quote for my keynote. |
| 20:33 |
|
moritz_ |
lol |
| 20:33 |
|
pmichaud |
and perhaps a theme. |
| 20:33 |
|
TimToady |
wow, I said something good (for once) |
| 20:35 |
|
FurnaceBoy |
eh, you're frequently quotable. |
| 20:35 |
|
FurnaceBoy |
<TimToady>ASCII just doesn't have enough brackets... I've noticed this before... |
| 20:36 |
|
pmichaud |
that's why we make new ones, like "<< >>" |
| 20:36 |
|
pmichaud |
and #{ ... } |
| 20:36 |
|
pmichaud |
and =begin FOO ... =end FOO |
| 20:36 |
|
TimToady |
there aren't enough quotidian quotes |
| 20:37 |
|
pmichaud |
and even things like '(' ~ ')' <EXPR> |
| 20:37 |
|
pmichaud |
which is a particularly bizarre form of bracketing construct :-) |
| 20:37 |
|
TimToady |
in which the contents leak out of the brackets :) |
| 20:38 |
|
moritz_ |
so what happens to plan()? |
| 20:38 |
|
TimToady |
why should it change? |
| 20:38 |
|
moritz_ |
everything else is an operator now |
| 20:38 |
|
pmichaud |
we still want todo(), plan() |
| 20:39 |
|
TimToady |
we just want to throw out the "use Test;" part |
| 20:39 |
|
TimToady |
unless you want a different tester |
| 20:40 |
|
moritz_ |
so 'use Test::Most' would just overwrite... what? |
| 20:40 |
|
moritz_ |
the :ok part, somehow? |
| 20:40 |
|
TimToady |
all those functions that aren't there anymore :) |
| 20:40 |
|
pmichaud |
:ok becomes the "builtin" form for testing, but other modules can still define their own "is", "ok", "dies_ok", "is_deeply", whatever equivalents |
| 20:40 |
|
pmichaud |
as normal functions |
| 20:41 |
|
TimToady |
I wonder if people are going to be upset by our taking :ok as an adverb |
| 20:41 |
|
pmichaud |
on the operators? |
| 20:42 |
|
moritz_ |
so if somebody wants to change the behaviour of :ok, which hooks do they pull? |
| 20:42 |
|
pmichaud |
or in general? |
| 20:42 |
|
TimToady |
write a set of comparisons that have :ok as a named parameter and included in the current lexically scope more tightly than the builtins from the prelude |
| 20:42 |
|
TimToady |
that's all |
| 20:43 |
|
TimToady |
and you only have to redefine the ones you want to change |
| 20:44 |
|
TimToady |
that's why lexically scoped multis interleave with other longnames from other scopes the way they do |
| 20:44 |
|
TimToady |
(used to be the other way till we got smarter) |
| 20:45 |
|
TimToady |
anyway, the :ok call won't dispatch at all to a version that doesn't support :$ok as a parameter |
| 20:46 |
|
pmichaud |
that might result in "spooky at a distance" |
| 20:46 |
|
TimToady |
I presume the proto has :ok in it but the standard operator leaves that out of the sig |
| 20:46 |
|
TimToady |
how so? |
| 20:46 |
|
pmichaud |
$a foo $b might dispatch differently from $a foo $b :ok |
| 20:46 |
|
TimToady |
that's true of any multi |
| 20:46 |
|
pmichaud |
someone simply adding an :ok might not recognize the difference. |
| 20:46 |
|
pmichaud |
true. |
| 20:47 |
|
moritz_ |
so there's no magical :ok that turns an infix op into a test, as a fallback? |
| 20:47 |
|
TimToady |
fudge --ok |
| 20:47 |
|
TimToady |
hmm, that is a problem for fudge |
| 20:48 |
|
|
apeiron joined #perl6 |
| 20:48 |
|
TimToady |
how will it recognize the beginning of a statement if there's no "is/ok" there? |
| 20:49 |
|
TimToady |
another problem: $x eqv $a + $b :ok will apply the :ok to the + |
| 20:50 |
|
pmichaud |
oh well. |
| 20:50 |
|
pmichaud |
it was a nice thought. :-) |
| 20:50 |
|
TimToady |
they'd have to write $x eqv ($a+$b) :ok |
| 20:50 |
|
TimToady |
but that's just how adverbs work on operators |
| 20:50 |
|
moritz_ |
another test suite faq |
| 20:51 |
|
pmichaud |
presumably $a + $b :ok would not dispatch? |
| 20:51 |
|
pmichaud |
i.e., there wouldn't be a matching infix:<+> |
| 20:51 |
|
TimToady |
probably not, so at least it's an error |
| 20:51 |
|
TimToady |
albeit at runtime |
| 20:51 |
|
TimToady |
but hey, that's when you run the tests, at runtime :) |
| 20:52 |
|
TimToady |
so it can still fly, I think |
| 20:52 |
|
TimToady |
still have the fudge problem though |
| 20:53 |
|
TimToady |
unless we have an "is" placeholder at the beginning, or some such |
| 20:53 |
|
TimToady |
or change the rules for how fudge recognizes a test |
| 20:53 |
|
TimToady |
split into statements and assume anything containing :ok is a test, maybe |
| 20:54 |
|
TimToady |
where "split into statements" pays attention only to final ; or } |
| 20:56 |
|
moritz_ |
and we significantly increase the number of builtin multis |
| 21:00 |
|
TimToady |
but the presence or absence of a named argument is known at compile time, so the candidate list can be optimized even before we know any of the types |
| 21:00 |
|
pmichaud |
...and one could write the builtins with optional named params |
| 21:01 |
|
TimToady |
that seems like a recipe for slow builtins |
| 21:01 |
|
moritz_ |
aye |
| 21:01 |
|
pmichaud |
yes |
| 21:03 |
|
TimToady |
very likely the :ok versions delegate to the non-:ok versions for the actual work |
| 21:03 |
|
TimToady |
and it seems like there's going to be a lot of boilerplate |
| 21:04 |
|
TimToady |
which argues more for a metaoperator |
| 21:04 |
|
TimToady |
maybe :ok is really a metaoperator in disguise |
| 21:05 |
|
TimToady |
it just happens to bind to the same operator as a real adverb |
| 21:07 |
|
|
pbuetow joined #perl6 |
| 21:07 |
|
TimToady |
but always just generates the appropriate underlying operator you need |
| 21:08 |
|
TimToady |
sort of a semantic pass macro |
| 21:09 |
|
PerlJam |
Are you guys talking about adding testing operators to perl 6? |
| 21:09 |
|
moritz_ |
yes |
| 21:09 |
|
PerlJam |
awesome! |
| 21:09 |
|
pmichaud |
PerlJam: making test functions part of the builtins, yes. |
| 21:09 |
|
moritz_ |
PerlJam: the current approach looks like this: $x == 2, :ok<$x is really 2>; |
| 21:09 |
|
TimToady |
no comma |
| 21:10 |
|
moritz_ |
erm, withotu the comma |
| 21:10 |
|
moritz_ |
right |
| 21:10 |
|
PerlJam |
er, how does :ok know not to bind to the 2 ? |
| 21:10 |
|
pmichaud |
adverbs bind to operators |
| 21:10 |
|
TimToady |
it's where an infix is expected |
| 21:11 |
|
TimToady |
same way 1..10:by(2) knows |
| 21:11 |
|
PerlJam |
aye, I just haven't looked at perl6 syntax in a while. |
| 21:12 |
|
PerlJam |
so, all of the comparators grok :ok ? |
| 21:12 |
|
PerlJam |
(or will) |
| 21:12 |
|
TimToady |
make :ok a crypto-meta-operator that rewrites any operator that returns boolean |
| 21:13 |
|
PerlJam |
so, what happens to $a == 2 && $b == 3 :ok<fooey> ? Do I need parens or something? |
| 21:13 |
|
moritz_ |
probably around the second == |
| 21:13 |
|
TimToady |
that one would silently fail currently |
| 21:13 |
|
TimToady |
I mean, fail to work as expected |
| 21:13 |
|
TimToady |
you'd get a useless use of, maybe |
| 21:14 |
|
PerlJam |
it would silently suceed where it may should have failed :) |
| 21:15 |
|
TimToady |
it's possible we should reformulate adverbs a bit |
| 21:15 |
|
TimToady |
I wonder if they can be made to apply to the *top* operator visible |
| 21:15 |
|
TimToady |
instead of the last one |
| 21:15 |
|
TimToady |
then this would apply to the && instead of the == |
| 21:16 |
|
PerlJam |
How far up the parsetree should they look? :-) |
| 21:16 |
|
TimToady |
but 1..10:by(2) would still work |
| 21:16 |
|
pmichaud |
then of course we have the issue of ... and 1..10:by(2) |
| 21:16 |
|
TimToady |
only inside the current scalar item, I think |
| 21:17 |
|
TimToady |
so make it slighty tighter than comma |
| 21:17 |
|
TimToady |
pmichaud: that would be fine since :by is tighter than and |
| 21:17 |
|
TimToady |
&& would be more of a problem |
| 21:18 |
|
PerlJam |
This is starting to feel like the "regular" syntax version of that weird regex ~ thingie |
| 21:19 |
|
PerlJam |
Use the special <MAGIC HERE> operator for all your testing needs. |
| 21:20 |
|
pmichaud |
I have to go help kids with their homework |
| 21:20 |
|
pmichaud |
bbl |
| 21:22 |
|
PerlJam |
So ... what was wrong with ok($test,$str) ? Or, why do we need another form? |
| 21:22 |
|
|
tewk_ joined #perl6 |
| 21:24 |
|
TimToady |
we talked about that eariler, doesn't provide anything beyond a boolean unles ok is a macro |
| 21:24 |
|
moritz_ |
PerlJam: one of the problems is that is() isn't very verbose about its comparison semantics |
| 21:25 |
|
moritz_ |
PerlJam: and changing that to ok($a eqv $b) doesn't give any useful diagnostic output |
| 21:25 |
|
TimToady |
backlog about the last 2 hours... |
| 21:26 |
|
PerlJam |
okay. |
| 21:27 |
|
PerlJam |
so, an adverb that attaches to the highest precedence operator in the previous expression ? And all adverbs or just special ones with nice syntactic markers? |
| 21:28 |
|
TimToady |
highest within , precedence |
| 21:28 |
|
TimToady |
so basically loose unary precedence like "not", but a postfix |
| 21:29 |
|
|
kulp joined #perl6 |
| 21:29 |
|
|
azawawi joined #perl6 |
| 21:30 |
|
TimToady |
but unlike current formulation, can see within (), so $a and ($b and $c) :foo applies to the second and, because it's the top operator in the expression governed by the :foo |
| 21:30 |
|
TimToady |
assuming you'd never want to apply an adverb to (), which we already assume |
| 21:32 |
|
PerlJam |
Those seem like really special adverbs. Could we make them look lik ^:foo or something? |
| 21:32 |
|
PerlJam |
s/lik/like/ |
| 21:32 |
|
TimToady |
but since tigher than comma, works in the middle of a list: 1,2,3..10:by(2), 4,5 |
| 21:33 |
|
TimToady |
the only thing special is that it would write the code for you instead of dispatching to a multi with an :ok parameter |
| 21:33 |
|
PerlJam |
or maybe I'm just really uncomfortable with all adverbs behaving this way. |
| 21:33 |
|
TimToady |
the syntax is independent of the behavior |
| 21:33 |
|
TimToady |
if you mean the meta-op semantics |
| 21:33 |
|
PerlJam |
sure, but I'd like the former to give me some clue about the latter |
| 21:34 |
|
TimToady |
do you care that !eq is writing code for you? |
| 21:34 |
|
TimToady |
or += for that matter |
| 21:35 |
|
TimToady |
the only difference is whether you have to implement :ok explicitly or not, and the user doesn't really care |
| 21:36 |
|
PerlJam |
!eq, += and :ok all occupy separate conceptual boxes in my head. Mayhap they shouldn't. |
| 21:36 |
|
TimToady |
maybe the current metaoperators all have :foo forms too, and maybe that's their native form |
| 21:36 |
|
TimToady |
$a + $b :assignop |
| 21:37 |
|
TimToady |
doesn't really fly though |
| 21:37 |
|
TimToady |
since you can't write === @x :reduce |
| 21:38 |
|
TimToady |
not that [===] is exactly normal either :) |
| 21:38 |
|
PerlJam |
[===] feels more natural to me though |
| 21:38 |
|
TimToady |
well, I guess it means "are all of these the same object" |
| 21:38 |
|
TimToady |
well, you've been programmed to think of lists when you see [] |
| 21:39 |
|
PerlJam |
true |
| 21:39 |
|
TimToady |
which is why I picked it, after all :) |
| 21:39 |
|
|
jogla joined #perl6 |
| 21:41 |
|
PerlJam |
What you need is an implementation :) They always seem to bring design flaws out (if there are any) |
| 21:41 |
|
TimToady |
anyway, I don't see much problem with treating some adverbs as semantic macros; this is not important for the user to track, only the implementor of :ok, who would otherwise have to duplicate all the builtins |
| 21:42 |
|
TimToady |
the policy of which operator to apply an adverb to is a different matter |
| 21:42 |
|
|
Limbic_Region joined #perl6 |
| 21:42 |
|
moritz_ |
in rx.t we have tests like this: |
| 21:42 |
|
moritz_ |
ok ('bazaar' ~~ /a*: a/) ~~ Match where matchcheck($_, q/:a/), 'basic'; |
| 21:42 |
|
TimToady |
gee, who wrote that mess :) |
| 21:42 |
|
moritz_ |
would that become ('bazaar' ~~ /a*: a/) ~~ Match where matchcheck($_, q/:a/) :ok<basic>; |
| 21:42 |
|
PerlJam |
the principle of least surprise is a strong attractor. you just have to pick the right least surprise :) |
| 21:44 |
|
TimToady |
so that would apply :ok to the second ~~ if we went with the precedence solution, which is correct, I guess |
| 21:44 |
|
moritz_ |
aye |
| 21:44 |
|
TimToady |
since that's the top operator |
| 21:45 |
|
moritz_ |
but for longer expressions I'm a bit worried that the :ok is too far on the right |
| 21:45 |
|
|
apeiron joined #perl6 |
| 21:45 |
|
PerlJam |
yeah, there's a bit of distance between there |
| 21:45 |
|
moritz_ |
and it changes the expression from "useless expression in void context" to "run a test" |
| 21:45 |
|
moritz_ |
which somehow violates the principile of end weight |
| 21:46 |
|
TimToady |
well, write a longer message :) |
| 21:46 |
|
PerlJam |
heh |
| 21:47 |
|
TimToady |
but it's kinda cool that brainos turn into "useless use" |
| 21:48 |
|
TimToady |
it'll even tell you *which* operator leaked |
| 21:49 |
|
TimToady |
well, one of 'em, anyway |
| 21:50 |
|
TimToady |
and it better justifies the existence of "loose unary" precedence :) |
| 21:50 |
|
PerlJam |
I guess part of my conceptual difficulty is that I don't think of tests in an adverbial way. I think of them as nouns that you feed stuff to. Maybe I'm just insane. |
| 21:50 |
|
TimToady |
well, they're predicates, really, or assertions |
| 21:51 |
|
TimToady |
if there weren't a history of ! meaning factorial we'd say $a == $b! when we really mean it |
| 21:52 |
|
PerlJam |
they're the teacher and we're the students handing in our assignments to find out if we pass or fail. :) |
| 21:52 |
|
azawawi |
hi |
| 21:52 |
|
lambdabot |
azawawi: You have 1 new message. '/msg lambdabot @messages' to read it. |
| 21:52 |
|
moritz_ |
the difference between a test and an assertion is that you (have to) actively run a test, whereas assertions are verified along the way of a normal executioing |
| 21:53 |
|
TimToady |
yes, and you don't really want to blow execution out of the water on the first failed test :) |
| 21:53 |
|
moritz_ |
(that's what the Eiffel people generally get wrong; they say "we don't need tests, we have our design by contract" - but as long as the code is not executed, these contracts aren't checked) |
| 21:54 |
|
TimToady |
you will soon have us all converted to Haskell :) |
| 21:54 |
|
|
BinGOs joined #perl6 |
| 21:54 |
|
moritz_ |
TimToady: so should :ok'ed operators catch exceptions? |
| 21:55 |
|
moritz_ |
not before I convert myself to Haskell ;) |
| 21:55 |
|
TimToady |
well, why not? the one think it can't do it catch parsefails... |
| 21:56 |
|
TimToady |
*thing |
| 21:57 |
|
moritz_ |
nice |
| 21:58 |
|
TimToady |
although a parser could resync a statement if it sees an :ok coming up, I suppose, the way some parsers resync on semicolons |
| 21:58 |
|
moritz_ |
what will '1 :ok<1 is a true value>' work out to? |
| 21:59 |
|
moritz_ |
ie when there's no operator to bind to? |
| 21:59 |
|
PerlJam |
"operator expected" :) |
| 21:59 |
|
moritz_ |
well, these things must be tested somehow |
| 21:59 |
|
PerlJam |
unless there's a null operator it can bind to for other possibilities |
| 22:00 |
|
moritz_ |
simple truthness, dies_ok, eval_dies_ok needs to be addressed |
| 22:00 |
|
TimToady |
currently it says 'No previous operator visible to adverbial pair |
| 22:00 |
|
moritz_ |
sub unfix:<> |
| 22:00 |
|
moritz_ |
the null operator |
| 22:00 |
|
PerlJam |
"unfix"? :) |
| 22:01 |
|
moritz_ |
neither pre nor post nor infix |
| 22:01 |
|
TimToady |
given that :ok is testing for boolean, presumably it should supply a true() |
| 22:01 |
|
moritz_ |
unfix |
| 22:01 |
|
PerlJam |
What's your fixity? I have none. |
| 22:02 |
|
Limbic_Region |
salutations all |
| 22:03 |
|
moritz_ |
hello Limbic_Region ;) |
| 22:03 |
|
moritz_ |
where did you leave your ~ ? ;-) |
| 22:04 |
|
Limbic_Region |
on use.perl it is a space |
| 22:04 |
|
TimToady |
the final frontier... |
| 22:05 |
|
moritz_ |
unendliche weiten... |
| 22:05 |
|
moritz_ |
ELANG |
| 22:24 |
|
|
YMas joined #perl6 |
| 22:24 |
|
azawawi |
moritz_: any interesting RTs / tasks to work on? |
| 22:25 |
|
moritz_ |
depends on your notion of "interesting" ;) |
| 22:26 |
|
azawawi |
moritz_: something that gets committed in the end ;-) |
| 22:27 |
|
moritz_ |
azawawi: I'm sure most of your patches will get commited in the end... |
| 22:27 |
|
moritz_ |
on the side of the test suite there's still a lot in t/TASKS |
| 22:27 |
|
moritz_ |
on the rakudo side - dunno, really |
| 22:27 |
|
azawawi |
im actually looking at it |
| 22:27 |
|
moritz_ |
perhaps infix:<where> |
| 22:28 |
|
azawawi |
tests for complex: polar |
| 22:29 |
|
moritz_ |
have to go to bed now :( |
| 22:29 |
|
moritz_ |
happy hacking ;) |
| 22:29 |
|
azawawi |
me 2 it is 1:29am here |
| 22:29 |
|
azawawi |
good night... |
| 22:30 |
|
|
YMas left #perl6 |
| 22:39 |
|
|
hercynium joined #perl6 |
| 22:45 |
|
|
ab5tract joined #perl6 |
| 22:48 |
|
|
ingyfoo joined #perl6 |
| 22:48 |
|
|
ingy joined #perl6 |
| 22:50 |
|
pugs_svn |
r22559 | azawawi++ | [t] removed unused empty directories |
| 23:02 |
|
|
kulp joined #perl6 |
| 23:04 |
|
pugs_svn |
r22560 | putter++ | [elfish/on_sbcl] Self-compiles. |
| 23:04 |
|
pugs_svn |
r22560 | putter++ | Undef and bool boxing. Dispatch and misc fixes. Slower. |
| 23:04 |
|
pugs_svn |
r22560 | putter++ | Doesn't quite compile the p5 version. |
| 23:04 |
|
pugs_svn |
r22560 | putter++ | [STD_red] Improved --format=cl string and nil dumping. |
| 23:04 |
|
pugs_svn |
r22560 | putter++ | [elf_h] Yet more missing argument fixes. |
| 23:11 |
|
|
r0bby joined #perl6 |
| 23:40 |
|
speckbot |
r14591 | larry++ | Make operator adverbs parse sanely based on precedence. They are now treated |
| 23:40 |
|
speckbot |
r14591 | larry++ | as "loose unaries" (albeit still in a trailing position), and no longer require |
| 23:40 |
|
speckbot |
r14591 | larry++ | the parser to track "previous operator". The benefits are construed to |
| 23:40 |
|
speckbot |
r14591 | larry++ | outweigh the problems. |
| 23:40 |
|
speckbot |
r14591 | larry++ | |
| 23:40 |
|
speckbot |
r14591 | larry++ | Note also that existence and deletion are now simply adverbs on subscript |
| 23:40 |
|
speckbot |
r14591 | larry++ | operators. |
| 23:55 |
|
|
kulp joined #perl6 |
| 23:58 |
|
|
alester joined #perl6 |