th a
multimethod, and using type/parameter dispatch in order to
help code evolve better over time will never be a "good" or normal
thing to do if it feels kludgy.
My claim is that it doesn't need to feel kludgy.
A macro library kludging over a kludge is twi
't), you'd better define the multis together to get well-defined
> semantics.
That seriously sucks.
Multis rock because they let you append to an interface from your
perspective.
If it's just a pretty form of casing, then we aren't gaining
anything, IMHO.
--
() Yuval Kog
, that was properly ordered, mmd
is useful as a subset of it's behavior - it's just pattern matching.
This is nice, but has none of the extensibility that MMD can offer
if done differently.
On Fri, Jul 08, 2005 at 12:18:51 +0300, Yuval Kogman wrote:
> On Fri, Jul 08, 2005 at 08:50:4
i proposed - it's trying to define with
great detail the simplest rules I can think of.
> it is only simple and predictable when you have the whole class
> heirarchy in your head.
That's why under the fourth steps I detailed that MI confusions are
a fatal error, possibly at compile t
On Fri, Jul 08, 2005 at 14:26:20 +0300, Yuval Kogman wrote:
http://svn.openfoundry.org/pugs/docs/notes/mmd_match_order.txt now
contains a proposal fofr some clear semantics on parameter coercion
and MMD, if anyone cares.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl
, even if you don't agree with this - just for
the sake of clarity (because I can't explain it any better).
> Anyway, I think that once we start diving inside expressions to
> measure their specificity, we've gotten too complex to be predictable.
I think that may be right,
here clauses by introspecting their
PIL, that's a different story =)
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me sneaks up from another MIME part: neeyah!
pgp1bev1lj7CN.pgp
Description: PGP signature
hooking the metamodel's
'add_method' method, or whatever it's called (stevan?).
I'm not sure I know how to oppertunistically 'staticize' this,
though.
Interesting paper, although admittedly I only skimmed it.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEB
eneric in their constraint,
you should be happy. For when you're confused or forgetful and the
system isn't DWIM enough, i guess %4.5 can be dealt with using
errors.
I don't know of a method to take care of %0.5 elegantly, but I think
that encouraging MMD to not be used in order to lower the actual
number that %0.5 is is a bigger mistake.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: : neeyah!
pgpJPtw4t52Mb.pgp
Description: PGP signature
is a part of the context? Then we can use C casting
syntax, and it'll actually make sense.
(where { ... })$value
;-)
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me supports the ASCII Ribbon Campaign: neeyah!!!
pgpgzg9AWkDU5.pgp
Description: PGP signature
lization of operator precidence here (even
> thought he two are
> superficially dis-similar, the looser/tighter concept appears valid).
I like that =)
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me has realultimatepower.net: neeyah
pgpjhRyhnok4i.pgp
Description: PGP signature
On Fri, Jul 08, 2005 at 16:45:09 -0400, David Storrs wrote:
> Could we break them out into separate threads so that our poor summarizer
> doesn't go
> bonkers?
See? That's what specialization/particulation is good for. Thanks
for strengthening my point!
--
() Y
ttp://svn.openfoundry.org/pugs/docs/notes/mmd_match_order.txt which
proposes a DWIMish sort function.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me has realultimatepower.net: neeyah
pgpOI04zyeSfW.pgp
Description: PGP signature
.);
> $_->method(...);
> }
>
> And the Perl 6 equivalent until your revelation,
>
> given $object {
> .method(...);
> .method(...);
> .method(...);
> }
>
> was the perfect solution. Killing off a useful and much
t mindset
is that Parsec can parse any list of crap into any structured crap.
It's only affinity towards real strings and characters is the
builtin library of useful rules.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me has realultimatep
On Wed, Jul 13, 2005 at 00:46:49 +0300, Yuval Kogman wrote:
> Perhaps the most interesting aspect of the string-is-a-list mindset
> is that Parsec can parse any list of crap into any structured crap.
> It's only affinity towards real strings and characters is the
> builtin librar
ers (especially for safety). Since Perl 6 has more
explicit types I'd like DBI to be able to leverage these, too.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me supports the ASCII Ribbon Campaign: neeyah!!!
pgpoml771u5Hb.pgp
Description: PGP signature
.
I'd rather have '.foo' not work on $?SELF at all than have that.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me dodges cabbages like macalypse log N: neeyah!
pgpaUXI5Wijpd.pgp
Description: PGP signature
a -> Bool or so... Isn't that lovely?)
Anywho, my point is - there's lots we can borrow to make our
Prelude.pm prettier, and our code a little more generic.
Mechanical conversion from perl 5 can use the fully qualified
instances of '==' and 'eq' in the Str and
g compilation - it's just that the
default trigger should the actual execution of chunks of code.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me sushi-spin-kicks : neeyah
pgpSLGwKeTOMi.pgp
Description: PGP signature
On Fri, Jul 15, 2005 at 10:01:43 +0800, Autrijus Tang wrote:
> On Fri, Jul 15, 2005 at 02:38:22AM +0300, Yuval Kogman wrote:
> > As I see it == is the generic comparison, and 'eq' is == with
> > coercing parameters (in Haskell it'd be
> > eq :: (Show a) => a
On Thu, Jul 14, 2005 at 18:06:24 -0700, Dave Whipp wrote:
> Yuval Kogman wrote:
>
> > - optimizers stack on top of each other
> > - the output of each one is executable
> > - optimizers work in a coroutine, and are preemptable
> > - optimizers
yway, I'm done with my brainstorming... Sorry for the post being
so chaotic.
Ciao!
[1] http://lambda.org/
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me spreads pj3Ar using 0wnage: neeyah!!!
pgphgrAQBlnw9.pgp
Description: PGP signature
D already works for that. Which part does not work?
I'm just ranting about where MMD in p6 seems to be going.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me tips over a cow: neeyah!!
pgpVytQjMvT1u.pgp
Description: PGP signature
t; did really poorly. Some people overloaded eq, some overloaded ==,
> some wrote a ->equal method, and there was no way to shift between the
> different paradigms smoothly. This is one of the times where we have
> to choose for them.
I wholly agree
--
() Yuval Kogman <[EMAIL PRO
On Mon, Jul 18, 2005 at 15:16:16 +1200, Sam Vilain wrote:
> Yuval Kogman wrote:
> >everyone gets to choose, and another thing I have in mind is the
> >Transactional role...
> > DBI::Handle does Transactional;
> >To the STM rollbacker and type checker thingy this mea
umeric
> $a == $b :str # string
yuck yuck yuck yuck yuck Now the one true version of == will be
patched once a week to support new adverbs, and those patches will
be promptly rejected, and there will be chaos.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /methinks long and hard, and runs away: neeyah!!!
pgpEHQp9gyFme.pgp
Description: PGP signature
t; The end goal is to be able to give the DB layers enough hooks that we
> can say a well written one Just Works™ in the face of atomic { }.
>
> Does that seem relevant to the point you were making?
Yes =)
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
t stuffing it in a string
the syntax is different
Anywho, I like your proposal, but i'd like some even fresher ideas
into pack and unpack, so i'm just trying to kick the thread
around...
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung
ig = $something but GC::timely; # do we have runtime 'does'? I
keep forgetting
contained elements within a container
my @a is Array of (Item is GC::timely);
and containers themselves without respect to their contained:
my @a is Array is GC::timely
--
(
owser runtime has the window class in the dom, we
# can get it, and it doesn't matter if we're running on
# javascript or parrot embedded in mozilla
}
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo mas
Atom
...
Pair
Junction
int, str, ...
where any of these can also 'do' Junctive.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me tips over a cow: neeyah!!!
t;1"
>
> The coroutine worked fine in a "while" loop, but it didn't work in a "for"
> loop.
I think unary = is what you want:
my @a = $span.lazy;
for [EMAIL PROTECTED] -> $item {
...
}
Ofcourse, my @a = $span.lazy w
On Thu, Jul 28, 2005 at 19:58:16 -0300, Flavio S. Glock wrote:
> 2005/7/28, Yuval Kogman <[EMAIL PROTECTED]>:
> >
> > I think unary = is what you want:
> >
> > my @a = $span.lazy;
> >
> > for [EMAIL PROTECTED] -> $item {
> >
objects are checked first, and then everything is
cleaned up in the background.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me beats up some cheese: neeyah!
pgpGT8KHLqMjI.pgp
Description: PGP signature
tainly shorter than
>
> $pair.value.value.value
>
> But maybe that's worth being dehuffmanized like that...
Haskell has !! :
sub infix: (Pair $x, 0) { $x.key }
sub infix: (Pair $x, Int $index) { $x.value !! ($index - 1) }
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\
cts can be minimized
- for example a file handle object can retain the path it was opened
with, it's mode, it's position in a seekable file, it's modes, and
the only thing which is truely unserializable is the file descriptor
itself. The object could be semi-useful under unsafe seri
to be
controlled under do :GC::disabled, without wasting lots of memory.
On block exit a consistent state is reached - any timely objects
that should have been destroyed in the nested block will be
finalized.
Hmmm... ;-)
sub nothingness () {
$*RUNTIME.Memory.GarbageCollector.dispose($*RUNTIME,
:recursive(1));
}
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me sneaks up from another MIME part: neeyah!
undefine($spot_II); # no more refs
# the object may still be alive, if it didn't say it needed
# timely destruction
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me spreads pj3Ar using 0wnage: neeyah!!!
pgpnaC1QBZzwK.pgp
Description: PGP signature
On Mon, Aug 15, 2005 at 15:59:34 +0100, Adrian Howard wrote:
> On 15 Aug 2005, at 13:17, Yuval Kogman wrote:
> I'm not sure what you're proposing here. A separate arena for
> stuff you want to allocate and not be moved by the GC? How would
> I tell the compiler?
You won
GC scheme that copies or
defragments - I personally doubt that this will be the case any time
in the forseeable future, but it's runtime and GC dependant, and
there are other solutions, this is just one.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD274
ither, and due to post order happen
before the class's finalizer).
> I'm not sure that replacing the GC is going to be easy, I expect
> thats going to involve heavy magic.
If the runtime has an interface where it allows you to replace the
GC with some pluggable GCs it supports, then w
# parse scientific notation of method name (e.g. "e5"),
# and apply it to the invocant, returning a float
}
There, no ambiguity.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me spreads pj3Ar using 0wnage: neeyah!!!
pgpTcztTCimYb.pgp
Description: PGP signature
defined $credit_card_holder_name }
> {...}
multi sub validate () { # no credit card info
}
multi sub validate (
$credit_card_number,
$credit_card_expiration,
$credit_card_holder_name
) {
}
--
()
jects
- the border between the webapp and the browser is clear
and distinct, and calls between the two are done by
explicitly invoking one runtime from the other
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27
d MMD: The type signatures are rigid, and the moment things
get closed (no more MMD alternatives are possible), if your
dispatches don't have any MMD candiates it's just as much a type
error as a normal sub with a bad type.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hac
On Thu, Aug 18, 2005 at 12:24:40 +, Ingo Blechschmidt wrote:
> Hi,
>
> Yuval Kogman woobling.org> writes:
> > So now that the skeptics can see why this is important, on the
> > design side I'd like to ask for ideas on how the code serialization
ity at a great gain of
> usability of pairs. That little bit is this ability:
>
> my @args = (1, 2, 3, foo => 'bar');
> baz([EMAIL PROTECTED]); # $foo gets argument 'bar'
To be honest, I don't see how that is a feature, this strengthens my
suppor
e it go away, frankly, and let the issues be
resolved by simplifying the OOP system. *cough*, *cough*.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: uhm, no, I think I'll sit this one out..: neeyah!
pgpYO92WR49S5.pgp
Description: PGP signature
ode in the other structure, then a binary
function is applied regardless of type (resulting in coercion or
a fatal error).
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me does not drink tibetian laxative tea: neeyah!
pgpZh5buBST12.pgp
Description: PGP signature
t; $b();
Right... It is my assumption that actually serializing this is
trivial. The real question is whether we want to serialize, and
what parts we would like to serialize when we do.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me sushi-spin-kicks : neeyah
pgpi2FAoBtqax.pgp
Description: PGP signature
On Sun, Aug 21, 2005 at 12:11:17 +, Ingo Blechschmidt wrote:
> Hi,
>
> Yuval Kogman woobling.org> writes:
> But we should note that some backends don't generate meaningful
> ASTs, simply because they don't convert PIL -> target language
> AST -&g
plementor SMD is just MMD with some constraints, so it's
really just an extension of the implementation, so I'm not worried
either way. If you're interested I can dig up a chat log where
autrijus and I argue over this a bit.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me sushi-spin-kicks : neeyah
pgpE6IEEhOIaB.pgp
Description: PGP signature
nt some language which
uses syntax errors for package qualifiers (Acme::Don't, anyone?) is
obund to pop up, and then it'll be just inconsistent.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me groks YAML like the grasshopper: neeyah!!
pgpR08YbGVAV0.pgp
Description: PGP signature
Also, lazifying semantics are consistent with
sub &infix:<||> ($left, $right is delayed) {
$left ?? $left :: ** $right; # can you steamroll a scalar?
}
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me spreads pj3Ar using 0wnage: neeyah!!!
pgpqbfguyPqSX.pgp
Description: PGP signature
ude to ~~, as well as ==), so that
~~ and == on collections are defined with the same aggregate
semantics, but MMD ~~ or == applies to the nested elements in the
same "shape":
sub extend_comparators (&op) {
...
my sub app
ame "comparator" could be a lexically scoped &infix:<~~> just the
same.
It's not as short, but I'm sure an evil macro could be cooked up if
it recurrs.
We can even specify
multi &infix:<~~> (Any $a, Any $b, :&comparator) { # what is the
# anymore
...
$x.unwrap; # this serves as context passthrough
}
> to force value-finding behavior iff it's called for. After all, you
> probably want it to stay lazy if you call it in undifferentiated scalar
> context:
>
On Tue, Aug 23, 2005 at 10:28:01 -0700, Larry Wall wrote:
> On Tue, Aug 23, 2005 at 06:19:33PM +0300, Yuval Kogman wrote:
> : "10" == "10"; # dispatches to Str, due to better match
>
> Nope, that will continue to coerce to numeric comparison. The design
true, and
not what I want eqv for:
if [1, 2, 3] ~~ [code { 1 }, rx/\d+/, Num] { say "true" } else { say
"false" }
> Or we could have a more explicit way of doing whatever it is that the
> snapshot hash does to each argument.
>
> if [1,2,3].snap eqv [1,2,3].snap { say "true" } else { say "false" }
I think the opposite is better, make snapshotting by default, and
mutable value equality false by saying
[1, 2, 3] eqv [1, 2, 3] :always # or :forever
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: *shu*rik*en*sh*u*rik*en*s*hur*i*ke*n*: neeyah
pgpkL3zKnNBEK.pgp
Description: PGP signature
e code can be extracted)
* Emit::PBC (parrot byte code version of the code can be extracted)
* Emit::...
* Rich type/value annotations (full partially resolved type/value
inferencing trees for symbols, including constantness, return
values, and so forth).
PHEW, THAT WAS LONG.
Sorry!
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me sushi-spin-kicks : neeyah
pgpMJ6bIaGORb.pgp
Description: PGP signature
) at ..."
and disambiguation can fix this:
foo(named(my $x = :foo));
foo(pair(my $x = :foo));
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me groks YAML like the grasshopper: neeyah!!
pgp4XME69xRIb.pgp
Description: PGP signature
On Thu, Aug 25, 2005 at 11:16:56 -, David Formosa (aka ? the Platypus)
wrote:
> On Wed, 24 Aug 2005 16:13:03 +0300, Yuval Kogman <[EMAIL PROTECTED]> wrote:
>
> [...]
>
> > perl6 creates a new instance of the perl compiler (presumably an
> > object). The compile
when compiling foo.pl, prelink SomeModule's runtime symbols into
it, to ensure that no other version of SomeModule can affect
foo.pl's emitted code. This can be a recursive or non recursive
process.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418
hermore, even if it's
optimized to not duplicate read only containers that were flattenned
into it, they are still not the same id.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me supports the ASCII Ribbon Campaign: neeyah!!!
pgp2pjMeM0smQ.pgp
Description: PGP signature
g
>
>my ($foo, $bar, [EMAIL PROTECTED]) := foo();
for this I think we need an easier solution... Perhaps flattenning
foo instead of adding a slurp, or making yadda yadda in lvalue throw
it's arguments away silently:
my ($foo, $bar, ...) := foo();
--
ctic construct (i think):
@bar >>:=<< @foo;
But anyway, were you to do that you could say:
pop @bar; @foo's last elem still exist
$bar[0]; # @foo's first elem *is* changed
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\
removed, replaced, and
then the array is fused back together into one contiguous structure.
I would expect it to delete.
> * What happens if the array becomes tied (or was already)?
Tying is like binding to IType->new, so i think all ties are lost.
--
() Yuval Kogman <[EMAIL PROT
ady available
&foo.signature; # a code, and a yadda yadda ?
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me sushi-spin-kicks : neeyah
pgpOctUZwYX55.pgp
Description: PGP signature
things -> $thing {
$index_x{ $thing.x_value }.insert($thing);
$index_y{ $thing.y_value }.insert($thing);
$index_z{ $thing.z_value }.insert($thing);
}
which makes the 'x_value' etc calls much more obvious, and t
;, <<$val3, $val4>> >>) =
foo("bar" << <<1, 2>>, <<3, 4>> >>, "baz")
we have soome variants:
1, 3
1, 4
2, 3
2, 4
but the return of which pair goes into which value?
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me supports the ASCII Ribbon Campaign: neeyah!!!
pgp4dwboVHDL5.pgp
Description: PGP signature
t; This has the advantage of being very nonmagical, keeping code together, and
> avoiding AAAD.
Arguably for plain container types autovivification is semantically
safe, at least in my opinion. I would do this for weird things (for
example, autovivification should not know the key it's autovivifying
- if you want to go that far, just tie the structure).
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me dodges cabbages like macalypse log N: neeyah!
pgpHK8KDbxcSu.pgp
Description: PGP signature
On Sun, Aug 28, 2005 at 05:18:42 -0400, David Storrs wrote:
>
> On Aug 28, 2005, at 5:12 AM, Yuval Kogman wrote:
>
> >On Sun, Aug 28, 2005 at 05:02:25 -0400, David Storrs wrote:
> >>nested_call.wrap(), maybe?
> >It's not 100% the same thing... Wrapping is fo
On Sun, Aug 28, 2005 at 05:02:25 -0400, David Storrs wrote:
> nested_call.wrap(), maybe?
It's not 100% the same thing... Wrapping is for wrapping only. This
applies to super methods, delegate methods, and so forth.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hack
ing you wait for his reply:
http://colabti.de/irclogger/irclogger_log/perl6?date=2005-08-28,Sun&sel=281#l460
Bottom line: the aim is to change the meaning.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me climbs a brick
ispatch. But that is an implementation issue.
> Conceptually I like to define the semantics of Perl6 in terms of type
> and dispatch.
I thought so too, but then i was informed that both assignment and
method call dispatch are not operators.
--
() Yuval Kogman <[EMAIL PROTECTED]>
e something that
looks like 'use overload' in perl 5.
Oh well.
> Do we really need even that many???
At the risk of sounding like a broken record, i think not
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: : neeyah!
pgpEr3BiOWrFY.pgp
Description: PGP signature
being an operator rich language we can specificate the generic
comparator to make things a bit more fun like I proposed:
$x +eqv $y;
$x ~eqv $y;
Ofcourse, I think that s/eqv/==/;, but everyone hates that.
> I fully agree that the number of standard Comparers should be kept
>
On Mon, Aug 29, 2005 at 15:12:44 +0200, TSa wrote:
> HaloO,
>
> Yuval Kogman wrote:
> >On Mon, Aug 29, 2005 at 13:12:37 +0200, TSa wrote:
> >>Sorry, I believe everything is an operator---or actually operators
> >>are Code subtypes with syntactic sugar. But s
On Wed, Aug 31, 2005 at 04:56:25 -0600, Luke Palmer wrote:
> (That is, lexically binding &prefix:<+> does not change things in
> numeric context; only when there's actually a + in front of them)
Unless you override &prefix:<+> ?
sub foo (&prefix:<+&g
o (&prefix:<+>) { +1 == +2 }
> foo(&say);# "1" and "2" printed
>
> Luke
Furthermore, even if:
sub &infix:<==> ($x, $y) { +$x == +$y }
sub foo (&prefix:<+>) { 1 == 2 }
foo(&say); # nothing printed
b
On Fri, Sep 02, 2005 at 09:24:52 +0200, Juerd wrote:
> sub foo (@bar) { ... }
>
> foo $aref;
>
> Here $aref is dereferenced because of the Array context. The scalar
> can't do this by itself, of course.
my @bar := $aref;
--
() Yuval Kogman <[EM
On Thu, Sep 01, 2005 at 17:12:51 +, Luke Palmer wrote:
> On 9/1/05, Yuval Kogman <[EMAIL PROTECTED]> wrote:
> > On Wed, Aug 31, 2005 at 13:43:57 -0600, Luke Palmer wrote:
> > > Uh yeah, I think that's what I was saying. To clarify:
> > >
> > >
On Sat, Sep 03, 2005 at 11:45:33 +0300, Yuval Kogman wrote a lot.
I'd like to summarize:
* if operators are not special than they are defined in perl 6
(maybe)
* if operators are defined in terms of other operators, then
overriding an operator may interfere
so it doesn't have arity,
each variant has arity.
I'd say it 'fail's.
To get the arity you must tell it which variant yyou mean, either by
providing enough of the prototype, eg
&foo(Any).arity vs foo(Any, Any).arity
--
() Yuval Kogman <[EMAIL PROTEC
ess of course you make .arity a special form).
There was a syntax to disambiguate multis to .assuming... I meant
that.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me sushi-spin-kicks : neeyah
pgpxBzmLCxxY1.pgp
Description: PGP signature
h much behave
accordingly.
There is one more problem though:
class Complex {
multi sub &infix:<*> { ... }
}
package Moose;
use Complex;
use SomeMathLib ;
...
function($some_complex_number); # if function calls infix:<*> on
_bind_some ([EMAIL PROTECTED] is rw) {
my @bound_params = map { pop @params } 1 .. $?SELF.arity;
$?SELF.bind_params(@bound_params);
}
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me supports the ASCII Ribbon Campaign: neeyah!!!
pgpZ6GyiTREuw.pgp
Description: PGP signature
statically determined, and might be re-made if
unsafe statical analysis was made (all variants could be determined,
but new ones may be introduced in runtime). This is highly dependant
on the capabilities of the runtime.
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me dodges cabbages like macalypse log N: neeyah!
pgpSrffqKQTLD.pgp
Description: PGP signature
On Mon, Sep 12, 2005 at 13:15:33 +0300, Yuval Kogman wrote:
> To make things safe, when the prelude is bug fixed and the runtime
> is not yet updated, the cryptographic hash of the function changed,
> so it is no longer equal to the native one based on the way they are
> paired.
On Mon, Sep 12, 2005 at 13:15:33 +0300, Yuval Kogman wrote:
The circularity issue was not made clear in the email or the
diagram. Here is what I meant:
The prelude operators are mutually recursive at some point, and
completely pure. An pathetic example:
multi &infix:<-> (Int
A proof of concept is available here:
http://svn.openfoundry.org/pugs/docs/notes/circular_prelude_stuff.pl
And logs where I explain the guts to Luke are availble here:
http://colabti.de/irclogger/irclogger_log/perl6?date=2005-09-12,Mon&sel=785#l1413
--
() Yuval Kogman <[EMAIL PR
On Mon, Sep 12, 2005 at 13:27:21 -0600, Luke Palmer wrote:
> On 9/12/05, Yuval Kogman <[EMAIL PROTECTED]> wrote:
> > Hi,
>
> Hi. These are superficial thoughts, before I've had time to really
> think about the Big Picture.
>
> > 2. each block of cod
On Tue, Sep 13, 2005 at 02:08:47 +0300, Yuval Kogman wrote:
> A proof of concept is available here:
and has been updated here:
http://svn.openfoundry.org/pugs/perl5/Blondie/
There's a bit of documentation, and the code is split up into files
and ever so slightly re
queue - messages are also approved.
With a pull only model you need to part the list and iterate the two
result sets asynchronously. With a push model you give your handler
results as they come in, and it gobbles them up in the background as
it sees fit (chunked, as fast as possible, with a de
mments, or synonyms for the control
structure naming?
BTW, I expect readability to be optimal with 1-2 lines of pre/post,
and 1-5 lines of middle. Any observations?
--
() Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker &
/\ kung foo master: /me groks YAML like the grasshopp
st ... ;
if ($bool) {
pre
}
mid
if ($bool) {
post
}
> 2: if the middle part does something that changes the value of the
> expression $condition then the new construct again has a different meaning.
Err, that's the point
--
() Yuval Kogman <[EMAIL PROTECTED
On Tue, Sep 20, 2005 at 14:31:07 -0400, Mark Reed wrote:
> On 2005-09-20 14:23, "Yuval Kogman" <[EMAIL PROTECTED]> wrote:
> > On Tue, Sep 20, 2005 at 18:19:42 +, [EMAIL PROTECTED] wrote:
> >>
> >> 2: if the middle part does something that changes t
don't know what he fixed in his program, but "I/O primitives are by
default bufferred unless the programmer specifically requested
otherwise" sounds a lot like perl 5 and $| ;-)
I think that Perl 6 needs more than this to be "smarter about IO
buffering", but I'm not sure
k to it's "caller" to add to readability
These are two advantages that the construct has over wrapping the
code in a new sub.
> (I'd actually prefer something like:
Your example is only WRT data composition... I was actually doing
conditional side effects.
--
() Yuval Kog
1 - 100 of 260 matches
Mail list logo