Thinking about scalars

2001-04-23 Thread Dave
I have lurked for several months now, and find that I can hold my tongue no longer. The 'discussion' of overloading '+', to include concatenation, suffers from a general degeneration into implementation details, where linguistic sentiment should reign. The contention that '+' should be overload

Re: Dot can DWIM without whitespace

2001-04-25 Thread Dave
On Tue, Apr 24, 2001 at 07:38:50PM -0700, Brent Dax wrote: [snip four examples are obvious ...] >>> $a."b"; If a has a method 'foo' such that $a.foo is the standard invocation, it would be nice when $b = 'foo' for $a.foo === $a."$b" === $a.$b How I see the . operato

Re: RFC 90 (v1) Builtins: zip() and unzip()

2000-08-11 Thread Dave Storrs
ve(), to emphasize that they are go together? Dave

Re: Self-Sorting Containers

2000-08-11 Thread Dave Storrs
2) you generally don't use code refs as keys Dave

Re: Portable upper/lower case regexp matchesre and procedures

2000-08-11 Thread Dave Storrs
he RFCs (perhaps with conditions, like "I agree with this as long as XYZ is [not] done")? Dave

Re: Portable upper/lower case regexp matchesre and procedures

2000-08-14 Thread Dave Storrs
the RFC Librarian sends out are a big help on this, but don't go quite far enough (IMHO). (I suppose it's also possible to search all the archives, but that gets tedious and, with the high traffic on these lists, is getting more impractical all the time. Speaking of which, is there currently a way to search all the lists simultaneously? Dave

Re: Permanent sublists (was Re: Language WG report, August 16th2000)

2000-08-17 Thread Dave Storrs
s, but it can also be used as an object, so it should go to -OO. Subroutine calls are a flow issue, so do I post something about subs to -subs or to -flow? You get the idea. Dave

Re: pascal-like "with" was Re: Default filehandles(was Re: commandline option: $|++)

2000-08-17 Thread Dave Storrs
ive...you are "express"ing the keys of your hash as new scalars. 2) "express" should guarantee that, before it creates a variable names $FOO, it first calls "local" on any existing $FOO 3) The new variables should be lexicals, defined only within the "express" block, so that you don't pollute your namespace. Dave

Re: RFC 56 (v2) Optional 2nd argument to C and C

2000-08-17 Thread Dave Storrs
I like #3 too, does that make a better consensus? Can you guess which option I favor? :> Dave

Re: pascal-like "with" was Re: Default filehandles(was Re: commandline option: $|++)

2000-08-17 Thread Dave Storrs
D'oh. s{2) .+^}{} Mismatch between brain and fingers there somewhere, thanks for pointing it out. Dave On 17 Aug 2000, Johan Vromans wrote: > Dave Storrs <[EMAIL PROTECTED]> writes: > > > 2) "express" should gu

Re: pascal-like "with" was Re: Default filehandles(was Re: command line option: $|++)

2000-08-17 Thread Dave Storrs
This seems good...the HOF stuff seems to have pretty well accepted, and the thumbtack notation with it. Dave On Thu, 17 Aug 2000, Clayton Scott wrote: > > > On Wed, 16 Aug 2000, David L. Nicol wrote: > > > %record = loadrecord($studentID); > &

Re: pascal-like "with" was Re: Default filehandles(was Re: commandline option: $|++)

2000-08-17 Thread Dave Storrs
6?) Well, if you're using the HOF notation, I believe it works. Alternatively, the interpreter can simply DWIM and add in the appropriate derefed-hash-refs in the appropriate places. But globals is fine, as long as you save (localize) the old values first. Dave

Re: implied pascal-like "with" or "express"

2000-08-18 Thread Dave Storrs
llowing: &calc_letter_grade($person{name}, \$person{letter_grade}); print "$person{first_name} is $person{age}\n"; print "$person{first_name}'s numerical grade is $person{num_grade}\n"; $person{num_grade} = 0 unless $person{never_missed_class}; if ( $person{num_grade} > 60 ) { print "$person{name} passed!\n"; } @temp = ($person{name}, $person{age}); Dave

Re: implied pascal-like "with" or "express"

2000-08-18 Thread Dave Storrs
my examples... print "^{name}'s age is ^age\n"; I wanted to make sure that the {} notation was acceptable with "hat variables." You need it when you have keys like 'total - female', and you need it when you are going to have other text butting up against your variable name. Dave

OT: pronouncing "www" (was: Re: ... as a term)

2000-08-24 Thread Dave Storrs
h! > > We pronounce it something similar to "way way way". Personally, I've always said it "dub dub dub". Dave

auto-initializing values

2000-09-11 Thread Dave Storrs
entinel value are still there 5) If so, do error handling Dave

RE: auto-initializing values

2000-09-11 Thread Dave Storrs
mployees) { if ( $_{name} eq 'NONE' ) { die "Oops! DB error\n"; } } Dave

Re: auto-initializing values

2000-09-11 Thread Dave Storrs
On Mon, 11 Sep 2000, John Porter wrote: > Dave Storrs wrote: > > > > init_vars \{name => 'NONE'}; > > my @employees : size 50; # 50 entries, each a ref to 1 elem. hash > > @employees = get_from_db('*'); > > f

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and HereDocs)

2000-09-14 Thread Dave Storrs
use it is too confusing. I would say that the same logic should apply to the start of the here doc; I'm not sure, just from looking at it, if the example above is meant to be two interleaved heredocs, one heredoc after another, or what. Dave

Re: 'eval' odd thought

2000-09-15 Thread Dave Storrs
_work_. I'm with MJD on this one. Dave

Re: pack/unpack is damn unperlish. Explain them as Perl.

2000-09-19 Thread Dave Storrs
ific way. The binary data used by (un)pack will belong to exactly one type of C numeric variable, meaning that it will be limited in what kinds of numbers it can store and how it will represent them." Is this definition completely off-base? Dave

Re: Pre-withdrawal notice for RFC184

2000-09-19 Thread Dave Storrs
discussion of it, I seem to have missed this one, or I would have been in on the discussion. Personally, I really like the idea. I have now read the RFC and will think on it; if enough other people chime in with "wait!wait!", I'll post some thoughts...otherwise, I'll be sorry to see it go. Dave

Re: RFC 255 (v2) Fix iteration of nested hashes

2000-09-20 Thread Dave Storrs
there is an iterator extant (probably bad) 4) Make powerful magic in some way that isn't coming to mind Dave

Re: RFC 12 (v2) variable usage warnings

2000-09-21 Thread Dave Storrs
o execution path which will result in $z having a defined value. Dave

Re: RFC 12 (v2) variable usage warnings

2000-09-21 Thread Dave Storrs
riable $x" or "Not all execution paths leave $x defined". Dave

RE: PERL6STORM - tchrist's brainstorm list for perl6

2000-09-22 Thread Dave Storrs
;s a good idea all by itself, actually.) Assuming that both of these ideas were implemented, then you could write: $/ = "||\" and it would DWYM. Dave

Re: RFC 245 (v1) Add new C keyword to DWIM for clearing values

2000-09-17 Thread Dave Rolsky
'; is shorter and clearer. There's no point in trying to 'initialize' arrays or hashes, because you'll never get those warnings with it. > Nonetheless, feel free to point out why this is a bad idea and I'll > gladly retract it. See the above ;) -dave /*== www.urth.org We await the New Sun ==*/

Re: perl6storm #0050

2000-09-24 Thread Dave Storrs
tfalls created; in this case, I don't think it does. The potential problems of being able to assign precedence as you see fit (talk about action at a distance!) are enormous, and it does not seem to lend the same kind of elegant power that, for example, Damian's HOFs do. Dave

Re: RFC 290 (v1) Remove -X

2000-09-25 Thread Dave Storrs
and have the new readability-enhanced ( :> ) versions as well, for them's as want those. This seems like an excellent place to TIMTOWTDI. Dave

Re: RFC 288 (v1) First-Class CGI Support

2000-09-25 Thread Dave Storrs
nt "Hello!"; # flushes %HTTP first I like this a lot, but you need to make sure that it flushes the hash in the right order if multiple keys are present. Dave

Re: RFC 277 (v1) Eliminate unquoted barewords from Perl entirely

2000-09-25 Thread Dave Storrs
On Mon, 25 Sep 2000, Michael Fowler wrote: > This RFC makes no mention of what happens to the following constructs: > > %foo = (bar => "baz"); This actually isn't a bareword (as I understand it), since the => operator quotes its LHS.

Re: RFC 277 (v1) Eliminate unquoted barewords from Perl entirely

2000-09-25 Thread Dave Storrs
ment. 2) Inside the braces of a hash access or hash slice These places are not ambiguous, and it's a pain to have to put quotes around them every time. Dave

Re: RFC 292 (v1) Extensions to the perl debugger

2000-09-26 Thread Dave Storrs
humor aside, there is too much information in the debugger help screen to fit in 50 lines. That means that anyone trying to use the debugger through a DOS window, or a fixed-size telnet client, can't see the majority of the information. Dave

Re: RFC 292 (v1) Extensions to the perl debugger

2000-09-27 Thread Dave Storrs
Arrow for the command history." I'm not saying that outside tools shouldn't be built to provide _better_ versions of the standard behavior, or nicer UIs. I'm just saying that the basic versions are not acceptable, and should be improved and standardized. Dave

Re: my and local

2000-09-28 Thread Dave Hartnoll
To my mind, things would be a lot clearer if my and local were to change places - but I can see why that would not be a good thing. If it's not too late for suggestions for renaming local, what about 'override'. Dave. - Original Message - From: "Michael Fowler&quo

Re: IDEA: lexically scoped subs anyone

2000-09-29 Thread Dave Storrs
nk this is definitely a cool idea. Dave

Re: UNIX epoch issues (Re: Why shouldn't sleep(0.5) DWIM?)

2001-01-30 Thread Dave Storrs
we wanted to get really fancy, then the value of as an int could be the number of places of accuracy that would be returned. Dave

Re: Really auto autoloaded modules

2001-02-01 Thread Dave Rolsky
re needs to be a way to figure out which to load. Hopefully the smallest/quickest. And code that does this: use CGI qw( param header heavy_lifting ); Would get CGI.pm. If the loading is done based on interface implementation (there's a nice nebulous idea) this could be very slick (and very hai

Re: Really auto autoloaded modules

2001-02-02 Thread Dave Rolsky
s installed. Anything else is madness (ok, my idea is madness too). -dave /*== www.urth.org We await the New Sun ==*/

Re: Really auto autoloaded modules

2001-02-02 Thread Dave Rolsky
question is how we define an interface (as opposed to how we name it). -dave /*== www.urth.org We await the New Sun ==*/

RE: Really auto autoloaded modules

2001-02-03 Thread Dave Storrs
equest other versions. I'm sure this idea can be improved on, but it's a first cut. What do people think? Dave

RE: Really auto autoloaded modules

2001-02-04 Thread Dave Storrs
On Sun, 4 Feb 2001 [EMAIL PROTECTED] wrote: > >>>>> "Dave" == Dave Storrs <[EMAIL PROTECTED]> writes: > > > Dave> When you want to install a new version, you simply prepend it > Dave> with its version number (or insert it at appropriate pl

Re: What can we optimize (was Re: Schwartzian transforms)

2001-03-29 Thread Dave Mitchell
y guidelines * Performance guidelines Based on your comments above (which I hearily agree with), I guess we can safely dispense with that last entry. Dave M.

Re: Larry's Apocalypse 1

2001-04-06 Thread Dave Storrs
always put -ws on your shebang line if you don't want to type "module main." Dave

Re: Perl 5 compatibility (Re: Larry's Apocalypse 1)

2001-04-06 Thread Dave Storrs
extreme. You are correct, but being backwards compatible is unlikely to _cost_ us adherents and might well gain us some. *shrug* Dave

Re: Larry's Apocalypse 1

2001-04-12 Thread Dave Storrs
, but it needs to know what it's getting. Also, the flag would be a good choice in that it's very human-readable. Dave

recap on new operators?

2001-04-24 Thread Dave Storrs
e syntax Con: - You need to know whether you are looking at Perl5 or Perl6 before you know how to read the operator (raises problems both for programmers and for p526 translator script) - Some of the permutations (e.g. ->= ) look terrible. Dave

Another string concat proposal

2001-04-25 Thread Dave Hartnoll
out sacrificing the normal meanings of any of the other operators for concat. Dave Hartnoll.

Re: Another string concat proposal

2001-04-25 Thread Dave Hartnoll
> On Wed, Apr 25, 2001 at 11:53:33AM +0100, Dave Hartnoll wrote: > > What about using double-dot as the string concat operator: > > > > P5P6 > > ->. > > . .. > > .=..= (or =.. for concat after) > > You have missed a row for what th

Re: Another string concat proposal

2001-04-25 Thread Dave Hartnoll
I wrote.. > ..(I would have suggested -> but that > introduces problems with it meaning the same as comma in some situations.) Ignore that. I'm getting confused with => sometimes meaning the same as comma. I think I'll quit now before I dig myself any deeper :-) Dave.

Re: .NET

2001-05-03 Thread Dave Storrs
tm], evolution would be nonempowering...which is different than deempowering; things could just remain in a steady state. It's still a pretty arrogant claim, no matter which way you slice it. Dave

Re: .NET

2001-05-03 Thread Dave Storrs
tantiated from that module, which is worse because it leaves fewer traces by not writing to disk) from some far corner of Script Kiddie Land. Dave

Re: Apoc2 - concerns ::::: new mascot?

2001-05-09 Thread Dave Mitchell
And there was me thinking the shiny ball must be a camel dropping

The 5% solution

2001-05-10 Thread Dave Mitchell
Just a quick obeservation: Given the radicalness of the changes suggested by apo 2, I think it's fair to say that the proportion of Perl 5 code that will run unchanged on a Perl 6 interpreter will be heading into single-figure percentages. While I personally think this will be price well worth pa

Re: Apoc2 - concerns ::::: new mascot?

2001-05-10 Thread Dave Hartnoll
ith Perl Mongers == Perl Mongoose as well :-) Dave.

Re: The 5% solution

2001-05-10 Thread Dave Mitchell
> Briefly: We want the Perl 6 runtime to be an equivalent of the Microsoft > CLR, so that if you can somehow get bytecode onto it - from whatever > language - you can run it. So we've got some bytecode that perl can run. > Now think about what B::Deparse does. I knew the intention was to go the

Re: Apoc2 - concerns

2001-05-10 Thread Dave Storrs
0-5 lines *&mySub($bar)<$STDIN# mySub returns num, gets that many Dave

Re: apo 2

2001-05-10 Thread Dave Storrs
, I would like to stipulate that that sentence be taken out and shot. ;> Dave

Re: Apoc2 - concerns ::::: new mascot?

2001-05-10 Thread Dave Hartnoll
> The RFC pleads for a community spirit from ORA. Barring that, it seeks a new > symbol for the community entirely I'd suggest a mongoose - eats poisonous snakes for breakfast. There's a sort of tie-in with Perl Mongers == Perl Mongoose as well :-) Dave.

Safe signals, multiple signals?

2001-05-10 Thread Dave Storrs
There have been multiple mentions of the fact that we intend to have safe signals in Perl 6. I was wondering if it will also be possible to have more than one alarm() set at a time, or some other mechanism for having multiple pending signals. Dave

Re: Apoc2 - concerns

2001-05-10 Thread Dave Storrs
< QUOTE LARRY > Dave Storrs writes: : You know, it would be really cool if you specify the number of : lines you wanted like so: : : <$STDIN # One line : *<$STDIN# All available lines : *4<$STDIN # Next 4 lin

Re: Safe signals, multiple signals?

2001-05-10 Thread Dave Storrs
On Thu, 10 May 2001, Uri Guttman wrote: > >>>>> "DS" == Dave Storrs <[EMAIL PROTECTED]> writes: > > DS> There have been multiple mentions of the fact that we intend to have safe > DS> signals in Perl 6. I was wondering if it will also be p

Re: Apoc2 - concerns

2001-05-11 Thread Dave Storrs
On Thu, 10 May 2001, Larry Wall wrote: > Dave Storrs writes: > : should stick with <>. Also, I'd prefer to use the 'x' operator for > : specifying multiples: > : > : @foo = <$STDIN> x 4; > : @foo = <$STDIN> x &mySub; > :

Re: Apoc2 - concerns

2001-05-11 Thread Dave Storrs
On Fri, 11 May 2001, Larry Wall wrote: > Dave Storrs writes: > : calling the function that produced the string, or whatever. I just think > : that we could extend 'x' to have a general repetition meaning. > > I think just patching one operator from verbal status to

Re: Perl5 Compatibility, take 2 (Re: Perl, the new generation)

2001-05-11 Thread Dave Storrs
d keep core size down, make the translator easily available as a separate system/API, and make it easy to turn off the translation after enough time has passed that P6 is the assumed standard. Dave

Re: Time::Local

2005-07-05 Thread Dave Rolsky
ll module, so that least significant things come last. This is the reverse of p5 Time::Local. When timelocal and timegm are implemented, they will of course use whatever order their inverses use. I'd agree that this makes the most sense. -dave /*

Re: Time::Local

2005-07-05 Thread Dave Whipp
Larry Wall wrote: The time function always returns the time in floating point. I don't understand why time() should return a numeric value at all. Surely it should return a DateTime (or Time) object. Using epochs in a high level language seems like a really bad thing to be doing. If I want

Re: Time::Local

2005-07-05 Thread Dave Whipp
Douglas P. McNutt wrote: At 10:55 -0700 7/5/05, Dave Whipp wrote: I don't understand why time() should return a numeric value at all. Some of us like to use epoch time, as an integer, to create unique file names which sort "right" in a shell or GUI. You can use "

Re: Time::Local

2005-07-05 Thread Dave Whipp
Darren Duncan wrote: The object should not store anything other than this single numerical value internally (smart caching of conversions aside). I think we can all either agree with that, or dont-care it. The internal implementation is an implementation issue (or library). It doesn't need t

Re: Time::Local -- and lexical scope

2005-07-05 Thread Dave Whipp
Dave Whipp wrote: You can use "{time - $epoch}" or "{time.as<%d>}" or "{int time}". (That last one is not "{+time}", because that would be a floating-point value, not an integer). I was thinking: an epoch is just a time, and "int time

Re: Time::Local

2005-07-05 Thread Dave Rolsky
= qw( Sunday Monday Tuesday ... ); I think you have a bigger problem than simply adjusting for a 1-indexed day number ;) -dave /*=== VegGuide.Orgwww.BookIRead.com Your guide to all that's veg. My book blog ===*/

Re: Time::Local

2005-07-06 Thread Dave Rolsky
likely to need a higher-level interface than this to do something interesting (like print a day _name_ or calculate the second Sunday of the month) and that interface will just use the information Perl's builtins give it. -dave /*=== VegGuide

Re: File.seek() interface

2005-07-07 Thread Dave Whipp
Wolverian wrote: Or maybe we don't need such an adverb at all, and instead use $fh.seek($fh.end - 10); I'm a pretty high level guy, so I don't know about the performance implications of that. Maybe we want to keep seek() low level, anyway. Any thoughts/decisions? We should approach thi

Re: Hackathon notes

2005-07-08 Thread Dave Whipp
Rod Adams wrote: multi method foo#bar (Num x) {...} multi method foo#fiz (String x) {...} $y = 42; $obj.foo#fiz($y); # even though $y looks like a Num $obj.foo($z); # let MMD sort it out. Having additional tags might also give us something to hang priority traits off: "fo

Re: Perl 6 Summary for 2005-07-05 through 2005-07-12

2005-07-13 Thread Dave Whipp
Damian Conway wrote: Important qualification: Within a method or submethod, C<.method> only works when C<$_ =:= > $?SELF>. C<.method> is perfectly legal on *any* topic anywhere that $?SELF doesn't exist. Just to be clear, this includes any method/submethod with an explicitly named invo

Re: Optimization pipeline

2005-07-14 Thread Dave Whipp
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 are small - optimizers operate with a certain section of code in mind > ... Optimizers

Re: Referring to package variables in the default namespace in p6

2005-07-21 Thread Dave Whipp
"TSa (Thomas Sandlaß)" wrote: Here your expectations might be disappointed, sorry. The non-symbolic form $*Main::foo = 'bar' creates code that makes sure that the lhs results in a proper scalar container. The symbolic form might not be so nice and return undef! Then undef = 'bar' of course let'

Re: Messing with the type heirarchy

2005-07-31 Thread Dave Whipp
Luke Palmer wrote: Everything that is a Num is a Complex right? Not according to Liskov But this is one of the standard OO >>paradoxes, and we're hoping roles are the way out of it. Well, everything that is a Num is a Complex in a value-typed world, which Num and Complex are in. I do

"set" questions -- Re: $object.meta.isa(?) redux

2005-08-10 Thread Dave Whipp
Luke Palmer wrote: A new development in perl 6 land that will make some folks very happy. There is now a Set role. Among its operations are (including parentheses): (+) Union (*) Intersection (-) Difference (<=) Subset (<) Proper subset (>=) Superset (>)

Re: $object.meta.isa(?) redux

2005-08-10 Thread Dave Rolsky
other RDBMS queries. 2. Writing a true RDBMS in Perl6 will be that much easier, because now all I'll have to do is overload these for the appropriate object types (relation, tuple, etc) and the code for doing various things will flow very na

Set operators in Perl 6 [was Re: $object.meta.isa(?) redux]

2005-08-10 Thread Dave Rolsky
way to write a set of numbers and strings can simply be <1 dog 42 cat 666.5> Groovy, but what about this? <1 dog 42 cat 42> Maybe a warning with an optional fatality under "use strict 'sets'"? -dave /*

Re: Time::Local

2005-08-16 Thread Dave Rolsky
_ but not going forwards? But that's in contrast to your saying that the epoch would be December 31, 1999 at 23:59:29.0 UTC. Or did I misread your earlier messages? -dave /*=== VegGuide.Orgwww.BookIRead.com Your gu

Re: Time::Local

2005-08-16 Thread Dave Rolsky
ge people to always use one of these, then hopefully most people will never need to care what Perl6's epoch actually _means_. It's just a magic number you pass to some function or library. -dave /*=== VegGuide.Org

Re: Time::Local

2005-08-16 Thread Dave Rolsky
On Wed, 17 Aug 2005, Autrijus Tang wrote: ...This seems to be quite consistent with the rumoured US proposal to abolish leap seconds by adding leap hours every 500 years or so: Wow, a piece of US government policy I can actually support! Hell must be a cold place right now. -dave

Re: Time::Local

2005-08-16 Thread Dave Rolsky
uot;cannot find an up-to-date leap seconds table" exception in another? Eek! -dave /*=== VegGuide.Orgwww.BookIRead.com Your guide to all that's veg. My book blog ===*/

Hoping that Params::Validate is not needed in Perl6

2005-08-17 Thread Dave Rolsky
that this could be implemented by a user-provide trait like "is transformed": sub print_error ($color where m:i/^ [green | blue | red] $/ is transformed { lc }) Presumably this can be done with the existing language. It doe

Re: Hoping that Params::Validate is not needed in Perl6

2005-08-17 Thread Dave Rolsky
do these sorts of checks? I'm sure the answer is yes, but how easy will it be? Of course, if it's implemented via a C6AN module it's only got to be done once, but it's worth thinking about. -dave /*=== VegGuide.Orgwww.BookIRead.com Your guide to all that's veg. My book blog ===*/

Re: Hoping that Params::Validate is not needed in Perl6

2005-08-17 Thread Dave Rolsky
up at compile time, right? -dave /*=== VegGuide.Orgwww.BookIRead.com Your guide to all that's veg. My book blog ===*/

Re: Hoping that Params::Validate is not needed in Perl6

2005-08-17 Thread Dave Rolsky
On Wed, 17 Aug 2005, Dave Rolsky wrote: Type Validation, "isa", & "can" Params::Validate allows for several ways to check the _value_ of a parameter. One way is to specify a primitive type like "SCALAR" or "ARRAYREF". In P6 we have that with

Re: Hoping that Params::Validate is not needed in Perl6

2005-08-18 Thread Dave Rolsky
On Thu, 18 Aug 2005, Autrijus Tang wrote: On Wed, Aug 17, 2005 at 11:45:52PM -0500, Dave Rolsky wrote: And another question. How will I make Perl6 not do automatic coercion for me. If I have this sub: sub date (Int +$year is required, +$month, +$day) BTW, Pugs supports the ++ syntax

Re: Demagicalizing pairs

2005-08-24 Thread Dave Whipp
ine noise: draw_polygon $canvas: @verticies with color => "red"; draw_polygon $canvas with color => "red": @vertices; Dave.

Parsing indent-sensitive languages

2005-09-08 Thread Dave Whipp
If I want to parse a language that is sensitive to whitespace indentation (e.g. Python, Haskell), how do I do it using P6 rules/grammars? The way I'd usually handle it is to have a lexer that examines leading whitespace and converts it into "indent" and "unindent" tokens. The grammer can then

Re: Parsing indent-sensitive languages

2005-09-08 Thread Dave Whipp
: the /\h*/ match will advance the match pos, so /^^/ won't match for the second on the same line, which would cause problems if I'm trying to match up nested blocks. Dave.

Re: coercion and context

2005-09-14 Thread Dave Rolsky
.numerify_if_looks_like_number, Date => String uses .date; Of course I'm pulling the syntax/API from my nether regions. -dave /*=== VegGuide.Orgwww.BookIRead.com Your guide to all that's veg. My book blog ===*/

Re: skippable arguments in for loops

2005-09-29 Thread Dave Whipp
Luke Palmer wrote: Joked? Every other language that has pattern matching signatures that I know of (that is, ML family and Prolog) uses _. Why should we break that? IMO, it's immediately obvious what it means. Something tells me that in signature unification, "undef" means "this has to be un

Look-ahead arguments in for loops

2005-09-29 Thread Dave Whipp
Imagine you're writing an implementation of the unix "uniq" function: my $prev; for grep {defined} @in -> $x { print $x unless defined $prev && $x eq $prev; $prev = $x; } This feels clumsy. $prev seems to get in the way of what I'm trying to say. Could we imbue optional b

Re: Look-ahead arguments in for loops

2005-09-30 Thread Dave Whipp
Damian Conway wrote: Rather than addition Yet Another Feature, what's wrong with just using: for @list ¥ @list[1...] -> $curr, $next { ... } ??? There's nothing particularly wrong with it -- just as ther's nothing particularly wrong with any number of other "we don't need thi

Re: Exceptuations

2005-10-05 Thread Dave Whipp
xception mechanism might be a way of unifying errors and warnings; but perhaps the opposite is true. Perhaps what we see is a needed to generalize the distinction between warnigns and errors. Dave.

Re: zip: stop when and where?

2005-10-06 Thread Dave Whipp
d @a Y @b -> ?$a, ?$b { ... } # keep going until both are exhaused I think we still need a way to determine if an optional arg is bound. Can the C function be used for that ("if exists $b {...}")? Dave.

$value but lexically ...

2005-10-06 Thread Dave Whipp
C properties get attached to a value, and are available when the value is passed to other functions/ etc. I would like to be able to define a property of a value that is trapped in the lexical scope where it is defined. The example that set me thinking down this path is sub foo( $a, ?$b = rand

  1   2   3   4   5   >