Re: Source/Program metadata from within a program

2001-08-31 Thread John Porter
Brent Dax wrote: use Fcntl qw(:seek); seek DATA, 0, SEEK_SET; @code = DATA; IMHO, that's too hackish--just reading that doesn't make what you're doing obvious. It also can only get the main program, not any of the modules it loads. -- John Porter

Re: Source/Program metadata from within a program

2001-08-31 Thread John Porter
about this issue? ;-) -- John Porter A word spoken in the mind will reach its own level in the objective truth.

Re: if then else otherwise ...

2001-07-29 Thread John Porter
? What you're asking has no counterpart in boolean logic, and as such would make no sense in any computer language. Screw boolean. It's just a three-way switch, exactly as if/else is a two-way switch. (As has been noted, switch() would handle this and the more general case.) -- John Porter

Re: if then else otherwise ...

2001-07-29 Thread John Porter
Bart Lateur wrote: This has a vague smell of Fortran. Nothing vague about it. It is exactly analogous to Fortran's three-way if. -- John Porter

Re: array/hash manipulation [was :what's with 'with'?]

2001-07-20 Thread John Porter
' for transformation of any structure to other structure.. This sort of thing should certainly not be in the kernel. -- John Porter

Re: aliasing a value in a while each loop

2001-07-20 Thread John Porter
= substr( $s, 10, 15 ), @z = @a[5..8,13]; etc. -- John Porter

Re: what's with 'with'? (was: [aliasing - was:[nice2haveit]])

2001-07-20 Thread 'John Porter '
David L. Nicol wrote: No, that does not work: Right; I misunderstood what was wanted. -- John Porter

Re: array/hash manipulation [was :what's with 'with'?]

2001-07-20 Thread John Porter
Sterin, Ilya wrote: Don't really know which would be more helpful, since I first need to find a scenerio where I would use this facility, then what result would I expect once the shortest list runs out. Let us ask the PDL folks. In fact, I'm quite sure this has been done already. -- John

Re: what's with 'with'? (was: [aliasing - was:[nice2haveit]])

2001-07-19 Thread John Porter
, @argset2 ) { quux; But I'm not convinced of the utility of this over using scalar references. -- John Porter

Re: aliasing - was:[nice2haveit]

2001-07-19 Thread John Porter
for an explicit scalar like $_. Unless there is something I am missing from this discussion. No. with() must be consistent with other perl constructs. If implemented, it will use $_. Plain and simple. -- John Porter

Re: aliasing - was:[nice2haveit]

2001-07-19 Thread John Porter
of hashes or arrays: for my @a ( @foo, @bar ) { ... for my %h ( %foo, %bar ) { ... -- John Porter

Re: what's with 'with'? (was: [aliasing - was:[nice2haveit]])

2001-07-19 Thread 'John Porter '
] : $_-[1]\n; } -- John Porter

Re: aliasing - was:[nice2haveit]

2001-07-18 Thread John Porter
; } (presuming lvalue-methods, of course...) -- John Porter

Re: nice2haveit

2001-07-16 Thread John Porter
Uri Guttman wrote: one related point is that this symbol table will be accessible via caller() so you could access/install lexical symbols in a parent block on the call stack. scary! Quite. Does anyone have a pointer to tchrist's rant on Tcl's upvar? -- John Porter

Re: Implied types, first try. Or Its amazing what you can do with potatoes

2001-07-10 Thread John Porter
for, what hash refs stringify to. Um, one pragma. -- John Porter

Re: You can't make a hot fudge sundae with mashed potatoes instead of ice cream, either.

2001-07-10 Thread John Porter
[EMAIL PROTECTED] wrote: ...just made them a convenience for identifying type errors... I.e. type-safe macros. -- John Porter

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-05 Thread John Porter
Matt Youell wrote: The terminology was new to me, however. I made it up. -- John Porter

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-04 Thread John Porter
, and *can't* have it except under certain rather strict constraints, e.g. when all players are playing by the Class::Struct rules, or some other more elaborate alternative. -- John Porter

Re: Anyone actually experienced with object inheritance?

2001-07-02 Thread John Porter
to do this. It actually is very applicable in programming Frame systems, which are a kind of souped-up semantic network thing, used a lot in knowledgebases. -- John Porter

Re: Anyone actually experienced with object inheritance?

2001-07-02 Thread John Porter
by inheritance, and (nested) namespace scoping. I think there's been plenty of call for the former in Perl6; the latter would be pretty nice too. -- John Porter

Re: Anyone actually experienced with object inheritance?

2001-07-02 Thread John Porter
on. -- John Porter

Re: Anyone actually experienced with object inheritance?

2001-07-02 Thread John Porter
this could be conflated with normal labels. -- John Porter

Re: Anyone actually experienced with object inheritance?

2001-07-02 Thread John Porter
Michael G Schwern wrote: my package Foo { sub bar { ... } } Well... package is a magic perl5-inducing keyword in perl6, right? Maybe namespace is the way to go. -- John Porter

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-02 Thread John Porter
: ... my $obj = Class::Object-new; ... No, that's not an inner class. Man, you think Class::Object is the answer to everything! (Not that it ain't cool...) -- John Porter

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

2001-06-29 Thread John Porter
it in the core. No, that's a lousy rule of thumb. The tradeoffs must be considered. Otherwise we'd have Forth. (Or Lisp, ca. 1960.) -- John Porter

Re: Multiple classifications of an object

2001-06-27 Thread John Porter
have both, right? We could let classes be first-class objects, eh? -- John Porter

Re: Multiple classifications of an object

2001-06-27 Thread John Porter
Mark J. Reed wrote: ... be sure that Perl stays Perl. Eh, puke. Anyway, as long as the class-level @ISA (or Class.ISA, hopefully) is the fall-back default for any instance that doesn't have its own .ISA set, then current semantics are retained. -- John Porter

Re: Multiple classifications of an object

2001-06-27 Thread John Porter
that if instance.ISA is set, then, in effect, I'm saying I am my own class! Specifically, it would bizarre (in a cool kind of way ;-) for there to be two inheritance trees - one defined by my own .ISA list, and one defined by the class into which I'm blessed. -- John Porter

Re: Multiple classifications of an object

2001-06-27 Thread John Porter
Mark J. Reed wrote: John Porter wrote: Mark J. Reed wrote: ... be sure that Perl stays Perl. Eh, puke. I'm sorry? Keep Perl Perl is a non-argument. And if you haven't heard me rail against it yet, you haven't been around very long. I think someone hits this tripwire at least once

Re: 'We already have a sub keyword'

2001-06-27 Thread John Porter
David L. Nicol wrote: Yet another minor candidate for regularization. (Hush, David, Don't say that. Perl should stay Perl! ;-) -- John Porter

Re: Multiple classifications of an object

2001-06-26 Thread John Porter
Hmm... very much like a module I wrote (but never released to CPAN), called Class::Multi. It was indended as my answer to multimethods, although it doesn't resemble multimethods at all. It delegates to both classes and instances. -- John Porter

Re: making variables or containers read-only

2001-06-21 Thread John Porter
make_readonly or similar? Trying to overload close to the job is just ridiculous. Currently nothing in perl enforces access besides lexical visibility rules. This will of course be different in perl6. If you're hung up on the implementation, please take it to the -internals list. Thank you. -- John

Re: Embrace polymorphic builtins, for they are cool.

2001-06-12 Thread John Porter
, the time warp, etc. etc... whatever your will. -- John Porter It's turtles all the way down!

Re: Properties and stricture

2001-06-07 Thread John Porter
Michael G Schwern wrote: Basically, any class which wants to be type-checked at compile time. I think the meaning of that is still not clear, given what strong typing usually means. -- John Porter

Re: Properties and stricture

2001-06-07 Thread John Porter
Michael G Schwern wrote: you can even do it now through ad hockery. Or odd hackery. :-) -- John Porter

Re: 1 until defined(getvalue()); return $^d;

2001-06-07 Thread John Porter
, right? -- John Porter It's turtles all the way down!

Re: Properties and stricture

2001-06-06 Thread John Porter
at compile time. We'll do what we can at compile time, but this is Perl... -- John Porter

Re: Properties and stricture

2001-06-05 Thread John Porter
to compilation errors. -- John Porter Anything essential is invisible to the eyes.

Re: Properties and stricture

2001-06-05 Thread John Porter
, but that's a consequence of perl's dynamic nature. -- John Porter

Re: Properties and stricture

2001-06-05 Thread John Porter
, and it casts very opportunistically. -- John Porter Anything essential is invisible to the eyes.

Re: Properties and stricture

2001-06-05 Thread John Porter
know exactly what the statement means. No, that is not strong typing. That is static typing. -- John Porter

Re: Properties and stricture

2001-06-05 Thread John Porter
compiler to know that if ( x y ) is wrong when you meant to say if ( x y ) That is what is meant by logic error. -- John Porter Anything essential is invisible to the eyes.

Re: Properties and stricture

2001-06-05 Thread John Porter
like Fortran and Java. And it may explain why programs written in Perl -- dynamic, weakly-typed though it be -- are at least no more buggy than programs written in low-level languages. But I think we've strayed into the topic of advocacy. -- John Porter Anything essential is invisible to the eyes.

Re: 1 until defined(getvalue()); return it;

2001-05-30 Thread John Porter
Simon Cozens wrote: $foo = 5; print it + ($bar = 10) + it; 20 or 25? or 30? -- John Porter

Re: 1 until defined(getvalue()); return it;

2001-05-30 Thread John Porter
of $y or $z was evaluated, not always simply $z. How is this done with C_ currently? -- John Porter

Re: 1 until defined(getvalue()); return it;

2001-05-30 Thread John Porter
arg value into Cit. This doesn't look like something that needs support from the compiler... -- John Porter

Re: properties

2001-05-19 Thread John Porter
Dan Sugalski wrote: So what happens when you assign an overloaded value to a tied variable, or vice versa? Which wins? Uh, the overloaded value gets evaluated to an normal value, and the tied variable does what it does with that. Maybe. -- John Porter

Re: what I meant about hungarian notation

2001-05-14 Thread John Porter
Damian Conway wrote [and John Porter reformats]: @bar[$foo]; # Access element int($foo) of array @bar %bar{$foo}; # Access entry $foo of hash %bar @bar{$foo}; # Syntax error %bar[$foo]; # Syntax error And why is that superior to: @bar[$foo]; # Access element int($foo) of array @bar

Re: what I meant about hungarian notation

2001-05-14 Thread John Porter
Graham Barr wrote: As I said in another mail, consider $bar[$foo]; $bar{$foo}; But if @bar is known to be one kind of array or the other, where is the ambiguosity that that is meant to avoid? -- John Porter

Re: what I meant about hungarian notation

2001-05-14 Thread John Porter
Bart Lateur wrote: As to what the combined $bar[$foo] would mean: that depends on what $bar contains. I think it would depend on what the declared type of @bar was (i.e. ordered or associative). -- John Porter

Re: what I meant about hungarian notation

2001-05-14 Thread John Porter
constrained TDI in Perl5. -- John Porter

Re: what I meant about hungarian notation

2001-05-14 Thread John Porter
Simon Cozens wrote: I'm not telling you how it *looks* in Perl 5, I'm telling you (in Perl 5 terms) what it will *mean*. Fine, you're using perl5 as pseudocode. I could do that too. But it has no bearing on the desirability of anyone's proposed perl6 syntax or semantics. -- John Porter

Re: apo 2

2001-05-13 Thread John Porter
[EMAIL PROTECTED] wrote: Property should be an adjective, not a noun. While I'm inclined to want to disagree with you 100% on that, I really only disagree 50%. :-) -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-10 Thread John Porter
Dave Storrs wrote: *4$STDIN # Next 4 lines *$num_lines$STDIN # Numifies $num_lines, gets that many *int rand(6)$STDIN # Gets 0-5 lines *mySub($bar)$STDIN# mySub returns num, gets that many Shades of printf... -- John Porter

Re: what I meant about hungarian notation

2001-05-10 Thread John Porter
it for containers indexed by scalar as well. -- John Porter All men are subjects.

Re: what I meant about hungarian notation

2001-05-09 Thread John Porter
aren't really scalars, but their own type. Thus they need their own prefix. No, that does not follow. -- John Porter

Re: what I meant about hungarian notation

2001-05-09 Thread John Porter
arrays and hashes. -- John Porter

Re: what I meant about hungarian notation

2001-05-09 Thread John Porter
Simon Cozens wrote: A scalar's a thing. Just as the index into a multiplicity is a thing. -- John Porter

Re: what I meant about hungarian notation

2001-05-09 Thread John Porter
. The result would be two types of variables: single and multiple. Ah! :-) -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Larry Wall wrote: Ordinary next methods don't do a goto. Well, of course, the next method of a syntactic loop control iterator object would not be ordinary. :-) -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Simon Cozens wrote: John Porter wrote: a syntactic loop control iterator object I surely hope you're joking. Why? It sounds reasonable to me (if not necessarily desirable). Perl is a highly dynamic language, I think it could support this. -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Peter Scott wrote: Even if it has a fixed-length prototype, is Perl smart enough to know that it can't be called as an object method, bypassing prototype checking? Maybe p6 won't have that loophole. -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
object... next FOO; What's unclear? In fact, no one needs to know this is going on, except the guy who wants to know why Cnext FOO looks like a method call. (And he only thinks that because next looks like a method name.) -- John Porter All men are subjects.

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Simon Cozens wrote: John Porter wrote: Cnext FOO looks like a method call It doesn't, Oh, but it does, to the perl6 programmer who's used to thinking $source.next (or its indirect object alternative, next $source ) iterates the iterator in $source. Not that there are any

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
a method call on a loop control object? -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Simon Cozens wrote: Then I call Occam's Razor. Perl is supposed to be easy, no? It's also supposed to have an implementation. And to have a consistency level somewhat greater than zero. Also, consider the implications for user-defined control constructs. -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Simon Cozens wrote: An object with exactly one and only one method doesn't sound that dynamic to me. Bit of a digression; but, the dynamicity of a language is in no way implicated by the number of methods in one build-in class. (Besides, this class will have at least three.) -- John Porter

Re: apo 2

2001-05-08 Thread John Porter
Me wrote: And, despite perl5's use of no as the opposite of use, and given that there may be no use in perl6 (;), and thus perhaps no no, (on and off?), then maybe no could be used as not yes? Well clearly on is the opposite of no. Yes? -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
Larry Wall wrote: We're not so far off of a yield-like method on continuations here... ... ordinary blocks that can function as continuations to the surrounding list context. Ah! Now we're talking! -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
/networks/stacks/datastructs/etc/etc. Ugck. means read, means write. Do you want to be that different from shell? Or from Perl, for that matter? -- John Porter All men are subjects.

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
to the archived discussions of RFC28. Suffice it to say that, contrary to some opinions, OO and FP are useful to more than just CS graduates. Part of Perl being Perl is being something greater than a lowest common denominator. -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-08 Thread John Porter
David L. Nicol wrote: That also wraps up the for should have an explicit iterator access method thread handily! Just label your loop and there you are! Well, right. Every loop would have a control object, whether it's nonymous or a-. -- John Porter

Re: apo 2

2001-05-07 Thread John Porter
Simon Cozens wrote: John Porter wrote: $thing is; Existence is not the same as essence. strike() while $the_iron is; -- John Porter

Re: So, we need a code name...

2001-05-07 Thread John Porter
da Du ron ron ron -- John Porter

Re: Subroutine attributes, from a long time ago

2001-05-07 Thread John Porter
[EMAIL PROTECTED] writes: : : why should a reader expect that a declarative description : of foo would be followed by the body of foo? Isn't the functional definition of a sub just another one of its attributes, anyway? -- John Porter

Re: Apoc2 - STDIN concerns

2001-05-07 Thread John Porter
-- John Porter All men are subjects.

Re: Apoc2 - STDIN concerns

2001-05-07 Thread John Porter
*does* mean FOO.next -- John Porter All men are subjects.

Re: Apoc2 - Context and variables

2001-05-07 Thread John Porter
Edward Peschko wrote: If %a = @b; does %c = map{ ($_ = undef ) } @a; Yep... particularly considering something neat like keys(%a) = @b; could be defined to do that. Or, even niftier @%a = @b; -- John Porter

Re: Apoc2 - Context and variables

2001-05-07 Thread John Porter
. If the hash variable type had some method for accessing the set of keys directly as a (pseudo)array, that would be one way to neatly solve the problem. That's why I proposed the @%foo syntax. But more python-like syntaces are possible, if desired. -- John Porter All men are subjects.

Re: apo 2

2001-05-05 Thread John Porter
Rocco Caputo wrote: $thing's veracity is true. What about just $thing is; -- John Porter All men are subjects.

Re: apo 2

2001-05-04 Thread John Porter
, not a specialization link. -- John Porter It's so mysterious, the land of tears.

Re: apo 2

2001-05-04 Thread John Porter
Bart Lateur wrote: I hardly ever restrict myself to word characters in the end delimiter, anyway. Interesting -- I *always* use EOF, because that's the only one vim knows a priori how to highlight correctly. :-/ -- John Porter It's so mysterious, the land of tears.

Re: apo 2

2001-05-04 Thread John Porter
Michael G Schwern wrote: $foo has true doesn't flow as well as $foo is true. But the general form, something like $thing is a_property or $thing is a_behavior flows considerably worse, IMHO. -- John Porter It's so mysterious, the land of tears.

Re: apo 2

2001-05-04 Thread John Porter
@pi are square; @dogs have fleas; @talks have stalled; -- John Porter

Re: sandboxing

2001-05-03 Thread John Porter
, or is it best left to the OS to provide a solid chroot facility? IMHO this is one of those things that should be kept firmly in the front of our minds as we design the engine. It is yet another area in which we could do right what java got half-right. -- John Porter It's so mysterious, the land

Re: Please make last work in grep

2001-05-02 Thread John Porter
Michael G Schwern wrote: And I'm quite sure there's an RFC for doing something like this alread up for Perl 6. At least RFC 199, and several related threads such as $a in @b. -- John Porter It's so mysterious, the land of tears.

Re: .NET

2001-05-02 Thread John Porter
know. distributed objects, I don't recall discussion of this wrt perl6, frankly. Or are we thinking on a totally separate line that just has a few similarities? Yes. Do you feel better now? -- John Porter It's so mysterious, the land of tears.

Re: Please make last work in grep

2001-05-02 Thread John Porter
Michael G Schwern wrote: If we could determine if the block has no side effects... oh wait, everything in Perl has a side effect. ;) :pure (again!) -- John Porter

Re: .NET

2001-05-02 Thread John Porter
Dan Sugalski wrote: I'd like to be able to do: $foo = new Bar; print SOCKET serialze($foo); and on the other end do: $foo = unserialize(SOCKET); $foo-bar(); I personally am a big fan of Obliq semantics. It's something I'd really like to see in perl. -- John Porter It's so

Re: .NET

2001-05-02 Thread John Porter
this thread. -- John Porter It's so mysterious, the land of tears.

Re: Flexible parsing (was Tying Overloading)

2001-04-29 Thread John Porter
what he's talking about? OReilly::Policy is (or might be) still general before specific. OReilly::* might be a whole family of site- specific modules. I think that's safer than supposing a universe of Policy::* policy modules. -- John Porter

Re: a modest proposal Re: s/./~/g

2001-04-29 Thread John Porter
Larry Wall wrote: Now we just need to make ... ___ ... mean something exceptional. Ref: http:[EMAIL PROTECTED]/msg02873.html ) -- John Porter

Re: Flexible parsing (was Tying Overloading)

2001-04-29 Thread John Porter
site. -- John Porter

Re: Flexible parsing (was Tying Overloading)

2001-04-27 Thread John Porter
be construed this way. -- John Porter It's a sky-blue sky The satellites are out tonight let x = x

Re: YA string concat proposal

2001-04-25 Thread John Porter
this (as in in C++): $obj.operator=('x'); -- John Porter It's a sky-blue sky The satellites are out tonight let x = x

Re: Tying Overloading

2001-04-24 Thread John Porter
of an identifier where otherwise a string literal would be understood. my @things; # declare that things is an array print things are $things; # second occurrence of things here is taken as a variable name. # its type -- array -- is already known. -- John Porter

Re: s/./~/g

2001-04-24 Thread John Porter
don't need to worry about that. -- John Porter It's a sky-blue sky The satellites are out tonight let x = x

Re: Strings vs Numbers (Re: Tying Overloading)

2001-04-24 Thread John Porter
Graham Barr wrote: The other choice is not to have a concat operator but instead have Cconcat LIST, but I guess not many people would like that either. sub concat(@) { join '', @_ } Seems to me like the sort of thing that ought to be in the core. -- John Porter

Re: Tying Overloading

2001-04-24 Thread John Porter
Dan Sugalski wrote: The one downside is that you'd have essentially your own private language. Whether this is a bad thing or not is a separate issue, of course. IIUC, this ability is precisely what Larry was saying Perl6 would have. -- John Porter

Re: Tying Overloading

2001-04-24 Thread John Porter
is, or ^ or #, or whatever. Or maybe a word operator, in the same family as cmp, eq, ne, le, gt... Perl's stigma for unreadability is bad enough already; now at least we have a good opportunity to unwreak some badness. -- John Porter

  1   2   3   4   5   >