use fatal err fail

2005-09-28 Thread Adam D. Lopresto
this is fair. It seems that, due to buffering and other things, print returns true even when it doesn't actually succeed. But why let facts get in the way of rhetoric? [4] The difference is that "no fatal" would only affect code that calls "fail" itself. The "err" would affect code that directly calls "die", too. -- Adam Lopresto http://cec.wustl.edu/~adam/ Eschew obfuscation!

Re: Perl 6 code - a possible compile, link, run cycle

2005-08-26 Thread Adam Kennedy
Ingo Blechschmidt wrote: Hi, Yuval Kogman wrote: On Thu, Aug 25, 2005 at 15:42:28 +0200, Ingo Blechschmidt wrote: This section will contain all information needed: * User-defined operators * Other symbols exported by "is export" * Exported macros Okay, this raises a distinction: Compile t

Re: my $pi is constant = 3;

2005-08-18 Thread Adam Kennedy
Larry Wall wrote: > On Wed, Aug 17, 2005 at 01:56:35PM +1000, Adam Kennedy wrote: > : > : >: If not a special form, should this work? > : >: > : >: my $pi is constant; > : >: $pi = 3; > : > > : >That could be made to work by defining constant

Re: my $pi is constant = 3;

2005-08-17 Thread Adam Kennedy
could disallow undefine($pi) though. Which would basically throw away compile-time optimizations relating to constants wouldn't it? Adam K

Re: DBI v2 - The Plan and How You Can Help

2005-07-11 Thread Adam Kennedy
and overall I completely agree with your general ideas. Adam K

Re: Perl6 burns 18% fewer calories

2005-07-10 Thread Adam Kennedy
he different country keyboards. Especially those poor nordics with the / and $ in funny places :) Adam K

Re: DBI v2 - The Plan and How You Can Help

2005-07-10 Thread Adam Kennedy
pull the data from at commit time) in would be really nice. Even if the way I have to pass the blobs to each driver differs, I'd like to be at least be able to say, This is a DBI2::Data::BLOB object (or something functionally equivalent). Adam K

Re: DBI v2 - The Plan and How You Can Help

2005-07-08 Thread Adam Kennedy
bi", which is zero by default. I concur. I've been presuming what they are talking about is a standard implementation for those that want to use that sort of feature. Not a default implementation that everyone should use. So "if you want to use database config files, we've got a standard way" Adam K

Re: DBI v2 - The Plan and How You Can Help

2005-07-05 Thread Adam Kennedy
then specifically advertise support or non-support for that API. And we could get an interface somewhat richer than the current "raw hashes" one. Adam K

Re: DBI v2 - The Plan and How You Can Help

2005-07-05 Thread Adam Kennedy
4. All host parameters should be named (like ":foo") rather than positional (like "?"), meeting with the SQL:2003 standard. The named format is a lot easier to use and flexible, making programmers a lot less error prone, more powerful, and particularly more resource efficient when the same par

Re: Quasiquoting

2005-06-28 Thread Adam Kennedy
fully" without also executing it, and even then perl doesn't (document) parse Perl, it just (code) parses Perl, or rather runs Perl. So to summarise, PPI is of limited use when it comes to working with bytecode or something that will be executed. It is for working with documents, not code. And I'm done here :) Adam K

Re: AUTLOAD and $_

2005-06-21 Thread Adam Kennedy
ntrol over the params and context of the function, and maybe run something else AFTER the function call is important. So I suspect there might be some false economy in this optimisation. Adam K

Re: ./method

2005-06-19 Thread Adam Kennedy
the porting rate up at around a million lines of code a year. Adam K

Re: ./method

2005-06-18 Thread Adam Kennedy
etely away from the letters for the rest, and god help the hunt and peckers. Something like (3ch|4.5key|2pos|5cm) cost. And I dislike having a THIRD sigil even more than I dislike the second. Adam K I think $ is way more objectionable to the lily-white non-Perl heathens, but I don't really

Re: Musing on registerable event handlers for some specific events

2005-06-09 Thread Adam Kennedy
Gaal Yahas wrote: On Wed, Jun 08, 2005 at 12:29:33PM -0700, Larry Wall wrote: There will certainly be an event manager for all sorts of events floating around in Perl 6. The main trick will be to hide this from the people who aren't interested. The other trick will be to actually spec it, sin

Re: Musing on registerable event handlers for some specific events

2005-06-09 Thread Adam Kennedy
: If it can be done in less than 10 lines lines of code, to get the most : minimal hooks into the core, I'd like to see it done. 10 lines? I laugh in your general direction. No really. In perl itself, I just to see... throw Event("CORE::prefork") if $Event::Manager::VERSION; ...or something

Musing on registerable event handlers for some specific events

2005-06-08 Thread Adam Kennedy
son does it. If it can be done in less than 10 lines lines of code, to get the most minimal hooks into the core, I'd like to see it done. Thoughts? Adam K

Re: Declarations of constants

2005-05-31 Thread Adam Kennedy
; # One significant figure sub time_to_ground ($height, $accel) { ...acceleration math... } my $time = time_to_ground( 500, $gravity ); ... thus simplifying internally to my $time = 1234; Adam K

Re: Syntax of using Perl5 modules?

2005-05-27 Thread Adam Kennedy
You get all those possibilities whenever you install any new version of a module you get from someone else, regardless of a p5->p6 hop. In p6, when you say "use Digest;", you are specifically asking for what p6 considers the "latest" version. In p5, it was "first match on libpath". Except that

Re: Syntax of using Perl5 modules?

2005-05-26 Thread Adam Kennedy
ersions of modules. Adam K

Re: ./method

2005-05-15 Thread Adam Kennedy
g us (who have / at shift-7) are probably not going to like it though :) But US/UK/CJK are all to the right of the period, so it's a very friendly combination in that regard. Adam K Adam

Re: ^method ?

2005-05-15 Thread Adam Kennedy
u are going to need to use until you get more advanced. Having the... Start->Programs->Accessories->SystemTools->CharacterMap,Click,"Select","Copy",Close,Ctrl-V ... ยบ character as the default invocant method (to use that option as an example) is something I'd much like to avoid. Adam K

Re: ^method ?

2005-05-14 Thread Adam Kennedy
with explicit invocants, we don't need all those pesky shortcuts for implicit attributes any more, since there's be a invocant around 90% of the time. Adam K

Re: ^method ?

2005-05-14 Thread Adam Kennedy
ome trickier thing gets a bit uglier... Is there any way we could prioritize based on frequency? We're accumulating quite a little library of P6 code now. What are people actually _using_ the most? What gets used in CPAN? How many $self->method calls are there compared to grep {} and map {}? /me goes back to work Regards Adam K

Re: Plethora of operators

2005-05-14 Thread Adam Kennedy
I wrote. use physics; Which, by the way I'm completely positive about. Loading in special grammars for particular classes of programmers is just an amazing idea. But really, in what circumstances could someone possibly need reduction so badly it needs to be in the core? Adam K

Re: PPI and the Perl 5 to Perl 6 converter?

2005-03-26 Thread Adam Kennedy
her as something for helping individual module authors port individual files/modules. Also curious how you handle BEGIN and friends... I take they are executed and then pruned, and end up unpruned in your XML? Also curious if you have managed to keep comments, POD etc... Adam K

PPI and the Perl 5 to Perl 6 converter?

2005-03-25 Thread Adam Kennedy
PF request for donations) about the Perl 5 to Perl 6 converter, and it being 40% completed? ... Larry? Is anybody working on it? If it's built on something other than PPI, is there anything I can see, so I can steal any parsing tricks I don't know of yet. :) Adam K

Re: .method == $self.method or $_.method?

2005-03-23 Thread Adam Kennedy
should .method be. Adam K

Re: .method == $self.method or $_.method?

2005-03-18 Thread Adam Kennedy
yone with a minicpan checkout would be to scan CPAN and see how often the various uses are needed currently. ($self-> compared to $_->). Granted there are a hell of a lot of caveats in that, but it there's a 10 to 1 ratio of one to the other, surely that would help to make the prefered preference a little clearer? Adam K

Re: .method == $self.method or $_.method?

2005-03-17 Thread Adam Kennedy
we call :method for a private method?" Adam K Michael G Schwern wrote: On Thu, Mar 17, 2005 at 06:04:56PM +1100, Adam Kennedy wrote: I should add that Darren and I, who both have similar tendencies towards larger scale coding where consistency is far preferred to compactness, both ended up

Re: .method == $self.method or $_.method?

2005-03-17 Thread Adam Kennedy
much preferred to have .foo be the same as $.foo and @.foo and %.foo and refer to the invocant method, at the cost of using C< map { $_.foo } >. To describe it in emotional terms, the current situation feels "backwards and inside out". Adam K Michael G Schwern wrote: There&#x

Re: Perl 6 Summary for 2004-12-20 through 2005-01-03

2005-01-09 Thread Adam Kennedy
the very very distant "sparkle in my eye" for PPI is to build something for perl similar to IntelliJ IDEA. If the PPI-like mode of the perl 6 parser happens (don't touch anything outside the file) then I don't see why it can't be done, at lease in some form. Adam Kennedy

Re: Lexing requires execution (was Re: Will _anything_ be able to

2004-11-29 Thread Adam Kennedy
The ability to read in and work with code based purely on syntax, without needing to know what it means. Adam

Re: Will _anything_ be able to truly parse and understand perl?

2004-11-25 Thread Adam Kennedy
Herbert Snorrason wrote: On Thu, 25 Nov 2004 22:00:03 +1100, Adam Kennedy <[EMAIL PROTECTED]> wrote: And just after the snip you will see I qualify "parse" in this context as loading the perl in some form of DOM-type tree. And yet you disqualify the Perl6 rule system, with i

Re: Will _anything_ be able to truly parse and understand perl?

2004-11-25 Thread Adam Kennedy
Smylers wrote: Adam Kennedy writes: perl itself would also appear unable to understand perl source, instead doing what I would call RIBRIB parsing, "Read a bit, run a bit". RIBRIB? RABRAB, surely! Smylers Yes, you are right, typo.

Re: Will _anything_ be able to truly parse and understand perl?

2004-11-25 Thread Adam Kennedy
Michele Dondi wrote: On Thu, 25 Nov 2004, Adam Kennedy wrote: I thought it was about time I brought some concerns I've been having lately to the list. Not so much on any particular problem with perl6, but on problems with perl5 we would seem to have the opportunity to fix but aren't.

Re: Will _anything_ be able to truly parse and understand perl?

2004-11-25 Thread Adam Kennedy
stand the difference between BEGIN (change parsing) and INIT (do before the program starts). Frankly that is a gaping security hole... not only do I have to still deal with the problem of loading every single dependency or having no parsing ability otherwise, but I am required to "trust" every perl programmer on the planet :( I love PPI, by the way :-) Thank you, I do to :) But I'd like to still have something like it in perl6 :( Adam

Will _anything_ be able to truly parse and understand perl?

2004-11-24 Thread Adam Kennedy
he issue of parsability would be welcome. I'm not sure if Damian is involved in Perl 6 language stuff any more, but if he or anyone else language-related is going to be at YAPC.AU next week I would dearly love to meet up and have a chat. My currently-being-API-frozen perl parser is visible at http://search.cpan.org/~adamk/PPI-0.831/ Thanks for your time Adam Kennedy

Re: What Requires Core Support (app packaging)Z

2004-09-19 Thread Adam D. Lopresto
rs, look for archives, etc, but the perl executable itself wouldn't need anything special (which feels a lot nicer, since presumably updating the PAR module installed would be a lot easier than updating perl to support a new archive type). -MPAR could also handle the directory case, removing

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

2004-09-04 Thread Adam D. Lopresto
already have ordinals for grammars, so I'm sure we could make 'em work > here. (Maybe "nth()" is an operator that constructs ordinal-objects? > (I kind of want a "th" suffix operator so I can do ($n)th. Although that > doesn't really lend itself to cou

Re: Return with no expression

2004-08-24 Thread Adam D. Lopresto
then you can't get to the original topic. I think too much topic-clobbering will be confusing. say chars($_) > 70 ~~ abbreviate($_) ?? $_; #oops, prints the length -- Adam Lopresto http://cec.wustl.edu/~adam/ [MacGyver] is the Martha Stewart of action. --Patrick J. Mooney

Re: "<->" as "->" with automatic "is rw"

2004-08-21 Thread Adam D. Lopresto
d reason to make -> {...} mean -> $_ {...}, using <-> {...} for -> $_ is rw {...}. A good way to remove one more special case (maybe offsetting the extra way to declare a sub, and sweeten the whole deal). -- Adam Lopresto http://cec.wustl.edu/~adam/ Yesterday upon the stair I met a man who wasn't there. He wasn't there again today -- I think he's from the CIA.

Re: Synopsis 2 draft 1 -- each and every

2004-08-21 Thread Adam D. Lopresto
ke eat in this case > >D $foo.take $foo.grab $foo.horde D $foo.drink $foo.sip$foo.slurp N $foo.taste Ok, I'll stop now. But I do sort of (very minorly) like sip as a mini-slurp. > > That assumes folks think of grab as being singular and take as bei

Re: :)

2004-07-22 Thread Adam D. Lopresto
turn off warnings for > the statement it refers to. Obviously, it's very confident about that code, so it should turn on a maximum level of warnings for that statement (assured that it will pass). The modifier to turn off warnings on a line would be ;), winking at us to let us know it's u

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

2004-06-09 Thread Adam D. Lopresto
) if $id is an object? What happens to $id? Does it > turn into some kind of limbo object? Does it become undefined? Is it > right for $subref.unwrap($id) to be able to do that to $id? Is it right > for $id to be able to do it to itself? > > Hmm. Not a very useful email really. Oh wel

but true

2003-12-19 Thread Adam D. Lopresto
oolean(Complex $self:){ return $self.real || $self.imag; } ... then somewhere in a function return Complex::new(0,0) but true; Since Complex already has an implementation of whatever method decides whether it's true or not, wouldn't just applying a property be insufficient to over

Re: The C Comma

2003-11-25 Thread Adam Turoff
On Tue, Nov 25, 2003 at 01:03:19PM +1100, Damian Conway wrote: > Schwern observed: > >This may be a consequence of the example used > > > > while $n++ then $foo > $bar > > > >which I immediately associated with. > > > > if $n++ then $foo > $bar > > Yeah, I can certainly see that. > > Perh

Re: The Block Returns

2003-10-03 Thread Adam D. Lopresto
code like $str .= lc; $linkedlist .= next; $structure .= clone(deep => 1); and such things. Really, making it mean anything else (including nothing at all) would be counterintuitive. -- Adam Lopresto http://cec.wustl.edu/~adam/ perl -le '$_=(split q,",,`$^Xdoc -q japh`)[1].".";y/pj/PJ/;print'

Re: Dispatching, Multimethods and the like

2003-06-17 Thread Adam Turoff
On Mon, Jun 16, 2003 at 06:31:54PM -, Dan Sugalski wrote: > For methods, each object is ultimately responsible for deciding what to > do when a method is called. Since objects generally share a class-wide > vtable, the classes are mostly responsible for dispatch. The dispatch > method can, i

Re: Dispatching, Multimethods and the like

2003-06-17 Thread Adam Turoff
On Tue, Jun 17, 2003 at 09:44:52AM -0400, Piers Cawley wrote: > Adam Turoff <[EMAIL PROTECTED]> writes: > > As it *appears* today, regular dispatching and multimethod dispatching > > are going to be wired into the langauge (as appropriate). Runtime > > dispatch b

Dispatching, Multimethods and the like

2003-06-16 Thread Adam Turoff
Damian just got finished his YAPC opening talk, and managed to allude to dispatching and autoloading. As it *appears* today, regular dispatching and multimethod dispatching are going to be wired into the langauge (as appropriate). Runtime dispatch behavior will continue to be supported, including

Re: This week's summary

2003-06-09 Thread Adam Turoff
On Mon, Jun 09, 2003 at 01:26:22PM +0100, Piers Cawley wrote: > Multimethod dispatch? > Adam Turoff asked if multimethod dispatch (MMD) was really *the* Right > Thing (it's definitely *a* Right Thing) and suggested that it would be > more Perlish to allow the progr

Re: Multimethod dispatch?

2003-06-03 Thread Adam Turoff
On Mon, Jun 02, 2003 at 10:34:14AM -0600, Luke Palmer wrote: > And I don't see what's stopping someone from writing Dispatch::Value. > > use Dispatch::Value; > sub foo($param is value('param1')) {...} > sub foo($param is value('param2')) {...} > > What it seems you're wanting is it to

Re: Multimethod dispatch?

2003-06-02 Thread Adam Turoff
On Sun, Jun 01, 2003 at 10:44:02PM -0600, Luke Palmer wrote: > You must not be following Perl 6 closely enough, then. Perl 6 is a > "real" programming language now, as opposed to a "scripting" language. Um, I've followed Perl6 closely enough to know that the distinction between "real langauge" an

Multimethod dispatch?

2003-06-02 Thread Adam Turoff
Apologies if I've missed some earlier discussions on multimethods. The apocolypses, exegesises and synopses don't seem to say much other than (a) they will exist and (b) wait for apocolypse 12 for more information. Looking over RFC 256[*] and Class::Multimethods[**] it sounds like the intent is t

Patterns and junctions

2003-04-04 Thread Adam D. Lopresto
uld could match anyway), so it seems silly to force the engine to prefer the first one. I'm imagining that in the first example, the implementation would probably build an FSA and process each letter as it comes, while the second would rely on backtracking. What think you all? -- Adam Lopres

Re: P6ML?

2003-03-26 Thread Adam Turoff
On Wed, Mar 26, 2003 at 09:19:36AM +, Simon Cozens wrote: > To what extent should the (presumably library-side) ability to parse a > given markup language influence Perl 6's core language design? (which > is what this list is nominally about.) I think this ought to > approximate to "none at all

Re: Arrays vs. Lists

2003-02-07 Thread Adam Turoff
On Fri, Feb 07, 2003 at 06:38:36PM -0500, Uri Guttman wrote: > > "ML" == Michael Lazzaro <[EMAIL PROTECTED]> writes: > ML> Along those lines, the closest I've been able to come so far to a > ML> usable two-sentence definition is: > > ML> -- A list is an ordered set of scalar values. >

Re: Spare brackets :-)

2003-01-28 Thread Adam Turoff
On Tue, Jan 28, 2003 at 09:24:50AM -0800, Austin Hastings wrote: > --- Dan Sugalski <[EMAIL PROTECTED]> wrote: > > At 8:47 AM + 1/28/03, Piers Cawley wrote: > > >> $ref[$key] > > >> > > >> an array or hash look-up??? > > > > > >Decided at runtime? > > > > How? People use strings as array ind

Re: "Arc: An Unfinished Dialect of Lisp"

2003-01-24 Thread Adam Turoff
On Fri, Jan 24, 2003 at 01:00:26PM -0500, Tanton Gibbs wrote: > > The problem with cons/car/cdr is that they're fundemental operations. > > Graham *has* learned from perl, and is receptive to the idea that > > fundemental operators should be huffman encoded (lambda -> fn). It > > would be easy to

Re: "Arc: An Unfinished Dialect of Lisp"

2003-01-24 Thread Adam Turoff
On Wed, Jan 22, 2003 at 10:16:50AM +, Andy Wardley wrote: > On Tue, Jan 21, 2003 at 12:55:56PM -0800, Rich Morin wrote: > > I'm not a Lisp enthusiast, by and large, but I think he makes some > > interesting observations on language design. Take a look if you're > > feeling adventurous... > >

Lexically scoped methods (was: L2R/R2L syntax)

2003-01-22 Thread Adam D. Lopresto
e a philosophical objection) > > with making them methods of Array, though, if they're valuable enough. > > That certainly would seem the common Perl thing to do. > > No, namespaces were invented for a reason. > > Graham. > -- Adam Lopresto ([EMAIL PROTECTED]) http://cec.wustl.edu/~adam/ All of our customer service representatives are on vacation. Please hold for the next available representative.

Re: L2R/R2L syntax

2003-01-17 Thread Adam D. Lopresto
. But this is perl, so who cares if anyone can read it, right? > > 4) Some people like the idea of having Unicode operators in perl6. > Some don't. There are issues with it. Larry hasn't come up with a > ruling yet. We should wait for his decision. > > 5) Sarcasm is, apparently, dead. I'm not dead yet! I'm feeling much better, really. > > MikeL > -- Adam Lopresto ([EMAIL PROTECTED]) http://cec.wustl.edu/~adam/ What exactly do we mean when we use the word "semantics"?

Re: right-to-left pipelines

2002-12-12 Thread Adam D. Lopresto
razy enough to write a unary comma operator). So basically we can leave off the parentheses in the usual cases, but they're still required when you're doing something unusual or that would otherwise be hard to read. -- Adam Lopresto ([EMAIL PROTECTED]) http://cec.wustl.edu/~adam/ "I have a very firm grasp on reality! I can reach out and strangle it any time!"

Re: REs as generators

2002-12-10 Thread Adam Turoff
On Tue, Dec 10, 2002 at 03:38:58PM -0800, Rich Morin wrote: > On occasion, I have found it useful to cobble up a "little language" > that allows me to generate a list of items, using a wild-card or some > other syntax, as: > > foo[0-9][0-9] yields foo00, foo01, ... > > I'm wondering whether Pe

Re: Multmethods by arg-value

2002-12-10 Thread Adam Turoff
On Tue, Dec 10, 2002 at 11:37:58AM -0800, David Whipp wrote: > I was reading the "Partially Memorized Functions" thread, and the thought > came to mind that what we really need, is to define a different > implementation of the method for a specific value of the arg. Something > like: > > sub days_

Re: Partially Memoized Functions

2002-12-10 Thread Adam Turoff
On Mon, Dec 09, 2002 at 02:20:01PM -0800, Austin Hastings wrote: > --- Paul Johnson <[EMAIL PROTECTED]> wrote: > > How about the same way as one would do it now? Presumably we won't > > all > > forget how to program when Perl 6 comes out. > > I think you've missed the point. The original poster (

Re: Partially Memoized Functions

2002-12-10 Thread Adam Turoff
On Mon, Dec 09, 2002 at 01:58:11PM -0800, Austin Hastings wrote: > --- Adam Turoff <[EMAIL PROTECTED]> wrote: > > I think you're trying to overoptimize something here. I can't see > > a benefit to caching only sometimes. If there is, then you probably > > w

Re: Partially Memoized Functions

2002-12-10 Thread Adam Turoff
On Mon, Dec 09, 2002 at 01:58:11PM -0800, Austin Hastings wrote: > --- Adam Turoff <[EMAIL PROTECTED]> wrote: > > It doesn't matter whether some of the values are cheap lookups > > while other values are "complex calculations". Once a cached sub > > is

Re: Partially Memoized Functions

2002-12-10 Thread Adam Turoff
On Tue, Dec 10, 2002 at 01:53:28PM +1100, Damian Conway wrote: > And in those rare cases where you really do need partial caching, the > simplest solution is to split the partially cached subroutine into a > fully cached sub and an uncached sub: > > sub days_in_month(Str $month, Int $year) > {

Re: Partially Memoized Functions

2002-12-09 Thread Adam Turoff
On Mon, Dec 09, 2002 at 08:36:20PM -, Smylers wrote: > I was wondering whether it'd be better to have this specified per > C rather than per C. That'd permit something a long the > lines of: > > sub days_in_month(Str $month, Int $year) > { > > } > > Perhaps there are only some e

Re: right-to-left pipelines

2002-12-09 Thread Adam D. Lopresto
with a :. But now I'm trying to speculate about Larry's colon, something best left to others). But somehow it seems like an increase in readability, especially if things were renamed. Imagine renaming "grep" to "where" or "suchthat". And then the antigrep can

Re: purge: opposite of grep

2002-12-05 Thread Adam D. Lopresto
works well enough, but just like "unless" somehow > simplifies the logic by removing that leading !, "purge" can simplifiy the > array filter: > >@members = purge {$_->{'quit'}} @members; > > FWIW, I came up with "purge" because

Re: Unifying invocant and topic naming syntax

2002-11-17 Thread Adam D. Lopresto
aller's topic unless it was explicitly passed an argument. -- Adam Lopresto ([EMAIL PROTECTED]) http://cec.wustl.edu/~adam/ Never be afraid to tell the world who you are. --Anonymous

Re: Superpositions and laziness

2002-11-08 Thread Adam D. Lopresto
.} > > whereas others feel that: > > sub square ( Num $n ) is memoized {...} > > is more appropriate. > > Damian > -- Adam Lopresto ([EMAIL PROTECTED]) http://cec.wustl.edu/~adam/ "I cannot read the fiery letters," said Frodo in a quavering voice &q

Re: list comprehensions

2002-11-06 Thread Adam D. Lopresto
> I don't see why I'd want to do it with arrays, but... > > %a_students = %grades{grep /^a/i, keys %grades}; Looks like that's just the same as %a_students = grep {.key ~~ :i/^a/}, %grades.kv; (after adjusting for perl6 syntax for a few things) -- Adam Lopresto

Re: UTF-8 and Unicode FAQ, demos

2002-11-04 Thread Adam D. Lopresto
scalar", but perl5 people will have to get used to a lot. I think the operators should just be list based, and if you want otherwise you can specify "scalar:op" or convert both sides to scalars manually (preferably with .length, so it's absolutely clear what's meant). -- Ada

Re: perl6 operator precedence table

2002-10-29 Thread Adam D. Lopresto
> In typical topical string usage, that leaves us with > > > > if .subst/a/b/ {...} > > $result = .where/a/b/ > > > > That's quite livable, though the second is a bit odd, English-wise. > > We could even keep around > > > > s/a/b/ > > > > as a shorthand for .subst/a/b/. > > Oh, I definitely think so! > > > > And maybe even add > > > > w/a/b/ > > > > as a synonym for .where/a/b/. > > Hm. *s*ubstitute and *w*eplace. ;-) > > Damian > -- Adam Lopresto ([EMAIL PROTECTED]) http://cec.wustl.edu/~adam/ I just want a plate and a fork and a bunny...

Re: [OT] Power of Lisp macros?

2002-10-24 Thread Adam Turoff
On Thu, Oct 24, 2002 at 12:26:41PM -0300, Adriano Nagelschmidt Rodrigues wrote: > Luke Palmer writes: > > Lisp is implemented in C, and C's macros are certainly not essential > > to its functionality. But think of what macros in general provide: > > > > * Multi-platform compatability > >

Re: perl6 operator precedence table

2002-10-24 Thread Adam D. Lopresto
for nasty surprises between: > > $str =~ s/a/b/; substitute a for b in $str > > and: > > $str ~= s/a/b/; substitute a for b in $_ and append result to $str > > But I guess that's no worse than: > > $x-=10; > > and > >

Re: perl6 operator precedence table

2002-10-18 Thread Adam D. Lopresto
stead... my Bitwise $a = 1; #woohoo, $a and $b are no longer magical! my Bitwise $b = 3; print $a & $b; #prints 3 So if you really need to do a lot of bitmath, you use the special types, and otherwise you can be barely aware that they exist. sysopen($handle, $filenmae, O_CREAT & O_R

Re: Prototype-Based Inheritance (was Re: Indeterminate math)

2002-10-15 Thread Adam D. Lopresto
es look anything alike. :-P > > Mixing OO frameworks is quite useful in some real-world situations. > Sometimes it's more efficient to change your OO implementation than to > try to translate your problem to fit the one you're given. > > MikeL > -- Adam Lopresto ([EMAIL PROTECTED]) http://cec.wustl.edu/~adam/ All I want is a warm bed, a kind word, and unlimited power.

Re: Indeterminate math

2002-10-15 Thread Adam D. Lopresto
tp://www.pobox.com/~schwern/ > Perl Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One > Don't worry, baby, my wrath can be pretty groovy. > http://www.goats.com/archive/980804.html > -- Adam Lopresto ([EMAIL PROTECTED]) http://cec.wustl.edu/~adam/ Who are you and what have you done with reality? --Jamin Gray

Re: untaintby property

2002-10-14 Thread Adam D. Lopresto
any module to accidentally untaint data. Personally, I think untainting data should only be the result of an explicit "untaint" function, but maybe that's going too far. -- Adam Lopresto ([EMAIL PROTECTED]) http://cec.wustl.edu/~adam/ Her hair glistened in the rain like nose ha

Re: Passing arguments

2002-09-20 Thread Adam D. Lopresto
; > Furthermore, if the caller can pass undef for the second parameter, I > don't see a way to distinguish in the third variant between a legitimately > passed undef, for which we don't want $_, and a missing optional argument, > for which we do. > > /s > > -- Ad

Re: Suggestion for perl 6 regex syntax

2002-09-08 Thread Adam D. Lopresto
o perl 5 size, and many > would become even shorter than in perl 5. > > ______ > Do You Yahoo!? > Yahoo! Finance - Get real-time stock quotes > http://finance.yahoo.com > -- Adam Lopresto ([EMAIL PROTECTED]) http://cec.wustl.edu/~adam/ Dreaming permits each and every one of us to be quietly and safely insane every night of our lives. --William Dement

Re: auto deserialization

2002-09-03 Thread Adam D. Lopresto
onstructor seems really messed up. I guess that would mean that I could pass Date.'Sep 21, 1963' to anything expecting a Date object. I think that might be just slightly too magical for comfort. I don't like the idea of object types automagically converting themse

Re: auto deserialization

2002-09-01 Thread Adam D. Lopresto
atic functions as $date.foo() instead of Date.foo(), and therefore your constructor call would be simply my Date $date .= new('Jun 25, 20002'); -- Adam Lopresto ([EMAIL PROTECTED]) http://cec.wustl.edu/~adam/ perl -le '$_=(split q,",,`$^Xdoc -q japh`)[1].".";y/pj/PJ/;print'

'while <> {' in Perl 6

2002-08-09 Thread Adam Lopresto
ly smart, it could just be replaced with 'for <> {'. The only issues I can see are people using <> inside the loop, and maybe something about the scope of $_. (Does a topicalized $_ change the value of $_ outside of the loop?) -- Adam Lopresto ([EMAIL PROTECTED]) http://cec.wustl

Re: Perl6/Parrot status

2002-02-08 Thread Adam Turoff
On Thu, Feb 07, 2002 at 08:40:41PM -0500, Dan Sugalski wrote: > [...] I'm also trying to get a regular, if I'm > lucky every issue, Parrot/Perl 6 article in The Perl Review. Speaking on behalf of TPR, the only bottleneck here is providing a regular article/update on Parrot/Perl6 for each issue.

RE: two-way hashes

2001-08-05 Thread Mitchell, Adam R
sounds like a good idea, but we can't limit multiple values, so it might be better if it returns an array. maybe the code should look more like this: @{value}hash = key or maybe @%{value}hash = key unless this clashes with something else -Original Message- From: raptor [mailto:[EMAIL

Re: Per-object inheritance in core a red herring?

2001-07-10 Thread Adam Turoff
On Tue, Jul 10, 2001 at 02:08:58AM -0500, David L. Nicol wrote: > Uh, C++ virtual methods can be overloaded on a per-object basis, not > just a per-class basis, since the object drags around its virtual jump > table with it wherever it goes, so the jump can get compiled into > "jump to the address

Re: http://www.ora.com/news/vhll_1299.html

2001-07-09 Thread Adam Turoff
On Mon, Jul 09, 2001 at 03:48:27PM -0400, Buddha Buck wrote: > Why can't a general-purpose programming language be augmented with XML for > internal documentation purposes? You mean like C#? :-) Z.

Re: http://www.ora.com/news/vhll_1299.html

2001-07-09 Thread Adam Turoff
On Mon, Jul 09, 2001 at 02:36:17PM -0400, Sam Tregar wrote: > On Mon, 9 Jul 2001, Adam Turoff wrote: > > Don't laugh. It's here now. It's called XSLT. :-) > > Um, that's not what the article was talking about The proposal is to use > an XML syntax t

Re: http://www.ora.com/news/vhll_1299.html

2001-07-09 Thread Adam Turoff
On Mon, Jul 09, 2001 at 01:37:36PM -0400, Sam Tregar wrote: > On Mon, 9 Jul 2001, ivan wrote: > > > http://www.ora.com/news/vhll_1299.html > > Fascinating article, but his point about XML source code struck my funny > bone. I've certainly heard the argument before - most recently in Dr. > Dobbs

Re: Perl, the new generation

2001-05-10 Thread Adam Turoff
On Thu, May 10, 2001 at 12:13:13PM -0700, David Goehrig wrote: > On Thu, May 10, 2001 at 11:55:36AM -0700, Larry Wall wrote: > > If you talk that way, people are going to start believing it. > [snip] > > Some of us are are talking that way because we already > beleive it. You can't

Re: Larry's Apocalypse 1

2001-04-06 Thread Adam Turoff
On Fri, Apr 06, 2001 at 03:31:56PM -0400, John Porter wrote: > Jarkko Hietaniemi wrote: > > So URLs are not > > literals, they have structure, and only thinking of them as filenames > > may be too simplistic. > > Yeah. But Rebol manages to deal with them. I doubt it. telephone:? fax:? lpp:?

Re: Schwartzian Transform

2001-03-26 Thread Adam Turoff
On Mon, Mar 26, 2001 at 10:50:09AM -0500, Uri Guttman wrote: > > "SC" == Simon Cozens <[EMAIL PROTECTED]> writes: > SC> Why can't Perl automagically do a Schwartzian when it sees a > SC> comparison with complicated operators or functions on each side of > SC> it? That is, @s = sort { f(

Re: Schwartzian Transform

2001-03-26 Thread Adam Turoff
On Mon, Mar 26, 2001 at 08:25:17AM -0800, Peter Scott wrote: > I'm kinda puzzled by the focus on Schwartzian when I thought the GRT was > demonstrated to be better. Because the transform is a specialized case of the schwartzian transform where the default sort is sufficient. Address the issu

Re: Schwartzian Transform

2001-03-25 Thread Adam Turoff
On Tue, Mar 20, 2001 at 11:15:51PM -0500, John Porter wrote: > Adam Turoff wrote: > > This message is not an RFC, nor is it an intent to add a feature > > to Perl or specify a syntax for that feature[*]. > > Yay. > [...] > So you think > > @s = >

  1   2   >