Re: run-once code

2004-01-14 Thread David Storrs
On Wed, Jan 14, 2004 at 11:57:05AM +, Richard Nuttall wrote: > How about > > $test = sub > { > if ( some_expensive_lookup_function() >= $MAX_RECORDS ) > > mark_that_we_have_reached_max_records(); > >$test = sub{}; > }; > > Then call &$test() as needed; Neat.

Re: Semantics of vector operations

2004-02-02 Thread David Wheeler
Emacs to properly display Unicode characters? I expect that others on the list could benefit, too. Cheers, David

Re: Semantics of vector operations

2004-02-03 Thread David Wheeler
since that simply didn't work, I'm going to assume it was some kind of joke. :-) Am I right? David

Unicode in Emacs (was: Semantics of vector operations)

2004-02-03 Thread David Wheeler
rse. You may need to set your $LANG environment variable to a suitable value (I use "en_US.UTF-8"). I'm on Mac OS X. The fonts I use show most Unicode characters correctly when I use them in TextEdit... Thanks, David

Re: Funky «vector» operator

2004-03-20 Thread David Wheeler
x27;m using 21.3.50.2, which doesn't have mule). Do you know how to make it display Unicode characters, Karl? Thanks, David

Re: Funky «vector» operator

2004-03-22 Thread David Wheeler
Mule, because, AFAICT, Emacs in CVS has removed it in favor of something else. I'll post to the Emacs developer list to see if I can get any joy there. Regards, David

Re: Funky «vector» operator

2004-03-22 Thread David Wheeler
fy-frame-parameters (selected-frame) '((font . "fontset-courier14") (pushnew (lambda (frame) (modify-frame-parameters frame '((font . "fontset-courier14" after-make-frame-functions) No joy: An

Re: Funky «vector» operator

2004-03-22 Thread David Wheeler
hat I hear back from the Emacs developers. In the meantime, there's TextEdit. Thanks, David

Re: Funky «vector» operator

2004-03-23 Thread David Wheeler
On Mar 22, 2004, at 10:36 PM, David Wheeler wrote: I'll wait and see what I hear back from the Emacs developers. In the meantime, there's TextEdit. I've heard back that it may be that Unicode support simply isn't included in the Carbonized version of Mac OS X. They p

Compatibility with perl 5

2004-04-13 Thread David Cantrell
ch a null-op pragma were to go into the next perl 5.8.x release people could start preparing their existing code for perl 6 right now. Which is surely a Good Thing. And of course if the pragma were to also be available to download seperately from the CPAN people still using older 5.x releases could still use it. -- David Cantrell

Re: Compatibility with perl 5

2004-04-13 Thread David Cantrell
On Tue, Apr 13, 2004 at 02:27:08PM +0200, Juerd wrote: > David Cantrell skribis 2004-04-13 13:16 (+0100): > > Perl 6, we are promised, will try to run "legacy" code unchanged. How > > will it spot such legacy code? Doing this reliably is a hard problem, > > but we

Re: Compatibility with perl 5

2004-04-13 Thread David Cantrell
n a package, then start > it with "package main". This is something that should be brought to a wider audience cos then you won't get more people like me wandering in and asking silly questions. I shall write something up for perlmonks tomorrow. -- David Cantrell | Official London Perl Mongers Bad Influence

Re: backticks

2004-04-14 Thread David Storrs
On Wed, Apr 14, 2004 at 10:06:23PM +0200, Juerd wrote: > > If on your keyboard ` is in a worse place than {}, I'd like to know > where it is. > > Juerd Very top row, one space right of the F12 key. Extremely awkward. (This is a US keyboard on a Dell Inspiron 5100 laptop.) Please put me down a

Re: backticks

2004-04-15 Thread David Storrs
On Thu, Apr 15, 2004 at 11:45:27AM +0200, Juerd wrote: > David Storrs skribis 2004-04-14 22:39 (-0700): > > Very top row, one space right of the F12 key. Extremely awkward. > > (This is a US keyboard on a Dell Inspiron 5100 laptop.) > > That is inconvenient. Yup. > >

Re: backticks

2004-04-16 Thread David Wheeler
like this: for my $i (0..$#thingies) { my $css_class = $i % 2 ? 'blue' : 'yellow'; print "$thingies[$i]\n"; } Pretty useful, actually. Regards, David

Re: backticks

2004-04-16 Thread David Wheeler
On Apr 16, 2004, at 10:14 AM, Juerd wrote: Even with the "xx Inf"? Why? Oh, right, missed that. Sorry. David

Re: backticks

2004-04-17 Thread David Storrs
Folks, this discussion seems to be spinning. All the points, on both sides, have been made and are being repeated with only slight variation. We've all made our cases--why don't we drop the issue for a while and let Larry ruminate? I think we can all agree that he will give the idea a fair heari

Re: Apocalypse 12

2004-04-17 Thread David Storrs
On Fri, Apr 16, 2004 at 05:30:01PM -0700, chromatic wrote: > Perl.com has just made A12 available: > > http://www.perl.com/pub/a/2004/04/16/a12.html > > Warning -- 20 pages, the first of which is a table of contents. > > Enjoy, > -- c It's here, it's here, it's he!! *

Re: Periodic Table of the Operators

2004-05-27 Thread David Landgren
://www.ozonehouse.com/mark/blog/code/PeriodicTable.html Nice. Now to find a large enough printer to be able to pin it up on the wall. One minor quibble, in the "Quasi Operators" section there's a typo: s/Anonamizer/Anonymizer/ David - Mark Mark Lentczner http://www.ozonehouse.com/

Re: [Poop-group] Perl 6 Periodic Table of the Operators

2004-06-01 Thread David Nicol
So is he going to backport his representational ideography to the operators of perl 5.8? Darren Duncan wrote: Mark Lentczner has just (on May 26/28) created a useful/humerous graphical diagram of the 100+ operators in the Perl 6 language, designed to look like the periodic table of atomic element

Re: FW: Periodic Table of the Operators

2004-06-07 Thread David Cantrell
to type and . This is what is so wrong about allowing unicode operators - yes, I don't need to write them, but if some other programmer writes one I have to be able to read it. And I can't. -- David Cantrell | Reprobate | http://www.cantrell.org.uk/david When a man is tir

Re: FW: Periodic Table of the Operators

2004-06-07 Thread David Cantrell
Mark J. Reed wrote: On 2004-06-07 at 21:33:03, David Cantrell wrote: This is what is so wrong about allowing unicode operators - yes, I don't need to write them, but if some other programmer writes one I have to be able to read it. And I can't. Well, for one thing, just because your ema

Re: FW: Periodic Table of the Operators

2004-06-08 Thread David Cantrell
On Tue, Jun 08, 2004 at 11:30:51AM +0100, Tim Bunce wrote: > On Mon, Jun 07, 2004 at 10:52:32PM +0100, David Cantrell wrote: > > But when I'm using a > > terminal session, I have found that the only practical way of get

Re: Apocalypse 6: IDs of subroutine wrappers should be objects

2004-06-08 Thread David Storrs
On Tue, Jun 08, 2004 at 01:08:13PM -, Ingo Blechschmidt wrote: > Hello, > > quoting Apocalypse 6: > > You may ask a subroutine to wrap itself up in another subroutine in > > place, so that calls to the original are intercepted and interpreted by > > the wrapper, even if access is only through

Re: FW: Periodic Table of the Operators

2004-06-13 Thread David Storrs
On Sun, Jun 13, 2004 at 03:40:27AM +0200, Pedro Larroy wrote: > What advantages have to use characters not in standard keyboards? Isn't > it a little scary? Well, what do you consider a 'standard' keyboard? The zip operator/Yen sign probably appears on most keyboards in Japan, but on very few i

Re: definitions of truth

2004-06-25 Thread David Storrs
On Thu, Jun 24, 2004 at 12:43:30PM -0700, Scott Bronson wrote: > > So, in summary, though "0"==false appears to work, it leads to a number > of strange boundary conditions and, therefore, bugs. It's hard for new > programmers to grasp and even old hacks are still sometimes tripped up > by it. It

Re: if, loop, and lexical scope

2004-06-28 Thread David Storrs
On Sun, Jun 27, 2004 at 03:16:11PM -0600, Luke Palmer wrote: > > But anyway, if you still want to be old school about it, then you'll end > up not caring about the scope of your $i. Really you won't. And you'll > be happy that it was kept around for you once you decide you want to > know the val

Re: undo()?

2004-07-01 Thread David Storrs
On Tue, Jun 29, 2004 at 05:31:29PM -0600, Luke Palmer wrote: > Oh no! Someone doesn't understand continuations! How could this > happen?! :-) > > You need two things to bring the state of the process back to an earlier > state: undo and continuations. People say continuations are like time >

Re: if not C<,> then what?

2004-07-02 Thread David Storrs
On Thu, Jul 01, 2004 at 04:14:37PM -0700, Jonathan Lang wrote: > Juerd wrote: > > If you're really enamoured with the infix operator syntax, consider this > possibility: > > sub infix:-> ($before, $after) { > $before; # is this line redundant? > return $after; > } > print $

Re: C C and lazyness

2004-07-04 Thread David Storrs
On Sat, Jul 03, 2004 at 01:02:34AM -0600, Luke Palmer wrote: > But indeed there are cases where it is a problem: > > my $x = 2; > sub mklist () { > return map { 2 * $_ } 0..10; > } > > my @list = mklist; > say @list[0..4]; # 0 2 4 6 8 > $x = 1; > say @list;

Re: fast question

2004-07-07 Thread David Storrs
On Tue, Jul 06, 2004 at 06:39:07PM -0600, Luke Palmer wrote: > Matija Papec writes: > > > > Would there be a way to still use simple unquoted hash keys like in old > > days ($hash{MYKEY})? > > Of course there's a way to do it. This is one of those decisions that I > was against for the longest

Re: push with lazy lists

2004-07-13 Thread David Green
t, it would take a bit longer for your program to run, but that's a performance issue for them to sort out on *-internals. -David "sure Moore's Law will deal with it in a year or two" Green

Re: The .bytes/.codepoints/.graphemes methods

2004-07-13 Thread David Green
abbreviation, though I don't really know what to do with language_ dependent_thingummies. Though with less typing, the initials b < c < g < l give the same progression. -David "except for encodings where c

Re: push with lazy lists

2004-07-14 Thread David Storrs
On Wed, Jul 14, 2004 at 07:40:33AM +0200, Ph. Marek wrote: > > To repeat Dave and myself - if > @x = 1 .. Inf; > then > rand(@x) > should be Inf, and so > print $x[rand(@x)]; > should give Inf, as the infinite element of @x is Inf. Does it even make sense to take the Infiniteth

Re: String interpolation

2004-07-21 Thread David Manura
Two points, if I may jump in here: (1) If the interpolation rule is to be simple as suggested, why not impose this rule: "A character (except for a backslash) is interpreted literally if it is not preceeded by a backslash." For example, "The value is \$foo.bar()." --> "The value is 3." "T

Re: :)

2004-07-22 Thread David Storrs
On Sat, Jul 17, 2004 at 06:23:50PM -0400, Austin Hastings wrote: > > On Saturday, 17 July, 2004 01:53 Sat, Jul 17, 2004, Juerd wrote: > > > > Do we have a :) operator yet? > > It's an adverbial modifier on the core expression type. Does > nothing, but it acts as a line terminator when nothing but

Re: Why do users need FileHandles?

2004-07-22 Thread David Storrs
On Sun, Jul 18, 2004 at 05:36:58PM -0700, Dave Whipp wrote: > truncate Vs append would be infered from usage (assign => truncate). One > might be able to infer read Vs write in a similar way -- open the file based > on the first access; re-open it (behind the scenes) if we write it after > reading

Re: Why do users need FileHandles?

2004-07-22 Thread David Storrs
On Sun, Jul 18, 2004 at 08:39:09PM -0500, Rod Adams wrote: > Case 1: > So I wanted to do a read/write scan, so I create my TextFile, start > reading in data, so the file is opened for reading. Then, I come to the > part where I want to update something, so I do a write command. Suddenly > the f

Re: Why do users need FileHandles?

2004-07-22 Thread David Storrs
On Mon, Jul 19, 2004 at 03:37:12PM -0500, Rod Adams wrote: > I think part of the "mental jam" (at least with me), is that the > read/write, exclusive, etc, are very critical to the act of opening the > file, not only an after the fact restriction on what I can do later. If > I cannot open a fil

Re: String interpolation

2004-07-22 Thread David Storrs
On Wed, Jul 21, 2004 at 04:37:29PM -0700, Larry Wall wrote: > No Yes > -- --- > @foo@foo[1] > %bar%bar{"a"} or %bar«a» > $foo.bar$foo.bar() > &foo &foo(1) > > In this worldview, $foo is an exception only because it doesn't natural

Re: Why do users need FileHandles?

2004-07-22 Thread David Green
the other, and they'd both be commonly used, so I think they both need to be readily available. In fact, my general attitude towards random feature $foo is: useful to lots of people who want to use it + not harmful to people who don't = put it all in the core. -David "at least until starting perl begins to take longer than your coffee break" Green

Re: Why do users need FileHandles?

2004-07-24 Thread David Storrs
On Sat, Jul 24, 2004 at 02:23:10PM -0700, Brent 'Dax' Royal-Gordon wrote: > Jonadab the Unsightly One wrote: > > >Oh, and here's me resisting the urge to suggest that use ought to > >automatically install from the CPAN anything that isn't present, as a > >core behavior right out of the box. > > S

Re: Why do users need FileHandles?^H^H^H^H^HCore modules?

2004-07-26 Thread David Green
te rewrite for P5, right? So this would actually be Third System Syndrome, and thus we've nothing to worry about. (I'm not worried, anyway.) -David "impatient, maybe, but not worried" Green

Re: String interpolation

2004-07-26 Thread David Green
tes could actually be quite useful. They're a twistier, more complex version of plain old straight quotes, but most interestingly they come in left-handed and right-handed versions. So you might nest them to indicate alternating literal and interpolated values. Erm... or maybe not. But I'm sure there's some way to put them to good use. - David ³wondering how likely curly-quotes are to come out right² Green

Re: Why do users need FileHandles?

2004-08-13 Thread David Storrs
On Sat, Aug 07, 2004 at 03:55:21PM +0100, Nicholas Clark wrote: > On Sat, Jul 24, 2004 at 02:50:18PM -0700, David Storrs wrote: > > #!/usr/bin/perl6 > > #!/usr/bin/perl I stated perl6 explicitly to be, well, explicit. > > #use warnings; # Note that I am NOT explicitly

Re: Why do users need FileHandles?

2004-08-14 Thread David Storrs
On Fri, Aug 13, 2004 at 10:53:02AM +0100, Nicholas Clark wrote: > On Wed, Aug 11, 2004 at 03:25:20PM -0700, David Storrs wrote: > > On Sat, Aug 07, 2004 at 03:55:21PM +0100, Nicholas Clark wrote: > > > > However, Acme::Intraweb hasn't been updated for a while, whereas

Re: Synopsis 2 draft 1

2004-08-15 Thread David Wheeler
e you need to keep it as C, then I personally really don't mind using C for the iterator method. Just my $0.02. Regards, David smime.p7s Description: S/MIME cryptographic signature

Re: Revision of A12's lookahead notions

2004-08-17 Thread David Storrs
On Tue, Aug 10, 2004 at 11:07:59AM -0700, Larry Wall wrote: > > 2) In the absence of evidence to the contrary, methods always > assume they have *no* arguments. For methods: > > 2a) A method not followed by a left paren or colon has no > arguments. Just checking--whitespace

Re: Synopsis 2 draft 1

2004-08-18 Thread David Green
e the result. XXX .repr is what Python calls it, I think. >Is there a better name? Hm, sounds like kind of a reverse-eval. ".lave", when you want a nice, clean representation of your values! - David "hey, I could've suggested .deval" Green

Re: Synopsis 2 draft 1 -- each and every

2004-08-19 Thread David Green
On 8/15/04, [EMAIL PROTECTED] (David Wheeler) wrote: >On Aug 14, 2004, at 5:52 PM, Larry Wall wrote: >>for all $*IN # all() is junction >>for each $*IN # each method wants closure if we follow Ruby >>for next $*IN # next $foo is a loop exit > >Hmm. M

Re: Synopsis 2 draft 1 -- each and every

2004-08-19 Thread David Green
On 8/19/04, [EMAIL PROTECTED] (David Green) wrote: > >On Aug 14, 2004, at 5:52 PM, Larry Wall wrote: > > >>for all $*IN # all() is junction > >>for each $*IN # each method wants closure if we follow Ruby > >>for next $*IN # next $foo is a loop ex

Re: Return with no expression

2004-08-19 Thread David Wheeler
as an example. The behavior would exist with any subroutine that used C. It would be nice if Perl thought that => was scalar context for the expression that follows it. But then it wouldn't be just like a comma, would it? Regards, David smime.p7s Description: S/MIME cryptographic signature

Re: Return with no expression

2004-08-19 Thread David Wheeler
it by this all the time myself. But even more helpful would be if C<< => >> enforced a scalar context in Perl 5, too. Regards, David smime.p7s Description: S/MIME cryptographic signature

Re: Synopsis 2 draft 1 -- each and every

2004-08-20 Thread David Green
On 8/19/04, [EMAIL PROTECTED] (Luke Palmer) wrote: >David Green writes: > > Hang on -- should we be saying "for each $foo" or "for $foo.each" > > anyway? We don't say "for @foo.each"; the iteration is implicit. So > > I'm thinking i

Re: Synopsis 2 draft 1 -- each and every

2004-08-20 Thread David Green
ft or .splice, how about a table that looks like >this: [.pull's and .value's] I like the idea of being able to distinguish destructive from non-d. behaviour when I need to. But a lot of the time I don't care -- I wouldn't want to have to specify whether I'm pulling or val

Re: Synopsis 2 draft 1 -- each and every

2004-08-21 Thread David Green
t;; } # hm, what about void context? # (should probably iterate once, like scalar context) } } Or can you define separate methods for scalar and list contexts, and have Perl call whichever one is appropriate? (Which would be neat... polymorphism from the other end.) -David "polly going crackers" Green

Progressively Overhauling Documentation

2004-08-23 Thread David Green
t gonna happen -- unless you actually contribute something yourself, in which case Show Us the Code, mister!" But hey, rousing a bit of rabble is easy, and there's always the possibility that someone really clever will come up with an idea that is brilliant *and* feasible. - David "what's up, docs" Green

Re: Progressively Overhauling Documentation

2004-08-23 Thread David Green
n section, or "pdoc Freudian::Slip &foo" to display just the info from a particular sub (class/method/variable/etc.). And then if POD(??) had some sort of "=lookup &foo" directive, you could have a particular piece of documentation displayed somewhere other than where the code & docs themselves are. - David "that seems simpler than I expected" Green

bidirectional iterators

2004-08-23 Thread David Storrs
There has been a lot of discussion in the other threads lately about iterators. I was wondering if there will be an easy way to create a bidirectional iterator? Toy example to show what I'm thinking: for(1..10) { next if /7/; # always skip 7 prev if 9 && !rand 3; # occasionally

The first shall be first (was "Re: parameter contexts (was: Synopsis 9 draft 1)")

2004-09-04 Thread David Green
, unless you can do something like "($n)th but backwards" ... eh, which may not be worth it.)) I actually found things I liked in pretty much all the suggested alternatives, but none of them reached out and grabbed me by the throat the way "nth" did. It just seems more Perlish. - David "just reali[sz]ed that in England @floor[1st] is the second, but is hoping nobody else notices" Green

Re: The first shall be first (was "Re: parameter contexts (was: Synopsis 9 draft 1)")

2004-09-04 Thread David Green
g with the first==nth(1) and go up to the last=nth(0)=nth: because counting from the front is likely to happen more often than counting from the end; and because 1st(0) gives us a symmetrical counterpart to nth(0). -David "nth degrees of exasperation" Green

Re: The last shall be last (was: The first shall be first)

2004-09-04 Thread David Green
#x27;th> as well as C<1st>, C<2nd>, C<3rd>, etc. Where else? >Would there be any use for C[.3rd], frex? I guess there isn't so much need for a relative index into a file... unless maybe you've got some bad sectors and the data doesn't start until the fifth line. =) Of course, there's a resonance with the whole iterator thing... -David "but that's still making my head go 'round and around [ha]" Green

Re: The first shall be first (was "Re: parameter contexts (was: Synopsis 9 draft 1)")

2004-09-04 Thread David Green
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Luke Palmer) wrote: >sub wn($n) { $n ?? wn($n-1)+1 :: $w } >$w2 = 0... + wn«0...; >assert($w2 == $w*2); >Just think of the possibilities! :-) Hm. Needs more Unicode. =) >Seriously though, putting 1st, 2nd, nth, etc. in the langua

Re: The last shall be last (was: The first shall be first)

2004-09-04 Thread David Green
either end, and then only to add >to it. I would expect that to work like @foo[$last+2]=$bar does in Perl 5 -- adds an undef value for @foo[$last+1] and $bar after that. I was going to suggest that ordinals wrap around and cardinals "stick out", but that's probably just begging for subtle confusing errors. - David "eh, just use Inf-based arrays, then wrapping and sticking out amount to the same thing" Green

Iterators and C

2004-09-09 Thread David Wheeler
of the things that the presenters said was typical idiomatic Ruby was the use of blocks (I think that's what they called them) with iterators, such that you almost *never* see the use of C in Ruby. Might a similar thing happen with Perl 6 code blocks and iterators? Regards, David

Re: Reverse .. operator

2004-09-10 Thread David Storrs
On Fri, Sep 03, 2004 at 08:09:23AM -0400, Joe Gottman wrote: > > > > -Original Message- > > From: Larry Wall [mailto:[EMAIL PROTECTED] > > Sent: Thursday, September 02, 2004 8:41 PM > > To: Perl6 > > Subject: Re: Reverse .. operator > > > > On Thu, Sep 02, 2004 at 08:34:22PM -0400, Joe G

Ordinals, Hashes, and Arrays, oh my

2004-09-10 Thread David Green
neral, they're probably actually the base type, rather than "Struct", which does sound kinda silly, and probably sounds sillier if you're not used to C.) I was also going to suggest an in-between type of structure, like a Collection in VB, that accepts anything for the key (or some useful restricted type?) but is ordered (in order of when elements were added). But I can't think of any character available for the sigil. =) - David "making a hash of things" Green

Re: Ordinals, Hashes, and Arrays, oh my

2004-09-10 Thread David Green
On 2004/9/10, [EMAIL PROTECTED] (David Green) wrote: >If we consider a generic "data structure" type (which may or may not be >optimised under the hood for integral indices), then why shouldn't {} be >the "index-by-name" interface, and [] the "index-by-or

Re: Still about subroutines...

2004-09-17 Thread David Wheeler
On Sep 17, 2004, at 12:06 PM, Larry Wall wrote: I originally made them lowercase because they were $=line variables and I didn't want them to conflict with POD names that are typically uppercase, and use of an C<=> secondary sigil for POD is a no-brainer. s/uppercase/lowercase/ ? David

Re: Still about subroutines...

2004-09-17 Thread David Wheeler
tem type verbs you're concerned with... Thanks, David

Re: S13: Deep operators

2004-11-24 Thread David Ross
ol flow graph. Sorry if this is off topic or dated. I have recently return to developing in PERL struggling to catch up. The conceptual and concrete progress is awesome. david

Re: S13: Deep operators

2004-11-29 Thread David Ross
On Thu, 2004-11-25 at 05:29, Michele Dondi wrote: > > On Wed, 24 Nov 2004, David Ross wrote: > > > I have been studying PERL 5 core and modules to identify options and > > issues for meta-architectures and automated code generation. PERL 6 > > documents and discussio

Re: Hyper Here-Docs? (was: Re: angle quotes for here-docs ?)

2004-11-30 Thread David Christensen
with the perl 5: sub mysub($x) { return sub { $x }; # the sub{$x} is the construct } ? David

Re: Angle quotes and pointy brackets

2004-11-30 Thread David Wheeler
On Nov 30, 2004, at 2:23 PM, Larry Wall wrote: Correct. The p5-to-p6 translator will turn any while () {...} into for @$handle {...} I assume that each value would be still fetched from the file handle lazily, yes? Regards, David

Re: Angle quotes and pointy brackets

2004-11-30 Thread David Wheeler
On Nov 30, 2004, at 2:46 PM, Larry Wall wrote: : I assume that each value would be still fetched from the file handle : lazily, yes? Um, that was the question my "Correct" was answering. D'oh! Sorry. David

Re: Angle quotes and pointy brackets

2004-12-01 Thread David Green
that the double guillemets should do twice as much (identify AND capture). That might be simply because I'm not used to it, though. Either way, I know I really like being able to drop the parentheses when capturing like that. Overall, I think the new proposal is an improvement. -David «foo» Green

Iteration Again (was «Re: Angle quotes and pointy brackets»)

2004-12-01 Thread David Green
up the file right now, can't we use our flattening splatter? (for [EMAIL PROTECTED] ...) >And what about iterators in general? Well, if we can do it to >filehandles, why not all iterators? An iterator is simply a lazy >array copy that isn't accessed randomly; Or maybe a la

Re: Angle quotes and pointy brackets

2004-12-01 Thread David Green
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Smylers) wrote: >David Green writes: >> I'm not even sure what those double-quotation marks are doing -- [...] >Look back at how Larry defined the guillemets: [...] >So the double-quotes in there are "shell-like

Re: specifying the key Type for a Hash

2004-12-04 Thread David Green
ur car) is sized # I think this was already rejected is like# works really well if your type happens to be 'Totally' is thus# very vague, but short Hm. On the other hand, imagining Type-shaped holes into which your hash keys fit *does* have a rather picturesque appeal... -David "the thesaurus is your friend (sometimes)" Green

Re: iteration (was Re: Angle quotes and pointy brackets)

2004-12-04 Thread David Green
ops, ugh!). Hm. Unless the flattening operator will take care of that. C would do it, but I'm not sure about C. (It would definitely do *something*, of that I'm fairly confident!) But I'm starting to think I may have just been thinking the original problem all along, only inside-out >Hoping I haven't removed all doubt of my foolishness, I'm hoping this reply reassures you. - David "at risk of removing all doubts of mine" Green

Re: specifying the key Type for a Hash

2004-12-04 Thread David Wheeler
ot at all like English. On the aesthetic hand, "shape" is a much prettier word than "dim". Yes, to me, "dim" means "not bright", as in dumb. Cheers, David

Re: specifying the key Type for a Hash

2004-12-06 Thread David Green
take that as an abbreviation and read it as "is dimensioned", which is English-like enough for me. It's also short. And I don't mind calling it dim, because if it were so smart, I wouldn't have to tell it what to do in the first place. But "shape" *is* prettier. -David "pondering the shape of things to come" Green

Re: iteration (was Re: Angle quotes and pointy brackets)

2004-12-06 Thread David Green
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Matt Diephouse) wrote: >On Sat, 04 Dec 2004 08:59:24 -0700, David Green <[EMAIL PROTECTED]> wrote: >C signifies a role named "Iterate". Roles are sort of a >mix of interfaces and mixins (as I understand it --

Re: specifying the key Type for a Hash

2004-12-06 Thread David Green
e only reason to do that is not to have to use "unshift" at all, but you have to know it anyway because if it's available, you're going to run into it sooner or later. - David "a rose by any other name would parse as sweet" Green

Re: pull & put (Was: Angle quotes and pointy brackets)

2004-12-06 Thread David Green
s there? The bad news (assuming anyone actually thinks there's anything good in the above suggestion) is that since +<== and friends are assignment operators, you can't just do foobar( @a-==>, $x, $y). Um, unless -==> could be made to work as a unary operator. Which even I don't think I like. =) So we should keep the wordy versions too. -David "pull goes the weasel" Green

Re: Arglist I/O [Was: Angle quotes and pointy brackets]

2004-12-06 Thread David Wheeler
On Dec 6, 2004, at 7:38 AM, Austin Hastings wrote: for =<> {...} I dub the...the fish operator! :-) David

Re: specifying the key Type for a Hash

2004-12-07 Thread David Green
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Luke Palmer) wrote: >David Green writes: > > In article <[EMAIL PROTECTED]>, > > [EMAIL PROTECTED] (Larry Wall) wrote: > > >Maybe type parameters are just subscripts? [...] > > >my Fight %figh

Pleasing some of the people all of the time

2004-12-07 Thread David Green
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Larry Wall) wrote: >On Mon, Dec 06, 2004 at 03:11:15AM -0700, David Green wrote: >[snip] >: I like that. >: I like that even better. [etc.] >Um. You're so very...easy to please... I guess I'm okay with that...

Re: Perl 6 Summary for 2004-11-29 through 2004-12-06

2004-12-07 Thread David Wheeler
in all of the code that uses the variable. The answer: yes, yes you can. And I would consider this a huge improvement over Perl 5's otherwise useful lvalue-able subs. Cheers, David

Re: Classes with several, mostly unused, attributes

2004-12-15 Thread David Storrs
On Dec 15, 2004, at 5:36 PM, Abhijit Mahabal wrote: I think that "slackness-on-demand" is a better policy than "strictness-on-demand", but that, again, is just my opinion Until now, the policy in Perl has always been that it is as slack and forgiving as possible, and you have to ask if you w

Re: Classes with several, mostly unused, attributes

2004-12-15 Thread David Storrs
On Dec 10, 2004, at 11:05 AM, Abhijit Mahabal wrote: Consider a class (e.g., the hypothetical Geometry::Triangle) that can have several attributes (side1, side2, side3, angle1, ang_bisector1, side_bisector, altitude1 and so forth), most of which will not be needed for most instances of Geometry

Re: Classes with several, mostly unused, attributes

2004-12-15 Thread David Storrs
On Dec 15, 2004, at 6:11 PM, Abhijit Mahabal wrote: David Storrs wrote: On Dec 15, 2004, at 5:36 PM, Abhijit Mahabal wrote: I think that "slackness-on-demand" is a better policy than "strictness-on-demand", but that, again, is just my opinion Until now, the policy in

Re: Possible syntax for code as comment

2005-01-09 Thread David Storrs
On Sat, Jan 08, 2005 at 12:48:32PM -0800, Ashley Winters wrote: > > sub canon( $subjet, $complement) > -> $s = $subjet{$*Global}, $c = $complement > { > my @foo = ...; > for @foo -> $bar; $remaining = @foo.elems { > # $bar contains an element, $remaining contains the number of

Re: Dimension of slices; scalars versus 1-element arrays?

2005-01-10 Thread David Storrs
On Sat, Jan 08, 2005 at 11:37:06AM -0700, Craig DeForest wrote: > @a[4; 0..5]; > a 1x6 array (probably correct)? Or a 6 array (probably not > correct)? For the ignorant among us (such as myself), what is a 6 array? Google and pdl.perl.org did not yield any immediate answers. --Dks --

Re: Dimension of slices; scalars versus 1-element arrays?

2005-01-12 Thread David Green
co-ords of an element?) 'reverse' would presumably flip around the indices in all dimensions. Ah, the fun of coming up with new multidimensional variations on all the old (or new) favourites! - David "a head-scratcher no matter how you slice it" Green

Re: Dimension of slices; scalars versus 1-element arrays?

2005-01-12 Thread David Green
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (David Green) wrote: >I can imagine "table context" being reasonably popular. [...] >(Taking a scalar and returning a list is less common, but I can >imagine a 2-D version of 'split' that turns a string into

Re: Making control variables local in a loop statement

2005-01-14 Thread David Storrs
On Thu, Jan 13, 2005 at 07:35:19PM -0500, Joe Gottman wrote: >In Perl5, given code like > > for (my $n = 0; $n < 10; ++$n) {.} > > the control variable $n will be local to the for loop. In the equivalent > Perl6 code >loop my $n = 0; $n < 10; ++$n {.} > > $n will not be local to th

Re: Making control variables local in a loop statement

2005-01-14 Thread David Storrs
On Fri, Jan 14, 2005 at 02:46:58PM -0500, Austin Hastings wrote: > >rules, I can easily have it either way. > > > > {for (my $n=0; $n<10; ++$n) {...}} # Local to loop > > for (my $n=0; $n<10; ++$n) {...}# Persistent > > > >--Dks > > > But there's no clean way to make some of them

Re: Junctive puzzles.

2005-02-09 Thread David Green
$petticoat.conjunctions; # list containing (1|2|3|(4&5)) $petticoat.disjunctions; # list containing 1, 2, 3, (4&5) ($petticoat.disjunctions)[-1].conjunctions;# list 4, 5 - David "guilty by list association" Green

Re: Perl 6 Summary for 2005-01-31 through 2004-02-8

2005-02-10 Thread David Landgren
Uri Guttman wrote: [...] i think so but i can't read larry's mind (nor would i want to! :) XP = extreme programming DBC = design by contract (or even designed by conway :) MP = ?? Modular Programming David

<    1   2   3   4   5   6   7   8   9   10   >