Re: negated operators and disjunctions (was: Recommended Perl 6 best practices?)

2008-09-14 Thread Eric Wilhelm
ions? The 'dis' being a form of negative and all. I found this in E06: if %person{title} ne $known_title { ... } Well... I guess E06 is unmaintained, but currently has the best explanation of junctions I can find, so I offer the attached patch in the hope that the logic error does not

Re: Iterator semantics

2008-09-12 Thread Eric Wilhelm
an array" paradigm which breaks the weld? @a = 1..*; @a[-1] = 9; # @a = (9) now ? That's just my thoughts from what I understand and sorry if introducing welding into the analogy causes bits of molten metal to go flying around ;-) --Eric -- "You can't win. You can't break even. You can't quit." --Ginsberg's Restatement of the Three Laws of Thermodynamics --- http://scratchcomputing.com ---

Re: underscores in the core lib

2006-08-10 Thread Eric
_function, &RefugeeWindowsProgrammer, &Let_There_Be_Poetry, &MAGIC, &UNAUTHORIZED_USER_MAGIC. And, just like $scalars can hold arrays, &somesub could be a standard function or a user function (or a standard function which a user reimplemented -- you never know). - Ashley Winters -- -- __ Eric Hodges

Re: ~~ with *

2006-06-19 Thread Eric
Of course that might not realy make since for given/when and its smart matching magic. But then maybe we just don't want to be able to say "when $a == $b" and thats just invalid since it would be clearer written as an if. -- -- __ Eric Hodges

Re: 'temp $x;' with no assignment

2006-04-06 Thread Eric
/restore instruction is passed on to the mutatee to > save itself before the mutation, not after.) > > The p5-to-p6 translator will turn > > local $x; > > into > > temp undefine $x; > > Larry > In order not do do some strange magic could you jsut do: temp($x)++; That seems clear and non magical to me. Just my 2 cents! ;) -- -- __ Eric Hodges

Re: proposal: rename 'subtype' declarator to 'set'

2005-11-11 Thread Eric
> > I think 'subset' might be a nicer colour for this bikeshed. For an > extra three characters you lose the confusion with "to set", and it > highlights the fact that you're (usually) declaring a *constrained* > subset of the original type. > > > Stuart > Ehh. By that definition arn't all sets s

Re: given too little

2005-11-10 Thread Eric
I'm pretty sure i've heard this discussed but checking S04/Switch Statments doesn't make any mention of it. If it has been settled could we get some doc updates? -- -- __ Eric Hodges

Re: new sigil

2005-10-25 Thread Eric
T then it might overlap (collide) with a real class named T. In the following case it is not clear wether Dog is defined in the signature, or a realy seperate class. sub test (class Dog $x) { my Dog $y = $x + 5; } The same example with ^ becomes much clearer to me. sub test (^Dog $x) { my ^Dog $y = $x + 5; } The ^ clearly states the meaning while bareword Dog and 'class Dog' would both cause conflicts in my head. Just my reasoning about it all. BTW didn't you contradict your own real world usage of type1^type2 ? Even if we use ^ as a sigil why would it get confused on that? I don't think type1 ^type2 could have any realy meaning so it should be easy for the parser to know the difference. -- -- __ Eric Hodges

Re: new sigil

2005-10-20 Thread Eric
What about something like: c\ Then you get sub sametype (c\T $x, c\T $y) {...} Not exactly pretty though. c\T Actualy i think ^ might be my favorite so far. sub sametype (^T $x, ^T $y) {...} -- Eric

Re: Translitteration and combining strings and array references

2005-10-18 Thread Eric
ught i might bring it up since this seems different than the magical ness of pairs before. -- -- __ Eric Hodges

Re: Translitteration and combining strings and array references

2005-10-18 Thread Eric
I have a suggestion/proposal/whatever. I am just starting to get a grasp of uses for pairs and where they are handy. Working on string.trans some showed that it would be useful to have the function accept a list of pairs. That was working until the fix for magical pairs went through and now the pa

Re: Translitteration and combining strings and array references

2005-10-17 Thread Eric
e. > Free the Memes. > Actually its been fixed already. Of course i think the whole thing was then broken again, i was planning on checking it out sometime tonight after someone else figures out the current $?SELF being undeclared bug. ;) BTW it doesn't need any hash i just needed pairs which it had for about an hour before things changed again. lol. so is development on pugs I guess, here today, gone tomorrow, back again another day. -- -- __ Eric Hodges

Re: zip: stop when and where?

2005-10-04 Thread Eric
n provide a good code use of it and it doesn't add any data that wasn't there before. I don't think it should ever lean towards (b) but them I bet someone else will have an equaly good use of that. ;) So in the end I think some way of chooseing would be good, with one option picked as standard. -- Eric Hodges

Re: Stringification, numification, and booleanification of pairs

2005-09-21 Thread Eric
ue. A good alternative is hard to find, though. I tend > to prefer 1 at this moment (coincidentally, that's +?$pair). > > > Juerd > -- > http://convolution.nl/maak_juerd_blij.html > http://convolution.nl/make_juerd_happy.html > http://convolution.nl/gajigu_juerd_n.html > -- __ Eric Hodges

Re: Demagicalizing pairs

2005-08-22 Thread Eric
give the > variable a different name than the parameter. I like. > > sub seek (:x($horizontal),:y($vertical)) > > On the other hand, it's now unclear whether you can call that as > seek(1,2). > Needs to be allowed somehow. > > Larry > -- __ Eric Hodges

Perl defined Object, Array, Hash classes

2005-06-13 Thread Eric
internal classes because every added class could possibly compromise existing code. Well that is my 2 cents and my first post here so please forgive anything that apears rude or stupid and guide me on how to improve future posts. Thanks, __ Eric Hodges

Re: Topicalizers: Why does when's EXPR pay attention to topicaliz er r egardless of associated variable?

2002-03-27 Thread Eric Roode
s of topicality--now that we changed the > rule so that $_ is always aliased to the topic regardless of whether > it's aliased to an explicit variable name. > > Larry This seems to argue against OUTER:: --

Re: Math functions? (Particularly transcendental ones)

2001-09-10 Thread Eric Roode
math weenie, but I would thing gamma(x) would be of use. Also perhaps a div2(n,m): given two ints, returns two ints, n/m and n%m. -- Eric J. Roode[EMAIL PROTECTED] Senior Software Engineer, Myxa Corporation

RE: Expunge implicit @_ passing

2001-08-29 Thread Eric Roode
nal classes" prevent such a travesty? Are you seriously suggesting that the Array class should be designed such that it cannot be inherited? -- Eric J. Roode[EMAIL PROTECTED] Senior Software Engineer, Myxa Corporation

Re: explicitly declare closures???

2001-08-21 Thread Eric Roode
people DO create closures by mistake, and it can be a very difficult bug to trace if you aren't used to closures. -- Eric J. Roode[EMAIL PROTECTED] Senior Software Engineer, Myxa Corporation

Re: aliasing a value in a while each loop

2001-07-20 Thread Eric Roode
David L. Nicol wrote: > >Are there really situations where > > $$reference = An Expression; > >is clearer than > > $reference = \(An Expression); > >? Eric is confused. I don't know about in Perl 6-to-be, but in Perl 5 those two mean totally

RE: array/hash manipulation

2001-07-20 Thread Eric Roode
# Return the iterator as a closure wrt the above variables. return sub { my $i = $index++; return () if $i >= $max_num; # No more elements to return return map $_->[$i], @arr_list; # Return ith

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

2001-07-20 Thread Eric Roode
@bar) is very easy to code in perl 5. At the risk of sounding reactionary, this doesn't seem like a Big Win for perl. ------ Eric J. Roode[EMAIL PROTECTED] Senior Software Engineer, Myxa Corporation

Re: what I meant about hungarian notation

2001-05-09 Thread Eric Roode
$baz = Sfoo || |bar; And references are right out. ;-) -- Eric J. Roode[EMAIL PROTECTED] Senior Software Engineer, Myxa Corporation

Re: Apoc2 - concerns

2001-05-08 Thread Eric Roode
In a fit of insanity, at 10:14 EDT Tue May 8, I wrote: > >9 times out of 100, qw saves a large number of keystrokes. (The >other 1% of the time, ... I hope it's obvious that I meant "99 times out of 100" --

Re: Apoc2 - concerns

2001-05-08 Thread Eric Roode
roken". Personally, I don't understand how using two alphabetic characters and a pair of delimiters, in order to save typing a whole mess of quotes and backslashes, can be construed as "ugly". :-) And, while I'm on my soapbox here, I don't ge

Re: Flexible parsing (was Tying & Overloading)

2001-04-27 Thread Eric Roode
lexible syntax can be infinitely difficult to decipher. Thanks. -- Eric J. Roode[EMAIL PROTECTED] Senior Software Engineer, Myxa Corporation

Re: Flexible parsing (was Tying & Overloading)

2001-04-25 Thread Eric Roode
you could use to just the One Standard Style? -- Eric J. Roode[EMAIL PROTECTED] Senior Software Engineer, Myxa Corporation

Re: s/./~/g

2001-04-25 Thread Eric Roode
ave seen written out so far for the shift from -> to . and . to is: it looks more like other languages. That seems like a whole lot of fixing of non-broken syntax. -- Eric J. Roode[EMAIL PROTECTED] Senior Software Engineer, Myxa Corporation

Re: Strings vs Numbers (Re: Tying & Overloading)

2001-04-25 Thread Eric Roode
ascript is. My two cents. Thanks for listening. -- Eric J. Roode[EMAIL PROTECTED] Senior Software Engineer, Myxa Corporation

Re: RFC 12 (v2) variable usage warnings

2000-09-21 Thread Eric Roode
bly uninitialized" warning, right? -- Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Engineer'tona ', 'reh', 'ekca', 'lre', Myxa Corporation'.r', 'h ', 'uj', 'p ', 'ts';

Re: RFC 12 (v3) variable usage warnings

2000-09-21 Thread Eric Roode
my ($a, $b, $c); initialize_to_seven ($a, $b, $c); print "$a, $b, $c\n"; ------ Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Enginee

Re: RFC 263 (v1) Add null() keyword and fundamental data type

2000-09-20 Thread Eric Roode
Glenn Linderman wrote: >Eric Roode wrote: > >> 1. You don't say in your RFC, but I'm guessing, that a null value >> evaluates to false in a boolean context. Correct? > >I would expect it to be considered false. Logical expressions involving >NULL are defined

Re: RFC 12 (v2) variable usage warnings

2000-09-20 Thread Eric Roode
ndefined value in line 7 (run time) How about: foo(); $x = 1 unless defined($x); print $x; Generate a warning, or not? Or: foo(); print $x; Generate a warning, or not? Which one? Remember, foo() may initialize $x. -

Re: RFC 263 (v1) Add null() keyword and fundamental data type

2000-09-20 Thread Eric Roode
first. Would the use of a null value in a string generate a warning, as an undef value does now? -- Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Engineer'tona ', 'reh', 'ekca', 'lre', Myxa Corporation'.r', 'h ', 'uj', 'p ', 'ts';

Re: RFC 258 (v1) Distinguish packed binary data from printable strings

2000-09-19 Thread Eric Roode
ypes'", it would be a compile-time error. If so, please add this suggestion to the RFC. If not, should I make a separate RFC? -- Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Engineer'tona ', 'reh', 'ekca', 'lre', Myxa Corporation'.r', 'h ', 'uj', 'p ', 'ts';

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

2000-09-15 Thread Eric Roode
CHUNK2 $chunk3 = < CHUNK3 The here-doc terminators all line up with the perl code. The generated program is nicely indented relative to the left margin. -- Eric J. Roode, [EMAIL PROTECTED

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

2000-09-14 Thread Eric Roode
;, say <<<, rather than chucking the whole idea out the window. ------ Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Engineer'tona ', 'reh', &#x

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

2000-09-14 Thread Eric Roode
for you to trip over or hang yourself. I set my tab stops to four columns; at least one of my coworkers sets his tab stops to eight columns. We edit the same code with no problems. -- Eric J. Roode, [EMAIL PROTECTED]

Re: Drop here docs altogether? (was Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs))

2000-09-14 Thread Eric Roode
uot;oops! I added a bracket. gotta change the quoting character!"). -- Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Engineer'tona ', 'reh', 'ekca', 'lre', Myxa Corporation'.r', 'h ', 'uj', 'p ', 'ts';

RE: (RFC 199) Alternative Early-Exit Mechanisms for Blocks?

2000-09-14 Thread Eric Roode
at is the point of sub func1 { func2(); } sub func2 { last func1; } ? Imho, it is a BAD THING for functions to know who called them, and to vary their behavior accordingly. -- Eric J. Roode,

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

2000-09-14 Thread Eric Roode
side of the screen. I prefer four columns. No problem -- I make my tab settings four columns. Which, for purposes of here docs and this proposal, works just as well. The REAL sinners are those who mix spaces and tabs. THAT's evil. :-) ---

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

2000-09-14 Thread Eric Roode
Glenn Linderman wrote: >Amen to the below. So can we have an RFC 111 (v4) that gets rid of allowing >stuff after the terminator? Even the ";" afterward seems useless... the ";" >should be at the end of the statement, not the end of the here doc. The only >improvement to here docs I see in this

Re: Conversion of undef() to string user overridable for easy debugging

2000-09-13 Thread Eric Roode
el string. This would HAVE to be a very optional feature. I rely on undef converting to a null string in many, many programs. -- Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Enginee

Re: Don't require braces

2000-09-13 Thread Eric Roode
x27;s one-line if/for/while syntax as a matter of convenience, but I grudgingly admit that Perl's way more than makes up in unambiguity what it loses in convenience. -- Eric J. Roode, [EMAIL PROTECTED] print scala

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-11 Thread Eric Roode
as set representations and you have not made a good case yet. Your least-bad argument has been that arrays "make more sense to you" than hashes. Does execution time mean nothing to you? -- Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Engineer'tona ', 'reh', 'ekca', 'lre', Myxa Corporation'.r', 'h ', 'uj', 'p ', 'ts';

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-11 Thread Eric Roode
Ariel Scolnicov wrote: >Eric Roode <[EMAIL PROTECTED]> writes: > >[...] > >> The underlying problem is that arrays don't make SENSE as an >> implementation for sets. What is the value of: > >But all of the following DO make sense as implementations

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-11 Thread Eric Roode
mall set of people, and fairly useless to the majority of Perl programmers. That screams "module" to me, not "new core features". -- Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Engineer'tona ', 'reh', 'ekca', 'lre', Myxa Corporation'.r', 'h ', 'uj', 'p ', 'ts';

Re: $a in @b

2000-09-11 Thread Eric Roode
uld pass if the last expression in the block evaluates to true, just as grep does now: @l = grep {$_>9} @L; # same as: @l = grep {pass if $_>9}; #--> (10) -- Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Engineer'tona ', 'reh', 'ekca', 'lre', Myxa Corporation'.r', 'h ', 'uj', 'p ', 'ts';

Re: RFC 195 (v1) Retire chop().

2000-09-08 Thread Eric Roode
Richard Proctor wrote: >>[Eric Roode wrote] >> Perhaps $/ and $\ should become per-filehandle variables, and >> there should be some way to set autochomp-on-read per filehandle, >> and auto-newline-on-output per filehandle. > >I can see a small benefit for autocho

Re: RFC 195 (v1) Retire chop().

2000-09-08 Thread Eric Roode
remove $/ from the end of a string at any other time, they can s,$/$,, -- Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Engineer'tona ', 'reh',

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-01 Thread Eric Roode
but maybe it should be a primitive. I dunno. I don't use set functions, so I'd never use it, personally. But I'm sure many set mathematicians out there would. ------ Eric J. Roode, [EMAIL PROTECTED] pri

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-01 Thread Eric Roode
-- most of it quite simple and short -- for implementing union, intersection, complement, etc, with hashes and with bit vectors. Also, as TomC recommended, do check out the existing modules on CPAN. -- Eric J. Roode, [EMAI

Re: Proposal: chop() dropped

2000-09-01 Thread Eric Roode
dead-fish way to do s|$/$||, with some extra magic thrown in for when $/ is null. -- Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Engineer'tona ', 'reh&

Re: Proposal: chop() dropped

2000-08-31 Thread Eric Roode
if /^barf/; last if /!!$/; print LOG "$_ found\n"; } -- Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Engineer'tona ', 'reh', 'ekca', 'lre', Myxa Corporation'.r', 'h ', 'uj', 'p ', 'ts';

Re: Proposal: chop() dropped

2000-08-31 Thread Eric Roode
via the > > use String::Chop; > >or related module. Useful functions all, no doubt. But I would lobby heavily for a new set of names -- ones that can be remembered! Quick -- which trims leading spaces, champ, chump, or chimp? ---

RE: Proposal: chop() dropped

2000-08-31 Thread Eric Roode
in it > } Although... if you're going to generalize it this way, why not call them LEFT$ and RIGHT$, and rename substr() to MID$? Ugh... -- Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sor

Re: "Tainted" precision

2000-08-29 Thread Eric Roode
people, I'd think. use precision; # maybe? Disclaimer: I failed limit-of-error analysis in college :-) -- Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Engineer'tona ', 'reh', 'ekca', 'lre', Myxa Corporation'.r', 'h ', 'uj', 'p ', 'ts';

Re: Multiple for loop variables

2000-08-29 Thread Eric Roode
the "for" statement, and I haven't seen one yet that had seemed justified to me. -- Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Engineer'tona ', 'reh', 'ekca', 'lre', Myxa Corporation'.r', 'h ', 'uj', 'p ', 'ts';

Re: Multiple for loop variables

2000-08-28 Thread Eric Roode
ist, 0, 3) ) {...} ? (notwithstanding the destructive nature of splice) ------ Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Engineer'tona ', 'reh', &#x

Re: Nice to have it

2000-08-28 Thread Eric Roode
over @hash{ grep /^[^_]/, keys %hash } would be what? Brevity? ------ Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort Senior Software Engineer'tona ', 're

Re: HERE construct

2000-08-28 Thread Eric Roode
Steve Simmons wrote: >In all the straining at gnats over whitespace, filtering, etc, I have yet >to see a single proposal that isn't accomplished by just using variables >and manipulating them appropriately. And it avoids all the problems with >whitespace on the HERE word. In many cases, I agree

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

2000-08-28 Thread Eric Roode
Richard Proctor proposed: > > All of these should work: > > print print << EOL; > EOL > print

Re: OT: pronouncing "www"

2000-08-24 Thread Eric Roode
At our company, we pronounce "www" as "dub-dub-dub". The first syllable of the letter "w", three times. Very easy to say quickly. "dub-dub-dub-dot-perl-dot-com". Try it. -- Eric J. R