1. registration and requests
- Posted by Carlos Valdes <cvaldes at DF.GOB.MX> Feb 11, 1999
- 483 views
- Last edited Feb 12, 1999
Today´s sad story: After almost two years using Euphoria I decided to register through the web. I had not registered before because I considered some registering options as expensive to the price of the package and the cheap one, through the web, difficult. I was right. I got an automatic reply saying that my address is not my address. Rob, you more than deserve your money, but this is frustrating, I don´t want to keep trying, sending variations of the same tune, and maybe some day getting registered. I wanted the download version and no more. :( Now, I want to ask for something that I think is needed. Normally when you want to do something zero or more times you use: while x<10 do . . --code . end while But when you want to execute a paragraph at least once, you use: while 1 do . . --code . if x>10 then exit end if end while Why there is not something like: repeat . . . until x>10 --condition tested at end of loop Also I think that Euphoria objects and sequences are very flexible and powerful, and for shure this is one of the main strengths of the language, but there are times when you want to have fixed structures that automatically complain if you violate content types or sizes. In this particular case, structures or templates are really needed (similarly to constants: individual elements that do not change during the execution of the program. I would call them atomic-structures). Going back to the past, I think that expressions like: seq[..5] and seq[6..] meaning take the first 5 elements of seq and take from the 6th to the end, respectively, give elegance to the language (although the first does not save much keypresses). Also, I want to thank all the participants in the list for the help (although most of the time I am only an observer but learn through the help you give to others) and the opportunity to learn with their contributions and samples. You really do honor the name of the language (by the way, it does not need to change, a language is used because of its usefuness, expressiveness, and ease of use, not because of its name), even with the permanent discussions and disagreements. But remember, it is because we are all Euphoric! (and I would like to be a registered one). Greetings (y saludos a los muchos miembros de la lista que hablan español). Carlos Valdés jcarlosvo at hotmail.com
2. Re: registration and requests
- Posted by Robert Craig <rds at ATTCANADA.NET> Feb 13, 1999
- 471 views
Carlos Valdes writes: > After almost two years using Euphoria I decided to register through > the web. I had not registered before because I considered some > registering options as expensive to the price of the package and the > cheap one, through the web, difficult. > I was right. I got an automatic reply saying that my address is not > my address. > Rob, you more than deserve your money, but this is frustrating, I > don´t want to keep trying, sending variations of the same tune, and > maybe some day getting registered. I wanted the download version > and no more. :( I'm sorry that you ran into a glitch. Over 95% of the time PsL orders go very smoothly, but they do have some strict security measures in place to prevent possible fraud. It just means that you have to resubmit your Web order, and be careful not to mistype your address or whatever. We've only had one case where someone actually used a stolen credit card in an attempt to register Euphoria. I received a copy of the message that PsL sent you. Apparently the address that you filled in was not exactly the same as the address that your credit card company has on record for you. You could try submitting your Web order again as PsL suggests, or, you can call them at 713-524-6394 and talk to a human. If you are frustrated with PsL, you could try one of the following instead: * send RDS a check or money order in U.S. or Canadian funds $39 U.S. or $60 Canadian (Our bank accepts most major currencies, but not Mexican currency.) * send RDS *cash* in U.S. or Canadian funds. We don't recommend sending cash, but if you are really stuck, you can do it. You don't have to go through PsL to avoid the $5 shipping charge. We can e-mail the download instructions as soon as we receive payment by any means. ------------------------- > Why there is not something like: > repeat > . > . > . > until x>10 --condition tested at end of loop Euphoria tries to be a "minimal" language, where we avoid adding language features for things that can be handled almost as well by existing features. > seq[..5] and seq[6..] I've been tempted to add this, but in the first case is it really so hard to type a '1'? e.g. seq[1..5] instead of seq[..5] The second form would be useful, but I still can't make up my mind about it. Regards, Rob Craig Rapid Deployment Software http://members.aol.com/FilesEu/
3. Re: registration and requests
- Posted by Don Groves <groves at ACM.ORG> Feb 13, 1999
- 447 views
At 00:19 2/13/99 -0500, Robert Craig wrote: >Carlos Valdes writes: > >> Why there is not something like: > >> repeat >> . >> . >> . >> until x>10 --condition tested at end of loop > >Euphoria tries to be a "minimal" language, where >we avoid adding language features for things that can be handled >almost as well by existing features. Amen to that! For those who want Euphoria to be more "maximal", there's always Perl. Perl was designed by a linguist (who is also an excellent computer scientist) and the same Perl statement can usually be written in many ways, just as in most human languages. This can be both a blessing and a curse. It can be a very complex and confusing language, particularly to a newbie. And Perl doesn't have anywhere near the performance of Euphoria. All that code in the compiler to handle all that extra syntax does have a price. I'm not knocking Perl, BTW. It's one of my favorite languages and certainly the best there is for processing text files. But I'll take Euphoria for it's speed, simplicity, and easy-to-understand syntax for most of my programming. -- Don Groves
4. Re: registration and requests
- Posted by "Bown, John" <John.Bown at UK.ORIGIN-IT.COM> Feb 15, 1999
- 483 views
> >> Why there is not something like: > >> repeat >> . >> . >> . >> until x>10 --condition tested at end of loop > >Euphoria tries to be a "minimal" language, where >we avoid adding language features for things that can be handled >almost as well by existing features. I agree with the sentiments but this conflicts with some of the realities of version 2.1 ... the 2.0 version allowed addition, subtraction and so on so why were the += / -= operators added ? They certainly weren't *needed*. The REPEAT/UNTIL statement is infinitely more understandable and readable that a bodged WHILE/END WHILE statement and one of the fundamental control structures expected in a modern programming language. It should be incredibly simple to add a REPEAT/UNTIL to Euphoria; fobbing us off with, "this can be handled almost as well by existing features". Please Rob, could you explain further why +=/-= are valid extensions in 2.1 but a REPEAT/UNTIL is rejected almost out of hand ? I'm at a loss as to how to balance your views at the moment.
5. Re: registration and requests
- Posted by Don Groves <groves at ACM.ORG> Feb 15, 1999
- 459 views
At 10:26 2/15/99 +0000, Bown, John wrote: >> >>> Why there is not something like: >> >>> repeat >>> . >>> . >>> . >>> until x>10 --condition tested at end of loop >> >>Euphoria tries to be a "minimal" language, where >>we avoid adding language features for things that can be handled >>almost as well by existing features. > >I agree with the sentiments but this conflicts with some of the >realities of version 2.1 ... the 2.0 version allowed addition, >subtraction and so on so why were the += / -= operators added ? They >certainly weren't *needed*. From my perspective, the += style operators save a lot of typing, which cuts down on errors (for me, anyway . "long_variable_name += 1" is much easier to type (and read) than "long_variable_name = long_variable_name + 1", IMHO. -- Don Groves
6. Re: registration and requests
- Posted by "Boehme, Gabriel" <gboehme at MUSICLAND.COM> Feb 15, 1999
- 489 views
Robert Craig <rds at ATTCANADA.NET> wrote: >> Why there is not something like: > >> repeat >> . >> . >> . >> until x>10 --condition tested at end of loop > >Euphoria tries to be a "minimal" language, where >we avoid adding language features for things that can be handled >almost as well by existing features. Hmm...I guess *my* response would be that "repeat...until <condition>" syntax is rather ugly and not very Euphoric -- it certainly doesn't fit very well alongside all the while...end while/for...end for syntax. But perhaps something *like* this would be nice to have: loop . . . when x > 10 exit end loop 1) loop...end loop -- Yes, I know this can be done with "while 1 do ... end while", but really, that whole "while 1" business looks goofy. And isn't it a bit slower than a dedicated "loop" would be? Doesn't the interpreter have to check that "while 1" condition each time through the loop? Not very speed efficient. 2) when <condition> exit -- The "when" serves the same function as the "if", except that it specifically indicates the loop's exit condition, and the interpreter expects it to be delimited with the "exit" keyword. This is a compact way of showing the loop's exit condition (instead of having to write out a whole "if" statement just to exit). Best of all, this way you can set up your exit condition anywhere you want to in the loop -- you're not tied to having it at the bottom or at the top. Plus, you can maybe even indicate more than one exit condition per loop this way if you need to. Many times I've had to write code like this... -- example "a" line = gets(fn) while sequence(line) do -- whatever... line = gets(fn) end while ..which can be a real pain when I forget to include that second "line = gets(fn)" in my "while" loop. (I've done that WAAAY too many times!) Euphoria shouldn't encourage that kind of error. With syntax like this... -- example "b" loop line = gets(fn) when atom(line) exit -- whatever... end loop ..that kind of mistake isn't made, and we don't have that extra line of redundant code. Yes, yes, I know this "can be handled almost as well" by doing this... -- example "c" while 1 do line = gets(fn) if atom(line) then exit end if -- whatever... end while ..but then we're into that useless "while 1" condition again. Man, does that look weird to waste a "while" on a "1" and use a whole "if" statement for the loop's exit condition just one line later! And I'm sure it's not very speedy either. Oh well. In any case, those are my ideas for Euphoria alternate loop syntax -- no more "while 1" loops! (NMW1L! -- my new acronymical battle cry :) ) >> seq[..5] and seq[6..] > >I've been tempted to add this, but in the first case is it really >so hard to type a '1'? >e.g. > seq[1..5] instead of seq[..5] > >The second form would be useful, but I still can't make up >my mind about it. I agree that the first form is unnecessary, but the second form is needed, IMO. Not exactly as depicted above, but rather like this: seq[6..end] Where the 'end' keyword stands for 'length(seq)'. I don't see why the 'end' keyword can't be used here -- after all, the two periods together ('..') have a special meaning within the brackets, so why not do the same for 'end'? Using the 'end' keyword like this has another advantage over the seq[6..] method -- you can do index calculations with it, and use it to indicate an element instead of a slice: slice = seq[6..end-1] -- from element 6 thru the second-to-last element element = seq[end] -- the last element of the sequence element = seq[end-1] -- second-to-last element of the sequence (If this looks familiar to some of you, this is the same usage of 'end' that I originally suggested to Dave Cuny for his Euphoria preprocessor.) I think this would keep slicing methods consistent with the way they work now, while eliminating the need to type out 'length(seq)' every time. Anyway, there's my two cents' worth -- at a penny per idea. What a bargain! :) Gabriel Boehme NMW1L!
7. Re: registration and requests
- Posted by Robert Craig <rds at ATTCANADA.NET> Feb 15, 1999
- 477 views
Gabriel Boehme writes: > Doesn't the interpreter have > to check that "while 1" condition each time through the loop? > Not very speed efficient. "while 1 do" is optimized away at compile time. (Actually, any non-zero constant will be optimized.) No internal code is emitted. The "end while" will jump unconditionally back to the first statement in the while loop. No test is ever performed at run-time. With Euphoria 2.1 it's even better. Consider: while 1 do a += 1 if a > b then -- bunch of statements end if end while With "branch straightening", when a <= b the internal form code for the if-statement will jump *directly* back to "a += 1", without executing the unconditional branch at "end while". I have to admit that "while 1 do" seems like an awkward way to introduce an infinite loop (Euphoria is not alone in this.) However I don't want to introduce a third looping construct. In the very early days, pre-1.0, I resisted adding the for-loop statement - everything was done with while-loops up to that time. John Bown writes (regarding minimalism): > why were the += / -= operators added ? They > certainly weren't *needed*. That's a good point. I resisted adding these assignment operators for a long time, on the basis of minimalism. Finally a few months ago I succumbed, after typing statements like: galaxy[row][column][otype] = galaxy[row][column][otype] + 1 in many places in Language War. What would the *ultimate* minimal language look like? Theoretically the following language, consisting of 4 statements, will let you compute any mathematical function that you can compute in Euphoria, C++, or any other programming language. (Note that I/O is not considered, just computation.) 1. var = 0 2. var = var + 1 3. goto label 4. loop var times ... end loop where any statement can have a label, and be the target of a goto. You can introduce as many vars as you want, without declaring them. Want to add 3 to x? x = x + 1 x = x + 1 x = x + 1 Want to assign y to x? x = 0 loop y times x = x + 1 end loop Want to subtract? multiply? divide? remainder? You can do them all with loops and adding 1. Regards, Rob Craig Rapid Deployment Software http://members.aol.com/FilesEu/
8. Re: registration and requests
- Posted by Grape Vine <chat_town at HOTMAIL.COM> Feb 15, 1999
- 481 views
>At 10:26 2/15/99 +0000, Bown, John wrote: >>> >>>> Why there is not something like: >>> >>>> repeat >>>> . >>>> . >>>> . >>>> until x>10 --condition tested at end of loop >>> >>>Euphoria tries to be a "minimal" language, where >>>we avoid adding language features for things that can be handled >>>almost as well by existing features. >> >>I agree with the sentiments but this conflicts with some of the >>realities of version 2.1 ... the 2.0 version allowed addition, >>subtraction and so on so why were the += / -= operators added ? They >>certainly weren't *needed*. > >From my perspective, the += style operators save a lot of typing, >which cuts down on errors (for me, anyway . >"long_variable_name += 1" is much easier to type (and read) than >"long_variable_name = long_variable_name + 1", IMHO. >-- >Don Groves I would prefer to see it like "long_variable_name + 1" that is very easy to read and to understand..(fo mer...remember I am a inbread redneck) Grape ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
9. Re: registration and requests
- Posted by "Boehme, Gabriel" <gboehme at MUSICLAND.COM> Feb 16, 1999
- 479 views
Grape Vine <chat_town at HOTMAIL.COM> wrote: >>>>Euphoria tries to be a "minimal" language, where >>>>we avoid adding language features for things that can be handled >>>>almost as well by existing features. >>> >>>I agree with the sentiments but this conflicts with some of the >>>realities of version 2.1 ... the 2.0 version allowed addition, >>>subtraction and so on so why were the += / -= operators added ? They >>>certainly weren't *needed*. >> >>From my perspective, the += style operators save a lot of typing, >>which cuts down on errors (for me, anyway . >>"long_variable_name += 1" is much easier to type (and read) than >>"long_variable_name = long_variable_name + 1", IMHO. >>-- >>Don Groves > >I would prefer to see it like >"long_variable_name + 1" > >that is very easy to read and to understand..(fo mer...remember I am a >inbread redneck) With +=, -=, etc., always remember the following phrase: "If you don't like them, just don't use them!" <grin> Gabriel Boehme