Re: The Inf type

2008-06-03 Thread Brandon S. Allbery KF8NH
On 2008 Jun 3, at 3:15, John M. Dlugosz wrote: Jon Lang dataweaver-at-gmail.com |Perl 6| wrote: type (i.e., 'num'). Somehow, I had got it into my head that Num was a role that is done by all types that represent values on the real number line, be they integers, floating-point, rationals,

Re: The Inf type

2008-06-03 Thread Brandon S. Allbery KF8NH
On 2008 Jun 3, at 4:19, John M. Dlugosz wrote: Jon Lang dataweaver-at-gmail.com |Perl 6| wrote: e g. Learn from the Haskell folks, who are still trying to untangle the mess they made of their numeric hierarchy (see http://haskell.org/haskellwiki/Mathematical_prelude_discussion). I'll

Re: assignable mutators (S06/Lvalue subroutines)

2008-05-26 Thread Brandon S. Allbery KF8NH
On 2008 May 26, at 10:19, TSa wrote: John M. Dlugosz wrote: I have similar thoughts. I'm thinking that some macros will aid in writing proper setters via a tie-like mechanism that don't require any core language changes, so it's not a real problem. That is, a reusable proxy class that

Re: Compile-time checking of assignment to read-only variables (Re:MMD distances)

2008-05-17 Thread Brandon S. Allbery KF8NH
On 2008 May 17, at 4:10, Carl Mäsak wrote: Whether we're risking the loss of important compiler optimizations by allowing overriding of variable RO-ness is not for me to say, that's up to the compiler writers around here. It seems to me you make it sound worse than it really is, that

Re: Compile-time checking of assignment to read-only variables (Re:MMD distances)

2008-05-15 Thread Brandon S. Allbery KF8NH
On 2008 May 15, at 1:30, Me Here wrote: John M. Dlugosz wrote: no strong_type_check :rw in scope can turn that off, in case you want to play dirty tricks. What is the point of be able to mark things readonly if the compiler does reject assignment attempts? (assuming you meant doesn't)

Re: parameters: ref vs rw

2008-05-10 Thread Brandon S. Allbery KF8NH
On 2008 May 10, at 21:46, John M. Dlugosz wrote: In S06, what is the difference between is ref and is rw? The text says that the rw may be converted to an lvalue, and that ref must already be. But what is that supposed to mean? At a guess, is rw makes a parameter variable into a local

Re: Minimal Distance (Re: Where is Manhattan Dispatch discussion?)

2008-05-07 Thread Brandon S. Allbery KF8NH
On 2008 May 7, at 4:21, TSa wrote: BTW, what is a flack? He's using flak (shrapnel; usual usage catching flak over ...) without understanding it. Coming back to how C++ handles static overloading. How is the sort order of (int *), (int ), (int), (const int *), (const int ), (const int),

Re: my TypeName $x;

2008-05-06 Thread Brandon S. Allbery KF8NH
On 2008 May 6, at 10:15, Jon Lang wrote: Signature? If so, what kind of object does the Signature object return if I ask it to give me its invocant? Surely not another Signature object? Whatever it is that Perl 6 returns in that case Turtle? :) -- brandon s. allbery

Re: All classes imply the existence of a role of the same name.

2008-05-03 Thread Brandon S. Allbery KF8NH
On 2008 May 3, at 6:25, Richard Hainsworth wrote: - if u want to add a role to an existing object, perl wraps the object into a class, adds the role, reinstantiates the object. As I understand it, Perl inserts a new anonymous class as the object's parent, and adds the role to that. The

Re: treatment of isa and inheritance

2008-05-02 Thread Brandon S. Allbery KF8NH
On 2008 May 2, at 5:50, TSa wrote: Brandon S. Allbery KF8NH wrote: It occurs to me that this shouldn't be new keywords, but adverbs, i.e. ``is :strict Dog''. Great idea! But aren't named args required to be after required ones? I was guessing, I still haven't had a chance to mindmeld

Re: treatment of isa and inheritance

2008-04-30 Thread Brandon S. Allbery KF8NH
On Apr 30, 2008, at 8:43 AM, TSa wrote: John M. Dlugosz wrote: isa as a synonym for is that turns on warnings is documented at the end of my paper under Concepts discussed in this paper that are not on the Synopses. I totally agree! Using 'isa' pulls in the type checker. Do we have the

Re: treatment of isa and inheritance

2008-04-30 Thread Brandon S. Allbery KF8NH
On Apr 30, 2008, at 15:14 , Jon Lang wrote: Brandon S. Allbery KF8NH wrote: It occurs to me that this shouldn't be new keywords, but adverbs, i.e. ``is :strict Dog''. On a side note, I'd like to make a request of the Perl 6 community with regard to coding style: could we please have

Re: treatment of isa and inheritance

2008-04-30 Thread Brandon S. Allbery KF8NH
On Apr 30, 2008, at 15:14 , Jon Lang wrote: only is is :strictly Dog more legible, but it leaves room for the possible future inclusion of adjective-based syntax such as big Dog It occurs to me that we already have this: we call them types. -- brandon s. allbery

Re: First look: Advanced Polymorphism whitepaper

2008-04-30 Thread Brandon S. Allbery KF8NH
On May 1, 2008, at 0:53 , chromatic wrote: correctness sense. Sadly, both trees and dogs bark.) Hm, no. One's a noun, the other's a verb. Given the linguistic orientation of Perl6, it seems a bit strange that the syntax for both is the same: while accessors and mutators are

Re: First look: Advanced Polymorphism whitepaper

2008-04-30 Thread Brandon S. Allbery KF8NH
On May 1, 2008, at 1:30 , Jon Lang wrote: On Wed, Apr 30, 2008 at 9:58 PM, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: On May 1, 2008, at 0:53 , chromatic wrote: correctness sense. Sadly, both trees and dogs bark.) Hm, no. One's a noun, the other's a verb. Given

Re: First look: Advanced Polymorphism whitepaper

2008-04-30 Thread Brandon S. Allbery KF8NH
On May 1, 2008, at 1:46 , Larry Wall wrote: On Thu, May 01, 2008 at 01:34:45AM -0400, Brandon S. Allbery KF8NH wrote: On May 1, 2008, at 1:30 , Jon Lang wrote: In defense of chromatic's point, both people and syrup run. But there *is* some commonality there, to the extent that both

Re: Context and return types question

2008-04-21 Thread Brandon S. Allbery KF8NH
On Apr 21, 2008, at 9:39 , John M. Dlugosz wrote: TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: I think the type is just :( $: :named$ ) if you want to extract the invocant with a $ prefix. Otherwise it would be :( $, :named $ ) and you extract the item positionally with prefix @ or

Re: Chained Comparisons ?

2008-04-16 Thread Brandon S. Allbery KF8NH
On Apr 16, 2008, at 3:49 , John M. Dlugosz wrote: Or, are the operators written in a tricky way, to return an object that encapsulates the original right argument and the proper boolean result, and has forms to take this object as well? IOW, no built-in support. Yes, they use

Re: static types, checking, conversions

2008-04-16 Thread Brandon S. Allbery KF8NH
On Apr 16, 2008, at 3:44 , TSa wrote: I found two dissertations and a couple of papers about typing JavaScript. The quintessential is that optional typing is defined as having *no* impact on the dynamic behavior of the program. In that respect type annotations are like comments. I doubt that

Re: Q on function returning

2008-04-13 Thread Brandon S. Allbery KF8NH
On Apr 13, 2008, at 1:20 , John M. Dlugosz wrote: So, what is the role of the inner and outer return types that are declared on the function? While some details have changed since then, you might want to review this thread:

Re: Idea: infir types of constants

2008-04-13 Thread Brandon S. Allbery KF8NH
On Apr 13, 2008, at 2:02 , John M. Dlugosz wrote: In Perl 6, I think you would have to arrange to write the return type later rather than sooner to do this: sub foo (::T $a, T $b) is of T and writing it the other way around would violate the one-pass parsing. Just from looking at

Re: Nomenclature Question - BEGIN etc.

2008-04-10 Thread Brandon S. Allbery KF8NH
On Apr 10, 2008, at 13:29 , John M. Dlugosz wrote: I might have misremembered, but i thought labels were followed by a colon in Perl 6. A quick scan of the docs... It is illegal for a provisional subroutine call to be followed by a colon postfix, since such a colon is allowed only on an

Re: Nomenclature Question - BEGIN etc.

2008-04-10 Thread Brandon S. Allbery KF8NH
On Apr 10, 2008, at 18:58 , Bob Rogers wrote: From: Larry Wall [EMAIL PROTECTED] Date: Thu, 10 Apr 2008 14:00:53 -0700 On Thu, Apr 10, 2008 at 03:41:19PM -0500, John M. Dlugosz wrote: Well, lessee. The Common Lisp spec calls them situations in the definition of (eval-when)...

Re: postfix and postcircumfix

2008-04-06 Thread Brandon S. Allbery KF8NH
On Apr 6, 2008, at 12:07 , John M. Dlugosz wrote: Larry Wall larry-at-wall.org |Perl 6| wrote: and think you've gotten anywhere, since you'd then have to rewrite it again: $foo.postcircumfix:( ).postcircumfix:( ).($bar) $foo.postcircumfix:( ).postcircumfix:( ).postcircumfix:( )

Re: Easy question: what is a list comprehension ?

2008-04-05 Thread Brandon S. Allbery KF8NH
On Apr 5, 2008, at 15:07 , John M. Dlugosz wrote: What is a list comprehension? I've seen that term bantered around here. The term comes from Haskell and Python; it's a shorthand notation for list generation and filtering. [x | x - some expression involving y, y = some range

Re: muse on Compact Structs, pack/unpack

2008-04-01 Thread Brandon S. Allbery KF8NH
On Apr 1, 2008, at 6:13 , John M. Dlugosz wrote: Meanwhile, how do I use it? my Buf $temp = $record; $stream.print ($temp); $stream.print (Buf $record); $stream.print($record.pack) # I would think? -- brandon s. allbery

Re: muse on Compact Structs, pack/unpack

2008-04-01 Thread Brandon S. Allbery KF8NH
On Apr 1, 2008, at 13:25 , John M. Dlugosz wrote: Brandon S. Allbery KF8NH allbery-at-ece.cmu.edu |Perl 6| wrote: $stream.print (Buf $record); $stream.print($record.pack) # I would think? A .pack member function on a Compact struct is indeed my first gut feeling, but at the end

Re: [svn:perl6-synopsis] r14515 - doc/trunk/design/syn

2008-02-23 Thread Brandon S. Allbery KF8NH
Hm, I see a minor nit... On Feb 23, 2008, at 12:40 , [EMAIL PROTECTED] wrote: +A Cproto may share dispatch with multis declared after it in the same scope, -^^ but in that case it functions only as the final tie-breaker if the inner multies can't

Re: pluralization idea that keeps bugging me

2008-02-09 Thread Brandon S. Allbery KF8NH
On Feb 9, 2008, at 11:43 , Richard Hainsworth wrote: I posted an idea about pluralisation could be handled in a way that would not be English-centric (Subject: interpolation contextualisation). There were no responses to the idea. Was it so bad? Did no one see it? Was it too un-perlish?

Re: Definition of Order in S29

2008-01-24 Thread Brandon S. Allbery KF8NH
On Jan 24, 2008, at 23:23 , Darren Duncan wrote: I'd be more interested in hearing what precedents if any exist in this regard. What do other languages call the same concepts? data Ord = LT | EQ | GT -- Haskell -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]

Re: Switch/Given and English, Was perl 6 grammar

2007-12-08 Thread Brandon S. Allbery KF8NH
On Dec 8, 2007, at 9:06 , Richard Hainsworth wrote: or not quite right. And there is absolutely no linguistic link between 'switch' and 'case'. If I am uncomfortable with 'switch', 'case' really sucks. In fact, whenever I work in language other than perl, and 'switch' is the preferred

Re: propose renaming Hash to Dict

2007-06-01 Thread Brandon S. Allbery KF8NH
On Jun 1, 2007, at 5:44 , Thomas Wittek wrote: Larry Wall: Nope. Hash is mostly about meaning, and very little about implementation. Please don't assume that I name things according to Standard Names in Computer Science. I name things in English. Hash is just something that is

Re: S12: can(), signatures and casting

2007-04-29 Thread Brandon S. Allbery KF8NH
On Apr 29, 2007, at 6:42 , Jonathan Lang wrote: In effect, the signature gets attached as a property of the string, and 'can()' checks for the signature property. The only problem that I have with this idea is that I can't think of any uses for a signatory string outside of '.can()'. Maybe

Re: [svn:perl6-synopsis] r14382 - doc/trunk/design/syn

2007-04-25 Thread Brandon S. Allbery KF8NH
Minor typo? On Apr 25, 2007, at 1:06 , [EMAIL PROTECTED] wrote: Run-time mixins are done with Cdoes and Cbut. The Cdoes binary operator is a mutator that derives a new anonymous class (if necessary) and binds the object to it: $fido does Sentry -The Cdoes operator is

Re: What should file test operators return?

2007-04-13 Thread Brandon S. Allbery KF8NH
On Apr 12, 2007, at 14:52 , brian d foy wrote: At the moment the file test operators that I expect to return true or false do, but the true is the filename. I expected a boolean, for no other reason than Perl 6 has them so it might as well use them. This is documented somewhere already.

Re: What should file test operators return?

2007-04-13 Thread Brandon S. Allbery KF8NH
On Apr 13, 2007, at 9:04 , brian d foy wrote: In article [EMAIL PROTECTED], Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: File tests are supposed to return something which: - behaves as a Bool - stringifies as a filename - numifies as a file size or as a time, if appropriate

Re: File test operators as Pairs

2007-04-13 Thread Brandon S. Allbery KF8NH
On Apr 13, 2007, at 20:09 , Jonathan Lang wrote: What does pair notation buy us that quoted-postfix notation doesn't already cover? I don't think it does. What it does buy is that the *unquoted* notation works: the definition of Perl6's grammar turns out to lead to `-f' and `- f'

Re: [svn:perl6-synopsis] r13570 - doc/trunk/design/syn

2007-02-05 Thread Brandon S. Allbery KF8NH
On Feb 5, 2007, at 17:26 , [EMAIL PROTECTED] wrote: +This can be viewed as a form of multiple dispatch, except that it's +based on longest-token matching rather than signature matcing. The matcing? -- brandon s. allbery[linux,solaris,freebsd,perl] [EMAIL PROTECTED] system

Re: [svn:perl6-synopsis] r13545 - doc/trunk/design/syn

2007-01-29 Thread Brandon S. Allbery KF8NH
On Jan 29, 2007, at 17:06 , [EMAIL PROTECTED] wrote: +absense of context propagation by the optimizer). The value returned Minor spelling nit: absence -- brandon s. allbery[linux,solaris,freebsd,perl] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAIL

Re: List assignment question

2006-11-15 Thread Brandon S. Allbery KF8NH
On Nov 15, 2006, at 12:04 PM, Mark J. Reed wrote: On 11/14/06, Vincent Foley [EMAIL PROTECTED] wrote: I was toying around with Pugs and I tried the following Perl 5 list assignment my ($a, undef, $b) = 1..3; Huh. I didn't think that worked in Perl 5, either. What am I

<    1   2