1. Subversion Repository for Euphoria

I have now managed to set up a Subversion repository
for Euphoria on SourceForge. I imported all of the
files in my (extended) C:\Euphoria directory, including the
source code, demo programs, standard included files, htx
subdirectory etc. so anyone can check out the latest 
development version of these files.

The Euphoria project is located at:

   http://sourceforge.net/projects/rapideuphoria

Under the Code menu on that page you will find:
   Subversion
   Subversion Browse
   Subversion Stats

The SourceForge documentation for Subverson is at:
   http://sourceforge.net/docs/E09

If you want to check-out or check-in files
using Windows, I recommend that you install 
the TortoiseSVN GUI Subversion client. It extends
the file browsing capabilities of XP so it's
easy to check things in and out, and do other
SVN operations as well.

If you wish to be enabled as a developer on the project,
with write permission, let me know. I'll accept any trustworthy 
person who seems to know what they are doing. Developers 
will use Subversion check-in/check-out to avoid stepping
on each other's toes.

If you want to modify the Euphoria package, you should 
post a message here so we can all discuss whether 
it's a good idea or not. Some things people have
already done, like porting to a new platform, 
extending the Translator to handle more C compilers, or
improving the installation process, are not too controversial,
and I would rubber stamp them, as long as they do not
cause damage to existing functionality, for instance
as long as the new code is properly contained 
inside #ifdef's for that platform. I'm hoping those people
will check out the relevant source, test their changes,
and check in the new source without needing too much
assistance from me.

Since most of us are just learning to use Subversion,
I'm sure we'll have a few problems initially, and
we might even have to start over at some point.
I'm hoping eventually that several good developers will
emerge, and things won't depend on me so much.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » topic index » view message » categorize

2. Re: Subversion Repository for Euphoria

Robert Craig wrote:
> 
> I have now managed to set up a Subversion repository
> for Euphoria on SourceForge. I imported all of the
> files in my (extended) C:\Euphoria directory, including the
> source code, demo programs, standard included files, htx
> subdirectory etc. so anyone can check out the latest 
> development version of these files.

Excellent.  I've got my copy checked out.

> If you want to modify the Euphoria package, you should 
> post a message here so we can all discuss whether 
> it's a good idea or not. Some things people have
> already done, like porting to a new platform, 
> extending the Translator to handle more C compilers, or
> improving the installation process, are not too controversial,
> and I would rubber stamp them, as long as they do not
> cause damage to existing functionality, for instance
> as long as the new code is properly contained 
> inside #ifdef's for that platform. I'm hoping those people
> will check out the relevant source, test their changes,
> and check in the new source without needing too much
> assistance from me.

I think one of the first things we should do is to format the code
to make it easier to work with.  Rob, you write some really good 
code, but the indenting and such is inconsistent, and that makes it
difficult to work with.

Matt

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

3. Re: Subversion Repository for Euphoria

Matt Lewis wrote:
> Robert Craig wrote:
> > I have now managed to set up a Subversion repository
> > for Euphoria on SourceForge. I imported all of the
> > files in my (extended) C:\Euphoria directory, including the
> > source code, demo programs, standard included files, htx
> > subdirectory etc. so anyone can check out the latest 
> > development version of these files.
> 
> Excellent.  I've got my copy checked out.

Good. I've added you as a developer.
You probably know more about SourceForge and SVN
than I do right now, so don't hesitate to straighten
me out if I make a mistake.

> > If you want to modify the Euphoria package, you should 
> > post a message here so we can all discuss whether 
> > it's a good idea or not. Some things people have
> > already done, like porting to a new platform, 
> > extending the Translator to handle more C compilers, or
> > improving the installation process, are not too controversial,
> > and I would rubber stamp them, as long as they do not
> > cause damage to existing functionality, for instance
> > as long as the new code is properly contained 
> > inside #ifdef's for that platform. I'm hoping those people
> > will check out the relevant source, test their changes,
> > and check in the new source without needing too much
> > assistance from me.
> 
> I think one of the first things we should do is to format the code
> to make it easier to work with.  Rob, you write some really good 
> code, but the indenting and such is inconsistent, and that makes it
> difficult to work with.

Cleaning up the code cosmetically sounds like a good idea,
but when you say the indenting is inconsistent, I wonder
what editor you are using, and if you have the tab stops
set to 4 like I do. I still use ed most of the time, and 
the indents seem to be fairly consistent, though when there
are lots of #ifdef's things can get very messy looking.
Maybe you can post an example of a routine that looks
inconsistent in your editor. (Though don't be surprised if
the indents do not show up properly here.)

Having a few coding standards is a good idea,
though with a diverse group of people they might be hard
to enforce if they are too detailed. They might also
tend to discourage new people from submitting code.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

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

4. Re: Subversion Repository for Euphoria

Hi Rob.
I also use ed not only to edit Euphoria source code but for other simple
editing tasks.
However, I think ed indenting is inconsistent because when you edit with
 another editor Euphoria source files generated by ed then the tabs get
messed up.
I think this is because ed uses tabs in certain cases and spaces in other
circumstances, for the same file.
I've found that the best way to deal with inconsistent indenting and
general tabbing is to not use tab characters at all, replacing them by
spaces.
Please correct me if I am wrong on this issue.
Regards.

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

5. Re: Subversion Repository for Euphoria

Matt:

   Wouldn't be much easier to break the code out
   into a code listing for Windows,Linux and Dos.

   I understand why Rob did this was to make it easier
   for him to maintain all the versions easier.

   But the way the code is written it is a rats nest to follow
   when you have to concentrate on Windows only or some
   other OS when you have to wade through all the #defines.

   This will have to be done some time in the future anyway to
   build a compiler or build an OOP version.
        

Bernie

My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

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

6. Re: Subversion Repository for Euphoria

Ricardo M. Forno wrote:
> However, I think ed indenting is inconsistent because when you edit with
>  another editor Euphoria source files generated by ed then the tabs get
> messed up.
> I think this is because ed uses tabs in certain cases and spaces in other
> circumstances, for the same file.

Unless you change ed.ex, ed uses tab=4 for Euphoria files 
as well as .c and .h files. This lets you easily indent your 
Euphoria or C code, at 4 spaces per indent *while you are editing*.

When you save a file with ed, it converts to tab=8,
so two leading tab4's on a line of source in the editor 
become one tab8 in the file. I did it this way because 
most of the Linux and Windows world assumes 
that a tab stored in a file means tab=8. Most editors 
let you change this, but many people just leave it as 
tab=8, and many printers also assume tab=8. I think
some editors have a "soft tab" that might be 4 when you are typing, 
while a "hard tab" in a file means 8.

I recall, at the start of a project many years ago,
for a company I used to work for, we had a conflict
because some people used editors with tab=4 and others
used editors with tab=8. Most people agreed that
4 spaces per indent was probably better than 8 spaces,
but we had to get everyone to set their editors to
tab=4, rather than having some people type, say, 
one tab plus 4 spaces to indent 3 levels, while others
typed 3 tabs.

> I've found that the best way to deal with inconsistent indenting and
> general tabbing is to not use tab characters at all, replacing them by
> spaces.

I could easily change ed to store source files with all tabs 
replaced by blanks (4 blanks per tab, roughly speaking).
This would eliminate any confusion, while still letting ed
users use the tab key to move 4 spaces, since ed converts
leading whitespace *back* into tabs when you load a program file.
I think I resisted this idea many years ago because it would
waste a bit of space and make scanning of the source file take
a tiny bit longer. (A tab8 can be scanned faster than 8 blanks).

I propose that we keep indenting the Euphoria and C source
code at 4 spaces per indent, but I'm open to suggestion on 
how we can avoid "tab wars".

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

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

7. Re: Subversion Repository for Euphoria

Create a tool that formats code in a standardized and commonly acceptable way.
Then people can write and submit as much ugly code as they want to.

Chris Bensler
~ The difference between ordinary and extraordinary is that little extra ~
http://empire.iwireweb.com - Empire for Euphoria

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

8. Re: Subversion Repository for Euphoria

Robert Craig wrote:
> 
> Ricardo M. Forno wrote:
> > However, I think ed indenting is inconsistent because when you edit with
> >  another editor Euphoria source files generated by ed then the tabs get
> > messed up.
> > I think this is because ed uses tabs in certain cases and spaces in other
> > circumstances, for the same file.
> 
> Unless you change ed.ex, ed uses tab=4 for Euphoria files 
> as well as .c and .h files. This lets you easily indent your 
> Euphoria or C code, at 4 spaces per indent *while you are editing*.
> 
> When you save a file with ed, it converts to tab=8,
> so two leading tab4's on a line of source in the editor 
> become one tab8 in the file. I did it this way because 
> most of the Linux and Windows world assumes 
> that a tab stored in a file means tab=8. Most editors 
> let you change this, but many people just leave it as 
> tab=8, and many printers also assume tab=8. I think
> some editors have a "soft tab" that might be 4 when you are typing, 
> while a "hard tab" in a file means 8.

OK, I think this explains my perceived inconsistency.  My editor is set to
use tab=4, and some of your lines come up as 4 spaces and some as tabs.  
So it was looking like the tabs weren't properly indented, and the spaces
seemed strangely out of place (though now I understand them).

> I propose that we keep indenting the Euphoria and C source
> code at 4 spaces per indent, but I'm open to suggestion on 
> how we can avoid "tab wars".
> 

Yeah, I'm open to whatever, so long as we're consistent.

Matt

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

9. Re: Subversion Repository for Euphoria

Bernie Ryan wrote:
> 
> 
> Matt:
> 
>    Wouldn't be much easier to break the code out
>    into a code listing for Windows,Linux and Dos.
> 
>    I understand why Rob did this was to make it easier
>    for him to maintain all the versions easier.

No kidding.  It would be a real nightmare to have to split and merge
the code base based on platform specific code.
 
>    But the way the code is written it is a rats nest to follow
>    when you have to concentrate on Windows only or some
>    other OS when you have to wade through all the #defines.

Most of the defines are in places where most people won't really want
to change too much.  If you're adding a routine or something, you might
not need to worry about any platform specific code at all.  If you're 
trying to change some of the basic I/O behavior, you'll have to do some
wading, but in reality, most of the code is applicable to all platforms.
 
>    This will have to be done some time in the future anyway to
>    build a compiler or build an OOP version.

Yes, and this is basically what I'm doing with ooeu right now, but I'm not
separating the code for different platforms.

Matt

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

10. Re: Subversion Repository for Euphoria

Robert Craig wrote:
> I propose that we keep indenting the Euphoria and C source
> code at 4 spaces per indent, but I'm open to suggestion on 
> how we can avoid "tab wars".

I agree with 4 spaces per indent, and in fact I never use the Tab key at all. 
The act of counting the number of times I'm pushing the space bar is part of my
discipline of indenting.  eg If I have to push space 20 times then it's probably
time to look at making a subroutine...

The editor I use (metapad) has an option for "Insert tabs as spaces", which I
have turned on.  It also inserts the right amount of spaces when enter is
pressed, to line up with where you are at.

I went off tabs in the Linux world, where without messing with the terminfo
files or what have you, tabs are 8 spaces wide which is not good for coding,
IMHO.

Gary

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

11. Re: Subversion Repository for Euphoria

Firstly, if you are using TAB chars, then how big a tab is should be irrelevant.
That's the whole point of using TAB instead of hard spacing.

You will never get everyone to agree on how big an indent should be or how code
should be formatted. People have argued about code style since programming was
invented.

Of course, style guidelines can be imposed for the project, but I think it would
be more practical to create a tool that reformats any contributed code in a
standard way.

Second, what is the purpose of so much whitespace anyways?
Why do most people agree on 4 space TAB. What's wrong with 2 or 3 spaces?
What about varying size based on context and purpose?


Chris Bensler
~ The difference between ordinary and extraordinary is that little extra ~
http://empire.iwireweb.com - Empire for Euphoria

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

12. Re: Subversion Repository for Euphoria

Chris Bensler wrote:
> Firstly, if you are using TAB chars, then how big a tab is should be
> irrelevant.
> That's the whole point of using TAB instead of hard spacing.

That's true as long as people use only tabs for indenting.
Once they start mixing tabs and spaces, then things will be 
messed up when viewed with a different tab setting. For example,
the problem Matt had when viewing code that I saved with ed.
 
> You will never get everyone to agree on how big an indent should be or how
> code
> should be formatted. People have argued about code style since programming was
> invented.

That's true. Everyone likes his own coding style and does not want
to be forced to follow someone else's.

> Of course, style guidelines can be imposed for the project, but I think it
> would
> be more practical to create a tool that reformats any contributed code in a
> standard way.

Perhaps we could run a C and/or Euphoria "beautifier" on the code
once in a while. I read that there are some negatives for running
a beautifer script on each SVN check-in. Also, we might want
certain standards that go beyond what a beautifier can handle.

> Second, what is the purpose of so much whitespace anyways?
> Why do most people agree on 4 space TAB. What's wrong with 2 or 3 spaces?

I've used 3, 8 and for the last several years, 4.
It's purely a subjective thing, but I find that
with 8 you have a lot of lines running off the right
side of the screen. With 2, it's visually harder to line up
the levels of indentation over a long routine. Especially
in C, where '}' is the only block terminator, not "end if"
"end while" etc.

> What about varying size based on context and purpose?

I've never seen much point in varying the indent size.
Consistency promotes readability.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

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

13. Re: Subversion Repository for Euphoria

Robert Craig wrote:
> 
> Chris Bensler wrote:
> > Firstly, if you are using TAB chars, then how big a tab is should be
> > irrelevant.
> > That's the whole point of using TAB instead of hard spacing.
> 
> That's true as long as people use only tabs for indenting.
> Once they start mixing tabs and spaces, then things will be 
> messed up when viewed with a different tab setting. For example,
> the problem Matt had when viewing code that I saved with ed.
>  

When you use tabs to indent programs, you tab the entire line. If, instead,
you are using tabs to align normal text in tabular form (say 1st column
for name, 2nd for address, and so on), not only spaces generate
inconsistencies, bur non-blank characters too, because a tab inserts not
a fixed number of spaces but enough spaces to the next tab stop. You get
fields that don't match when characters overlap a tab stop.
Regards.

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

14. Re: Subversion Repository for Euphoria

why do you guys insist on such a superficial problem? Since Euphoria does not
care the space or TAB, I think every style will be ok if a new src is created,
but SPACE should be used if we do some modification on old src, and TAB for old
TABbed src. The only aim is to keep src clean for reading

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

15. Re: Subversion Repository for Euphoria

oyster wrote:
> 
> why do you guys insist on such a superficial problem? Since Euphoria does not
> care the space or TAB, I think every style will be ok if a new src is created,
> but SPACE should be used if we do some modification on old src, and TAB for
> old TABbed src. The only aim is to keep src clean for reading

Because the problem is not so superficial. If at times you have to go throgh a
source file to clean it, in order to make it more understandable, and you spend
several minutes doing that, then some time was lost.
Regards

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

16. Re: Subversion Repository for Euphoria

Ricardo M. Forno wrote:
> 
> oyster wrote:
> > 
> > why do you guys insist on such a superficial problem? Since Euphoria does
> > not
> > care the space or TAB, I think every style will be ok if a new src is
> > created,
> > but SPACE should be used if we do some modification on old src, and TAB for
> > old TABbed src. The only aim is to keep src clean for reading
> 
> Because the problem is not so superficial. If at times you have to go throgh
> a source file to clean it, in order to make it more understandable, and you
> spend several minutes doing that, then some time was lost.
> Regards

Also, "random" whitespace changes play hell with the repository.

Matt

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

17. Re: Subversion Repository for Euphoria

Matt wrote[1]:
>Random whitespace mods foul up the repository.

Oh yes, these things save diffs rather than complete copies, and this
sort of thing could make each diff larger than (old+new), or at the
very least save complete copies, which it won't like much either.

Just for your info there are known problems with Edita in this area:

As you probably know, Edita has a "Replace tabs with spaces" option;
when this is checked, Edita should't write any tab (#09) characters to
file, instead replace them with spaces up to the next multiple of the
Tab Width setting (which defaults to 4). Loading a file automatically
converts multiple spaces back to tabs appropriate for the tab width
setting, for the duration of the edit.

HOWEVER: When this option is not checked, Edita saves tabs as-is.
It is sortof on my to-do list that Edita should write (and read) tab
chars as if Tab Width=8, converting to your personal preference
on-the-fly. I know that Edita loads eg the original database.e all
wrong, ie:
....if x then
\tdoSomething()

ends up (when Tab Width=4) as:
\tif x then
\tdoSomething()

(Yuk!) when, of course, it should be:
\tif x then
\t\tdoSomething()

and, obviously, get saved back just as it was found.

I also know that a unilateral change on my part may well cause all
manner of wailing and gnashing of teeth. I'm dithering, but I suppose
I should just do it, and have some sort of "Re-load this file wot was
saved (tab-wrongly) with Edita-pre-0.3.0" option, and/or rely on the
(new) re-indent function coming to the rescue. In the end, I think
this has become more of a political than technical thing for me.

I suppose the other thing I can do is announce the planned change 
(HEY! Everyone using EDITA, Listen Up!) and get everyone to check that
"Replace Tabs with Spaces" option now (if Tab Width != 8), to reduce
discomfort next release.

Anyway, what I am saying is that as things stand, anyone thinking of
using Edita to modify repository files should either make sure to save
as spaces (if acceptable) or set their tab width to 8, this should be
carefully tested and a LOUD warning put somewhere based on the
results. Same deal may apply to other popular editors, just thought
I'd better explain the current situation with Edita.

Regards,
Pete
[1] I might be paraphrasing or otherwise slightly mis-quoting there as
I deleted the post before deciding to reply.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu