perl6-language@perl.org

2006-01-25 Thread Jonathan Lang
Larry Wall wrote:
> But my hunch is that it's
> a deep tagmemic/metaphorical problem we're trying to solve here.
> Such issues arise whenever you start making statements of the form
> "I want to use an A as if it were a B."  The problem is much bigger
> than just how do I translate Perl 5 to Perl 6.  It's questions like:
>
> What makes a particular metaphor work?
> Will the cultural context support use of an A as if it were a B?
> How do we translate the user's thoughts to the computer's thoughts?
> How do we translate one user's thoughts to another user's thoughts?
> How do we know when such a translation is "good enough"?
> How do we know when our mental model of an object is adequate?
> How do we know when the computer's mental model of an object is adequate?
> What does adequate mean in context?
> Will the culture support partially instantiated objects?  :-)
>
> That's tagmemics, folks.  The main problem with tagmemics is that, while
> it helps you ask good questions, it doesn't give you easy answers for 'em...

Let me take a (feeble) crack at this:

It sounds like we're talking about something vaguely akin to C++'s
typecasting, where you treat an object of a given class as if it were
an object of a different class.  Another way to phrase this is that
you temporarily want to add role to the object.  "but" doesn't work
because you don't want the new role's default behavior to clobber
existing behavior that the object already has.  Perhaps "like"
instead, with the understanding that "$obj like Hash" means "try
$obj's dispatching first; if that doesn't work, try Hash's
dispatching".

The role in question needs to be an emulator, in that its methods
should have defaults that will make sense when mixed into the object
in question.  Therefore, Hash probably _wouldn't_ work, since Hash
probably isn't set up to work with $obj's internals.  You'd either
have to explicitly provide an appropriate emulator, or implicitly have
Hash find it (i.e., maintain a list of roles that do Hash, along with
a way to test each against $obj's class for compatability).  The
latter is probably a bit too much effort.

Or am I completely missing the point?

> But we'll not get true AI until a computer can understand a sentence like
>
>In a hole in the ground there lived a hobbit.
>
> as if it were a human.  A human has the ability to execute "new Hobbit"
> before "class Hobbit" is even defined!

The essence of this is that you don't need to know everything about
class Hobbit in order to make use of it.  As with Stevan Little's
reference to "lazy objects", you only need to know as much about
Hobbit as is to be used to complete your current task.  In this case,
you don't need to know _anything_ about a Hobbit, yet.  By the time
you _do_ need to know something about it (such as how to form a mental
image of one), the script will presumably have given you the
neccessary information.  If not, you're likely to say something like
"what's a Hobbit?"

a.k.a. "forward referencing".  :)

--
Jonathan Lang


Re: ff and fff [Was: till (the flipflop operator, formerly ..)]

2006-01-25 Thread Nicholas Clark
On Wed, Jan 25, 2006 at 02:49:51PM -0600, Jonathan Scott Duff wrote:
> On Wed, Jan 25, 2006 at 11:37:42AM -0800, Larry Wall wrote:
> > I've changed the flipflop operator/macro to "ff", short for "flipflop".
> 
> Two questions: 
> 
> 1) Will ff (and fff) require whitespace around them?
> 2) Do we get a more punctuationish unicode equivalent?

Sadly I can only find

1D191;MUSICAL SYMBOL FORTE;So;0;L;N;

It sems that fortissimo doesn't appear to have a single code point, let alone
fff

Nicholas Clark


Re: ff and fff [Was: till (the flipflop operator, formerly ..)]

2006-01-25 Thread Juerd
Jonathan Scott Duff skribis 2006-01-25 14:49 (-0600):
> 1) Will ff (and fff) require whitespace around them?

I hope it will be exactly like x and xx. They need whitespace around
them if otherwise it'd be part of an identifier. 

> 2) Do we get a more punctuationish unicode equivalent?

I fear someone will suggest the ff ligature.


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html


Re: ff and fff [Was: till (the flipflop operator, formerly ..)]

2006-01-25 Thread Jonathan Scott Duff
On Wed, Jan 25, 2006 at 11:37:42AM -0800, Larry Wall wrote:
> I've changed the flipflop operator/macro to "ff", short for "flipflop".

Two questions: 

1) Will ff (and fff) require whitespace around them?
2) Do we get a more punctuationish unicode equivalent?

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]


Re: ff and fff [Was: till (the flipflop operator, formerly ..)]

2006-01-25 Thread Rob Kinyon
On 1/25/06, Juerd <[EMAIL PROTECTED]> wrote:
> Patrick R. Michaud skribis 2006-01-25 13:47 (-0600):
> > On Wed, Jan 25, 2006 at 11:37:42AM -0800, Larry Wall wrote:
> > > I've changed the flipflop operator/macro to "ff", short for "flipflop".
> > > This has several benefits.  ...
> > ...another of which is that we can use "ff" and "fff" to mean "loud"
> > and "really loud" in our perl poetr^H^H^H^H^Hmusic.  :-)
>
> We need pp and ppp for balance.

/me wonders who signed up "The Little Einsteins"(tm) for P6l ...


Re: ff and fff [Was: till (the flipflop operator, formerly ..)]

2006-01-25 Thread Juerd
Patrick R. Michaud skribis 2006-01-25 13:47 (-0600):
> On Wed, Jan 25, 2006 at 11:37:42AM -0800, Larry Wall wrote:
> > I've changed the flipflop operator/macro to "ff", short for "flipflop".
> > This has several benefits.  ...
> ...another of which is that we can use "ff" and "fff" to mean "loud" 
> and "really loud" in our perl poetr^H^H^H^H^Hmusic.  :-)

We need pp and ppp for balance.


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html


Re: ff and fff [Was: till (the flipflop operator, formerly ..)]

2006-01-25 Thread Patrick R. Michaud
On Wed, Jan 25, 2006 at 11:37:42AM -0800, Larry Wall wrote:
> I've changed the flipflop operator/macro to "ff", short for "flipflop".
> This has several benefits.  ...

...another of which is that we can use "ff" and "fff" to mean "loud" 
and "really loud" in our perl poetr^H^H^H^H^Hmusic.  :-)

Pm



ff and fff [Was: till (the flipflop operator, formerly ..)]

2006-01-25 Thread Larry Wall
I've changed the flipflop operator/macro to "ff", short for "flipflop".
This has several benefits.  It's a doubled char like other short-circuit
operators.  It lets us add an "fff" to be equivalent to p5's scalar
... operator, and either of them can take the ^ modifiers to exclude
endpoints.  In trying to explain p5's flipflip operator, GrandFather
on perlmonks just abbreviated it as "f/f", so it seems pretty natural
that way.  Also, upon a bit of psychological reflection, it's probably
actually *good* for this operator to be an obscure one, because
the very readability of "till" would tend to give people the false
impression they know what's going on.  Much better to send them to
the manual to look up what "ff" means than to have them guessing wrong.
(And being alphabetic it's easier to look up than a doubled punctuation
character would be, if we had any punctuation characters to spare for
a rare operator, which we don't.)

Larry


Re: Perl 6 Summary for 2006-01-10 though 2006-01-24

2006-01-25 Thread Klaas-Jan Stol

Matt Fowles wrote:


  LuaNil Morphing
   Klaas-Jan Stol proffered a patch which changed LuaNil from a singleton
   and made it morph to other Lua types when asked. Warnock applies.

 

Actually, François Perrad applied this patch, but I think he only sent a 
reply to me.



   

  LuaTable Loving
   Klaas-Jan Stol also provided a patch making LuaTable more correct.
   Warnock applies.
 


Same here.

kjs