1. Changes to Euphoria

Jason Gade wrote:
> 
> 
> It's not like I'm against /every/ feature, I'm trying to make that clear. And
> I'm not so much in the "bloating the interpreter" camp or in the "slowing down
> the interpreter" camp because these days it just doesn't really matter that
> much. Clear code is far more important.
> 

I am in the do not slow down the interpreter camp and the clear code camp. I do
not care too much if the executable grows a bit.

> Maybe it's just pie-in-the-sky idealism, but for me it has more to do with the
> overall look and feel of the language, which features /should/ be included
> because
> they fit the philosophy of the language and which are just the syntactic sugar
> flavor-of-the-week.
> 

I am not against syntactic sugar as a lot of times the syntactic sugar is nice.
Many people consider the for loop syntactic sugar:

for a = 1 to length(lines) do
   --body
end for


That's simply sugar for:

integer a
a = 1
while a < length(lines) do
    -- body
    a = a + 1
end while


What I am for is not to reduce 2 character here or there, but sugar above is
great stuff. It means I (the programmer) have to work less to achieve the same
goal. That's my end desire. Am I lazy? I guess one could say that, but if you
have a ditch to dig will you choose a spoon, a shovel or back hoe?

Now, I am also in the camp that says let's try to have one way of doing things.
I say try because, you could use a for or while loop to accomplish the same
thing, but each has their own benefit. They are not duplicating functionality. I
have used languages that have added every little new buzz word out there and they
are so complex it's no fun to program in. After all, I do like my programming
job, why? I think it's fun.

> I think there should be a compelling reason to add anything --feature or new
> built-in-- to the interpreter, and a broad consensus as well. Not just
> "because
> it's cool."
>

Again, can you please tell me what has been added to the interpreter "because
it's cool" ? In your opinion, I am not asking for fact, simply your opinion.
 
> Same rant, different day I guess.
 
> Heh, for true minimalism and performance I guess I can always just stick with
> C.
>

Hm, C has goto, right grin (added for goto fans, sorry, could not resist)

> But allow me to make a comparison -- in some ways, going from C (a beautiful
> language, IMO, missing some features) to C++ (not so beautiful, lots of
> little-used
> features) introduced a lot of power and expressiveness at the expense of a lot
> of clunkiness and ugliness. And some missing features remain missing, or at
> least non standard. I'd like to avoid that here.
> 

Hm, I hardly think C to C++ is a valid comparison of Eu 3.1 to Eu 4.0.

--
Jeremy Cowgar
http://jeremy.cowgar.com

new topic     » topic index » view message » categorize

2. Re: Changes to Euphoria

Jeremy Cowgar wrote:
> 
> Jason Gade wrote:
> > 
> > 
> > It's not like I'm against /every/ feature, I'm trying to make that clear.
> > And
> > I'm not so much in the "bloating the interpreter" camp or in the "slowing
> > down
> > the interpreter" camp because these days it just doesn't really matter that
> > much. Clear code is far more important.
> > 
> 
> I am in the do not slow down the interpreter camp and the clear code camp. I
> do not care too much if the executable grows a bit.

Which is why I like you smile !

> 
> > Maybe it's just pie-in-the-sky idealism, but for me it has more to do with
> > the
> > overall look and feel of the language, which features /should/ be included
> > because
> > they fit the philosophy of the language and which are just the syntactic
> > sugar
> > flavor-of-the-week.
> > 
> 
> I am not against syntactic sugar as a lot of times the syntactic sugar is
> nice.
> Many people consider the for loop syntactic sugar:
> 
> }}}
<eucode>
> for a = 1 to length(lines) do
>    --body
> end for
> </eucode>
{{{

> 
> That's simply sugar for:
> 
> }}}
<eucode>
> integer a
> a = 1
> while a < length(lines) do
>     -- body
>     a = a + 1
> end while
> </eucode>
{{{

> 
> What I am for is not to reduce 2 character here or there, but sugar above is
> great stuff. It means I (the programmer) have to work less to achieve the same
> goal. That's my end desire. Am I lazy? I guess one could say that, but if you
> have a ditch to dig will you choose a spoon, a shovel or back hoe?
> 
> Now, I am also in the camp that says let's try to have one way of doing
> things.
> I say try because, you could use a for or while loop to accomplish the same
> thing, but each has their own benefit. They are not duplicating functionality.
> I have used languages that have added every little new buzz word out there and
> they are so complex it's no fun to program in. After all, I do like my
> programming
> job, why? I think it's fun.

Right, and the "one way" and the "sugar" or "tool in the toolbox" (to borrow
another phrase) sometimes conflict. I understand that. Which is why I'm trying to
make clear that I don't want to obstruct things just for the sake of being
obstructionist.

> 
> > I think there should be a compelling reason to add anything --feature or new
> > built-in-- to the interpreter, and a broad consensus as well. Not just
> > "because
> > it's cool."
> >
> 
> Again, can you please tell me what has been added to the interpreter "because
> it's cool" ? In your opinion, I am not asking for fact, simply your opinion.

"retry" is the one that comes to mind mostly, for arguments that I've already
given, and I've also already conceded on it.

Other things which have only been proposed here, and like yesterday, I realize
that it's just discussion at this point though sometimes, like yesterday, it
still feels like being steam rolled, like some things will be included no matter
what anybody thinks.

nested routines felt like that yesterday, just other vague feelings.

>  
> > Same rant, different day I guess.
>  
> > Heh, for true minimalism and performance I guess I can always just stick
> > with
> > C.
> >
> 
> Hm, C has goto, right grin (added for goto fans, sorry, could not resist)

Yes, C has goto. Nothing wrong with that.

I was once going to port Rogue from C to Euphoria (just because) and I reached a
piece of code that does something like the proposed "entry" keyword. Since C
doesn't have "entry", it used a goto. It took awhile for me to figure out how to
do that properly in Euphoria and I eventually had to ask here in the list.

Of course, someone gave me the obvious and elegant solution using an "if"
statement.

Pity I never finished that project...

> > But allow me to make a comparison -- in some ways, going from C (a beautiful
> > language, IMO, missing some features) to C++ (not so beautiful, lots of
> > little-used
> > features) introduced a lot of power and expressiveness at the expense of a
> > lot
> > of clunkiness and ugliness. And some missing features remain missing, or at
> > least non standard. I'd like to avoid that here.
> > 
> 
> Hm, I hardly think C to C++ is a valid comparison of Eu 3.1 to Eu 4.0.
> 
> --
> Jeremy Cowgar
> <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a>

Right, again to be more clear -- my rants are less about 4.0 specifically (even
though it still seems like features are being piled on) but the future of the
language in general, beyond 4.0.

As I've said both here and in the developer's list, I'm pretty much on board
with the 4.0 roadmap that you have spelled out.

--
A complex system that works is invariably found to have evolved from a simple
system that works.
--John Gall's 15th law of Systemantics.

"Premature optimization is the root of all evil in programming."
--C.A.R. Hoare

j.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Changes to Euphoria

After reading all the threads regarding the changes in Eu 4.0, I'd like to add
my 1/2 cent.

Please, forgive me, I'm really new to Eu, even if I went back and forth from it
for several times now, so my doubt is *for sure* a naive one, and my english too
bad.

I was first attracted to Eu for speed, and for the ability to use an interpreter
*and* a real compiler, but the most important feature of the language soon became
its 'devotion' to sequences.

This made me (erroneously?) think that Eu could have its place in vector
languages, like APL, J, K, Q etc. etc., with its own character and extentions
toward procedural languages, but nevertheless in the array languages pool.

Reading past threads I noticed that Rob himself had a deep experience with APL,
so some sort of inheritance of good ideas from it could be a supposition even
more reasonable.

In all recent discussions I saw on Euforum, I did not see any proposal for
better sequence ops, or some improvements on sequencing in itself though, but
many, reasonable or not, I'm not in the position of expressing an honest opinion,
about procedural structures.

Just out of curiosity, am I totally wrong in thinking Eu in the vector language
family, or are Eu sequences already at the best we can achieve (really, no flame
intended at all), or ...?

TIA, and

Cheers.
MBianchi

new topic     » goto parent     » topic index » view message » categorize

4. Re: Changes to Euphoria

MBianchi wrote:
> 
> I was first attracted to Eu for speed, and for the ability to use an
> interpreter
> *and* a real compiler, but the most important feature of the language soon
> became
> its 'devotion' to sequences.
> 

Me too!

> This made me (erroneously?) think that Eu could have its place in vector
> languages,
> like APL, J, K, Q etc. etc., with its own character and extentions toward
> procedural
> languages, but nevertheless in the array languages pool.
> 

I'm sorry. I've played with many, many languages but all of the ones you listed,
I have not. Honestly, I do not know what a vector language is.

> Reading past threads I noticed that Rob himself had a deep experience with
> APL,
> so some sort of inheritance of good ideas from it could be a supposition even
> more reasonable.
> 
> In all recent discussions I saw on Euforum, I did not see any proposal for
> better
> sequence ops, or some improvements on sequencing in itself though, but many,
> reasonable or not, I'm not in the position of expressing an honest opinion,
> about procedural structures.

There is a new library called sequence.e which contains many functions that work
on sequences. I am unsure if any of those would be what you are thinking, since I
am not experienced in vector languages.

> Just out of curiosity, am I totally wrong in thinking Eu in the vector
> language
> family, or are Eu sequences already at the best we can achieve (really, no
> flame
> intended at all), or ...?
> 

Can someone else answer this who understands vector languages?

--
Jeremy Cowgar
http://jeremy.cowgar.com

new topic     » goto parent     » topic index » view message » categorize

5. Re: Changes to Euphoria

Thoughts inspired by Jason and Jeremy's discussion...

Things in life are often a trade off...

Programmers develop habits as well as use idioms of a particular language.
Working with a small team of programmers on a huge project I can often tell
which member of my team wrote a particular section of code by how it's
written.  If I got my way, my ability to do this would lessen which is a loss.

So what am I looking to get to compensate for this loss?

I'm looking for a cleaner code that is easier to read with understanding.
The quicker you get comprehension the less you are stressed.  Making the
programmers job easier.  Idioms shared make comprehension easier too.

You can achieve much of this by the minimalist approach.

Take GOTO's verses structured code as a first example.  GOTO allows a 
programmer to express themselves very individually (making it easier for
me to tell who wrote the code) while structured code isn't so individual.
The structure tends to enforce a likely similar looking code.  And it's
generally quicker to comprehend (especially in a long block of code.)
Structures have a beginning so you know you're in a structure.  Even if the
code scrolls of the end of the page, you already know the eventuality.

With GOTO all you see at the beginning of a loop is a label.  That label
doesn't tell you, you are about to enter a loop.  Your comprehension will
require you to examine more code.

You could also minimize by taken out the structure, just use GOTO's
everywhere.  It's largely a matter of taste, but I prefer using structured
code.  YMMV.

I'd like to talk about loops.  You may think I'm just in love with my idea
(which I admit is partly true) but there are good reasons for my proposal.
I don't believe any on this forum will have any trouble judging the merits
or speaking their mind about it.  Some may even oppose an idea not for the
idea itself but because of who proposes it (which I think is a rather sad
thing.)

It's been noted that FOR loops are an addition to Euphoria which originally
had just while loops.  I've used FOR loops so much that I don't give it a
thought usually about whether they should be included or not, but thinking
minimally (don't include what you don't need) I realize there's a good
reason for not having them.  Let me start with the while loop and get back
to the for.

while (1)
   ...
end while

I would claim that quicker comprehension occurs with this construct...

Loop
   ...
End Loop

Both are infinite loops.  Yes, it's not much quicker to comprehend, we're
not dolts after all, but after examining thousands of lines of code, by 
3am I betcha that it becomes a bit more significant.

I would also claim (without support, just my INTJ assertiveness again) that
comprehension is better when Loop is used to describe Loop, rather than any
other _____ is a loop.  Call me crazy.

Now, how about getting out of the loop?  Some language provide a plethora
of ways and are thinking of new ways all the time no doubt (programmers are
such a creative bunch after all.)  The fact that sometimes you need to get
out of loops and the beginning, the end, the middle has led to repeat, until,
etc.  But for a minimalist the answer is right there, IF.  You need something
like EXIT to be used with the IF, but IF eliminates the need for any 
additional unneeded keywords because you can put the IF test anywhere in the
loop; beginning, middle and end.  Exit tells you immediately that you are
leaving the loop you are currently in.  Exit 12, on the other hand, is an
offramp in New Jersey I think!

What about FOR.  What does FOR add to the game that LOOP doesn't give you
already?  FOR gives you an INDEX.  What a great idea.  But perhaps
if a minimalist were trying to add an implicit INDEX he or she might have
realized you don't need to add FOR at all!

Loop
   ...
End Loop

There it is, did you see it?  Looks like anticomprehesion time, doesn't it?
Never fear, I'll get back to that in a moment.

FOR gives you more than just INDEX.  You can tell where to start, where to
end and how much to increment by.

For LOOP to have a start you'd have to do something like this...

Loop from 5

End Loop

Well why not?  This also gives us something else...

Loop
  ...
End Loop

...under the covers can become...

:Loop
   ...
GOTO Loop

And now quicker comprehension because the lack of from indicates no INDEX
at all.  It does however require the idiom  Loop from 1, but I don't think
that's such a big deal.  Idioms foster comprehension too.

Other languages use STEP where Euphoria uses BY...  I really like BY.  I
don't know why, I just do.  So we keep it...

Loop from 10 by 5

As long a we understand the INDEX is implicit (with only Loop for loops that
comprehension will come rathe quickly.  We don't have any other type of loop
to cause confusion.)

But how about the end of the loop?  With FOR I specify the end in the
declaration.  We minimalist don't need it.  We already have IF (cond) Exit.

Again I would restate that use of a single loop construct would make
comprehension quicker and would be reinforced with each subsequent use.

I stated my case for the two issues I've brought up before (somebody got
a fire extinguisher handy???)

Am I in love with my ideas.  Sure, why not?  Can I live with rejection.
Yeah, I suppose.  I'll just go into a corner and sulk for awhile.... blink

The biggest problem is that taken up my proposal requires change.  Change
is not easy.  No, better to say, change is hard.  One of the really annoying
things about me is that time often proves me right; by then the sun has
cooled, the earth has left it's orbit and the guys I was fighting with (in 
the friendly fashion that programmers do) has left the company.

But it's not about me.  So please consider the merits regardless of the
source.

I would also argue that a minimalist approach makes for a better compiler
or interpreter but we'd all agree on that, so where's the fun?

new topic     » goto parent     » topic index » view message » categorize

6. Re: Changes to Euphoria

Jeremy,

Thanks for answering, perhaps some link could be useful to clarify what I'm
talking about:

http://www.byte.com/art/9509/sec12/art2.htm (for an interesting lecture)
http://www.vector.org.uk/archive/v231/legrand.htm (even more interesting
lecture, to me)
http://www.vector.org.uk/typography/pview.htm (Where they all are from)
http://www.ed-thelen.org/comp-hist/APL-hist.html (most enlightning lecture, from
my standpoint)
http://www.jsoftware.com/

Please, don't be cheated by strange characters, or almost unreadable sources, or
age of most articles contributions, that's not the real point, in my opinion.

Looking at the concepts which were at the foundations of this class of
languages, I cannot avoid to think to Eu sequences as still misunderstood
children of the language.... (by myself, at least, for sure!) smile

Couldn't they be considered the most distinguishing feature of the language, and
its 'secret weapon' to be as perfected and empowered as possible ?

Cheers.
MBianchi

new topic     » goto parent     » topic index » view message » categorize

7. Re: Changes to Euphoria

ken mortenson wrote:
> 
> Loop
>    ...
> End Loop

This is a cool idea. All our loop constructs can be replaced by one simple

Loop

End Loop

Loop [from x by y] -- default is from 1 by 1 and optional
  -- put code here to emulate "for" loop
  if Loop = 10 then exit end if 
  -- code here for "while" loops
End Loop

(Can Loop have this dual purpose, to start a Loop AND be its counter?)

So, instead of

for i=1 to 20 do
  ...code
end for

we do

Loop
  ...code
  if Loop = 20 then exit end if
End Loop

Instead of

q = x
while atom(q) do
  ...code
  q = x
end while

q = x
Loop
  if atom(q) then exit end if
  ...code
  q = x
End Loop

Loop..End Loop is a teensie bit more verbose, but it minimalizes the strain
on my brain... one loop construct instead of 2+.

This was just a fun thought experiment. Please don't claim that I'm adding
Loop to Euphoria. 8)

new topic     » goto parent     » topic index » view message » categorize

8. Re: Changes to Euphoria

ken mortenson wrote:
> 
> Thoughts inspired by Jason and Jeremy's discussion...
> 
> Things in life are often a trade off...
> 
> Programmers develop habits as well as use idioms of a particular language.
> Working with a small team of programmers on a huge project I can often tell
> which member of my team wrote a particular section of code by how it's
> written.  If I got my way, my ability to do this would lessen which is a loss.
> 
> So what am I looking to get to compensate for this loss?
> 
> I'm looking for a cleaner code that is easier to read with understanding.
> The quicker you get comprehension the less you are stressed.  Making the
> programmers job easier.  Idioms shared make comprehension easier too.
> 
> You can achieve much of this by the minimalist approach.
> 
> Take GOTO's verses structured code as a first example.  GOTO allows a 
> programmer to express themselves very individually (making it easier for
> me to tell who wrote the code) while structured code isn't so individual.
> The structure tends to enforce a likely similar looking code.  And it's
> generally quicker to comprehend (especially in a long block of code.)
> Structures have a beginning so you know you're in a structure.  Even if the
> code scrolls of the end of the page, you already know the eventuality.
> 
> With GOTO all you see at the beginning of a loop is a label.  That label
> doesn't tell you, you are about to enter a loop.  Your comprehension will
> require you to examine more code.
> 
> You could also minimize by taken out the structure, just use GOTO's
> everywhere.  It's largely a matter of taste, but I prefer using structured
> code.  YMMV.
> 
> I'd like to talk about loops.  You may think I'm just in love with my idea
> (which I admit is partly true) but there are good reasons for my proposal.
> I don't believe any on this forum will have any trouble judging the merits
> or speaking their mind about it.  Some may even oppose an idea not for the
> idea itself but because of who proposes it (which I think is a rather sad
> thing.)
> 
> It's been noted that FOR loops are an addition to Euphoria which originally
> had just while loops.  I've used FOR loops so much that I don't give it a
> thought usually about whether they should be included or not, but thinking
> minimally (don't include what you don't need) I realize there's a good
> reason for not having them.  Let me start with the while loop and get back
> to the for.
> 
> while (1)
>    ...
> end while
> 
> I would claim that quicker comprehension occurs with this construct...
> 
> Loop
>    ...
> End Loop
> 
> Both are infinite loops.  Yes, it's not much quicker to comprehend, we're
> not dolts after all, but after examining thousands of lines of code, by 
> 3am I betcha that it becomes a bit more significant.
> 
> I would also claim (without support, just my INTJ assertiveness again) that
> comprehension is better when Loop is used to describe Loop, rather than any
> other _____ is a loop.  Call me crazy.
> 
> Now, how about getting out of the loop?  Some language provide a plethora
> of ways and are thinking of new ways all the time no doubt (programmers are
> such a creative bunch after all.)  The fact that sometimes you need to get
> out of loops and the beginning, the end, the middle has led to repeat, until,
> etc.  But for a minimalist the answer is right there, IF.  You need something
> like EXIT to be used with the IF, but IF eliminates the need for any 
> additional unneeded keywords because you can put the IF test anywhere in the
> loop; beginning, middle and end.  Exit tells you immediately that you are
> leaving the loop you are currently in.  Exit 12, on the other hand, is an
> offramp in New Jersey I think!
> 
> What about FOR.  What does FOR add to the game that LOOP doesn't give you
> already?  FOR gives you an INDEX.  What a great idea.  But perhaps
> if a minimalist were trying to add an implicit INDEX he or she might have
> realized you don't need to add FOR at all!
> 
> Loop
>    ...
> End Loop
> 
> There it is, did you see it?  Looks like anticomprehesion time, doesn't it?
> Never fear, I'll get back to that in a moment.
> 
> FOR gives you more than just INDEX.  You can tell where to start, where to
> end and how much to increment by.
> 
> For LOOP to have a start you'd have to do something like this...
> 
> Loop from 5
> 
> End Loop
> 
> Well why not?  This also gives us something else...
> 
> Loop
>   ...
> End Loop
> 
> ...under the covers can become...
> 
> :Loop
>    ...
> GOTO Loop
> 
> And now quicker comprehension because the lack of from indicates no INDEX
> at all.  It does however require the idiom  Loop from 1, but I don't think
> that's such a big deal.  Idioms foster comprehension too.
> 
> Other languages use STEP where Euphoria uses BY...  I really like BY.  I
> don't know why, I just do.  So we keep it...
> 
> Loop from 10 by 5
> 
> As long a we understand the INDEX is implicit (with only Loop for loops that
> comprehension will come rathe quickly.  We don't have any other type of loop
> to cause confusion.)
> 
> But how about the end of the loop?  With FOR I specify the end in the
> declaration.  We minimalist don't need it.  We already have IF (cond) Exit.
> 
> Again I would restate that use of a single loop construct would make
> comprehension quicker and would be reinforced with each subsequent use.
> 
> I stated my case for the two issues I've brought up before (somebody got
> a fire extinguisher handy???)
> 
> Am I in love with my ideas.  Sure, why not?  Can I live with rejection.
> Yeah, I suppose.  I'll just go into a corner and sulk for awhile.... blink
> 
> The biggest problem is that taken up my proposal requires change.  Change
> is not easy.  No, better to say, change is hard.  One of the really annoying
> things about me is that time often proves me right; by then the sun has
> cooled, the earth has left it's orbit and the guys I was fighting with (in 
> the friendly fashion that programmers do) has left the company.
> 
> But it's not about me.  So please consider the merits regardless of the
> source.
> 
> I would also argue that a minimalist approach makes for a better compiler
> or interpreter but we'd all agree on that, so where's the fun?

Frankly, your approach reminds me of Fortran (any flavour). 
Its superiority in some specific areas of programming has survived programming
concepts and hardware changes. Fortran compilers have been the first to introduce
some advanced features like statistical reshuffling of code to optimise its
speed, etc.

Great and granted.

So you'd get the do i=1,n,step ... end loop, the arithmetic 3 way if and a few
other minimalist thingies.

But if I found Fortran comfortable to program with, I'd use Fortran, nand I
don't. I even downloaded OpenWatcom F77 compiler, just to try my hand. Good for
stuff where speed is more importan than maintainability. But I'd say hardly
better.

CChris

new topic     » goto parent     » topic index » view message » categorize

9. Re: Changes to Euphoria

c.k.lester wrote:
> 
> 
> This is a cool idea. All our loop constructs can be replaced by one simple

And millions of lines of code broken.
 
> 
> Loop [from x by y] -- default is from 1 by 1 and optional
>   -- put code here to emulate "for" loop
>   if Loop = 10 then exit end if 
>   -- code here for "while" loops
> End Loop
>

The above loop is simple but now go to something like

for a = 1 to length(lines) do ....

Now you are evaluating the length of lines over and over and over again.
Granted, length is stored in the sequence but some other calculation.
 
If that's what you want, you can do it via

while 1 do
end while

If you have trouble typing that, you can use an editor that will expand loop to
while 1 do.. Most decent editors do that.

--
Jeremy Cowgar
http://jeremy.cowgar.com

new topic     » goto parent     » topic index » view message » categorize

10. Re: Changes to Euphoria

ken mortenson wrote:
> 
> 
> You can achieve much of this by the minimalist approach.
> 

I'm going to go out on a limb here and suggest that Euphoria is not a minimalist
programming language. That should solve all of this debate?

--
Jeremy Cowgar
http://jeremy.cowgar.com

new topic     » goto parent     » topic index » view message » categorize

11. Re: Changes to Euphoria

ken mortenson wrote:
> 
> while (1)
>    ...
> end while
> 
> I would claim that quicker comprehension occurs with this construct...
> 
> Loop
>    ...
> End Loop
> 
> Both are infinite loops.  Yes, it's not much quicker to comprehend, we're
> not dolts after all, but after examining thousands of lines of code, by 
> 3am I betcha that it becomes a bit more significant.

Incorrect.  The lack, at the beginning, of the indicator as to finality means I
must open up a stack in my brain as I see Loop.  And I can't pull from that stack
until perhaps much later.  Bad idea.

> Now, how about getting out of the loop?  

> But for a minimalist the answer is right there, IF.  You need something
> like EXIT to be used with the IF, but IF eliminates the need for any 
> additional unneeded keywords because you can put the IF test anywhere in the
> loop; beginning, middle and end.  

Your beginning and my beginning are different.  I want it at **THE** beginning. 
Not on the next line, indented or not.  I want to comprehend as much of the logic
that is being proposed, as quickly as possible, without having to span additional
lines (sometimes pages and pages of lines) until I get to a test intended to
allow for exit.

Even if you *allow* such specification at the very beginning, it sounds like you
would also *allow* it many lines later.  All arguments that rail against GOTO
rail against separating the exit test from the definition.  I can do that now
with a while(1) loop.  I don't want to HAVE to do it for all loops.

> Exit tells you immediately that you are
> leaving the loop you are currently in.  

For my compiler (read: brain) to do anything "immediately" I must see the
conditional test.  If that doesn't appear until many lines of code later, I can't
do it *immediately*.

If this idea had merit, all loops would be while(1) loops, which we already
have, and are avoided unless necessary by virtually everybody.

> But it's not about me.  So please consider the merits regardless of the
> source.

I see no merit, no matter the source.

Mike

new topic     » goto parent     » topic index » view message » categorize

12. Re: Changes to Euphoria

Jeremy Cowgar wrote:
> 
> ken mortenson wrote:
> > 
> > 
> > You can achieve much of this by the minimalist approach.
> > 
> 
> I'm going to go out on a limb here and suggest that Euphoria is not a
> minimalist
> programming language. That should solve all of this debate?
> 
> --
> Jeremy Cowgar
> <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a>

Well, not as minimalist as C or as Ken's proposals, but...

I'm good with while and for and (eventually) foreach.

--
A complex system that works is invariably found to have evolved from a simple
system that works.
--John Gall's 15th law of Systemantics.

"Premature optimization is the root of all evil in programming."
--C.A.R. Hoare

j.

new topic     » goto parent     » topic index » view message » categorize

13. Re: Changes to Euphoria

CChris wrote:

> Frankly, your approach reminds me of Fortran (any flavour). 

Wow.  That's not a response I expected.  Although defining 5=6 in Fortran
did make for interesting debug sessions with friends.

> Its superiority in some specific areas of programming has survived programming
> concepts and hardware changes. Fortran compilers have been the first to
> introduce
> some advanced features like statistical reshuffling of code to optimise its
> speed, etc.
> 
> Great and granted.
 
> So you'd get the do i=1,n,step ... end loop, the arithmetic 3 way if and a few
> other minimalist thingies.

I believe you are confusing terse syntax with minimalism (you are free to
disagree, my opinions and assertions are just vibrations in the wind.)

> But if I found Fortran comfortable to program with, I'd use Fortran, nand I
> don't. I even downloaded OpenWatcom F77 compiler, just to try my hand. Good
> for stuff where speed is more importan than maintainability. But I'd say
> hardly
> better.
> 
> CChris

Chris, with all due respect (this is not presymbolic language folks, when I
say with respect it has profound meaning to me) I believe you've just set
up a straw man argument.

1) Only fools would program in FORTRAN these days.
2) Ken's ideas are just repackaged FORTRAN.
3) Ken is a fool.

Thanks for playing.

Am I being unfair in my assessment?

new topic     » goto parent     » topic index » view message » categorize

14. Re: Changes to Euphoria

ken mortenson wrote:
>  
> 1) Only fools would program in FORTRAN these days.
> 2) Ken's ideas are just repackaged FORTRAN.
> 3) Ken is a fool.
> 
> Thanks for playing.
> 
> Am I being unfair in my assessment?

Ken,

We have had enough arguments on the forum for a while. Can we just discuss
programming issues? There are people here trying to solve problems, trying to ask
questions and get answers, i.e. what the forum is designed to do but their
messages are lost in ones like this.

--
Jeremy Cowgar
http://jeremy.cowgar.com

new topic     » goto parent     » topic index » view message » categorize

15. Re: Changes to Euphoria

Jeremy Cowgar wrote:

> We have had enough arguments on the forum for a while. Can we just discuss
> programming
> issues? There are people here trying to solve problems, trying to ask
> questions
> and get answers, i.e. what the forum is designed to do but their messages are
> lost in ones like this.

I agree with your sentiment Jeremy.  I'm not trying to start another fight.
It just seems weird that my proposal would be likened to FORTRAN.  This is
a deep and profound misunderstanding of minimalist goals which are best
embodied in that universally recognized stupid fool, Albert Einstein...

...as simple as possible, no simpler.

My thoughts may not be welcome, yet still be of value.

I've had bosses that only liked an idea if it was their idea.  In one
case, I'd have to take him to lunch, fill him with Hennesseys and by
the end of lunch he was trying to convince me to do my idea because
by then it was his idea.  Life is weird and doesn't work the way you'd
expect.  If only we had the source code to humanity, perhaps we could
fix it?

I don't want to fight.  I don't want my ideas labeled stupid when they
are reasonable either.  This proposal is a modest one.  How well it does
will be a great indicator of how welcome more profound ideas of mine will
be accepted.  I'm not going to lose any sleep if nobody likes it.  But
the ways it is or will be attacked is very revealing to me.

I can face a thousand challenger to an idea, but only the one that is 
truly reasonable is going to have an impact.  I'm not attacking the
messenger but I'm not so sure others will have that same restraint.

Judge for yourself of course.  No, I do not want to fight.

new topic     » goto parent     » topic index » view message » categorize

16. Re: Changes to Euphoria

Jeremy Cowgar wrote:

> for a = 1 to length(lines) do ....
> 
> Now you are evaluating the length of lines over and over and over again.
> Granted,
> length is stored in the sequence but some other calculation.

length(lines) is part of initialization.  Only an inexperienced coder would
put it inside the loop.  To be explicit...

LineLength=length(lines)
Loop
  if (a>LineLength) Exit
End Loop

Yes, we have an explicit var instead of an implicit one.  I don't have a
problem with that.

new topic     » goto parent     » topic index » view message » categorize

17. Re: Changes to Euphoria

ken mortenson wrote:

my bad...
> LineLength=length(lines) a=1
> Loop a+=1
>   if (a>LineLength) Exit
> End Loop
> 
> Yes, we have an explicit var instead of an implicit one.  I don't have a
> problem with that.

new topic     » goto parent     » topic index » view message » categorize

18. Re: Changes to Euphoria

ken mortenson wrote:
> 
> are reasonable either.  This proposal is a modest one.  How well it does
> will be a great indicator of how welcome more profound ideas of mine will
> be accepted.  

Ken, I think the real debate is not how good or how bad your ideas are it is
does it fit into the purpose of Euphoria. I stated previously and was waiting for
a response ...

"I'm going to go out on a limb here and suggest that Euphoria is not a
minimalist programming language. That should solve all of this debate?"

Euphoria is not a minimalist language but you are proposing that it be. The
people here do not want a minimalist language. They like Euphoria syntax. Be it
wrong or right in your eyes, that is Euphoria and that's why people are here
using it, because they like that.

I am not telling you to leave, even if I wanted to (which I do not), I have no
authority to do that. But I can suggest that if so far what you have outlined is
what you think the one true language is, you may be wasting your time here. I say
that to save you time, not to be mean or cruel.

Some of your suggestions about Euphoria may be right or wrong, but it would be
like suggesting to Python that they adopt Ruby syntax. The fact they are python
programmers is they like their syntax.

I'm just trying to figure out the root problem here. That's all.

--
Jeremy Cowgar
http://jeremy.cowgar.com

new topic     » goto parent     » topic index » view message » categorize

19. Re: Changes to Euphoria

Jeremy Cowgar wrote:

> Euphoria is not a minimalist language but you are proposing that it be. The
> people here do not want a minimalist language. They like Euphoria syntax. Be
> it wrong or right in your eyes, that is Euphoria and that's why people are
> here
> using it, because they like that.

Jeremy, I think your a fair individual.  You may be surprised to find that
I'm not really a minimimist either.  I do appreciate some of it's concepts.

The truth is, I don't want to give up FOR loops either.  I've been using
them faithfully since before GWBasic.  6 years before actually.

> I am not telling you to leave, even if I wanted to (which I do not), I have
> no authority to do that. But I can suggest that if so far what you have
> outlined
> is what you think the one true language is, you may be wasting your time here.
> I say that to save you time, not to be mean or cruel. 

Well, that's about the kindest boot in the ass I've ever gotten.  Don't
worry, I don't lose sight of my goals.  I'm not sure why I'm here, other
than community.  Yes, I'd like my vision of the IDE and compiler to be
realized and I've fallen in love with sequences (which is a hard love,
APL requires a new keyboard.)

I have no delussions that Euphoria will somehow morph into my vision.
Sometimes you have to expose your ideas to the world to see the response.
I want to thank all those that have sent me letters of encouragement,
it was... nice, surprising and touching.  I would not betray names, that
wouldn't be right.  I have an out of style send of honor.

I will probably test the waters a bit longer.  It would only be fair
that those with need have the opportunity of such new experiences.

new topic     » goto parent     » topic index » view message » categorize

20. Re: Changes to Euphoria

ken mortenson wrote:
> 
> Chris, with all due respect (this is not presymbolic language folks, when I
> say with respect it has profound meaning to me) I believe you've just set
> up a straw man argument.
> 
> 1) Only fools would program in FORTRAN these days.
> 2) Ken's ideas are just repackaged FORTRAN.
> 3) Ken is a fool.
> 
> Thanks for playing.
> 
> Am I being unfair in my assessment?

I would have characterized his assessment a bit differently:

1) CChris doesn't like to code in FORTRAN
2) Ken's ideas somehow remind CChris of FORTRAN
3) CChris wouldn't like to program in a language that followed Ken's ideas

Matt

new topic     » goto parent     » topic index » view message » categorize

21. Re: Changes to Euphoria

Matt Lewis wrote:
> 
> ken mortenson wrote:
> > 
> > Chris, with all due respect (this is not presymbolic language folks, when I
> > say with respect it has profound meaning to me) I believe you've just set
> > up a straw man argument.
> > 
> > 1) Only fools would program in FORTRAN these days.
> > 2) Ken's ideas are just repackaged FORTRAN.
> > 3) Ken is a fool.
> > 
> > Thanks for playing.
> > 
> > Am I being unfair in my assessment?
> 
> I would have characterized his assessment a bit differently:
> 
> 1) CChris doesn't like to code in FORTRAN
> 2) Ken's ideas somehow remind CChris of FORTRAN
> 3) CChris wouldn't like to program in a language that followed Ken's ideas
> 
> Matt

I stand corrected.  Thanks Matt.

new topic     » goto parent     » topic index » view message » categorize

22. Re: Changes to Euphoria

Jeremy Cowgar wrote:
> 
> MBianchi wrote:
> > 
> > I was first attracted to Eu for speed, and for the ability to use an
> > interpreter
> > *and* a real compiler, but the most important feature of the language soon
> > became
> > its 'devotion' to sequences.
> > 
> 
> Me too!
> 
> > This made me (erroneously?) think that Eu could have its place in vector
> > languages,
> > like APL, J, K, Q etc. etc., with its own character and extentions toward
> > procedural
> > languages, but nevertheless in the array languages pool.
> > 
> 
> I'm sorry. I've played with many, many languages but all of the ones you
> listed,
> I have not. Honestly, I do not know what a vector language is.
> 
> > Reading past threads I noticed that Rob himself had a deep experience with
> > APL,
> > so some sort of inheritance of good ideas from it could be a supposition
> > even
> > more reasonable.
> > 
> > In all recent discussions I saw on Euforum, I did not see any proposal for
> > better
> > sequence ops, or some improvements on sequencing in itself though, but many,
> > reasonable or not, I'm not in the position of expressing an honest opinion,
> > about procedural structures.
> 
> There is a new library called sequence.e which contains many functions that
> work on sequences. I am unsure if any of those would be what you are thinking,
> since I am not experienced in vector languages.
> 
> > Just out of curiosity, am I totally wrong in thinking Eu in the vector
> > language
> > family, or are Eu sequences already at the best we can achieve (really, no
> > flame
> > intended at all), or ...?
> > 
> 
> Can someone else answer this who understands vector languages?
> 
> --
> Jeremy Cowgar
> <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a>


Haven't read this whole thread yet, but found this reference which also
mentions Euphoria:

http://c2.com/cgi/wiki?CollectionOrientedProgramming

it's from:

http://c2.com/cgi/wiki?ArrayOrientedLanguage

Dan Moyer

new topic     » goto parent     » topic index » view message » categorize

23. Re: Changes to Euphoria

ken mortenson wrote:
> 
> CChris wrote:
> 
> > Frankly, your approach reminds me of Fortran (any flavour). 
> 
> Wow.  That's not a response I expected.  Although defining 5=6 in Fortran
> did make for interesting debug sessions with friends.
> 

Interesting...

> > Its superiority in some specific areas of programming has survived
> > programming
> > concepts and hardware changes. Fortran compilers have been the first to
> > introduce
> > some advanced features like statistical reshuffling of code to optimise its
> > speed, etc.
> > 
> > Great and granted.
>  
> > So you'd get the do i=1,n,step ... end loop, the arithmetic 3 way if and a
> > few
> > other minimalist thingies.
> 
> I believe you are confusing terse syntax with minimalism (you are free to
> disagree, my opinions and assertions are just vibrations in the wind.)
> 

How do you get minimalism in a language without terse syntax, and many lines to
implement the simplest construct?
Admittedly, a language may have terse syntax while not being minimalistic - I
thin to APL.

You'll admit the border area is quie blurred, unless you have precise
definitions, which it would help to state explicitly.

> > But if I found Fortran comfortable to program with, I'd use Fortran, nand I
> > don't. I even downloaded OpenWatcom F77 compiler, just to try my hand. Good
> > for stuff where speed is more importan than maintainability. But I'd say
> > hardly
> > better.
> > 
> > CChris
> 
> Chris, with all due respect (this is not presymbolic language folks, when I
> say with respect it has profound meaning to me) I believe you've just set
> up a straw man argument.
> 
> 1) Only fools would program in FORTRAN these days.
> 2) Ken's ideas are just repackaged FORTRAN.
> 3) Ken is a fool.
> 
> Thanks for playing.
> 
> Am I being unfair in my assessment?

Not unfair, but quite off the spot.

My thoughts are more along this:
1/ Only speed freaks, or people who need the speed for specific applications,
program in Fortran today, in spite of its being much harder to maintain. And they
are by no means fools, since they are able to maintain that.
2/ Ken has been/is/was closr to this school of programming
3/ Ken's experience is different from mine, and from most Eu users' as well.
Even though my programming experience is probably quite different from most Eu
users' as well.

CChris

new topic     » goto parent     » topic index » view message » categorize

24. Re: Changes to Euphoria

ken mortenson wrote:
> 
> Thoughts inspired by Jason and Jeremy's discussion...
<SNIP>
> while (1)
>    ...
> end while
> 
> I would claim that quicker comprehension occurs with this construct...
> 
> Loop
>    ...
> End Loop
> 
<SNIP>
> 
> What about FOR.  What does FOR add to the game that LOOP doesn't give you
> already?  FOR gives you an INDEX.  What a great idea.  But perhaps
> if a minimalist were trying to add an implicit INDEX he or she might have
> realized you don't need to add FOR at all!
> 
> Loop from 10 by 5
>    ...
> End Loop
> 
<SNIP>

1) You suggestion looks nice, Yet incomplete.
   Explained below:
2) Replacing or Removing the current while and for
   loop structures will make virtually all break
   virtually every current euphoria program.

Incomplete Explained:
    You don't show using the index values.
Someone suggested or assumed that it would be Loop.
Thusly: 
Loop from 1 by 1
  ? Loop
End Loop


The problem is with nested Loops.
for iy = 1 to 5 do
  for ix = 1 to 5 do
    print(1, {iy, ix})
  enf for
  puts(1, 10)
end for


    Best Regards,
    Lucius L. Hilley III - Unkmar

new topic     » goto parent     » topic index » view message » categorize

25. Re: Changes to Euphoria

CChris wrote:

> How do you get minimalism in a language without terse syntax, and many lines
> to implement the simplest construct?

Chris, I'm not just glad you asked this question I'm ecstatic.  My cable
modem is flaking our on me at the moment, so I hope I can respond in one shot.

There's a lot of confusion being expressed about what minimalism is and
frankly, I think different people have a different definition.  But for me
it's embodied in the phrase that some may have difficulty parsing...

...as simple as possible, no simpler.

I don't hold completely to the first part.  To me, 'as possible' is not
to be taken to extreme.  For me, the no simpler part is the deal braker.

Regarding terseness, some people think minimalist refers to key strokes.
It doesn't.  It refers to functionality.  Being able to read your own code
a week later also plays into it.  So do I want to eliminate FOR loops?

Never.  They are very practical and easy to comprehend.  But the most
important point from a minimalist perspective is they do add something
that is near and dear to a minimalists heart... they reduce clutter!

Perhaps some will say I'm not a pure minimalist and perhaps they are right.

But I hold the principle of less clutter in very high regard.

Take for example strings.  VB strings are horrible.  You don't want to do
string manipulation in a loop.  The performance impact is incredible.  How
do I know?  Because I've written a string class that I use in situations
that require performance and it gives me about a 20x increase in speed.

A minimalist keeps his focus on results.  How am I able to day in and day
out produce over a thousand lines of good code in VB?  I couldn't if the
language didn't have sufficient capability that I was constantly having to
invent the functionality.  I also couldn't do it if my job involved
interface work all the time, which involves research; an entirely different
thing from being creative in a language or writing business logic.

Give me functionality.  Don't put roadblocks in my way.  One roadblock that
reduces my efficiency as a programmer is twelve ways to do essentially the
same thing.

I'm a very safe driver, but I don't have to think much to do it.  I've been
described by programmers I work with as writing rock solid, bullet proof
code.  I don't have to expend an extreme amount of concentration to do that
either.  Because my tool is comfortable and has sufficient functionality in
most cases.  Where it fails, I try to create a solution, like my string
class.

I'm not the fastest coder.  I worked with some phenominal people that make
me look like a sloth where lines of code produced daily are concerned.

But for me (and YMMV) being a practical minimalist makes me very 
efficient.  I like that.

I have another expression I use.  Supermen make bad programmers.  Always
trying to be smarter than the other guy.  Writing tricky code.  My code
is hardly ever tricky.  I'm writing to an audience of other professionals
that I have a high regard for.  So I try to write as clear as I am able.

Terseness often makes code harder to read.  So I like it simple, but not
too simple.  In this case I'm not specifically refering to functionality.

I hope I've given you some insight into my thought process.

new topic     » goto parent     » topic index » view message » categorize

26. Re: Changes to Euphoria

Lucius L. Hilley III wrote:
 
> 1) You suggestion looks nice, Yet incomplete.
>    Explained below:
> 2) Replacing or Removing the current while and for
>    loop structures will make virtually all break
>    virtually every current euphoria program.
> 
> Incomplete Explained:
>     You don't show using the index values.
> Someone suggested or assumed that it would be Loop.
> Thusly: 
> }}}
<eucode>
> Loop from 1 by 1
>   ? Loop
> End Loop
> </eucode>
{{{

> 
> The problem is with nested Loops.
> }}}
<eucode>
> for iy = 1 to 5 do
>   for ix = 1 to 5 do
>     print(1, {iy, ix})
>   enf for
>   puts(1, 10)
> end for
> </eucode>
{{{

> 
>     Best Regards,
>     Lucius L. Hilley III - Unkmar

Thank you Lucius (and please to me ya!)  Your question is specific enough
to make it easier to respond to.  Something I try but often fail to fully
achieve.  I appreciate it.

I think the FOR loop should be retained for precisely the reasons you've
outlined, but I'm going to be more specific in a moment (damn cable modem
again, grrrr...)

I'd also retain while(1) for the reasons other have given, to not break
existing code.  Frankly, if my ideas are ever to come to fruition it will
likely be the result of a clean sheet approach (which I certainly am not
ready to jump into at this point.)

I would add Loop...End Loop to Euphoria, because we already have it's
complete functionality covered by WHILE and FOR (this is the practical
minimalist in me kicking in!)

Having said all that, let me respond to your specific issues.  I don't like
the idea of overloading Loop to be the name of the Index.  I prefer to call
the Index some other name.  Let me see, what would I call it?  (give me a
break, I don't do stand up for a living!)  Suspense over, I prefer the
name Index, partly because I'm appalled at single letter var names like i.
That's the maintenance programmer in me.  Try to find all the references to
i in somebodies ten page function and you'd know what I'm talking about.

BTW, basic overloads the return value of a function the same way and I much
prefer the RETURN idiom.  I'd also like to not have RETURN in a routine that
reaches it's end, but I digress.

For nested loops, my Loop...End Loop would general require assignment to
a variable because as you enter another level of nesting it goes out of
scope (an var with the same name, Index or whatever, is created for each
level of nesting and is visible only at it's level.)

Let me repeat the example and hopefully the discussion above makes it
a bit clearer...

Loop from 1
  x=Index  -- x will get the values 1,2,3,4,5
  Loop from 2 by 2
    y=Index         -- y will get the values 2,4,6
    if (y>5) Exit
  End Loop
  if (x>4) Exit
End Loop

If you did this...

Loop from 1
  if (Index>4) Exit
  x=Index  -- x will get the values 1,2,3,4
  Loop from 2 by 2
    if (Index>5) Exit
    y=Index         -- y will get the values 2,4
  End Loop
End Loop

Hopefully the difference is clear.  Does that help?

new topic     » goto parent     » topic index » view message » categorize

27. Re: Changes to Euphoria

ken mortenson wrote:

> I would add Loop...End Loop to Euphoria, because we already have it's
> complete functionality covered by WHILE and FOR (this is the practical
> minimalist in me kicking in!)

This is a typo folks, I would NOT add Loop which the second part should
have made clear regardless of my brain fart.  Don't get excited.

new topic     » goto parent     » topic index » view message » categorize

28. Re: Changes to Euphoria

ken mortenson wrote:
> >     Best Regards,
> >     Lucius L. Hilley III - Unkmar
> 
> Thank you Lucius (and please to me ya!)

Should have been, Pleased to meet ya (you).  I'm blaming my cable modem which
is forcing me to repeatedly reboot both the modem and my computer.  The
lights indicate it's got a good connection to the central office, but the PC
and modem don't seem to be playing nice today...

That's my story and I'm sticking to it.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu